Skip to content

fix: clear stale exports and preserve public plugin types - #201044

Merged
steipete merged 1 commit into
mainfrom
steipete/ci4-dead-export-round2
Nov 18, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/ci4-dead-export-round2

Conversation

@steipete

@steipete steipete commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

  • All 90 focused tests pass across discovery, prompt-prefix stability, GBrain connection/installation, model-request hooks, and plugin metrics/lifecycle suites.
  • Codex autoreview of the final six-file change: no actionable findings through P2. Formatting and whitespace checks pass.
  • Plugin SDK surface check passes, with no unauthorized removals. Existing canonical SDK type imports caught the fix(ci): keep internal runtime helpers private #201017 regression before restoring the declarations.
  • Exact base 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.
  • Final 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.

@clawsweeper

clawsweeper Bot commented Nov 18, 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 agents Agent runtime and tooling plugin: gbrain size: S labels Nov 18, 2026
@steipete
steipete marked this pull request as ready for review November 18, 2026 06:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T06:36:08.213326Z 843063b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review final head 843063bab5387b8235491d9ac302e27a82c7f90b. All 90 focused tests and the SDK surface check pass. Final local type, lint, format, and guard checks pass; the PR body identifies the unchanged 16 full-tree findings owned by #201031 and their exact-base origin. The patch also restores the six public SDK declarations broken by #201017. Codex review found no actionable issues through P2.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Restores 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.

  • Before: The entry point re-exports a private declaration, causing a TypeScript compilation error.
  • After: The import resolves to the existing exported type with its shape unchanged.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with appropriate compiler and owner-boundary coverage, passing exact-head CI, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored, behavior-preserving cleanup is supported by the existing SDK compiler contract, reported focused owner tests, and passing exact-head checks; no shipped runtime scenario changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Plugin developers encounter compiler errors importing documented SDK types, and obsolete internal exports keep local checks noisy.
Reason: The maintainer-authored repair reconciles already approved SDK contracts and removes unused seams while preserving runtime behavior.

Regression provenance

Possible 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
Reviewed head: 843063bab5387b8235491d9ac302e27a82c7f90b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Plugin 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]
Loading

Technical review

Best 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

  • Public hook and metric declarations changes intended behavior with a stated reason (62a9ca0: The earlier cleanup treated the leaf declarations as internal at its frozen source; fix: resolve eleven stale exports in local checks #201014 had meanwhile added canonical public re-exports, and this PR explicitly explains why those declarations must remain exported.)
  • Message discovery wrappers keeps the original intent (3d819f2: Asynchronous discovery retained synchronous wrappers around shared generator steps; production now consumes resolveMessageToolDiscovery, and this patch removes only the obsolete test-consumed wrappers.)
  • GBrain attestation coverage keeps the original intent (0ff7e27: The installer must reject binaries lacking matching asset, digest, and release-workflow provenance before publication; the patch preserves those cases through the installer and leaves the implementation unchanged.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3d819f2 adds src/agents/tools/message-tool-discovery.ts:288 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3d819f2efa6b; files: src/agents/tools/message-tool-discovery.ts)
  • Vito Cappello: Raw commit 2b7950c adds src/plugins/hook-model.types.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2b7950cae3c3; files: src/plugins/hook-model.types.ts)
  • Mitchell Etzel: Raw commit bd1c54c adds src/plugins/plugin-metrics.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bd1c54cfde53; files: src/plugins/plugin-metrics.ts)
  • Ayaan Zaidi: Raw commit 0ff7e27 adds extensions/gbrain/src/gbrain-release.ts:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0ff7e2772eb1; files: extensions/gbrain/src/gbrain-release.ts)

PR surface

Source -10, Tests +40. Total +30 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 7 17 -10
Tests 2 65 25 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 72 42 +30

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Current-main SDK compilation is broken for the existing named hook and metric contracts, with limited developer-facing impact.
  • add merge-risk: 🚨 compatibility: The patch repairs public SDK type availability; its maintainer-authored direction restores the previously approved exports without changing their shapes or callable APIs.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Current-main SDK compilation is broken for the existing named hook and metric contracts, with limited developer-facing impact.
  • merge-risk: 🚨 compatibility: The patch repairs public SDK type availability; its maintainer-authored direction restores the previously approved exports without changing their shapes or callable APIs.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 18, 2026, 1:44 AM ET / 06:44 UTC.

@steipete
steipete merged commit 36ee3b3 into main Nov 18, 2026
228 of 230 checks passed
@steipete
steipete deleted the steipete/ci4-dead-export-round2 branch November 18, 2026 06:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: gbrain rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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