Skip to content

test: select workspace mode for worker wire permission proof - #132267

Merged
steipete merged 1 commit into
mainfrom
steipete/worker-permission-main-20260828
Aug 29, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/worker-permission-main-20260828

Conversation

@steipete

@steipete steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes a stale worker wire-test setup that expected workspace containment without selecting a permission mode. Since #131547, creating a worktree intentionally pins the directory while inheriting configured tool/exec policy; it does not select workspace mode.

Why This Change Was Made

Select the existing workspace mode in the fixture's session creation, verify the persisted mode, and assert all three effect markers are absent before probing. Keep the original allowed-write, outside-write denial, exec approval-required outcome, transcript, reconciliation, legacy negotiation, 36 load turns and restart-audit assertions unchanged. Preserve current main's separately repaired Gateway cleanup owner.

The fix belongs to test setup. Reintroducing the worktree-only production default would contradict the documented permission contract. No production/default/containment/approval/authority changes are made.

User Impact

No product behavior change. The real wire scenario once again tests the explicitly selected workspace policy it claims to exercise.

Evidence

The unmodified fixture failed on fresh Linux at the outside-marker absence assertion. Separate temporary instrumentation of the actual prepared-tool execution path showed new marker effects under an absent mode and denial under explicit workspace mode, with the same live placement generation/owner epoch/turn claim. That instrumentation was removed. This explains the fresh reproduction; it does not identify the historical CI marker creator or claim general worker security completeness.

The original final uninstrumented full wire scenario and 141 owner/sibling cases passed. The current-main port passed its complete original wire scenario again (39.793s), a full private-QA build (3m51.7s), and the full changed-files gate in clean Linux environment33226469125. Node24.19.0/pnpm12.0.0, canonical frozen install; command8m10.534s/exit0. Exact full tracked tree a5dd4b860b3a5c8349813be6287b743e3cfbb6ca matched before/after; the Testbox was stopped. The environment Actions run may be cancelled by lease cleanup; the wrapper receipt records command success.

Fresh isolated complete-delta Codex review found no actionable P0 findings. Exact headbe409 CI33227133928 is green; native landing gates are next. AI-assisted. This is local synthetic-provider/isolated Gateway proof, not an authenticated provider session or full release matrix.

Production LOC:0. Test LOC:+13/-1 (net+12). Existing documented input only; no new test-only production seam, config field, schema/protocol, dependency or permission policy.

Worktree creation intentionally inherits configured policy. Select the existing workspace mode in the fixture, verify persisted mode and absent markers, and retain the complete denial, reconciliation, load and restart assertions. Preserve current main Gateway cleanup.
@steipete steipete self-assigned this Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 29, 2026
@steipete
steipete marked this pull request as ready for review August 29, 2026 01:42
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 9:52 PM ET / August 29, 2026, 01:52 UTC.

ClawSweeper review

What this changes

Updates the paired node-worker wire E2E fixture to explicitly select workspace mode and verify clean effect markers before exercising containment.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

The test-only correction matches the current session-permission contract and has no introduced correctness or security finding. It remains open for normal maintainer handling because it carries the protected maintainer label and is member-authored.

Priority: P3
Reviewed head: be40935c3d0b61de7da9d6e2db44e5ce783b3094

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned test correction with coherent boundary coverage and no actionable defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR changes only the isolated wire E2E fixture, so the external-contributor proof gate does not apply; its supplied Gateway and paired-node run is consistent with the exercised boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR changes only the isolated wire E2E fixture, so the external-contributor proof gate does not apply; its supplied Gateway and paired-node run is consistent with the exercised boundary.
Evidence reviewed 6 items Introduced change: The verified PR delta only changes the wire E2E fixture: it selects workspace, asserts the persisted mode, and checks that permission-effect markers are absent before the permission scenario.
Current permission contract: Current main documents that worktrees pin a session root but inherit configured policy when mode is omitted; an explicit mode remains unchanged. Workspace permits writes under the root with reviewed exec escalation.
Gateway-to-worker boundary: The current schema accepts an optional permission mode, session creation forwards it unchanged, and worker launch includes it with the remote containment root only when present.
Findings None None.
Security None None.

How this fits together

Gateway session creation records an optional permission mode, then worker dispatch carries that selected mode and the remote workspace root to the paired node. This E2E test uses a synthetic provider to verify an allowed in-workspace write and denied escape or exec attempts.

flowchart TD
  A[Session creation request] --> B[Gateway session record]
  B --> C[Worker turn launcher]
  C --> D[Paired node workspace]
  D --> E[Allowed workspace write]
  D --> F[Denied escape and exec]
  E --> G[Wire E2E assertions]
  F --> G
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed: the introduced fixture update already matches the established Gateway contract and has no actionable review finding.
Agent review details

Security

None.

PR surface

Tests +12. Total +12 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0, tests +12 net The branch changes only an E2E setup and assertions; it introduces no runtime, API, or configuration surface.

Technical review

Best possible solution:

Keep the explicit fixture mode and its precondition assertions so the wire test continues to prove the documented workspace boundary rather than an inherited default.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: the prior fixture omitted a mode although current main explicitly defines omission as inherited policy, while its later assertions require workspace containment.

Is this the best way to solve the issue?

Yes. Selecting the existing explicit session mode at the fixture boundary is narrower and more maintainable than restoring a worktree-only production default.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a6ccf6ad8f94.

Labels

Label changes:

  • add P3: This is a low-risk test-fixture correction with no user-facing behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR changes only the isolated wire E2E fixture, so the external-contributor proof gate does not apply; its supplied Gateway and paired-node run is consistent with the exercised boundary.

Label justifications:

  • P3: This is a low-risk test-fixture correction with no user-facing behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR changes only the isolated wire E2E fixture, so the external-contributor proof gate does not apply; its supplied Gateway and paired-node run is consistent with the exercised boundary.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the related merged permission-default correction and the recent paired-worker history, including this fixture update. (role: feature owner and recent area contributor; confidence: high; commits: 295a48b59102, 117078fedbf6, be40935c3d0b; files: test/e2e/qa-lab/runtime/node-worker-launch-wire.e2e.test.ts, src/gateway/worker-environments/worker-turn-launcher.ts, docs/gateway/permission-modes.md)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Exact head be40935c3d0b61de7da9d6e2db44e5ce783b3094 is green in CI33227133928. The full original wire sequence, private-QA build, changed-files gate and isolated P0 review are recorded in the body. Native current-main review confirms the fixture still needs explicit mode; the newer optional Fast Mode creation change leaves this omitted-field fixture path unchanged.

I read the latest ClawSweeper review5459631580: no actionable finding or rank-up move. This is the requested normal maintainer delivery; no product permission default, authority, approval or containment policy changes. Proceeding through native preparation/merge with the exact-head gate, without bypass.

@steipete
steipete merged commit 81e9f85 into main Aug 29, 2026
205 checks passed
@steipete
steipete deleted the steipete/worker-permission-main-20260828 branch August 29, 2026 01:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…w#132267)

Worktree creation intentionally inherits configured policy. Select the existing workspace mode in the fixture, verify persisted mode and absent markers, and retain the complete denial, reconciliation, load and restart assertions. Preserve current main Gateway cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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