Repository navigation
Conversation
|
🦞👀 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. Reviewed September 7, 2026, 12:58 AM ET / 04:58 UTC. ClawSweeper reviewWhat this changesRefused plugin Gateway requests now name the plugin when known, distinguish missing identity, and link to the restriction documentation, with regression coverage for three caller cases. Merge readiness✅ Ready for maintainer review This remains a useful, focused diagnostic repair: current main and the latest release still return the generic refusal. No blocking correctness or security finding was identified, and the supplied runtime evidence supports the changed behavior. Priority: P3 Review scores
Verification
How this fits togetherThe plugin Gateway adapter lets eligible plugins call Gateway methods within the running process. It checks plugin eligibility before dispatching and returns an error to rejected callers. flowchart TD
A[Plugin Gateway request] --> B[Read caller identity]
B --> C{Eligible plugin?}
C -->|Yes| D[Dispatch Gateway method]
C -->|No| E[Explain refusal and link documentation]
D --> F[Return result or method error]
E --> G[Plugin author diagnoses refusal]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Tests +27. Total +31 across 2 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the existing eligibility boundary and explain rejected calls directly at its error producer, using the documented plugin restriction. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main sends both an unsupported named plugin and a caller without identity through the same generic throw. No local runtime reproduction was executed. Is this the best way to solve the issue? Yes. Updating the existing refusal is a narrow repair, and the tests exercise the public runtime entrypoint without adding production seams or changing plugin admission. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against abc35e08c1a2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
runtime.gateway.request refused every untrusted caller with one bare message that named neither the plugin nor the cause. A missing plugin runtime scope and an untrusted plugin produced identical text, so an author could not tell which condition they had hit. Name the plugin when its identity is known, distinguish an absent runtime scope, and point at the documented restriction. No admission rule changes: canTrustedOfficialPluginRequestScopes still gates. Co-Authored-By: Claude Opus 5 <[email protected]>
Address two review findings on the gateway request refusal message.
The docs pointer used a repo-relative path, `docs/plugins/sdk-runtime.md`.
The reader is a plugin author who installed from npm and has no `docs/`
directory, so the pointer was not actionable for the exact audience the
message exists to help. Cite the published page instead, matching the
sibling refusal in server-plugin-subagent-runtime.ts which already points
at this same page in URL form.
The no-identity branch claimed "No plugin runtime scope is active for this
call." That is literally false: the branch is selected by `!pluginId`, and
a gateway request scope is routinely established without one (see
server-methods.ts and local-request-context.ts). The real condition is a
missing plugin identity, so say that.
Also correct the new tests' `origin: "external"`, which is not a member of
`PluginOrigin` ("bundled" | "global" | "workspace" | "config") and failed
typecheck. Use "global", the value neighbouring tests already use for an
untrusted third-party plugin; it fails the trust predicate identically.
55ab2bb to
c498c85
Compare
|
Thanks @Colton-Harris! Proof: A real Gateway loaded an external JavaScript plugin and reproduced both refusal cases before and after the repair.
Validated 90 focused tests, three expected baseline regression failures, real disable/re-enable controls, independent behavior and code review, and the required CI gate. Landed as a6d0cbc. |
Name unsupported plugin callers, distinguish missing plugin identity, and link the published Gateway restriction. Keep existing trust eligibility and successful dispatch unchanged. Verified real Gateway refusal and allowed-plugin controls, plugin disable/re-enable, scopes, structured errors, timeouts, and 90 focused tests. The three identity regression cases fail on the original refusal and pass after the repair. Closes openclaw#140351. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #140351.
What Problem This Solves
Plugin authors received the same generic Gateway refusal whether their call lacked a plugin identity or came from a named plugin that was neither bundled nor trusted official. The error did not identify the caller or point to the restriction documentation.
Why This Change Was Made
The existing rejection boundary now names an unsupported plugin when its identity is known, distinguishes a call without identity, and links the published
api.runtime.gatewayrestriction. Trust eligibility and successful dispatch are unchanged.This retains @Colton-Harris's repair and consolidates its regression tests around the same rejection boundary.
User Impact
A refused plugin call now explains which identity condition failed. Unsupported calls remain blocked.
Evidence