docs: per-task review briefs (tasks 1, 3, 4, 5), round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+250
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T1.md+62 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T3.md+63 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T4.md+63 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T5.md+62 −0
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T1.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T1.md| new file mode 100644 |
| index 000000000..685f74baf |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T1.md |
| @@ -0,0 +1,62 @@ |
| +# Review brief: Task 1: the reserved carlos- runtime-directory prefix (a security gate), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `console-addr-from-install`, commit e043ac06d92ddd610cecc5fcccdb59ca4adc9a45. |
| +Under review: the diff `79075f0cae57a0e8354b3404ce1f6c044c78066f..e043ac06d92ddd610cecc5fcccdb59ca4adc9a45` in `internal/caps/caps.go`, `internal/caps/converge.go`, `internal/caps/runtimedir_reserved_test.go`, `internal/caps/runtimedir_guard_test.go`. |
| +Authorities: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md` |
| +(rev 3; design review closed, Paul's decisions in §12, §14, §15) and |
| +`docs/superpowers/plans/2026-11-24-hub-console-socket.md` (plan review |
| +closed), both on this branch, and the code on `main`. Do not review |
| +against other unmerged branches; if this work needs one, say so as a P1 |
| +and stop. |
| + |
| +You are an independent reviewer. Read the spec section and the plan task, |
| +then the diff, and check every claim against the code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The design and Paul's decisions (spec §12, §14): the `carlos-` runtime |
| + directory prefix reserved in `internal/caps` with a guard test; a |
| + root-written drop-in plus a console-owned socket; env > socket > the |
| + route scan, the route scan deleted the release after. Report only code |
| + that fails to implement them, or that is unsafe or would not work. |
| +- Design-review R1 P1-2 (version-path provenance) is declined (spec §11). |
| + |
| +## What to check |
| + |
| +1. Does `ReservedRuntimeDir` refuse every `carlos-` name on every path an app's `runtime_dir` reaches a unit: ship (`cli.go`), adopt (`internal/release/release.go`), converge (`internal/caps/converge.go`), render (`internal/caps/render.go`)? Any path that renders `RuntimeDirectory=` from app data without `ValidCapabilities`? |
| +2. `RuntimeDirClaimant`: does it fail closed on every error that is not absence, and does it read exactly the drop-ins `scanClaims` and systemd would apply? Any claim location it misses (a socket drop-in, an operator's own drop-in name)? |
| +3. The guard test: does it find what it says (site counts, split spellings, property maps), and are the allowlist's writers all under `carlos-`? Is its residual stated honestly? |
| +4. Did the change alter any existing behaviour of `ValidCapabilities` or `scanClaims` for names that were valid before (other than `carlos-*`)? |
| + |
| +## 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. |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T3.md| new file mode 100644 |
| index 000000000..82bc6a366 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T3.md |
| @@ -0,0 +1,63 @@ |
| +# Review brief: Task 3: root's console fleet step (root code), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `console-addr-from-install`, commit e043ac06d92ddd610cecc5fcccdb59ca4adc9a45. |
| +Under review: the diff `79075f0cae57a0e8354b3404ce1f6c044c78066f..e043ac06d92ddd610cecc5fcccdb59ca4adc9a45` in `internal/host/consolefleet.go`, `internal/host/consolefleet_test.go`, the call in `internal/host/agent.go` (`runAdoptUnderRootRelease`), `internal/consolefleet/consolefleet.go`. |
| +Authorities: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md` |
| +(rev 3; design review closed, Paul's decisions in §12, §14, §15) and |
| +`docs/superpowers/plans/2026-11-24-hub-console-socket.md` (plan review |
| +closed), both on this branch, and the code on `main`. Do not review |
| +against other unmerged branches; if this work needs one, say so as a P1 |
| +and stop. |
| + |
| +You are an independent reviewer. Read the spec section and the plan task, |
| +then the diff, and check every claim against the code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The design and Paul's decisions (spec §12, §14): the `carlos-` runtime |
| + directory prefix reserved in `internal/caps` with a guard test; a |
| + root-written drop-in plus a console-owned socket; env > socket > the |
| + route scan, the route scan deleted the release after. Report only code |
| + that fails to implement them, or that is unsafe or would not work. |
| +- Design-review R1 P1-2 (version-path provenance) is declined (spec §11). |
| + |
| +## What to check |
| + |
| +1. Spec §4 steps 1-5: is each implemented exactly? The reload-pending marker ordering: can any failure (write, reload, crash between steps) leave a drop-in on disk that is not in effect while the record says `exclusive: true`? |
| +2. The `systemctl show` parse: strict enough? Does `systemd.Command(...).Output(ctx)` behave as assumed (exit status for a unit that does not exist, property formats for `RuntimeDirectory`, `RuntimeDirectoryMode`, `RuntimeDirectoryPreserve`)? |
| +3. Exclusivity: are the checks sufficient for the edge to trust the socket (spec §3, §4 step 5)? What could hold `/run/carlos-console` that the step would miss? |
| +4. Root safety: every path root reads or writes is fixed; nothing a tenant, app, agent or record can create or name steers it. The rootstate store use (`rootstate.Open(dir, true, true)`), `hostfloor.Durable`, `os.Remove` + directory sync. |
| +5. Placement in the pass: never fatal, full and config-only passes, not restart-only; the record write only on change. |
| + |
| +## 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. |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T4.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T4.md| new file mode 100644 |
| index 000000000..a5341d88a |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T4.md |
| @@ -0,0 +1,63 @@ |
| +# Review brief: Task 4: the edge's selection of the console's fleet socket (a gate on where fleet bearer tokens go), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `console-addr-from-install`, commit e043ac06d92ddd610cecc5fcccdb59ca4adc9a45. |
| +Under review: the diff `79075f0cae57a0e8354b3404ce1f6c044c78066f..e043ac06d92ddd610cecc5fcccdb59ca4adc9a45` in `internal/edge/replicaconsole.go`, `internal/edge/edge.go` (the new fields and `newEdge`), `internal/edge/replicaconsole_socket_test.go`. |
| +Authorities: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md` |
| +(rev 3; design review closed, Paul's decisions in §12, §14, §15) and |
| +`docs/superpowers/plans/2026-11-24-hub-console-socket.md` (plan review |
| +closed), both on this branch, and the code on `main`. Do not review |
| +against other unmerged branches; if this work needs one, say so as a P1 |
| +and stop. |
| + |
| +You are an independent reviewer. Read the spec section and the plan task, |
| +then the diff, and check every claim against the code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The design and Paul's decisions (spec §12, §14): the `carlos-` runtime |
| + directory prefix reserved in `internal/caps` with a guard test; a |
| + root-written drop-in plus a console-owned socket; env > socket > the |
| + route scan, the route scan deleted the release after. Report only code |
| + that fails to implement them, or that is unsafe or would not work. |
| +- Design-review R1 P1-2 (version-path provenance) is declined (spec §11). |
| + |
| +## What to check |
| + |
| +1. Precedence env > socket > route scan exactly as spec §6. Can any input other than root's record and the directory's ownership choose the socket, or can a route row change where a token goes while the socket is used? |
| +2. The production record reader: `rootstate.OpenTrustedFile` + `CheckPublicConfig` + `consolefleet.DecodeRecord`. Can the edge be made to act on a record root did not write? |
| +3. `ready()`: the check-to-dial window (only root and the directory's owner can change `/run/carlos-console`); the unix proxy dials only that path; a failed dial is a 502 with no version header and no fallback. |
| +4. The last-call record and its status wrapper: correct results (`ok` for 2xx, otherwise the code), safe under `-race`, no header edits (AGENTS.md: a wrapper that edits headers needs its own map), nothing lost for a streamed or hijacked response on these POST doors. |
| +5. Tests: would they catch a regression in the trust rule at `replicaconsole.go:16-26`? |
| + |
| +## 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. |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T5.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T5.md| new file mode 100644 |
| index 000000000..eee6a9c19 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-hub-console-socket-T5.md |
| @@ -0,0 +1,62 @@ |
| +# Review brief: Task 5: the console's fleet socket listener (termination: it changes how the console stops), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `console-addr-from-install`, commit e043ac06d92ddd610cecc5fcccdb59ca4adc9a45. |
| +Under review: the diff `79075f0cae57a0e8354b3404ce1f6c044c78066f..e043ac06d92ddd610cecc5fcccdb59ca4adc9a45` in `cmd/console/fleetsocket.go`, `cmd/console/fleetsocket_unix.go`, `cmd/console/fleetsocket_other.go`, `cmd/console/fleetsocket_test.go`, `cmd/console/stop.go`, `cmd/console/main.go` (serve). |
| +Authorities: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md` |
| +(rev 3; design review closed, Paul's decisions in §12, §14, §15) and |
| +`docs/superpowers/plans/2026-11-24-hub-console-socket.md` (plan review |
| +closed), both on this branch, and the code on `main`. Do not review |
| +against other unmerged branches; if this work needs one, say so as a P1 |
| +and stop. |
| + |
| +You are an independent reviewer. Read the spec section and the plan task, |
| +then the diff, and check every claim against the code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The design and Paul's decisions (spec §12, §14): the `carlos-` runtime |
| + directory prefix reserved in `internal/caps` with a guard test; a |
| + root-written drop-in plus a console-owned socket; env > socket > the |
| + route scan, the route scan deleted the release after. Report only code |
| + that fails to implement them, or that is unsafe or would not work. |
| +- Design-review R1 P1-2 (version-path provenance) is declined (spec §11). |
| + |
| +## What to check |
| + |
| +1. `consoleStop.serve` with extra listeners: does one `Shutdown` close and drain both; can a fleet listener failure end the console or leak a goroutine past the stop; is the exit status unchanged? |
| +2. `fleetSocketOnly`: does `http.LocalAddrContextKey` reliably identify the unix listener for every request, and does the 404 hold for every non-box-door request (paths, methods, raw paths)? |
| +3. `openFleetSocket`: directory checks (symlink, owner, mode), removing a stale socket, the 0666 chmod window (between listen and chmod), and behaviour on a box where the directory does not exist (today's flagship until root's drop-in and a console restart). |
| +4. Does anything here change the console's TCP serving, readiness (`NotifyReady`) or the systemd stop budget? |
| + |
| +## 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. |