Repository navigation
fix: clear stale exports and preserve public plugin types - #201044
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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. |
|
@clawsweeper re-review Please review final head |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesRestores six existing public plugin type declarations, removes unused message-discovery wrappers, and tests private GBrain attestation logic through installation. Example: A plugin imports PluginHookBeforeModelRequestEvent from openclaw/plugin-sdk/plugin-entry.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR repairs a current-main SDK compilation regression and removes obsolete internal exports without changing runtime behavior; no actionable correctness or security findings remain, and the exact-head CI gate passes. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPlugin authors consume hook and metric types through the SDK entry point; message-tool discovery produces action schemas, and the GBrain installer validates downloaded binaries before publishing them. flowchart LR
A[Plugin source] --> B[SDK entry point]
B --> C[Hook and metric types]
D[Message tool factory] --> E[Discovery owner]
E --> F[Action schema]
G[GBrain installer] --> H[Private attestation check]
Technical reviewBest possible solution: Keep the existing SDK contracts exported and exercise internal discovery and attestation logic through their existing production owners, as this patch does. Do we have a high-confidence way to reproduce the issue? Current main re-exports six private declarations through plugin-entry, and the existing compiler contract imports all six; the PR reports compiler failures before restoration and passing checks afterward, without a local rerun during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair: restore export visibility at the existing type owners, delete unused forwarding wrappers, and preserve attestation coverage through installation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c4d8259fdf68. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -10, Tests +40. Total +30 across 6 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, 1:44 AM ET / 06:44 UTC. |
|
Merged via squash.
|
What Problem This Solves
Local developer checks still report unused exports after the message-tool refactor in #197553 and GBrain installer change in #200987. In addition, #201017 made six plugin types private after #201014 had exposed them through the canonical SDK entry, breaking compilation of that public entry.
User Impact
No runtime behavior changes. Existing plugin type imports continue to compile, and three stale internal exports disappear from developer checks. The fourth reported helper,
gbrainReleaseAsset, was already made private by #201017.Why This Change Was Made
Delete two obsolete message-tool schema wrappers and exercise the existing discovery owner in their tests. Keep GBrain attestation private and exercise its acceptance/rejection cases through installation, including executable contents and preservation of an existing binary on rejection. Restore the six declarations needed by the unchanged public SDK entry and existing type-contract test. Production code decreases by 10 lines; no baseline or ignore entries are added.
The separate PR-CI admission investigation found that #165231 explicitly deferred Knip for ordinary PRs. This PR does not change CI policy or runner capacity.
Evidence
62a9ca09124d408b1db45a9148f7048b04338c31: 3 production / 16 full-tree / 0 script dead-export findings. After the internal cleanup: 0 / 16 / 0. The unchanged 16 full-tree entries come from consumers removed by test(agents): trim and fold low-value regression suites #198916 (ee3e16e) and are owned by open test(agents): remove orphaned helper code #201031; they are a separate main regression, not ignored findings.pnpm check:changed --base 62a9ca09124d408b1db45a9148f7048b04338c31 --timed: all selected type graphs, formatting, lint, and guards pass. It exits 1 solely for the unchanged 16 full-tree entries above. SDK restoration fixes all six compiler errors and the downstream lint preparation failure; the final SDK surface check also passes.