refactor(architect): drop host-mode bind-mount collapse — uniform fleet mounts (AR-5) #1206
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/agent-hooks!1206
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/1200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
AR-5 finishes the host-mode retirement: every architect-only branch in
the container-reconcile path is gone. The architect container now
ships the same bind set as every other type (credentials dir + projects
sub-bind + cursor config dir + named state volume). The architect
process never writes to the projects or cursor binds, so the extra
mounts are inert — simpler reconcile code wins over a per-type collapse.
After AR-3 (#1198) and AR-4 (#1199), the only remaining architect-only
code path was the
dockerRunbind-mount collapse + the companion driftskip in
matchesDesired. Both are deleted in this PR.Acceptance criteria (issue #1200)
HOST_MODE_TYPES— already absent in code; only one historical M18-spec mention remained (annotated as retired).HostContainerLifecycle— never existed (onlyDockerContainerLifecycleis present); onlyDockerContainerLifecycle.getArchitectWorkerhost filter — already removed by AR-4; stale "#1200 will simplify" comment cleaned up.dockerRunhost_mode branch — deleted. Architect gets the standard--volumeset.matchesDesiredhost_mode branch — deleted. Drift detection is uniform.specs/architect-dockerize.md— updated to describe uniform mounts; "Decoupling host_mode" + "Out of scope" sections collapsed.HOST_MODE_TYPES,HostContainerLifecycle,host_mode,getArchitectWorker.*host) — zero hits.Tests
container-reconcile.test.tscase asserts architect and dev emit the same--volumeargv set (state-volume name normalised).'unchanged' when present + matchesfixture now includes the projects bind, sincematchesDesiredno longer skips it for architect.just qaclean (3362 tests, 0 fail).Test plan
just qacleanbun test src/infrastructure/container/container-reconcile.test.ts— 56/56 passbun test src/domain/dispatch/registry.test.ts— 22/22 passHOST_MODE_TYPES/HostContainerLifecycle/host_mode/getArchitectWorker.*hostCloses #1200. Part of #1203 (editable-architect tracker).
🤖 Generated with Claude Code
Review — AR-5: drop host-mode bind-mount collapse
CI: ✅ green. LGTM — approving.
What this does
Removes the
minimalMountbranch fromdockerRunand theagent.type !== "architect"gate frommatchesDesired, making the architect container provision identical to every other fleet agent (credentials dir + projects sub-bind + cursor config dir + named state volume). The architect process never writes to the extra mounts, so they're inert — the payoff is a completely uniform reconcile path. All AC items from #1200 verified in the diff.Functional correctness ✅
dockerRun:minimalMountvariable and both conditioned blocks (if (!minimalMount)mkdir + spread) are cleanly deleted. Unconditionalmkdir projects+ both--volumelines now follow the shared path. No residual branches.matchesDesired: Theif (agent.type !== "architect")gate around theprojectscheck is removed. The cursor bind has never been checked inmatchesDesired(for any type) — intentional pre-existing design, not a regression. The'unchanged'inspect fixture correctly includes projects but not cursor, consistent with what the function actually validates.Tests ✅
The new "uniform bind set" test is well-constructed:
reconcileOneindependently, extracts--volumeargs with the newcollectVolumeshelper, normalises the instance-scoped state volume name, then sorts and compares — exactly the right approach.projectsandcursorbinds are present catch any future re-introduction of the collapse.collectVolumesis a clean extraction, reusable by other tests.Minor observations (non-blocking)
specs/architect-dockerize.md"Out of scope" section — the first bullet now says "The chat relay … Tracked as AR-3 (#1198)", but AR-3 shipped in #1198. The bullet reads as a future-tense tracker item when it's actually historical. Consider removing it or retitling the section "Historical / done" since only the cursor item is genuinely still out of scope.specs/m18-ui-rewrite-and-architect.mdline 174 — the- [ ]checkbox for the retired host-mode flag is left unchecked. The appended note explains it's retired, but a checked[x](or struck-through text) would better signal it was superseded rather than still outstanding.'unchanged'test comment — after the AR-5 update the comment doesn't explain why the cursor bind is absent from thedockerInspectJsonfixture. A one-liner (// cursor bind not checked by matchesDesired) would help the next reader avoid confusion.None of these affect correctness. Ship it.