refactor(drivers): rename the layout axis to partition - #580
Conversation
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.
|
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 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. |
Renames the driver axis
layouttopartitiononintegration/remote.sharedandper-teamanswer 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/remoteis unreleased, so nothing in the wild is keyed on the old name.What changed
The driver directory (
scripts/drivers/layout/→scripts/drivers/partition/), thedrivers.partitionconfig key, the axis argument passed to the registry,partition_store_relpathand the load helper, and the prose describing the axis.scripts/lib/driver-registry.shneeded 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.
api.shandrename-team.shpass the axis as a bare word (agmsg_driver_for_team layout …), which nolayout_-prefix pattern matches.remote.sh(json_object('layout', 'per-team')) and several tests that spell the key inline as"drivers":{"layout":…}— neither matchesdrivers.layout.layoutmatches 49 files, nearly all of them unrelated. Those were classified by reading, not replaced.Every remaining
layoutunderscripts/,tests/, andserver/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 unmodifiedintegration/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 teamandan unknown partition is an error, not a fallback.After landing
Local dogfood installs carry
drivers.layoutin their team config and need a forget-and-pull or a reinstall to pick up the new key.