carlos / platform Public

review: round 3 and census round 2 briefs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev f8a3419c9d64e64ac1adbd754258ec15672a64be parent 0db1966
2 files changed, +56 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-named-unit-delivery-114-R2.md +9 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114-R3.md +47 −0

CI passed — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-named-unit-delivery-114-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-named-unit-delivery-114-R2.md
new file mode 100644
index 000000000..6c9bb3dc6
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-named-unit-delivery-114-R2.md
@@ -0,0 +1,9 @@
+# Census review brief: named-unit-delivery-114, round 2
+
+Repo carlos/platform, branch `named-unit-delivery-114`, code tip 0db1966bfe019dc1482684bbb996e724237915b2 (main 9bcbab0f).
+
+Same role and instructions as round 1 (`docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-named-unit-delivery-114.md`). Your round 1 verdict, ESCALATED 10, is `docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114.md`. Since then, by Paul's ruling (amadan discussion #114, last reply; spec §12), the branch was restructured around three invariants: a root-owned declaration (`/etc/carlos/named-units.json`) is the only authority for which unit root writes into (`declarations.go`), a strict base-file grammar (`baseenv.go`), and one no-follow, root-owned, not-group/other-writable reader for every root file read (`rootread_unix.go`). The card and claims were regenerated: `docs/superpowers/notes/census-proposal-named-unit-delivery-114.md`, `docs/superpowers/notes/census-named-unit-delivery-114-claims.md`.
+
+First, one line per round 1 escalation: resolved or not. Then do exactly what the card's "Review" paragraph says against `git diff origin/main...0db1966bfe019dc1482684bbb996e724237915b2`, approve or escalate per unit and per re-pinned envelope with a one-line reason. Output as before, ending with APPROVED or ESCALATED (n).
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents. Do not run the full test suites. Leave GOCACHE unset.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114-R3.md
new file mode 100644
index 000000000..c46512b65
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114-R3.md
@@ -0,0 +1,47 @@
+# Review brief: named-unit config delivery (#114) on current main, plus #453 §4.1, round 3 of 3
+
+Repo carlos/platform, branch `named-unit-delivery-114`, commit 0db1966bfe019dc1482684bbb996e724237915b2.
+Under review: the diff `origin/main...0db1966bfe019dc1482684bbb996e724237915b2` (main at 9bcbab0f).
+Authorities, fixed rulings and deferrals: as in round 1's brief, `docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114.md`, plus Paul's ruling of 2026-10-28 below. It all still binds.
+
+## Fixed: do not re-argue (new this round)
+
+Stopping rule 2 triggered after round 2 (two fault families, each found twice). Paul ruled (amadan discussion #114, last reply; spec §12 on this branch): **a root-owned declaration decides.** Three invariants, each with one decider:
+- A: root writes, replaces or removes a carlos drop-in or env file for unit U only when the root-owned `/etc/carlos/named-units.json` names U, host, account and app exactly and the registry row matches; the registry selects, never authorizes; reaping keys on declarations. Decider `declarations.DeclaredBinding` (`internal/appconfig/declarations.go`).
+- B: the base file must be a strict subset (empty lines, `#` comments without backslash, `NAME=value` with no backslash or quote in the value; UTF-8, LF only, no CR/NUL, size caps) or delivery is blocked. Decider `baseFileNames` (`baseenv.go`).
+- C: one reader for every root read of the base file, the declaration file and the drop-in: no symlink components, O_NOFOLLOW, fstat, regular, owned by root, not group/other writable. Decider `rootRead` (`rootread_unix.go`).
+Report only mechanisms that fail these invariants or bypass their deciders. Do not propose a different authority model. Each stamped unit needing a declaration line before delivery starts is intended.
+
+You are an independent reviewer. Read the code and check every claim against it.
+
+## Round 3
+
+Earlier rounds: round 1 `docs/superpowers/reviews/CODEX-FINDINGS-named-unit-delivery-114-r1.md` (NOT READY), round 2 `docs/superpowers/reviews/CODEX-FINDINGS-named-unit-delivery-114-r2.md` (NOT READY), and the census review `docs/superpowers/reviews/CODEX-FINDINGS-census-named-unit-delivery-114.md` (ESCALATED 10; its E1-E3 count as findings here).
+
+First give one line per P1 and P2 from round 2 and per census escalation E1-E3: resolved, partly, or not. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings. The verdict covers everything outstanding.
+
+What to check:
+1. Is every root write, replace, remove, reload and restart on the stamped path gated by `DeclaredBinding` (or `declares` for reaping), with no path where registry data alone moves a byte? Include re-stamps, a declaration naming a unit no route stamps, two routes stamping one unit, a declaration changing between plan and apply in one pass.
+2. Is every root read of the three files through `rootRead`, with no TOCTOU between the Lstat walk and the open that an agent-writable directory could exploit? Which directories on the path can the box agent (user carlos) write?
+3. Can a base file accepted by `baseFileNames` be read by systemd as assigning a name the guard did not report, or vice versa?
+4. Defects the restructure introduced: anything main's release path or the delivery rails relied on that changed; the idle-declared-unit reporting; the store-call witness.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The census, and review of any newly changed security, root, termination or production-storage behaviour, still check the fix; see AGENTS.md, "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the section or task, the problem, the evidence (file:line, verified), the failure scenario, a concrete fix and the invariant or trust boundary it breaks (that is its fault family). End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round.
+- **NOT READY**: one or more P1s, listed.
+
+This is round 3: a NOT READY also says whether the P1s share one cause, and whether refusing the case up front or cutting the feature would remove them.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites; targeted `go test ./internal/appconfig/ -run <X>` is fine. Leave GOCACHE unset.