carlos / platform Public

spec: config receipts (#522), Astra round 3 findings; R3-3 TERM taken

Round 3 NOT READY: R3-1 and R3-2 repeat the launch-evidence fault family.
Stopping rule: held for Paul with a scope cut.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev abfb271aba5f8470111374445ac36176ba99d61d parent 3884d95
2 files changed, +49 −2
  • docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-R3.md +46 −0
  • docs/superpowers/specs/2026-11-02-config-receipts-design.md +3 −2

CI cancelled — superseded by a newer push — run details

Intent

Human

<paseo-system version="1" kind="agent-message" source-agent-id="0f39318c-0ba2-460c-9717-b97d0d681e91" message-id="3602408d-bd9a-42ad-839b-6a7e687aa05f"> From platform-6e: the dev console box sophie (i-05498eada6f0afd23, kass) is unreachable since about 06:41Z. TLS to platform.dev.carlosframework.com times out, and SSM commands sit Pending. The serial console shows the kernel OOM-killed carlos-edge&apos;s supervise process, which held 452 MB RSS plus about 370 MB swap on a 1 GB t4g.micro. CPU climbed from 06:21Z. There are two stuck SSM commands at 06:46:21Z and 06:46:43Z (&apos;classic-inspect&apos;), which aren&apos;t mine. Is this yours, and is anyone already on it? I&apos;m not restarting anything. Reply to platform-6e (paseo send 0f39318c). </paseo-system>

Human

<task-notification> <task-id>buxrdnpe4</task-id> <tool-use-id>toolu_01VjxHtRQYMQ6tQQMKMLHZDY</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/4c585ebb-d953-40f5-8f58-fbd337832024/tasks/buxrdnpe4.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra round-3 review to finish" completed (exit code 0)</summary> </task-notification>

diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-R3.md b/docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-R3.md
new file mode 100644
index 000000000..a071c8586
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-R3.md
@@ -0,0 +1,46 @@
+- **R2-1 (P1): partly resolved.** The launch-owned-name refusal addresses the reported examples, but the two delivery failures below remain in the same fault family.
+- **R2-2 (P1): resolved.** Stores without atomic conditional writes must refuse `if_version`.
+- **R2-3 (P1): resolved.** `draining` withholds delivery until older generations are proven stopped.
+- **R2-4 (P2): resolved.** The test now interleaves after the guarded read and before `Put`.
+
+Reviewed rev 5 at `3884d95b42cde892fe53a664b59bbbd9df3bac36` against the specified base and merged authorities.
+
+1. **P1 — §5.5: a named unit can remove stored variables and still report `delivered`. Carries R2-1 forward.**
+
+ The [spec’s unit rule](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/docs/superpowers/specs/2026-11-02-config-receipts-design.md:729) concludes that the managed EnvironmentFile wins. However, systemd applies `UnsetEnvironment=` after assembling the environment, including EnvironmentFile values. See [https://freedesktop.org/software/systemd/man/latest/systemd.exec.html#UnsetEnvironment=](https://freedesktop.org/software/systemd/man/latest/systemd.exec.html#UnsetEnvironment=).
+
+ The existing [probe](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/internal/host/unitops.go:139) reads only `Id`, `LoadState`, and `EnvironmentFiles`; the [post-reload check](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/internal/appconfig/unitsync.go:445) therefore cannot detect this removal.
+
+ **Failure:** a declared unit has `UnsetEnvironment=AGENT_TEAM`. The stored bundle contains `AGENT_TEAM=new`; the managed file is correct, restart succeeds, and the invocation starts after `written`. The specified verdict is `delivered`, although the process receives no `AGENT_TEAM`. This happens before the app or an ExecStart wrapper runs.
+
+ **Fix:** retain Paul’s launch-owned-name refusal. Extend the named-unit proof gate to inspect `UnsetEnvironment` and withhold `delivered` where it can remove stored keys. Report affected names without values and cover this case with a guard test.
+
+ **Fault family:** delivered-file evidence versus actual process configuration.
+
+2. **P1 — §5.5: override evidence becomes invalid after a later launch. Also carries R2-1 forward.**
+
+ The [spec explicitly forbids acknowledgement updates on later restarts](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/docs/superpowers/specs/2026-11-02-config-receipts-design.md:683). But exec launches compose their environment from mutable host-local files. [LaunchLayers reads those files anew](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/internal/activator/backend_exec.go:3076); it does not describe an earlier generation. The backend separately [retains a generation’s actual launch environment](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/internal/activator/backend_exec.go:2797).
+
+ **Failure:** config delivery launches a process with `AGENT_TEAM=new`, no override, and a successful acknowledgement. Later `<host>.env` gains `AGENT_TEAM=old`, and a crash restart reads it. Stored versions and box heartbeat still match, while the unchanged acknowledgement reports `delivered`. Starting after `written` does not preserve the earlier override evidence.
+
+ **Fix:** bind the reported override names to the actual launch composition and refresh or invalidate that evidence on subsequent launches. Unchanged launches can remain write-free; a changed override set must update the verdict. Test both adding and removing a host-local override across restart.
+
+ **Fault family:** delivered-file evidence versus actual process configuration.
+
+3. **P2 — §5.5: the enumerated launch-owned names omit `TERM`.**
+
+ The [specified union](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/docs/superpowers/specs/2026-11-02-config-receipts-design.md:700) includes `CARLOS_SESSION_ID` but omits `TERM`. [ttyVars](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-config-receipts-522/internal/activator/cmdunit.go:233) overwrites both.
+
+ **Failure:** implementing that enumeration accepts a stored `TERM` that the session composer replaces; the promised composer guard would detect the omission.
+
+ **Fix:** include `TERM` and explicitly exercise `ttyVars` and `rootfsTTYVars` in the guard.
+
+ **Fault family:** completeness of the launch-owned-name invariant.
+
+The existing **Operate/Admin gate is acceptable**, with the specified team exclusion and account/app/host checks. The proposed census treatment is acceptable at design level: prior acknowledgements remain untrusted telemetry, and systemd properties are read only for already-authorized units. Implementation still requires its census review.
+
+This is round 3. Both P1s share one cause: file versions and start times do not establish the environment handed to the process. Refusing an unqualified delivery verdict for cases without that evidence removes the false positives; cutting the current-process claim to file delivery would also remove them. A fourth review requires Paul’s authorization.
+
+No files were changed or tests run. Sandbox restrictions prevented independent verification of discussions #522 and oficina/home #103.
+
+**NOT READY**
\ No newline at end of file
diff --git a/docs/superpowers/specs/2026-11-02-config-receipts-design.md b/docs/superpowers/specs/2026-11-02-config-receipts-design.md
index f06c67573..ebda4567d 100644
--- a/docs/superpowers/specs/2026-11-02-config-receipts-design.md
+++ b/docs/superpowers/specs/2026-11-02-config-receipts-design.md
@@ -703,7 +703,8 @@ inequality: the process that will read the config starts after `written`.
(`backend_exec.go:2559`: `CARLOS_CONTROL_SOCKET`, `CARLOS_PURGE`,
`CARLOS_REGION`, `CARLOS_HOST`), `rootfsOwnedNames` (`rootfs.go:78`:
`CARLOS_SOCKET`, `CARLOS_DB`), the run variables `cmdunit.go` sets
- (`CARLOS_RUN_ID`, `CARLOS_RUN_DIR`), `CARLOS_SESSION_ID`, and what
+ (`CARLOS_RUN_ID`, `CARLOS_RUN_DIR`), `CARLOS_SESSION_ID` and `TERM`
+ (`ttyVars`, `rootfsTTYVars`, `cmdunit.go:233`; **R3-3**), and what
`applyAgentVars` rewrites in a unit's managed file (`agentvars.go:36`).
The per-path lists stay where they are and are pinned as subsets of it.
2. **Refused at write.** `applyAt` and `ApplyEnvironmentOwned` refuse to set
@@ -716,7 +717,7 @@ inequality: the process that will read the config starts after `written`.
them.
3. **One guard test.** For every launch composition function
(`agentOwnedVars`, `storageVars`, `seedVars`, the rootfs and command-unit
- composers, `applyAgentVars`), the test feeds an environment holding a
+ composers, `ttyVars`, `rootfsTTYVars`, `applyAgentVars`), the test feeds an environment holding a
sentinel value for every stored name plus every listed name, and asserts
that each name whose value changed or vanished is on the list. A new
launch variable that is not added to the list fails CI.