Repository navigation
fix(test): worker containment checks expect retired recovery guidance - #197082
Conversation
Preserve source-specific root recovery from #194473 and compact model-visible JSON from #196756 while keeping denial, outside-file and operator-hint assertions intact. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 992c9b9d-1cb4-8f47-ade7-b850d5e2aa5f
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR updates worker permission tests to expect source-specific recovery guidance and compact JSON error results. Example: A guarded worker attempts to patch ../outside.txt outside its recorded root.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it correctly repairs stale test expectations, preserves containment assertions, and has green exact-head checks; no actionable findings remain. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe worker permission suite sends tool requests through the worker runtime and checks the returned diagnostics, operator logs, and filesystem effects. flowchart TD
A[Permission test fixture] --> B[Worker runtime]
B --> C[Prepared containment policy]
C --> D[Patch rejection]
D --> E[Recovery diagnostic owner]
E --> F[Compact result serializer]
F --> G[Diagnostic and filesystem assertions]
Technical reviewBest possible solution: Merge the focused expectation repair while retaining the existing production owners and containment assertions. Do we have a high-confidence way to reproduce the issue? The stale assertions visibly disagree with the current recovery and serialization owners; no target code was executed during this review. Is this the best way to solve the issue? Updating the independent expectations is the smallest complete fix because production already implements the intended behavior and the existing rejection checks remain intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9a19582e9255. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2. Total -2 across 1 file. 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. 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 11, 2026, 1:54 AM ET / 06:54 UTC. |
|
Merged via squash.
|
…openclaw#197082) Align the worker permission fixture with source-specific containment recovery guidance introduced by openclaw#194473 and compact JSON results introduced by openclaw#196756. Preserve exact denial, outside-file contents/mode and operator-only hint assertions. No production permission policy changes. Proof: independent isolated review clean; source-extracted diagnostic red/green checks for configured and guarded modes; exact-head CI 42974054691 passed changed tests, boundary checks, lint/types, ratchets and ci-gate. Local named runtime test could not collect without task dependencies; no local integration success claimed. Co-authored-by: steipete <[email protected]> Co-authored-by: obviyus <[email protected]>
Related: #194473, #196756
What Problem This Solves
Fixes worker-runtime checks rejecting the current source-specific containment guidance and compact error-result text.
User Impact
No production or permission changes. The fixture retains exact denial diagnostics, unchanged outside-file bytes and mode, and separation of operator-only hints from model-visible output.
Why This Change Was Made
#194473 intentionally distinguishes configuration containment from a recorded session root: a hidden native child cannot widen the latter by changing cwd. #196756 intentionally emits compact model-visible JSON. Independently assert both current messages and compact serialization instead of restoring obsolete generic respawn advice. Existing policy, filesystem and logging assertions remain intact; no retries, timeouts, skips, baselines, production changes or net test growth.
Contributor credit: @steipete and @obviyus.
Work sessions
Linked for team reference; these sessions aren’t public.
Evidence
worker-runtime-permissions.suite.ts:303.git diff --checkpass. Independent isolated Codex review through P2 completed scoped-clean, no findings.src/worker/worker.runtime.test.tsexecution stopped before collection because this independent task checkout lacks dependencies. Full named execution and static checks remain for exact-head PR CI before landing; no guard was bypassed or local full-test pass claimed.Worked on by