reviews: Astra brief for #991 round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+41
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-INSTANCE-GOMEMLIMIT-991.md+41 −0
CI passed — run details
Intent
Attributed to this commit: 119 g CO₂e (14,075,598 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on instance-gomemlimit-991, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-INSTANCE-GOMEMLIMIT-991.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-INSTANCE-GOMEMLIMIT-991.md| new file mode 100644 |
| index 000000000..f0a003f02 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-INSTANCE-GOMEMLIMIT-991.md |
| @@ -0,0 +1,41 @@ |
| +# Review brief: instance GOMEMLIMIT default (#991), branch, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `instance-gomemlimit-991`, commit 75e0c87fe2768781df78d1f6e495c8c5155d0ad6. |
| +Under review: the diff `7e0c953ee6a9beb42b690fa7694afafdcd88a1ea..75e0c87fe2768781df78d1f6e495c8c5155d0ad6` (three commits: code and tests, census overlay, one docs sentence). |
| +Authorities: AGENTS.md on main (Build & test, the census section, Rules this repo has paid for); amadan discussion #991 (the goal and its correction reply). Do not review against unmerged branches (stateless-scale-1-memory-env adds CARLOS_MEMORY_MIB for rootfs and is NOT an authority; this branch deliberately leaves rootfsenv.go alone). |
| + |
| +You are an independent reviewer. Read the diff, then the code it names, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Scope is GOMEMLIMIT only, binary instances only (flat exec child and nested unit). GOMAXPROCS is out (nested slices get CPUQuota from the size; Go 1.25+ reads cpu.max). Rootfs, co-spawned sidecars, sidecar members, seeds and carlos run are out of scope for this branch. |
| +- Value: memory.max/10*8 bytes, from the same tier the cgroup or nested slice gets for that start. An app-set GOMEMLIMIT (app config or <host>.env, any value including empty) wins verbatim. |
| +- gVisor-run instances keep root's fixed value (internal/instanceexec/sandbox.go gvisorLauncher). |
| + |
| +## What to check |
| + |
| +1. Every binary launch path: does the value always match the memory.max applied to that very start (no second read of a live tier that can differ, e.g. across a resize or a swap)? Is any path left setting nothing where it should, or setting it where the child is uncapped? |
| +2. The startRole signature change (containment.go): did reading the tier once at the caller change behaviour for any caller, including generations above 0, swaps, staged starts and HA/claim starts? Root and termination behaviour must be unchanged. |
| +3. Override rule: is "the app set it" detected from the right layers (default bundle, named environment, <host>.env), and never from a platform-owned variable? Can a tenant use this to influence anything root reads? (It shouldn't: it's a child env var.) |
| +4. LaunchLayers / move env pins excluding the default: correct, and does it leave any move or adoption check comparing envs that now differ between old and new agents? |
| +5. Tests: would each fail if its guard were removed? Any test that passes either way? |
| +6. Census: `docs/superpowers/notes/census-proposal-instance-gomemlimit-991.md` and `internal/provision/testdata/plan14-root-reads-instance-gomemlimit-991.tsv`. You are the census reviewer (AGENTS.md, "The census: the reviewer decides"): approve or refuse each changed unit's class and claim, explicitly. |
| +7. The docs sentence in docs/site/cli.md: accurate to the code (it says the box sets GOMEMLIMIT for instances; check it doesn't overclaim for rootfs, seeds or carlos run). |
| + |
| +## 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 problem, the evidence (file:line, verified), the failure scenario, a concrete fix and the invariant or trust boundary it breaks. Then a "Census verdict" section: APPROVED or REFUSED per unit. 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 the touched packages is fine (leave GOCACHE unset). |