carlos / platform Public

Blocked: resident guard misses StartStaged; review budget exhausted Issue closed

On branch security-review-mitigations

BLOCKED: NOT READY at 636d5f3af3dd688f5b70bebcfa0a29c111ea9e9e. Do not merge or deploy this branch.

The same isolation fault family appeared in rounds 2 and 3. R2 found new stateless binary residents starting flat on nested deployments. The first fix guarded ExecBackend.Start and startGenFrom, but R3 traced the production service wake through doWake -> doStatelessWake -> startPinnedAt -> SplitBackend.StartStaged -> ExecBackend.StartStaged -> spawnChildFrom. That path bypasses the new guard. A new resident whose stateless mark arrives after a flat mint can still execute with the agent UID. The direct Start/StartGen regression tests do not cover this production path.

Review history: R1 GLM/Mistral audit no P1; R2 Opus approved dependency/console changes but the separate policy check found the resident P1 and implicit-flat P2; R3 final Opus review is NOT READY for the missed StartStaged path. Census units/envelopes were approved on the census's narrower root-read question, but that is not overall security approval. No fourth round and no further layout fix without Paul's choice, per AGENTS.md stopping rules 1 and 2.

Recommended choice: enforce the invariant once at spawnChildFrom, before primary flat/foreign binary preparation/execution, with one Service-level stateless wake regression through the actual StartStaged path. Preserve previously served/good-version legacy residents and explicit operator flat choice. Remove duplicate enforcement that could drift, update census, and authorize one narrowly scoped fourth review of the final change. Verify all entry points rather than adding only another wrapper check.

Alternatives under the rule: (a) refuse the affected new resident/multi-copy case at admission and report it to operators until safe support exists; (b) disable/defer that feature for new untrusted tenants. The already-reviewed dependency/console changes can be separated if Paul chooses to ship that slice while layout remains blocked; that does not make the layout risk resolved.

All mitigation code is committed and pushed. No merge or production deployment occurred. A merge from newer main was aborted after the census-chain conflict; the reviewed tip remains intact. Static-site header capability is #771; unrelated rootfs cleanup flake is #772. Branch CI remains separate from this security blocker.

Paul explicitly selected “Central guard + one fourth review (Recommended)” in the session after the R3 blocker was explained. Authorized scope: enforce the existing never-served resident predicate once in spawnChildFrom, preserve trusted served/good-version legacy and explicit-flat behavior, test through the actual Service stateless wake/StartStaged path, update census, and perform exactly one additional Opus security/census review. No broader fix loop or production authorization was granted.

Implementation is in progress. The branch remains blocked from merge until that review and final-tip CI pass. Reviewed main has been merged into the working branch; the census overlay will be regenerated against it. R1-R3 history remains unchanged.

Authorized Opus R4 at 4fb2910820422cb1eec7c1669e520b7f19f8025b: READY AFTER FIXES. R3 P1 is CLOSED; the reviewer traced all primary flat/foreign start paths into the single spawnChildFrom guard and validated the real Service -> SplitBackend -> StartStaged regression. All named census units/envelopes and the RouteFor name-class consequence approved.

One P2 availability correction is being applied exactly as requested: return launchRefused{ErrFenced} so a pre-exec refusal records proven no-start instead of stop uncertainty; add Service/convergence coverage. No fifth review and no broader isolation fix loop. Missing-db/foreign-row recovery remains a separately recorded supported-product gap, not a production-storage change in this branch.

Full CI on the R4-reviewed tip has passed. The final P2 commit will receive final-tip CI before any merge. No deployment or production resource changes.

Opus completion of the mandatory P2/census verification WITHIN the authorized R4 (not a fifth round) explicitly approved final tip 1bc3d4badd2ceac5cb735f0664d89d85c034e6c8 and closed R4.

Verified: exact launchRefused{ErrFenced} return at backend_exec.go:2193; unchanged predicate, read sources, errors.Is and text; real Service StopUncertain assertion and actual layout.Pass.Converge tests for DB-present recovery and no-DB refusal. No optional-database/root-storage behavior added; #774 retained as the allowed known residual. The five census units and their dispositions/read sites are unchanged from R4 approval: runAgent, mintLayoutIntentWith, spawnChildFrom, residentLayoutRefusal, RouteFor. All four envelopes approved at final tip; helper and chain/proposal seal changes checked. The reviewer did not recompute hashes; census-propose validated them, and the author retained the byte-identical production-diff integration comparison.

Verdict: P2 complete; final-tip census APPROVED; R4 CLOSED. Merge remains conditional on CI at that exact final tip. No further review round was opened or authorized.

Mitigation branch landed through amadan as 197cc40ca6fd98dc80bb7baadb59206cabab9954 after CI passed on reviewed tip 1bc3d4badd2ceac5cb735f0664d89d85c034e6c8. Opus R4 and its P2 completion check are closed. Central spawnChildFrom guard covers StartStaged; trusted legacy and explicit flat remain supported. No production deployment. #771 and #774 remain follow-ups. Main CI is running; GitHub mirror synchronized.