Named-unit config delivery (#114) brought onto current main as one squash of worktree-unit-route-config (4690a5b)
The #114 branch (24 commits, approved spec and plan, built and reviewed in September) squashed onto main at 9bcbab0f, 784 commits later. The six conflicts and the drift behind them: cli.go: runAdd keeps main's refuseAddRootfs/refuseAddNested and #114's early registry open (the nested-mint evidence read reuses that handle); the StampShape check on the resulting row sits before main's addBeforeWrite/addWrite. internal/appconfig/sync.go: rebuilt on main's SyncWithCallbacks. Callbacks gains Units *UnitOps; SyncUnits(..., restart, ack, ops, options...) is the root pass's entry and Sync stays the ops-less form every test uses. The stamped half (lock, planStamped, prepareStamped, reapDropIns, applyStamped) is wired around main's hostwrite claims, acks and the instance overlay: both eligibility gates admit Stamped routes, the overlay is fetched for a stamped route as for a unit-backed one (SyncExec no longer renders it), and the stamped branch runs before the exec-backed skip. syncHostClaimed is split into prepareHost (hostname rail, key-loss guard, render, agent vars; returns a *hostRender or an error), the guarded write, and finishHost (ack + restart), so prepareStamped shares every refusal; commitHost is the stamped path's unclaimed write. UnitConfigApps uses unitDelivered, as on the branch. internal/appconfig/syncexec.go: the frozen-file notice loop keeps main's route filter (o.kept) and ConfigEnvPath and gains #114's stamped case; execRouteBase keeps main's sidecar clause and gains rt.Unit == ""; AwaitingRestart keeps main's instance-overlay loader and owned-environment branch and gains Blocked/Undelivered. internal/host/agent.go: the comment at the restart callback now says Sync restarts stamped units itself; the call is SyncUnits with the ack function, productionUnitOps and claims.Writes. Tests: sync_test.go takes the captureStdout form with main's ack argument; syncexec_test.go keeps main's tests and appends #114's with the current SyncExec signature; unitsync_test.go passes the ack argument; owned_test.go (#449) now expects a write to an un-opted owned bundle in Undelivered with no Hosts, which is #114 §3.4's honest answer and the same update #114 made to TestAwaitingRestartSkipsUnoptedAndSocketRoutes. Not changed, recorded for the review: provisioning now mints Unit from instance records (provision.RouteFor), so a stamp can arrive without passing the CLI rails; the root pass's rail still refuses a mis-shaped stamp every pass and reports it. The release pass's named-unit restart (restartBoundUnit) has proof-binding checks and a settle that the config restart does not share; #453 spec §6.1's shared lock is later work. Stamped routes write no config ack in this branch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Summary
Squash-merges #114 (named-unit config delivery) onto main, resolving six conflicts against the hostwrite/ack/instance-overlay changes in appconfig.Sync, the route filter in SyncExec, owned environments in AwaitingRestart, runAdd's rootfs/nested refusals and the adopt pass's restart wiring.
33 files changed,
+6,755
−128
AGENTS.md+5 −0apimode.go+11 −0appconfig_cli.go+18 −6appconfig_restart_test.go+35 −0cli.go+78 −27cli_test.go+181 −2docs/site/cli.md+21 −2docs/superpowers/plans/2026-09-07-named-unit-config-delivery.md+3,017 −0docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.md+804 −0docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R2.md+98 −0docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R3.md+61 −0docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG.md+75 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-UNIT-CONFIG.md+88 −0internal/appconfig/awaitingrestart_test.go+120 −11internal/appconfig/claimsync.go+5 −1internal/appconfig/dropin.go+185 −0internal/appconfig/dropin_test.go+155 −0internal/appconfig/owned_test.go+5 −2internal/appconfig/routefingerprint.go+6 −2internal/appconfig/routefingerprint_test.go+32 −0internal/appconfig/stamped.go+100 −0internal/appconfig/stamped_test.go+119 −0internal/appconfig/sync.go+143 −26internal/appconfig/sync_test.go+47 −6internal/appconfig/syncexec.go+122 −29internal/appconfig/syncexec_test.go+54 −0internal/appconfig/unitsync.go+335 −0internal/appconfig/unitsync_test.go+585 −0internal/console/apiconfig.go+22 −2internal/console/apiconfig_restart_test.go+37 −0internal/host/agent.go+16 −12internal/host/unitops.go+127 −0internal/host/unitops_test.go+48 −0
CI failed — run details
Intent
Human
go ahead (approving the #453 spec rev 2; next step is landing #114 on current main with the base-layer guard)
AGENTS.mdLoading diff…
apimode.goLoading diff…
appconfig_cli.goLoading diff…
appconfig_restart_test.goLoading diff…
cli.goLoading diff…
cli_test.goLoading diff…
docs/site/cli.mdLoading diff…
docs/superpowers/plans/2026-09-07-named-unit-config-delivery.mdLoading diff…
docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R2.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R3.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-UNIT-CONFIG.mdLoading diff…
internal/appconfig/awaitingrestart_test.goLoading diff…
internal/appconfig/claimsync.goLoading diff…
internal/appconfig/dropin.goLoading diff…
internal/appconfig/dropin_test.goLoading diff…
internal/appconfig/owned_test.goLoading diff…
internal/appconfig/routefingerprint.goLoading diff…
internal/appconfig/routefingerprint_test.goLoading diff…
internal/appconfig/stamped.goLoading diff…
internal/appconfig/stamped_test.goLoading diff…
internal/appconfig/sync.goLoading diff…
internal/appconfig/sync_test.goLoading diff…
internal/appconfig/syncexec.goLoading diff…
internal/appconfig/syncexec_test.goLoading diff…
internal/appconfig/unitsync.goLoading diff…
internal/appconfig/unitsync_test.goLoading diff…
internal/console/apiconfig.goLoading diff…
internal/console/apiconfig_restart_test.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/unitops.goLoading diff…
internal/host/unitops_test.goLoading diff…