Repository navigation
refactor(plugins): decompose plugin registry - #105783
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 12, 2026, 8:38 PM ET / July 13, 2026, 00:38 UTC. Summary PR surface: Source +206, Other 0. Total +206 across 13 files. Reproducibility: not applicable. This PR is a structural refactor with no reported user-facing failure to reproduce. The relevant verification question is behavioral equivalence, for which the PR supplies broad remote test and build evidence. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a structural refactor with no reported user-facing failure to reproduce. The relevant verification question is behavioral equivalence, for which the PR supplies broad remote test and build evidence. Is this the best way to solve the issue? Yes, provisionally: one explicit state object with domain registrars is a cleaner owner boundary than helper extraction inside the original mega-closure. The best version is the current design after exact-head equivalence review of lifecycle and authorization paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e01d1e85f372. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +206, Other 0. Total +206 across 13 files. View PR surface stats
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 (1 earlier review cycle)
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(plugins): decompose plugin registry This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Land-ready proof for
Known proof gaps: none for this internal refactor. No plugin SDK, config, docs, changelog, or user-visible runtime contract changed. |
* refactor(plugins): decompose plugin registry * chore(plugins): move session accessor debt baseline
Closes #105758
What Problem This Solves
createPluginRegistrywas a 3,577-line closure inside a 4,022-line module. Every plugin registration domain captured the same implicit mutable scope, making unrelated plugin work collide in one file and obscuring each domain's state and lifecycle dependencies.Why This Change Was Made
Replace the mega-closure with one typed registry state object and compose focused registrar modules for capabilities, tools/hooks, network/channel surfaces, providers, operations, host/session surfaces, and memory. The scoped plugin runtime proxy and plugin API builder now have explicit modules;
registry.tsis the 130-line lifecycle composition root. Existing registry, plugin API, validation, rollback, and runtime ownership contracts are preserved.User Impact
No user-visible behavior change. Maintainers get smaller owner-specific review surfaces, explicit shared state, and fewer conflicts when extending separate plugin domains.
AI-assisted implementation; the complete patch was reviewed with the repository autoreview helper.
Evidence
tbx_01kxcbcnse4nqt5w0xkr9hjf30(harbor-krill-63eb).pnpm check:changed: core production and test tsgo, changed-file formatting, full core oxlint shards, plugin SDK baseline, import-cycle check, and repository guards passed.registry.tstoregistry-runtime.ts;node scripts/check-session-accessor-boundary.mjspassed.pnpm build: full runtime, plugin SDK declaration/export, asset, and Control UI build passed..agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-outputreported no accepted/actionable findings; correctness confidence 0.94.src/plugins/registry.ts: 4,022 lines before; 130 lines after.