Skip to content

test(codex): expect apply_patch recovery guidance in containment response - #185084

Merged
steipete merged 1 commit into
mainfrom
steipete/test-codex-patch-guidance-20261026
Oct 26, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/test-codex-patch-guidance-20261026

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Problem

extensions/codex/src/app-server/dynamic-tools.test.ts > "keeps Codex apply_patch containment diagnostics operator-only" fails on main. #184901 (c0ffba6e18a3) made host root-escape apply_patch errors carry model-visible recovery guidance through src/agents/apply-patch-containment-hint.ts. The Codex bridge test still expected only the bare Path 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

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T22:03:48.615698Z 40f23c7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 22:03
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The assertion expects only the root-escape error and fails because the response also contains recovery guidance.
  • After: The assertion expects the guidance while still checking that the outside file remains unchanged and permission advice stays operator-only.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, minimal test repair supported by source inspection and reported focused execution; validation remains in-process rather than a shipped-entry-point run.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only PR changes no production behavior; its reported focused run exercises real patch construction and the Codex bridge in process.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: The Codex bridge suite fails despite receiving the intentionally improved containment response.
Reason: The maintainer-authored change restores useful coverage without changing runtime behavior or weakening containment checks.

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
Reviewed head: 40f23c7fda3270c114546d41eb353307bb3deb7b

Before merge

None.

Findings

None.

Agent review details

How this fits together

OpenClaw’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]
Loading

Technical review

Best 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

  • Codex containment response expectation keeps the original intent (7df94d8: The test consolidation retained containment and operator-only diagnostic coverage; later runtime guidance intentionally changed the model-visible message.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests +1. Total +1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 1 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 1 +1

Labels

Label changes:

  • add P3: This repairs test-expectation drift without changing shipped runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This repairs test-expectation drift without changing shipped runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 6:16 PM ET / 22:16 UTC.

@steipete
steipete merged commit c7c65c6 into main Oct 26, 2026
117 of 122 checks passed
@steipete
steipete deleted the steipete/test-codex-patch-guidance-20261026 branch October 26, 2026 22:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant