carlos / platform Public

Review brief: agent-start-demo-1-followups round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 1d6db344f43889837dc52439e15375285fe0cfe5 parent 72c3bd2
1 file changed, +59 −0
  • docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-1-followups-R1.md +59 −0

CI passed — run details

diff --git a/docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-1-followups-R1.md b/docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-1-followups-R1.md
new file mode 100644
index 000000000..683b6ce69
--- /dev/null
+++ b/docs/superpowers/reviews/REVIEW-BRIEF-agent-start-demo-1-followups-R1.md
@@ -0,0 +1,59 @@
+# Review brief: agent-start-demo-1-followups branch, round 1 of 3
+
+Repo carlos/platform, branch `agent-start-demo-1-followups`, commit 72c3bd21db80028d6cea93e78d4d58e250713035 (the brief's own commit sits on top; it changes nothing else).
+Under review: the diff `origin/main...agent-start-demo-1-followups` (merge base is main's tip ffcf01b5; the branch's own work is commit da8f93bb plus the census overlay regenerated in merge 72c3bd21).
+Authorities: `docs/superpowers/specs/2026-11-02-agent-start-demo-design.md`, `docs/superpowers/plans/2026-11-02-agent-start-demo-1-anonymous-apps.md`, `docs/superpowers/notes/agent-start-demo-1-rulings.md`, AGENTS.md. 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 diff, then the code it touches, and check every claim against that code. The implementer's report (claims to check, not evidence) is `/home/paulca/.cache/tmp/claude-1001/asd-followups/fu-report.md`.
+
+The branch makes six follow-ups Paul approved on amadan #527 after the first dev deployment of anonymous demos:
+
+1. Starter (`internal/console/testdata/demo/main.go`) reads `--socket`/`--db` flags like a real box launch; the e2e (`internal/console/demo_e2e_test.go`) launches it with that argv and no CARLOS_SOCKET/CARLOS_DB env.
+2. Demo root control's unit (`internal/host/claimunit.go`) declares `StateDirectory=carlos-release/private` / `StateDirectoryMode=0700` so a fresh box without `/var/lib/carlos-release/private` does not fail 226/NAMESPACE.
+3. `internal/edge/wildcard.go`: an order error's 1h retry no longer gets lost when a refresh wakes the loop.
+4. README: every possible housekeeper box needs the demo tuple and DNS-01 grant.
+5. `internal/console/apidemo.go`: an earlier job of the same live lifetime reports `superseded`.
+6. Worker-reconnect 503 adds `Retry-After: 15`; budgets not charged.
+
+## Fixed: do not re-argue
+
+- Paul's rulings R1-R26 in `docs/superpowers/notes/agent-start-demo-1-rulings.md` (notably R13 box-wide demo mode from root-owned config, R14 CARLOS_DEMO_BOX switch). Report only mechanisms that fail to honour them.
+- The choice of Retry-After over a bounded wait in item 6, and a new `superseded` state in item 5, were options Paul's brief allowed.
+
+## What to check
+
+1. Correctness of each of the six items against the code paths they claim to fix; tests that would fail on the old code.
+2. **Root control unit path (focus).** `StateDirectory=carlos-release/private` in `claimUnitContent`: does systemd create `/var/lib/carlos-release/private` with the right owner/mode, is it compatible with the existing `ReadWritePaths` line and `ProtectSystem=strict`, with root's own release-state code that creates/uses that path (find it; check ownership, mode, any `0700` expectations, symlink/no-follow checks, and whether StateDirectory's chown/chmod on every start can fight with it or with `/var/lib/carlos-release` parent ownership), and is it emitted only in demo box mode with ordinary and claims-mode rendering byte-identical? Check every other path on the demo ReadWritePaths line for the same fresh-box failure. Is the test meaningful?
+3. **Wildcard retry (focus).** In `internal/edge/wildcard.go`, trace the loop: order failure sets `nextAttempt`, delay computation, refresh/startup wakes, issuer gate (`issuerGate`), standDowns, removed parents, multiple parents. Can a retry still be lost, postponed indefinitely by repeated refreshes, or fire early? Can the new delay be zero or negative and spin (CA hammering)? Does an issuer handoff behave? Are the tests driving the real loop/pass with the injected clock, and would they fail on the old code?
+4. Census (record a separate verdict): card `docs/superpowers/notes/census-proposal-agent-start-demo-1-followups.md` (regenerated on the merged tree; run `make census-card` if you want the current card, it writes nothing). Give a verdict for unit `internal/host/claimunit.go` `claimUnitContent` (body change) and for each re-pinned envelope `internal/edge` and `internal/host`, citing lines you read, under the AGENTS.md rule ("The census: the reviewer decides"): reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment root relies on; or if the diff cannot settle it. Note `internal/edge` envelope also contains main's changes; judge only this branch's edge diff.
+5. Items 5 and 6: status API contract (plan's status section and README API paragraph); superseded must never claim a live URL or mask a newer job's failure; a 503 must not spend create/update budget; Retry-After on the shared 503 helper must not mislead other callers.
+6. README wording accuracy against the code (housekeeper/issuer selection, restart need).
+
+## 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). Then the census verdicts (approve/reject per unit and envelope, with cited lines). 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 -run` on one package, niced, is fine; scratch under $TMPDIR).