Skip to content

fix(pull): a pulled team lands in its per-team store, not the shared one - #563

Merged
fujibee merged 1 commit into
integration/remotefrom
fix/pull-per-team
Jul 30, 2026
Merged

fix(pull): a pulled team lands in its per-team store, not the shared one#563
fujibee merged 1 commit into
integration/remotefrom
fix/pull-per-team

Conversation

@fujibee

@fujibee fujibee commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Found while wiring forget: _remote_write_pulled_team never wrote drivers.layout, so pull-bootstrapped teams landed in the shared db/messages.db while connected teams live under db/teams/<team>/. Verified live on the second dogfood machine — its pulled team sits in the shared store with no db/teams/ at all.

Machine B arrives empty, so no external direct-DB reader can depend on a pulled team being in the shared store — the compatibility argument that keeps unconnected teams shared does not apply. Writing layout=per-team before bootstrap restores the invariant that every remote-bound team lives in its own store, which is also what forget (#562) relies on to delete exactly one team's data.

No migration for already-pulled teams: the only installs in that state are our own dogfood ones, which will be refreshed with forget + re-pull once #562 lands.

Regression pins: config selection, db/teams/<team>/messages.db exists, zero rows for the team in the shared store — and drops without the production line.

PR opened on the author's behalf — their sandbox blocks GitHub access.

A second machine starts with an empty local team, so bootstrap can select
the per-team layout before importing any remote history. Recording that
choice in the initial config keeps pull aligned with connect and prevents
remote rows from entering the shared local-only store.

Pin both the selected config and the absence of pulled rows in the shared
database.
@fujibee
fujibee merged commit fded718 into integration/remote Jul 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant