Repository navigation
test(codex): expect apply_patch recovery guidance in containment response - #185084
Conversation
|
🦞👀 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 SummaryThis 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 updates the Codex bridge test to expect the existing model-visible recovery guidance for rejected apply_patch paths. Example: The test attempts to patch /tmp/outside.txt with file tools rooted at /tmp/workspace.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it correctly repairs a stale test expectation while preserving containment and diagnostic-separation coverage; no introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClaw’s patch tool rejects paths outside its bound workspace, and the Codex bridge translates that failure into model-visible text while logging separate operator guidance. flowchart LR
A[Codex tool call] --> B[OpenClaw dynamic tool bridge]
B --> C[Patch containment owner]
C --> D[Root escape with recovery guidance]
D --> E[Model error response]
D --> F[Separate operator diagnostic]
Technical reviewBest possible solution: Land this focused expectation update while retaining all existing containment and diagnostic-separation assertions. Do we have a high-confidence way to reproduce the issue? The current-main assertion omits text explicitly appended by the production containment owner; the linked maintainer discussion independently reports the matching baseline failure, but no tests were run during this read-only review. Is this the best way to solve the issue? Updating the existing independent expected response is the smallest complete repair and preserves the security-relevant assertions without adding scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1f60747222d3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +1. Total +1 across 1 file. Added test files: 0. View PR surface stats
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 October 26, 2026, 6:16 PM ET / 22:16 UTC. |
Problem
extensions/codex/src/app-server/dynamic-tools.test.ts> "keeps Codex apply_patch containment diagnostics operator-only" fails onmain. #184901 (c0ffba6e18a3) made host root-escapeapply_patcherrors carry model-visible recovery guidance throughsrc/agents/apply-patch-containment-hint.ts. The Codex bridge test still expected only the barePath escapes sandbox root (...)text.Change
This is a test-only change. The expected model-visible message now includes the guidance #184901 appends. The operator-only assertions are unchanged: the logged hint is still required, and the escaped path still must not appear in operator logs.
Evidence
node scripts/run-vitest.mjs extensions/codex/src/app-server/dynamic-tools.test.ts --maxWorkers=1: 52/52 passed with this change. Without it, the target test fails onmainwith the mismatch described above; it was observed in fix(agents): release completed run state from retained async contexts #184990's exact-head CI and reproduced on that PR's parent.