carlos / platform Public

docs: review brief for the hub console address spec, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 196054ede8bd387b1ffd1c3b12b400bb13e25084 parent abdb2d9
1 file changed, +99 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install.md +99 −0
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install.md
new file mode 100644
index 000000000..484f1749e
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-hub-console-address-from-install.md
@@ -0,0 +1,99 @@
+# Review brief: hub console address from install (design spec), round 1 of 3
+
+Repo carlos/platform, branch `console-addr-from-install`, commit
+abdb2d98fd5b99e6995fc563bcbcffaa26e6e68f.
+Under review: `docs/superpowers/specs/2026-11-24-hub-console-address-from-install-design.md`.
+Authorities: the code on `main` (this branch is main plus the spec);
+`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, recorded in the spec's header): root's
+ install of the console writes the console's address into a root-owned
+ file the edge reads; trust comes from root and a release only the
+ operator account can promote, never from records. Report only mechanisms
+ that fail to honour it.
+- `/proc`/cgroup listener discovery is rejected (branch
+ `hub-operator-console`, Codex's two P1s). Do not propose it.
+- The precedence `CARLOS_REPLICA_CONSOLE_ADDR` > the new record > the old
+ route scan is the requested shape. Tito and self-hosters keep the env var.
+
+## What to check
+
+1. **Record-free.** Does anything in §3-§4 let a record, route row, bucket
+ object, tenant, app or box agent choose or change the address the edge
+ forwards fleet tokens to, or make the writer say `ok` for something that
+ is not an ops-account console build? Check `VersionPath`
+ (`internal/release/versions.go`), `verifyPointer`
+ (`internal/release/release.go`), `makeRestartRoute`
+ (`internal/host/agent.go`), and the guard marker (`internal/host/unitops.go`,
+ `internal/hostfloor/report.go`).
+2. **The derivation in §4.** Is the systemd environment precedence stated
+ correctly (EnvironmentFile over Environment=, last assignment wins,
+ `-` optional files, UnsetEnvironment/PassEnvironment)? Is anything that
+ can set the console's `CONSOLE_ADDR` missed (drop-ins, `ExecStart`
+ wrappers, the console's own defaults, `cmd/console/main.go:957`)? Is the
+ `ExecStart` shape check sufficient and parseable from `systemctl show`
+ output?
+3. **The edge reader in §5.** Is reading per call with
+ `rootstate.OpenTrustedFile` + `CheckPublicConfig` sound from the edge's
+ uid (`carlos`) under `carlos-edge.service`'s sandbox? Can the edge be
+ made to use a record root did not write?
+4. **Fail closed (§6).** Does any failure produce an address the edge would
+ not have used before this change? Is falling through to the existing
+ route scan on a non-`ok` record a regression against the trust comment
+ at `internal/edge/replicaconsole.go:16-26`?
+5. **Listener identity (§2).** The spec argues the stop/rebind residual is
+ the env var's, and narrows who can bind host loopback on a hub. Check the
+ unit claims (`internal/host/units/carlos-instance@.service`,
+ `carlos-instance-rootfs@.service`, `carlos-app@.service`,
+ `internal/execsandbox/command.go`). Is the argument correct, and is
+ leaving the full fix as a decision for Paul acceptable, or does this
+ design make the exposure worse than today?
+6. **host.env ownership.** On the flagship hub `/etc/carlos/host.env` is
+ `carlos:carlos` 0600. Is §2's treatment correct?
+7. **Rollout (§9), visibility (§8), census and tests (§10).** Can every step
+ be done and verified without a shell on the box, apart from the one
+ Paul-approved removal of the interim line? Are the census scope claims
+ right?
+
+## 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.