Skip to content

refactor(drivers): rename the layout axis to partition - #580

Merged
fujibee merged 2 commits into
integration/remotefrom
refactor/partition-axis
Jul 31, 2026
Merged

refactor(drivers): rename the layout axis to partition#580
fujibee merged 2 commits into
integration/remotefrom
refactor/partition-axis

Conversation

@fujibee

@fujibee fujibee commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Renames the driver axis layout to partition on integration/remote.

shared and per-team answer how the store is divided, and that is all the axis decides. "layout" covers that and much else — the word is already in this tree for tmux panes, on-disk transcript shapes, screen copy, and install structure — so an axis named after it reads as any of them.

Hard rename, no compatibility shim: integration/remote is unreleased, so nothing in the wild is keyed on the old name.

What changed

The driver directory (scripts/drivers/layout/scripts/drivers/partition/), the drivers.partition config key, the axis argument passed to the registry, partition_store_relpath and the load helper, and the prose describing the axis.

scripts/lib/driver-registry.sh needed nothing structural — it takes the axis as a parameter and never named this one. Only a sentence of prose there mentioned the axis by name.

Finding the sites took four passes, and that is the interesting part

A single grep would have got this wrong in both directions.

  1. Path, config-key, and function-prefix greps — seven files.
  2. Reading the loader rather than grepping it added two more: api.sh and rename-team.sh pass the axis as a bare word (agmsg_driver_for_team layout …), which no layout_-prefix pattern matches.
  3. A full-tree sweep then found a JSON literal in remote.sh (json_object('layout', 'per-team')) and several tests that spell the key inline as "drivers":{"layout":…} — neither matches drivers.layout.
  4. The bare word layout matches 49 files, nearly all of them unrelated. Those were classified by reading, not replaced.

Every remaining layout under scripts/, tests/, and server/ is the ordinary word: tmux panes, CLI-internal transcript shapes, a pre-1.1.0 install structure, field counts.

Tests

bats tests/test_storage.bats tests/test_migrate_team_store.bats tests/test_team.bats tests/test_remote.bats tests/test_remote_forget.bats — 186/187.

The one failure, connect: a keyed team fails closed when the remote disallows age-v1, is not from this change: it fails identically on unmodified integration/remote. Verified by running it on a clean worktree of the base before concluding that.

The axis's own tests pass, including a team on the per-team partition moves, and only that team and an unknown partition is an error, not a fallback.

After landing

Local dogfood installs carry drivers.layout in their team config and need a forget-and-pull or a reinstall to pick up the new key.

fujibee added 2 commits July 31, 2026 11:32
shared and per-team answer how the store is divided, which is what the axis
decides. "layout" covers that and much else — the word already appears in
this tree for tmux panes, on-disk transcript shapes, screen copy, and
install structure, and an axis named after it reads as any of them.

Hard rename, no compatibility shim: integration/remote is unreleased, so
there is no config in the wild keyed on the old name. Local dogfood installs
do carry drivers.layout and need a forget-and-pull or a reinstall.

Renamed: the driver directory, the drivers.partition config key, the axis
argument passed to the registry, partition_store_relpath and the load
helper, and the prose that describes the axis. The registry itself needed
nothing — it takes the axis as a parameter and never named this one.

Enumerating the sites took four passes. Path, config-key and function-prefix
greps found seven files; reading the loader added two more that pass the
axis as a bare argument; a full-tree sweep then turned up a JSON literal in
remote.sh and several tests that spell the key inline. Every remaining
"layout" in scripts, tests and server is the ordinary word.
The Tauri tests hand back a fake api.sh response, and those still returned
the old field name. StoreInfo ignores unknown fields, so the tests stayed
green while pinning a response shape agmsg no longer produces — a fixture
asserting the contract we just replaced.

Missed because the sweep dismissed app/ wholesale as UI layout. Most of it
is: pane menus, CSS, an install-structure comment, the schema shape of a
released store. But four fixtures and one paragraph were the axis, and
excluding a directory is not the same as reading it.

Found in review.
@fujibee
fujibee merged commit bf53976 into integration/remote Jul 31, 2026
17 checks passed
@fujibee

fujibee commented Jul 31, 2026

Copy link
Copy Markdown
Owner Author

Operational note for anyone migrating an existing install past this rename.

Update the install first, migrate the config second. In that order the new code reads drivers.partition and everything resolves. In the reverse order — config rewritten while the old code is still in place — the old code looks for drivers.layout, does not find it, and falls back to the default shared. That fallback is silent: no error, no warning, just a team quietly resolving to the shared store instead of its own.

This was hit in practice while migrating local installs, not reasoned about after the fact. The rename itself is fine either way; it is only the window between the two steps that bites, and only in one direction.

Worth stating because the failure has no symptom at the point it happens. A team that has moved to its own store and then resolves to the shared one does not error — it reads a store that exists and is populated, just not the one it owns.

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