docs: review brief for the hub console spec, round 2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+109
−0
docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install-R2.md+109 −0
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install-R2.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install-R2.md| new file mode 100644 |
| index 000000000..4acb0f7a1 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install-R2.md |
| @@ -0,0 +1,109 @@ |
| +# Review brief: hub console address from install (design spec), round 2 of 3 |
| + |
| +Repo carlos/platform, branch `console-addr-from-install`, commit |
| +31bcd18375de1d47b6dd7c2e5f75f9f48d117bbe. |
| +Under review: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md` (rev 2). |
| +Authorities: the code on `main` (this branch is main plus the spec and its |
| +review files); `docs/superpowers/specs/2026-08-23-console-as-an-app-design.md`, |
| +`docs/superpowers/specs/2026-11-19-named-units-from-parameters-design.md`, |
| +`docs/superpowers/specs/2026-10-06-console-release-defences-design.md`; |
| +AGENTS.md (stopping rules, the census, "Operate via API and CLI"). Do not |
| +review against unmerged branches; if this work needs one, say so as a P1 |
| +and stop. |
| + |
| +You are an independent reviewer. Read the document, then the code it |
| +names, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's direction (2026-11-24, in the spec's header): root's install of the |
| + console makes where the console is known to the hub through a root-owned |
| + file; trust comes from root, never from records. Rev 2 reads this as a |
| + root-owned drop-in creating a systemd runtime directory (§12.1 asks Paul to |
| + confirm). Report only mechanisms that fail to honour it. |
| +- `/proc`/cgroup listener discovery is rejected (branch |
| + `hub-operator-console`). Do not propose it. |
| +- The precedence `CARLOS_REPLICA_CONSOLE_ADDR` > the new source > the old |
| + route scan is the requested shape. Tito and self-hosters keep the env var. |
| +- Round 1 P1-2 is declined with reasons in the spec's §3 ("What 'the |
| + console' means here") and §11: rev 2 no longer reads the version store, |
| + and the console binary's provenance is the release path's guarantee, the |
| + same one the console's public routes rely on. Raise it again only with new |
| + evidence that rev 2 itself relies on, or weakens, that provenance. |
| + |
| +## What to check |
| + |
| +1. **Who can create or occupy the path.** Can anything other than root (via |
| + root-owned unit configuration) create `/run/carlos-console`, or anyone |
| + other than console.service's user or root place `fleet.sock` in it? Check |
| + every root writer of unit drop-ins for one that renders a directive from |
| + app, bucket or record data (`internal/appconfig`, `internal/caps`, |
| + `internal/host`). Check systemd `RuntimeDirectory=` semantics (owner, mode, |
| + removal on stop and on restart, accumulation across drop-ins). |
| +2. **The edge (§6).** Two `lstat`s then a dial: is the check-to-dial window |
| + safe given who can change the directory? Can the edge, as `carlos` under |
| + `internal/host/units/carlos-edge.service`'s sandbox (`ProtectSystem=strict`, |
| + `RestrictAddressFamilies`), connect to a socket under `/run`? Is the claim |
| + about `sb_permission` correct? |
| +3. **The root step (§4).** Placement in `runAdoptUnderRootRelease` |
| + (`internal/host/agent.go`), interaction with the guard's |
| + `90-host-floor.conf` and config delivery's drop-ins on `console.service`, |
| + daemon-reload only on change, removal when the unit is gone. |
| +4. **The console listener (§5).** Is serving only the two box doors on the |
| + socket consistent with what the console's fleet handlers need (no |
| + reliance on a TCP peer address)? Check `internal/console/apifleetseeds.go`, |
| + `internal/console/replicadeploy.go` and the edge's forward-proof header. |
| +5. **Fail closed (§7).** Does any case forward a token somewhere it should |
| + not, or regress a hub that works today (dev's accountless route scan)? |
| +6. **Visibility and rollout (§8-§9).** Can each step be verified remotely |
| + through `carlos system status`, apart from the one Paul-approved removal |
| + of the interim line? Is the heartbeat-to-API-to-CLI path stated |
| + correctly (`internal/status/snapshot.go`, |
| + `internal/console/apisystemupdate.go`, `system.go`)? |
| +7. **Census and tests (§10).** Are the scope claims right, and do the tests |
| + cover each §7 row? |
| + |
| +## Round 2 |
| + |
| +Earlier rounds: `docs/superpowers/specs/CODEX-FINDINGS-hub-console-address-from-install-R1.md` |
| +(NOT READY: P1-1, P1-2, P1-3; P2-4, P2-5, P2-6). The round number counts |
| +every earlier review of this design, under any file name or reviewer. |
| + |
| +First give one line per P1 and P2 from round 1: resolved, partly, or not |
| +(P1-2 is declined, see above: say whether the decline holds). Carry every |
| +unresolved or partly resolved finding forward at its current severity, then |
| +add new findings. The verdict covers everything outstanding, earlier rounds |
| +included. |
| + |
| +## 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. |
| + |
| +In 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. |