carlos / platform Public

reviews: brief Astra on the #892 design, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d526ab0951955742855e7a24342c5d5c1441492b parent 8bfc752
1 file changed, +68 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-REPLICAS-SCALE.md +68 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-REPLICAS-SCALE.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-REPLICAS-SCALE.md
new file mode 100644
index 000000000..709b8c172
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-REPLICAS-SCALE.md
@@ -0,0 +1,68 @@
+# Review brief: stateless replicas at production scale design (#892), round 1 of 3
+
+Repo carlos/platform, branch `design-stateless-replicas-scale`, commit 8bfc752b.
+Under review: `docs/superpowers/specs/2026-11-11-stateless-replicas-production-scale-design.md`.
+Authorities (merged on main): `docs/superpowers/specs/2026-11-01-stateless-replicas-design.md`
+("11-01"), `docs/superpowers/specs/2026-10-24-rootfs-apps-design.md`, `docs/site/rootfs.md`,
+and the code on this branch (which is main 01d6ca78).
+
+S2 and S3 name #511 Plan 4 (`stateless-replicas-4`, unmerged) as where they will
+be built later. Do not review Plan 4 or its branch. Review S2 and S3 only for
+consistency with the merged 11-01 design and today's code; their plans are written
+after Plan 4 merges.
+
+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
+
+- 11-01 §5 (Paul's decisions): one copy per box, a copy may grow to fit its box,
+ workers on every copy, release once per deploy, websockets drop and reconnect.
+- Paul asked for #892 to be done without a live brainstorm; the author's calls are
+ listed in §9 for him. Report a call only if it is unsafe or contradicts a merged
+ authority, not because another call is possible.
+
+## What to check
+
+1. §2's rejection of worker-only instances: does 11-01 §6.6 (and the code) really
+ run the release command once per instance, so two instances of one app run it
+ twice per build?
+2. S1 (`CARLOS_MEMORY_MIB`): can the agent set it on every rootfs launch path from a
+ limit it already computes, with no new reads? Check `internal/activator/rootfs.go`
+ `spawnRootfs` (its `tier`), `rootfsenv.go` (workers inherit web's launch env;
+ release, run and TTY env), `backend_rootfs.go`, and the agent-owned name lists
+ (`agentOwnedNames`, `rootfsOwnedNames`, `moves.AgentOwnedVars` and its pin test).
+ Name any reader that would break or any path where the figure would be wrong
+ (for example a run or session whose unit has a different limit than the instance,
+ or a worker started after a size change against web's older launch env).
+3. S3 (drain swap): is "drain when copies > 1 and the size is a fleet size, never
+ drain a copy with no other copy serving" coherent with 11-01 §6.3-§6.4 and the
+ hub routing on main (`internal/edge`, Plan 3)? Is there a case where a box drains
+ the last serving copy, or where the hub keeps sending to a draining copy?
+4. §3's arithmetic and the 27.3 GiB budget figure.
+5. Anything in the design that contradicts a merged spec or today's code.
+
+## 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.
+- **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, 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. Keep to the five checks above.