Repository navigation
refactor: remove dead plugin loader exports - #105937
Conversation
21d2317 to
71fd146
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 3:17 AM ET / 07:17 UTC. Summary Reproducibility: not applicable. This PR is an internal cleanup rather than a reported runtime bug; the actionable concern is directly visible in the current-head deletion of the integrity-drift regression case. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Retain the internal export cleanup while restoring focused exact-pinned integrity-drift coverage through supported update entry points or test fixtures, then demonstrate an unchanged plugin lifecycle with a redacted real-setup transcript. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is an internal cleanup rather than a reported runtime bug; the actionable concern is directly visible in the current-head deletion of the integrity-drift regression case. Is this the best way to solve the issue? No, not as currently submitted: removing dead internal exports is appropriate, but the narrowest maintainable solution preserves focused coverage of the integrity-drift invariant and demonstrates unchanged plugin lifecycle behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b57e7b74e6f8. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles) |
71fd146 to
fc7dfe0
Compare
fc7dfe0 to
475bf7b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…lete-dead-plugin-exports
…lete-dead-plugin-exports # Conflicts: # scripts/deadcode-exports.baseline.mjs
…lete-dead-plugin-exports
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready on Proof:
Known proof gaps: none. |
|
Merged via squash.
|
* refactor(plugins): trim activation and contract exports * test(plugins): restore fixture cleanup * refactor(plugins): trim install and loader exports * test(plugins): fully reset loader caches * refactor(plugins): trim metadata and catalog exports * test(plugins): preserve catalog trust coverage * refactor(plugins): trim provider and plugin exports * refactor(plugins): trim runtime and tool exports * test(plugins): update dead-export consumers * test(plugins): remove empty dead-export suites * refactor(plugins): align exports with split registry * refactor(plugins): trim drifted loader exports * style(plugins): format test fixtures * refactor(scripts): use supported plugin APIs * refactor(plugins): finish dead export cleanup * chore(deadcode): refresh export baseline * test(cli): mock production memory state * chore(deadcode): sync latest export baseline * fix(tests): keep plugin fixtures inside core * chore(deadcode): refresh rebased export baseline * chore(deadcode): sync current ratchets * fix(plugins): retain reserved slot invariant * fix(plugins): preserve dead-export invariants * test(plugins): use neutral catalog query fixture * test(plugins): satisfy catalog lint * test(plugins): preserve integrity drift coverage * fix(ci): register skill experience live proof
Related: #105595
What Problem This Solves
The enforced unused-export ratchet still carried roughly 570
src/plugins/entries, leaving a large amount of dead internal surface and weakening the baseline as an actionable cleanup signal.Why This Change Was Made
Remove unused plugin-loader exports in coherent ownership groups, keeping implementations local when still used internally and deleting tests that only covered deleted code. Preserve plugin SDK barrels, manifest contracts, dynamic loader/report entry points, and other shipped surfaces; keep the few remaining test-only controls in Knip-ignored core test fixtures.
User Impact
No user-visible behavior change. Maintainers get a substantially smaller dead-export baseline and less accidental internal API surface around plugin loading.
This PR is AI-assisted; the resulting code and contracts were reviewed and validated.
Evidence
src/plugins/entries reduced from 574 to 7 intentional shipped/dynamic contracts; the latest-main-integrated baseline matches 3,540 entries.pnpm deadcode:exports:update(via its pinned Node wrapper) was byte-stable at SHA-2562dc0d7882ac183644208684b3c9e44eddadeac26b6cbd505c62d30466c91f562;pnpm deadcode:exportsmatched all 3,540 entries. The same update/check had already passed remotely on AWS Crabbox runrun_bc6c3b73ae61before the final unrelated main-baseline shrink.pnpm check:changedpassed all selected format, SDK, type, lint, policy, cycle, database, and Docker scheduler lanes in 13m52s on an earlier exact integrated head.src/plugins/update.test.tspasses 116/116, targeted format passes, and targeted lint reports zero warnings and errors.@openclaw/[email protected];plugins inspect irc --runtime --jsonreportedactivated: true,status: loaded, and the IRC channel capability; update reported the pinned version current; a second runtime inspection remained loaded; uninstall removed the config entry, install record, and installed directory, then inspection confirmed only the bundled disabled fallback with no install record.pnpm tsgo:core,pnpm tsgo:ui,pnpm tsgo:extensions, the completepnpm tsgo:testsequence, andpnpm plugin-sdk:surface:checkpassed on the same Testbox.pnpm buildpassed on the preceding exact integrated head; hosted CI is the exact final-head gate.