Repository navigation
fix: background continuations lose session access and GitHub tools - #141865
Conversation
Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]> OpenClaw-Publication: 867311a3-8ac4-4412-9b5d-e45028eed55e
|
🦞👀 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. |
Remove the unrelated line-ending normalization introduced by the publication snapshot. The launcher is byte-identical to the PR base. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]>
|
@clawsweeper re-review @openclaw/openclaw-secops — requesting a focused owner review of this bounded authorization-correctness repair. The automatic CODEOWNERS match is The production change replaces literal scope intersection with the existing shared scope checker: a caller already holding Current head: Please flag any owner concerns or confirm that this bounded repair is acceptable to land. No request to waive CI, alter ownership rules, or bypass the native merge workflow. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 1:28 PM ET / 17:28 UTC (Revision 12). ClawSweeper reviewWhat this changesThe branch preserves read and Talk access implied by write permission in background Gateway calls and adds continuation, resume, privilege-denial, and attempt-replacement regressions. Merge readiness✅ Ready for maintainer review The scope repair remains necessary on current main and v2026.9.5. No actionable introduced defect was found. Current ownership policy supports retiring the earlier blanket SecOps blocker; ordinary review and enforced checks still apply. Priority: P2 Review scores
Verification
How this fits togetherAgent tools and background continuations call the Gateway through an internal dispatcher that narrows caller permissions. Gateway authorization then checks those permissions and session access before invoking the requested operation. flowchart TD
A[Agent tool or continuation] --> B[Caller identity and granted scopes]
B --> C[Internal Gateway dispatcher]
C --> D[Shared scope implication policy]
D --> E[Gateway and session authorization]
E --> F[Permitted operation]
E --> G[Permission rejection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +9, Tests +218. Total +227 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the canonical scope implication policy during synthetic dispatch while retaining existing identity, session-access, and execution-lifetime checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: a write-only continuation requesting a read RPC loses its requested scope under current main's literal filter. The contributor reports a failing-before/passing-after boundary regression; this review did not execute it. Is this the best way to solve the issue? Yes. Reusing the existing scope checker repairs inconsistent narrowing without adding a competing permission policy, configuration option, or public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 209dc0e6d56e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
Updated follow-up for the September 9 exact-head review of
The PR body now distinguishes current-head proof from the original validation and preserves the limited CLI-autoreview waiver and human credit. |
Preserve main’s terminal-write cleanup, co-author prompt, and sandbox skill preparation while retaining shared GitHub capability preparation. Resolve the adjacent-import conflict without restoring chat-only preparation. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]>
Integrate current main while retaining plugin-refresh callbacks and asynchronous skill-preparation guards. Use the canonical attempt-currentness check for GitHub availability, covering replacement without cancellation. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]>
Keep the shared attempt dispatcher within its existing line limit by extracting the bounded availability stage. Preserve adopted session identity, explicit capability values, lazy loading, and the canonical live-attempt guard. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]>
|
Related fix #150295 is now merged, but it does not supersede this PR. It restores separately admitted owner identity for opted-in plugin tools after the exact parent yields; it does not replace this PR's synthetic operator-scope implication handling or shared-attempt GitHub availability preparation. The symptoms can both look like tools or access disappearing after a handoff, but the repaired contracts are different. Keeping this PR open; #150295 is not evidence that its read/Talk scope and background GitHub capability repairs are delivered. |
Refresh PR #141865 onto main while preserving its history. Add tool-routed follow-up, paused-child resume, and privilege-denial regressions requested by Martin. Keep current main’s shared GitHub availability owner instead of restoring the superseded helper, and retain the non-aborting attempt-replacement regression. Co-authored-by: Takhoffman <[email protected]> Co-authored-by: brokemac79 <[email protected]>
|
@Takhoffman — following my discussion with Martin (@brokemac79) in our Team chat, I’ve added our extra regression tests to this existing PR rather than creating a duplicate. Updated head: 5a1008d. Your original commits and credit are preserved. The added tests cover tool-routed follow-ups, explicit and automatic paused-child resumes with write-only authority, and rejection of unrelated privileges. I also retained the non-aborting attempt-replacement check while refreshing the branch. Main already contains the GitHub availability repair via #151651 and #152073, so the refresh keeps its current shared implementation instead of reintroducing the old helper. Validation: 459 tests passed, all selected repository checks passed, and final autoreview through P2 found no actionable issues. ClawSweeper revision 10 reviewed this exact head and found no actionable introduced code or security issues. The requested security-owner acceptance remains outstanding; I am not claiming that automated review provides it. Hosted CI failed a separate shared-main shard-inventory limit ( Both Team discussions and contributor credits are preserved. No merge or deployment was performed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Integrate the newly landed parent-continuation change without rewriting PR history. Keep write-only operator coverage for explicit and automatic resumes, with distinct durable fixture identities for each case. Co-authored-by: Takhoffman <[email protected]> Co-authored-by: brokemac79 <[email protected]>
|
@clawsweeper re-review Final head: 5a1008d. Main #153047 landed during the preceding CI watch and touched the resume fixture. The conflict is resolved without changing the permission repair: explicit and automatic parent resumes are both covered under write-only authority, using distinct durable fixture identities. All 459 selected tests and the repository checks passed; fresh autoreview through P2 found no actionable issues. The PR body and Team-discussion comment are updated. Prior requested owner acceptance remains unclaimed; no merge or deployment was performed. |
|
🦞👀 Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Merge current main to incorporate the maintained typecheck-shard rebalance without rewriting the existing PR history. Exercise real completion dispatch for child announcements and requester settlement, and retain denial of the separate Talk-secrets scope. Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review Refreshed head: The regression now reaches the actual completion-delivery dispatcher for both child announcements and requester settlement, then performs a read RPC through real Gateway authorization. All three continuation cases fail with 129 tests passed across 7 files, all selected repository checks passed, and fresh independent autoreview through P2 is clean. Hosted CI is pending on this head. The PR body also corrects stale approval wording: the original SecOps request matched historical CODEOWNERS, but #151624 removed that blanket product/test routing and #152415 introduced the narrower current tiers. None of the five current PR paths matches a required SecOps ownership rule. Existing reviewer requests remain; no owner acceptance, waiver of an enforced rule, merge, or deployment is claimed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Use the existing shared operator-scope policy for RPC and broadcast authorization, keeping raw transport grants exact and avoiding per-recipient allocations. Extend completion-dispatch coverage through the GitHub identity status tool and preserve denial of stronger privileges. Follow-up to #141865.
Use the existing shared operator-scope policy for RPC and broadcast authorization, keeping raw transport grants exact and avoiding per-recipient allocations. Extend completion-dispatch coverage through the GitHub identity status tool and preserve denial of stronger privileges. Follow-up to #141865.
…153979) * refactor: share operator permissions across Gateway calls and events Use the existing shared operator-scope policy for RPC and broadcast authorization, keeping raw transport grants exact and avoiding per-recipient allocations. Extend completion-dispatch coverage through the GitHub identity status tool and preserve denial of stronger privileges. Follow-up to #141865. * test: separate continuation authorization coverage Keep completion and GitHub identity regressions together in a sibling suite and share the existing Gateway fixtures, preserving coverage within the file-size gate. * test: isolate changed Stylelint targets from checkout contents The lane-routing test assumed a UI test path was absent; adding that file on main correctly changed the Stylelint plan. Preserve lane assertions and exercise present/deleted files in an owned fixture through the real dry-run CLI.
…penclaw#141865) * fix: background continuations lose session access and GitHub tools Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]> OpenClaw-Publication: 867311a3-8ac4-4412-9b5d-e45028eed55e * fix: preserve Windows launcher line endings during publication Remove the unrelated line-ending normalization introduced by the publication snapshot. The launcher is byte-identical to the PR base. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]> * refactor: isolate background GitHub availability preparation Keep the shared attempt dispatcher within its existing line limit by extracting the bounded availability stage. Preserve adopted session identity, explicit capability values, lazy loading, and the canonical live-attempt guard. Worked on by: - @Takhoffman Co-authored-by: Takhoffman <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: Takhoffman <[email protected]> Co-authored-by: brokemac79 <[email protected]> Co-authored-by: VACInc <[email protected]>
…penclaw#153979) * refactor: share operator permissions across Gateway calls and events Use the existing shared operator-scope policy for RPC and broadcast authorization, keeping raw transport grants exact and avoiding per-recipient allocations. Extend completion-dispatch coverage through the GitHub identity status tool and preserve denial of stronger privileges. Follow-up to openclaw#141865. * test: separate continuation authorization coverage Keep completion and GitHub identity regressions together in a sibling suite and share the existing Gateway fixtures, preserving coverage within the file-size gate. * test: isolate changed Stylelint targets from checkout contents The lane-routing test assumed a UI test path was absent; adding that file on main correctly changed the Stylelint plan. Preserve lane assertions and exercise present/deleted files in an owned fixture through the real dry-run CLI.
What Problem This Solves
Fixes delegated and background work failing with missing read permission even though its existing write permission already allows the read.
User Impact
Follow-ups, child-completion continuations, and paused-child resumes retain their permitted read access. This restores established permission implications; it does not grant new privileges or change credentials or configuration.
Why This Change Was Made
Synthetic scope narrowing uses the existing shared permission checker instead of literal scope-name membership. Caller identity, session access, role revocation, and execution-lifetime checks remain in place. Write access still does not grant Talk secrets, admin, approval, or pairing privileges.
The September 20 refresh preserves the original commits and incorporates current main, including its existing repair for the previously failing typecheck-shard inventory. It extends the real completion-dispatch boundary tests for both child announcements and requester settlement. The separate GitHub-availability repair is already on main through #151651 and #152073; this PR retains its non-aborting attempt-replacement regression without restoring a duplicate implementation.
Evidence
Current head:
349fbb54e5dcc415b108f872ea8d299c14aff6f3, incorporating main473dd5656f858a37c5eb0b7aa5d61073dbe8685bwithout rewriting prior commits.missing scope: operator.read; restoring the fix makes them pass. Completion cases use the actual completion-delivery dispatcher, Gateway facade, and RPC authorization, with model execution mocked. This is boundary proof, not a live authenticated publication replay.Review-policy clarification
The earlier SecOps request matched the historical CODEOWNERS policy. That blanket product/test routing was removed in #151624 and replaced by the narrower security tiers in #152415. None of this PR's current files matches a required SecOps ownership rule, and the live security-sensitive review passes on this head. The requested reviewers remain in place for normal review; this does not assert owner approval or waive any enforced check. The original requester retains the final front-end squash.
The original incident's operator principal was not retained. No merge, deployment, credential change, or session-owner-assignment fix is claimed.
Worked on by:
Work sessions
Discussion, implementation and verification — original fix with @Takhoffman.
Discussion, implementation and verification — additional regression coverage requested by @brokemac79.
Discussion, implementation and verification — current-base hardening and completion-continuation regression coverage.
View the OpenClaw team session