carlos / platform Public

worktree-unit-route-config

Config delivery for routes that name their own systemd unit (discussion #114)

Spec: docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.md (approved by Paul 2026-09-07, three codex rounds; rulings in §8, dispositions §9–§11). Plan: docs/superpowers/plans/2026-09-07-named-unit-config-delivery.md.

What lands:

  • A route stamped with a named unit (carlos route --unit, the #110 column) is the ROOT pass's: appconfig.SyncUnits renders /etc/carlos/apps/<host>.env, writes a marker-owned drop-in /etc/systemd/system/<unit>.d/zz-carlos-env.conf that resets the unit's EnvironmentFile= list to that file, records intent in carlos-env.pending before mutating, runs one daemon-reload, verifies the effective list is exactly carlos's file, and systemctl restarts the unit. All of it behind a flock, behind a rail (shape, name, hostname, one route per unit, alias/load-state probe, symlink-safe directories), with every failure printed and the marker kept so nothing restarts on a guess.
  • The exec sweep leaves stamped routes alone; an old /data/<host>.config.env stays (existing ruling) and is warned about every pass.
  • env set / secrets set now say when a write reached nothing (Undelivered) and when a stamp is blocked (Blocked), over both wire types, additive.
  • The doors (carlos route --unit, --hibernate, carlos add) validate the row that would result: an addr upstream, no socket, no hibernation.
  • Docs: cli.md and AGENTS.md.

Before merge: copy-review of the new member-facing strings (restartCopyUndelivered, restartCopyBlocked, the refusal reasons in internal/appconfig/stamped.go and cli.go, the stamped secrets notice in syncexec.go).

After the roll: the first root pass restarts each stamped, configured route once (spec §4), and the reset means a hand-built unit's own EnvironmentFile= lines stop applying. Check systemctl cat on console.service and the Woodstar units before rolling (spec §7 step 2). Woodstar's route is already stamped; no box step is needed.

Twelve tasks, each with tests; four controller rulings against plan text and the parked residuals are in the branch's SDD ledger. Full gate green: build, vet, all 42 test packages, gofmt, darwin/windows/linux-arm64.

🤖 Generated with Claude Code

Commits 24
Files changed 31 +6695 −130
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity