Repository navigation
Conversation
Keep role changes scoped to the next request as established by #197557 and #201334. Prove admitted guest writes and checkpoint settlement, next-request refusal, and explicit source cancellation across late committed receipts. Credit @obviyus for the admission contract; production behavior is unchanged.
|
🦞👀 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 Summary: ✅ CompletedThis 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 changesUpdates workspace tests to allow admitted work after role changes while preserving cancellation and Gateway-closure checks. Example: An admitted guest writes source.txt after its role changes to denied.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs obsolete test expectations after the intentional request-admission change; no actionable defects were found, and exact-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway operator authority enters the admitted-run and managed-workspace owners, which control filesystem writes and command checkpoint settlement into canonical storage. flowchart LR
A[Operator admission] --> B[Captured run authority]
B --> C[Managed workspace]
C --> D[Filesystem bridge]
C --> E[Command checkpoint]
D --> F[Canonical storage]
E --> F
Technical reviewBest possible solution: Keep the focused test repair in the existing workspace fixture and complete the ordinary exact-head CI gates. Do we have a high-confidence way to reproduce the issue? Source inspection confirms that main's tests expect role changes to invalidate authority that the current owner intentionally retains; the body supplies baseline failures, and this review executed no tests. Is this the best way to solve the issue? The smallest complete repair is to update these existing consumer tests, verify canonical file contents after role changes, and retain distinct cancellation and Gateway-closure controls. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c5ef395ba720. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +31. Total +31 across 2 files. 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 18, 2026, 5:09 PM ET / 22:09 UTC. |
|
Merged via squash auto-merge.
|
…aw#201473) Keep role changes scoped to the next request as established by openclaw#197557 and openclaw#201334. Prove admitted guest writes and checkpoint settlement, next-request refusal, and explicit source cancellation across late committed receipts. Credit @obviyus for the admission contract; production behavior is unchanged.
…aw#201527) Apply the request-start authority contract from openclaw#197557 and @obviyus’s openclaw#201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow openclaw#201473 for the stale in-process session-read expectation.
Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation. (cherry picked from commit ac17452) Co-authored-by: RomneyDa <[email protected]>
Bounded beta2 FRV repair; preserve the existing runtime contract and original failure assertions. Combined qualification follows integration. Selected source hunks only; unrelated source changes excluded. (cherry picked from commit 4484f83) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Two managed-workspace tests fail on main after #201334 because they still treat a role change as cancellation of already-admitted operator work. This maintainer-requested main repair aligns those expectations with the existing request admission contract.
User Impact
No production behavior changes. Already-admitted checkpoint settlement and guest filesystem writes remain allowed after a role change; the next admission is refused. Explicit source cancellation and Gateway shutdown still refuse privileged writes.
Why This Change Was Made
The older delegated-authority doctrine was explicitly superseded by #197557 (
123f8787c4767): rootAGENTS.mdsays authority is checked when work starts and revocation applies to the next request; the agent guide distinguishes calls already in progress from calls after lifecycle closure. #201334 (04cb8179ccd66) applies that rule to Gateway operator-derived turns, while preserving source assertions, cancellation, exact run/claim, physical-store and credential fences. Restoring role-policy reads at every checkpoint would reverse that intentional contract.The existing boundary fixture now proves the distinction: an admitted guest filesystem write reaches canonical storage after its role changes, reauthorization refuses, and an explicit source cancellation prevents another filesystem write even after a delayed native involvement receipt arrives. Command settlement similarly survives the role edit but refuses after source cancellation. Gateway-owner closure and the surrounding Stop, disposal, replacement and recovery cases remain covered.
Thanks to @obviyus for #201334 and the request-admission contract. Production LOC delta: 0. No configuration, schema, cache, or runtime guard changes.
Evidence
Unmodified main parent
d2db7b2267faf4521b3c3a08acd062edd7cbf910: the two reported cases fail, and the Gateway closure control passes. The corrected three-case selection passes (22.86 seconds Vitest time; 26.62 seconds wrapper time). The initial reproduction took 61.31/65.13 seconds including a cold worker compilation; these are test costs, not a performance comparison.Full authority/projection selection: 270 tests passed across 15 files, with two existing environment-dependent skips, in 288.88 seconds wrapper time. This includes the entire projection suite, operator-authority policy/recovery/reconnect suites, admitted-run lifecycle and delegated-claim tests, and sandbox custody/preparation/retirement tests. The queued-admission consumer suite also passes all 27 cases.
pnpm check:changedpassed, including the affected test typegraph, database guards, dead-export scans and changed-file lint. Formatting andgit diff --checkpassed.Codex autoreview of the complete local diff against
d2db7b2267faf, through P2: scoped-clean, no actionable findings. The test-audit and simplify pass retained the real boundary fixture and added no production helpers; test delta is +41/−10 lines.No new production performance claim: this changes only tests. Existing 62,000-file/1.100 GB projection measurements from #201410 remain applicable to the unchanged runtime; they were not rerun. The fixture executes real filesystem operations and real authority/checkpoint owners with a local substitute for the container backend; it is not native-container or live-model proof.