Repository navigation
refactor(plugins): bind registration owners once - #139898
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 6, 2026, 3:39 AM ET / 07:39 UTC. ClawSweeper reviewWhat this changesThe PR centralizes plugin-owner binding for registration methods while retaining explicit configuration, policy, and registration-mode adapters. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, maintainer-led extraction that is not superseded on the fetched main. Source review found no actionable correctness or security regression. Priority: P3 Review scores
Verification
How this fits togetherThe plugin registry receives contributions from loaded plugins and associates them with their owning plugin records. The API builder selects which registration methods plugins receive, while domain registrars validate and store their contributions. flowchart LR
A[Plugin record] --> C[Bind registration methods]
B[Domain registrars] --> C
C --> D[Mode and policy adapters]
D --> E[Public API selection]
E --> F[Plugin registration calls]
F --> G[Validated registry contributions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -157. Total -157 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep registration ownership centralized while preserving the explicit public API selection and specialized policy adapters. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving refactor, and source inspection did not identify an introduced failure. Tests were not run during this read-only review. Is this the best way to solve the issue? Yes: the shared binding removes repeated forwarding while the existing API builder and explicit adapters preserve the supported contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c03d61c62ca. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Plugin API construction repeats the same record binding across dozens of registration methods, and the registry builder duplicates the composed registrar list.
Why This Change Was Made
Bind the leading plugin record once and return the existing composed registrars directly. Keep explicit adapters where configuration, policy, registration mode, or generic hook types require them. The API builder still selects the public methods.
User Impact
No public API or lifecycle changes. Receivers, diagnostics, rollback and registration-mode behavior are preserved. This independent extraction from #135599 removes 157 production lines across two files.
Evidence
391 existing loader, registry, setup, provider, service, diagnostic and API-lifecycle tests passed. The complete changed-file gate passed, including production/test typechecks, lint, dead-export scans and other routed guards. Independent P2 review found no actionable issues. No tests were added merely to mirror the refactor.