review brief: named-unit-delivery-114 round 1 (Astra)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+47
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114.md+47 −0
CI failed — run details
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114.md| new file mode 100644 |
| index 000000000..a8644ba3c |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-named-unit-delivery-114.md |
| @@ -0,0 +1,47 @@ |
| +# Review brief: named-unit config delivery (#114) on current main, plus #453 §4.1, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `named-unit-delivery-114`, commit 17c0b24c5711e03f4737a6436296b4c415759f8f. |
| +Under review: the diff `origin/main...17c0b24c` (main at 9bcbab0f). |
| +Authorities: |
| +- `docs/superpowers/specs/2026-09-07-named-unit-config-delivery-design.md` as it stands on this branch (approved by Paul 2026-09-07; §12 is the amendment this branch adds). |
| +- `docs/superpowers/specs/2026-10-28-console-config-design.md` §4.1 only, on branch `design-console-config-453` (approved by Paul 2026-10-28; read it with `git show origin/design-console-config-453:docs/superpowers/specs/2026-10-28-console-config-design.md`). This is the one unmerged document you may read; only its §4.1 is in scope, and it is approved, not under review. |
| +- Everything on main. |
| + |
| +History: the #114 design took three codex rounds (2026-09-07) and the original build had per-task reviews, an Opus whole-branch review, a fix wave and a clean re-review. That build sat unmerged for seven weeks; this branch squashes it onto a main 784 commits newer and resolves six conflicting files (cli.go, internal/appconfig/sync.go, sync_test.go, syncexec.go, syncexec_test.go, internal/host/agent.go). This is the first review of the merged result. |
| + |
| +You are an independent reviewer. Read the documents, then the code, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- #114 spec §8 rulings: the root pass owns a named-unit route fully (env file, drop-in, daemon-reload, restart on change, console.service included); the EnvironmentFile reset stands; delivered-generation readback is deferred. |
| +- #453 rulings: base layer + one owner per variable (§4.1). |
| +- Deferred to later #453 work and NOT expected here: rollback of a failed config restart (.prev files), a lock shared by release and config restarts, config-ack changes for stamped routes, the console sealing key, door and CLI changes. Report a defect in what IS built only. |
| + |
| +## What to check |
| + |
| +1. Merge correctness. For each of the six conflicted files, did the resolution keep BOTH main's behaviour and #114's? Main added, since 8e16153d: the instance config layer and overlays, config acks, hostwrite claims, claim sync, team-scoped owned environments (#449), isolated exec / rootfs, sidecars, the change index. Look for a main behaviour silently dropped, or a #114 rail silently bypassed, including in files that auto-merged. |
| +2. Authority over the unit name (trust boundary: who can make root write a drop-in into which unit). Provisioning now mints `Unit` from instance records (`internal/provision/reconcile.go` RouteFor, `provision.go:121`, `:718`). Can a tenant, an app credential or a box agent cause a route to carry a `Unit` naming a unit it does not own (for example `console.service`, or another tenant's unit), and so make root deliver its bundle into that unit? Trace every writer of `Record.Unit` and `registry.Route.Unit`. If any non-operator path exists, that is a P1. |
| +3. The §4.1 rails: unmanaged-file guard (`unitsync.go` planStamped), overlap rail (prepareStamped), two-path check (`envFilesMatch`), base file names-only parsing (`baseenv.go`). Can any of them be bypassed by ordering, by a unit that already carries a carlos-marked drop-in, by an unreadable or symlinked base file, by `systemctl show` output shapes (quoted paths, `-` prefixes, globs, empty list), or by a race with an operator editing the unit? Is a value from the base file ever logged? |
| +4. Root-side writes: paths derived from `rt.Unit` and `rt.Host` (traversal, template/prefix names, symlinks in `/etc/systemd/system/<unit>.d/` or `/etc/carlos/apps/`), atomicity, permissions, and reaping when a stamp is removed. |
| +5. The release pass's `restartBoundUnit` and #114's config restart now both restart a stamped unit with no shared lock (deferred, see above). Separately from the deferral: does anything in THIS branch make an interleaving produce a wrong version stamp, a stuck unit, or a lying header that main did not already have? |
| +6. `stampedForDelivery` (`internal/appconfig/stamped.go:48`): a row with both `Backing=unit` and a `Unit` stamp stays on the carlos-app@ path. Is that right, and does every eligibility set (Sync, SyncExec, fingerprints, AwaitingRestart, UnitConfigApps) agree on it? |
| +7. Tests: do the §4.1 tests go through the real `SyncUnits` with only systemctl faked? Do any of main's tests now assert something weaker than before (e.g. #449's `TestAwaitingRestartOwnedEnvironmentInheritsNothing`, changed from Empty to one Undelivered)? |
| +8. Request budget: does the branch add any bucket read per box per pass with nothing changing? |
| + |
| +## 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. |
| + |
| +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. |