Named-unit declarations from an operator parameter (#114)
Root's adopt pass now reads /carlos/host/named-units/<instance-id> (an SSM String an operator writes with `carlos system named-units put`, in the box's own region, read with root's own IMDS identity) and installs it as /etc/carlos/named-units.json under the config-sync flock, so declaring a unit needs no SSM session (Paul, 2026-11-19: approach A). A value is installed only if both the delivery and the release-path decoders accept it and the console guard rule holds; an absent parameter or a read error never touches the file; equal bytes are never rewritten; the install is held while the release path may still compare the file's identity (in-flight rollback or pending history completion, incl. the guarded console host). Group and fleet boxes skip with no network call. Outcomes (installed, unchanged, not-found, unreadable, invalid, held, skipped, failed) and each declared unit's final delivery state (delivered, refused, no-route) are written to a public root store and carried in the heartbeat (BoxMetrics.named_units); `carlos system named-units show` prints the parameter beside the box's report. Reviews: Astra plan R1-R2, branch R1 (P1 code-health, P2 drift outcome, fixed) and R2 READY; census approved (#280); record-write census classed; copy by Luna (delegated), one fact correction. P3 follow-ups in #1278. Not released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Prompts: Go ahead. <task-notification> <task-id>aed9a74739e6e96d5</task-id> <tool-use-id>toolu_01Pj7K4wpBJJBfkHPBTXn5Ho</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/95f33cc2-8998-4fa5-abb8-8043c3daeffb/tasks/aed9a74739e6e96d5.output</output-file> <status>completed</status> <summary>Agent "Implement Task 4: root fetch step" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS. Root's adopt pass now reads the box's parameter, checks it, and installs it as `/etc/carlos/named-units.json` under the config-sync lock, writing the status record before the release key parse. Commits: - 66dca9a3 `host: console guard host comes from the marker itself` - 7ca8abda `host: root installs named-units from the box's parameter` Tests: every brief test, the reworked guard and install tests and the existing proofnamed ones pass in `internal/host`, and `internal/status` passes. Two deliberate breakages each made a test fail, and I put them back. The darwin and windows builds pass; off-linux vet shows only the known `haingress_alias_test.go` failure. "History pending": I followed the recovery code, which differs from the plan in two places: - **Failed or recovering, never verified:** a settled attempt like this is not in use, because `resumeHistoryRestart` returns at once without re-binding the host. The plan's wording could hold the install forever. - **Independent:** a settled independent attempt is not in use, because `settleHistory` never checks `Pending` for it. `Pending` also writes the record's exact bytes back, so the test checks both stores are unchanged rather than never written. Concerns: 1. **Extra outcome:** I added `failed` for a lock that can't be taken or a write that fails after every check passed. None of the spec's seven fits, and Tasks 6 and 7 will need to show it. 2. **Unreadable current file:** if root can't safely read the installed file, the outcome is `held`. That box can't be repaired through the parameter until the file is fixed on the box. 3. **Two small additions to the brief:** an `openDst` field on `namedUnitsFetch`, because tests can't use the root-only opener on a temp dir. The fleet skip also covers a box with `CARLOS_FLEET` set but invalid. 4. **Legacy mode:** an unsettled attempt with history still pending would hold its host, though the recovery code never settles it there. A legacy box shouldn't have such attempts, so I left it. 5. **Marker readers disagree:** a marker that names no valid live host (for example one with a trailing newline) now refuses installs. The release path treats the same marker as "no host guarded". This is what ruling 1 asked for. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/named-units-param-114/.superpowers/sdd/2026-11-19-named-units-from-parameters/task-4-report.md</result> <usage><subagent_tokens>186147</subagent_tokens><tool_uses>61</tool_uses><duration_ms>930988</duration_ms></usage> </task-notification> … and 1 more, on the branch's Prompts tab. Squashed from named-units-param-114 into main.
52 files changed,
+4,842
−207
commands.go+3 −0docs/parity.md+2 −1docs/site/cli.md+42 −9docs/superpowers/notes/census-proposal-named-units-param-114.md+57 −0docs/superpowers/plans/2026-11-19-named-units-from-parameters.md+433 −0docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-branch-R1.md+62 −0docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-branch-R2.md+21 −0docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-plan-R1.md+25 −0docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-plan-R2.md+16 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-units-param-114-branch.md+41 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-units-param-114-plan.md+18 −0docs/superpowers/reviews/LUNA-COPY-BRIEF-named-units-param-114.md+17 −0docs/superpowers/reviews/LUNA-COPY-RESULT-named-units-param-114.md+75 −0docs/superpowers/reviews/named-units-param-114-copy-deck.md+95 −0docs/superpowers/reviews/named-units-param-114-deferred-and-rulings.md+30 −0docs/superpowers/specs/2026-11-19-named-units-from-parameters-design.md+333 −0internal/appconfig/sync.go+47 −31internal/appconfig/unitsync.go+170 −29internal/appconfig/unitsync_test.go+260 −0internal/console/apisystemupdate.go+9 −1internal/console/apisystemupdate_test.go+49 −0internal/host/agent.go+18 −8internal/host/namedunitsfetch.go+366 −0internal/host/namedunitsfetch_test.go+667 −0internal/host/namedunitsprobe.go+42 −0internal/host/namedunitsprobe_linux_test.go+43 −0internal/host/namedunitsprobe_test.go+22 −0internal/host/proofnamed.go+7 −24internal/host/proofnamed_linux_test.go+45 −0internal/host/rootrollback.go+43 −0internal/host/unitops.go+134 −16internal/host/unitops_guard_linux_test.go+209 −0internal/host/unitops_test.go+64 −0internal/hostenv/awsssm.go+16 −0internal/hostenv/namedunits.go+87 −0internal/hostenv/namedunits_test.go+73 −0internal/namedunits/namedunits.go+113 −0internal/namedunits/namedunits_test.go+129 −0internal/provision/named_units_param_114_census_test.go+62 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-named-units-param-114.tsv+50 −0internal/status/namedunits_probe_test.go+19 −0internal/status/snapshot.go+39 −1main.go+67 −6parity/cli.tsv+3 −1parity/parity.tsv+2 −1scripts/gitleaks-gate/notscanned.go+1 −0system.go+17 −3system_namedunits.go+377 −0system_namedunits_test.go+235 −0testdata/clireg-golden.jsonl+85 −75
CI passed — run details
landed from named-units-param-114
commands.goLoading diff…
docs/parity.mdLoading diff…
docs/site/cli.mdLoading diff…
docs/superpowers/notes/census-proposal-named-units-param-114.mdLoading diff…
docs/superpowers/plans/2026-11-19-named-units-from-parameters.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-branch-R1.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-branch-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-plan-R1.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-named-units-param-114-plan-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-units-param-114-branch.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-units-param-114-plan.mdLoading diff…
docs/superpowers/reviews/LUNA-COPY-BRIEF-named-units-param-114.mdLoading diff…
docs/superpowers/reviews/LUNA-COPY-RESULT-named-units-param-114.mdLoading diff…
docs/superpowers/reviews/named-units-param-114-copy-deck.mdLoading diff…
docs/superpowers/reviews/named-units-param-114-deferred-and-rulings.mdLoading diff…
docs/superpowers/specs/2026-11-19-named-units-from-parameters-design.mdLoading diff…
internal/appconfig/sync.goLoading diff…
internal/appconfig/unitsync.goLoading diff…
internal/appconfig/unitsync_test.goLoading diff…
internal/console/apisystemupdate.goLoading diff…
internal/console/apisystemupdate_test.goLoading diff…
internal/host/agent.goLoading diff…
internal/host/namedunitsfetch.goLoading diff…
internal/host/namedunitsfetch_test.goLoading diff…
internal/host/namedunitsprobe.goLoading diff…
internal/host/namedunitsprobe_linux_test.goLoading diff…
internal/host/namedunitsprobe_test.goLoading diff…
internal/host/proofnamed.goLoading diff…
internal/host/proofnamed_linux_test.goLoading diff…
internal/host/rootrollback.goLoading diff…
internal/host/unitops.goLoading diff…
internal/host/unitops_guard_linux_test.goLoading diff…
internal/host/unitops_test.goLoading diff…
internal/hostenv/awsssm.goLoading diff…
internal/hostenv/namedunits.goLoading diff…
internal/hostenv/namedunits_test.goLoading diff…
internal/namedunits/namedunits.goLoading diff…
internal/namedunits/namedunits_test.goLoading diff…
internal/provision/named_units_param_114_census_test.goLoading diff…
internal/provision/plan9_b8_census_test.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-named-units-param-114.tsvLoading diff…
internal/status/namedunits_probe_test.goLoading diff…
internal/status/snapshot.goLoading diff…
main.goLoading diff…
parity/cli.tsvLoading diff…
parity/parity.tsvLoading diff…
scripts/gitleaks-gate/notscanned.goLoading diff…
system.goLoading diff…
system_namedunits.goLoading diff…
system_namedunits_test.goLoading diff…
testdata/clireg-golden.jsonlLoading diff…