0036 — The dock is the identity: the task records it, the workflow is keyed on it, the session is found by id

What was measured (2026-09-29)

The decision

  1. The dock is recorded once: in the task's setup record. That is driver-setup.json's finish-line row (dock-finisher, its ref), which driver-setup writes when the run is set up.
    • task.json does not carry a copy. The Supervisor round-trips task.json through an allowlist, which erases a field it does not know, and a second copy is a second fact to keep true.
    • The Supervisor's holdUntilDock is exactly such a copy. It is set on one task (page-speed), and it goes when the Stop gate reads the dock itself (decision 6).
  2. There is one resolver: dock-of <task> (local-bin #293).
    • It reads that row. If it is absent, it refuses (exit 2) and names what is missing.
    • --verify proves the finisher can count the dock (exit 4 if not).
    • --live lists every live task and its dock.
    • Every tool that needs a board takes it from dock-of or from an explicit --slug. No tool has a default board. A tool that cannot resolve a board refuses; it does not guess.
    • Other repos call dock-of; they do not re-read the file.
  3. A new Driver's workflow id is driver-<dock>, or driver-<dock>.<group-key> when its task names a group (as amended 2026-10-01), started with id_conflict_policy=FAIL. The Temporal server then refuses a second Driver on the same dock and group (§11); a whole-dock driver-<dock> excludes every group on its dock, and any group excludes a whole-dock Driver. "Who is driving this dock" is a describe of driver-<dock> plus a list of the running driver-<dock>.* (§11b, as amended). Runs already going under op-task-* or driver-task-* keep their ids, because a workflow id cannot change. Every lookup tries three ids in order:
    1. driver-<key>, the task's own dock key from dock-of: <dock>, or <dock>.<group> when it names a group (as amended)
    2. driver-task-<task>
    3. op-task-<task>
  4. A Driver is found by its session id (task.json driverSid), never by tmux name or roster name. Names are labels for people.
  5. The label is driver-<dock>, fixed before anything keys on it.
    • Door 1 creates the tmux session and the roster name as driver-<dock>, before ccswitch exec, because ccswitch keys a session's credential directory on its tmux name.
    • Door 2 cannot rename its tmux session safely. It keeps its old name and loses nothing, because of decision 4.
  6. Door 2 ends in the same state as door 1:
    • The dock is recorded.
    • The watcher is armed under driver-<dock>.
    • The finish gate is on by default for every Driver task, and its board comes from dock-of. Today it checks a board only if an optional <loop>/FINISH file exists (drive-gate.py 705–739). A respawn does not carry that file (09-13), settings never had one, and page-speed's was switched off on 09-15 for 14 days.
    • Turning the gate off is a dated switch that expires, and driver-brief shows it while it is on. It is never a renamed file that nobody reads.
    • The Driver is covered by the Supervisor's waker (ADR-0035 decision 1), so there is nothing to arm.
  7. The dock page shows who owns it, derived when the page is built from the same describe (§11b, part 2). It is never a field someone types.

Rejected

Consequences, and what happens to the four live Drivers

Nothing in the four live task directories is written.

Two cases are Gera's call.

Permission modes. Cross-session messages are held when the sender's and receiver's permission modes differ. module-switch's heads-up to module-send-gate shows "not delivered to Claude (1 held). The sending session's permission mode class doesn't match this session's…". ADR-0002's agent-to-agent channel therefore fails silently across modes. Should every fleet session run in one permission mode, or should crossSessionInbound be set to accept fleet-wide? Until he answers, a message to a session in another mode is not a delivered message, and senders must check for the held notice.

Groups on one dock. settings was a second Driver on a group of the portfolio dock, running alongside page-speed on the same dock, and decision 3 would have refused it. Should one dock ever have two Drivers split by group (keyed driver-<dock>.<group>), or is it strictly one Driver per dock? Answered 2026-10-01: split by group — see Amendment 2026-10-01.

Amendment 2026-10-01 — one Driver per dock group

The answer. On 2026-09-29 this ADR asked Gera whether one dock may have two Drivers split by group. The coordinator first answered "strictly one" on his behalf. That was wrong. Gera runs three Drivers on portfolio-architecture-phases, each owning groups of its rows, and each with a criterion of the form finisher --slug portfolio-architecture-phases --by-group …:

The rule.

Where the group comes from: dock-of stays the one resolver (decision 2). dock-of <task> --group:

  1. The setup record's key wins. That is a group on the finish-line row, set with driver-setup --task <t> --set group=<key>.
  2. Otherwise, a criterion that names exactly one group (… --by-group shows 0 open rows in <Group>; …) keys that group's name as a slug, e.g. found-along-the-way.
  3. "No group recorded" (exit 2) means the whole dock.
  4. Cannot tell (exit 3) covers a criterion naming several groups with no recorded key, or an unreadable record. It is never read as the whole dock, because a whole-dock Driver would refuse every group Driver on it. A re-arm refuses (could-not-ask) until a key is recorded.

Known limit. Exclusion is by key equality. Two keys whose group sets overlap (one lane recording page-speed while another task's criterion names "Places and names" alone) are not caught. Keys are declared per lane in setup, and overlapping them is a setup error that a human must see.

Finding the Drivers.

Exit 3 is tested.

Build: