Repository navigation
fix: sandbox preparation scans twice after creating workspace layout - #195787
Conversation
Carry the protected mount directory producer result to the checkpoint owner. Preserve the quiesced full capture and ordinary unchanged fast path, with distinct in-flight keys for known mutations. The real managed-layout regression fails on the parent with probe plus scan and passes with one scan. Full owner/consumer proof passed 143 tests; focused final proof passed 7. The 35-line allocation covers this regression and observer in the existing test support module.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Codex review: needs maintainer review before merge. What this changesThis PR skips the unchanged-workspace probe after sandbox preparation creates protected layout directories. Example: First preparation creates skills and .agents/skills in a managed sandbox workspace.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR removes redundant workspace observation through the existing checkpoint owner, with no introduced correctness or security defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSandbox layout preparation supplies a known-mutation fact to the managed workspace checkpoint owner, which holds reconciliation custody and publishes captured changes to the canonical workspace. flowchart TD
A[Prepare managed workspace] --> B[Create protected directories]
B --> C[Report known mutation]
C --> D[Acquire checkpoint custody]
D --> E[Quiesce and capture]
E --> F[Publish canonical workspace]
Technical reviewBest possible solution: Carry the producer’s mutation fact into the existing checkpoint owner while preserving full capture, ordinary probes, and separate pending-operation identities. Do we have a high-confidence way to reproduce the issue? Source shows generated layout reaching an unconditional probe before capture, and the PR reports the existing real-layout cases failing on the exact parent; this read-only review ran no target code. Is this the best way to solve the issue? The smallest complete repair forwards the existing producer fact through existing owners, preserves the earlier admission fix, and prevents callers with different capture requirements from sharing a pending result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c06bec7fb7f4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +14, Tests +35, Other +3. Total +52 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 2:29 AM ET / 07:29 UTC. |
…#195787) Carry the protected mount directory producer result to the checkpoint owner. Preserve the quiesced full capture and ordinary unchanged fast path, with distinct in-flight keys for known mutations. The real managed-layout regression fails on the parent with probe plus scan and passes with one scan. Full owner/consumer proof passed 143 tests; focused final proof passed 7. The 35-line allocation covers this regression and observer in the existing test support module.
Allow initial guest PR preparation from the recorded project's published history while preserving unpublished work and original PR identity. (cherry picked from commit 2757947) Stable adaptation: preserve the existing linked-identity fixture; expand its options type and allocate exactly 89 regression LF instead of 84. Production and documentation patches are unchanged from the source. Companions: #188785 is present-equivalent. Later #188784, #190223, #190576, #190542, #195413, #197229, #197243, #199717, #195787, #197510, #193664, #199851, #199864, #197656, #198851, #193873, #197594, #189006, #188904, #194025, #196200, #192283, #189010, #188816 and e0466ff are not prerequisites to this scoped repair; retain their separate intake dispositions. No later PR-number mentions. Proof: baseline 4 failed/20 passed through registered agent action; fixed 41/41 across preparation, refresh and base-action suites. Type-aware lint4, formatting5, docs MDX1419 and diff check pass. No live GitHub or full release qualification claim. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes an unnecessary workspace scan during first sandbox preparation after the sandbox owner creates protected layout directories.
User Impact
Preparation skips the unchanged-workspace probe when its caller already knows the layout changed. The required checkpoint still captures the workspace under existing quiescence, authority and rejection checks. No configuration or database migration is needed.
Why This Change Was Made
The layout producer already reports whether it created directories, but the checkpoint owner discarded that fact and probed before performing the required capture. Forwarding the known mutation removes that redundant probe. Normal-probe callers and capture-required callers cannot coalesce into the same pending operation.
Production growth is 14 net lines for the internal option, forwarding and coalescing identity. The existing custody type moves to the existing types module to meet the file cap. No cache, schema, public configuration or concurrency policy is added. Related: #195713 and #195773. The actual layout capture required by #185777 is preserved.
Evidence
df13b6b8994cefe16f311f29f0301bba511ec617: the real sandbox producer probes before required capture. Candidate performs only capture, including clean, authored and real-workspace cases. Mixed checkpoint modes, normal probe-only calls, quiescence, authority revocation and rejected results remain covered.Exact-head CI 42576433452 passes on
0f0541e7423669d7e91f7fa3a0847ea43ebb7c46. Task-worktree dependency-link omissions were repaired without version changes and their failed checks rerun.pnpm check:changedstill reports 20 historical forbidden changelog credits, reproduced on exact parent and introduced by266a7aa0fe69(#194364); this is not an overall-green local check.No production data, production access, deployment or merge was involved.