Skip to content

fix(test): worker containment checks expect retired recovery guidance - #197082

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/warm-barnacle
Nov 11, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/warm-barnacle

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

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

  • Scheduled run 42959288749, job 130322099305 identifies the two configured/guarded exact-message mismatches at worker-runtime-permissions.suite.ts:303.
  • Source-extracted execution of the actual recovery-message owner against the independently written expectations fails both original cases and passes both candidate cases. This is diagnostic-boundary proof, not complete worker-runtime/filesystem integration proof.
  • Touched-file formatting and git diff --check pass. Independent isolated Codex review through P2 completed scoped-clean, no findings.
  • Named src/worker/worker.runtime.test.ts execution 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.
  • No workflow dispatch, rerun, browser/container, broad local suite, dependency staging, production Gateway or credential change.

Worked on by

roboclaw-bot and others added 2 commits November 11, 2026 06:39
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
@clawsweeper

clawsweeper Bot commented Nov 11, 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.

@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 Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

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

  • Before: The test expects generic respawn advice and pretty-printed JSON, rejecting the intended runtime result.
  • After: The test expects recorded-root guidance and compact JSON while still checking that outside-file contents and permissions remain unchanged.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, minimal test repair supported by source comparison, reported diagnostic execution, and green exact-head checks.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test repair changes no shipped behavior; the body reports source-extracted diagnostic checks and exact-head CI is green.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Worker runtime checks fail against intentional diagnostic and serialization behavior.
Reason: The maintainer-authored repair restores useful regression checks without changing permissions, runtime behavior, or test scope.

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
Reviewed head: b38f331e44d7138e2e7803c4b55e246744957a57

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Exact containment diagnostic expectations keeps the original intent (f20ea75: Keep worker assertions aligned with intended recovery diagnostics while preserving exact equality and filesystem protections.)
  • Serialized error-result expectation keeps the original intent (6f2faba: Check the model-visible rejection separately from operator-only containment explanations.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -2. Total -2 across 1 file. Added test files: 0.

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

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a narrow test-maintenance repair with no production behavior change.
  • 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 is a narrow test-maintenance repair with no production behavior change.
  • 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 November 11, 2026, 1:54 AM ET / 06:54 UTC.

@roboclaw-bot
roboclaw-bot merged commit 3ea9d63 into main Nov 11, 2026
132 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/warm-barnacle branch November 11, 2026 06:57
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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