carlos / platform Public

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.
claude agent, operated by paul@keymail.dev fba7bf06cee6b4d76a7e54c18945a76ca080edf5 parent 9bcbab0
33 files changed, +6,755 −128
  • AGENTS.md +5 −0
  • apimode.go +11 −0
  • appconfig_cli.go +18 −6
  • appconfig_restart_test.go +35 −0
  • cli.go +78 −27
  • cli_test.go +181 −2
  • docs/site/cli.md +21 −2
  • docs/superpowers/plans/2026-09-07-named-unit-config-delivery.md +3,017 −0
  • docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.md +804 −0
  • docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R2.md +98 −0
  • docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R3.md +61 −0
  • docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG.md +75 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-UNIT-CONFIG.md +88 −0
  • internal/appconfig/awaitingrestart_test.go +120 −11
  • internal/appconfig/claimsync.go +5 −1
  • internal/appconfig/dropin.go +185 −0
  • internal/appconfig/dropin_test.go +155 −0
  • internal/appconfig/owned_test.go +5 −2
  • internal/appconfig/routefingerprint.go +6 −2
  • internal/appconfig/routefingerprint_test.go +32 −0
  • internal/appconfig/stamped.go +100 −0
  • internal/appconfig/stamped_test.go +119 −0
  • internal/appconfig/sync.go +143 −26
  • internal/appconfig/sync_test.go +47 −6
  • internal/appconfig/syncexec.go +122 −29
  • internal/appconfig/syncexec_test.go +54 −0
  • internal/appconfig/unitsync.go +335 −0
  • internal/appconfig/unitsync_test.go +585 −0
  • internal/console/apiconfig.go +22 −2
  • internal/console/apiconfig_restart_test.go +37 −0
  • internal/host/agent.go +16 −12
  • internal/host/unitops.go +127 −0
  • internal/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.md

Loading diff…

apimode.go

Loading diff…

appconfig_cli.go

Loading diff…

appconfig_restart_test.go

Loading diff…

cli.go

Loading diff…

cli_test.go

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/plans/2026-09-07-named-unit-config-delivery.md

Loading diff…

docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R2.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG-R3.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-UNIT-CONFIG.md

Loading diff…

docs/superpowers/specs/CODEX-REVIEW-BRIEF-UNIT-CONFIG.md

Loading diff…

internal/appconfig/awaitingrestart_test.go

Loading diff…

internal/appconfig/claimsync.go

Loading diff…

internal/appconfig/dropin.go

Loading diff…

internal/appconfig/dropin_test.go

Loading diff…

internal/appconfig/owned_test.go

Loading diff…

internal/appconfig/routefingerprint.go

Loading diff…

internal/appconfig/routefingerprint_test.go

Loading diff…

internal/appconfig/stamped.go

Loading diff…

internal/appconfig/stamped_test.go

Loading diff…

internal/appconfig/sync.go

Loading diff…

internal/appconfig/sync_test.go

Loading diff…

internal/appconfig/syncexec.go

Loading diff…

internal/appconfig/syncexec_test.go

Loading diff…

internal/appconfig/unitsync.go

Loading diff…

internal/appconfig/unitsync_test.go

Loading diff…

internal/console/apiconfig.go

Loading diff…

internal/console/apiconfig_restart_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/unitops.go

Loading diff…

internal/host/unitops_test.go

Loading diff…