Repository navigation
refactor(plugins): unify setup registration and artifact selection - #130474
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:53 PM ET / 22:53 UTC. ClawSweeper reviewWhat this changesCentralizes plugin artifact selection and reuses the setup registry for provider and CLI-backend setup lookup. Merge readinessKeep open for normal maintainer review. The refactor has a coherent shared ownership boundary and no concrete patch defect was found; exact-head package-import confirmation remains the relevant pre-merge check. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherPlugin manifests feed setup registration and runtime loading. Both paths choose a source or built artifact before passing it to the plugin module loader. flowchart LR
A[Plugin manifest] --> B[Setup lookup]
A --> C[Runtime lookup]
B --> D[Shared artifact selector]
C --> D
D --> E[Selected artifact]
E --> F[Plugin module loader]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -57, Tests +93. Total +36 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain the runtime-independent shared selector and confirm exact-head packaged imports for bundled and source-external plugins. Do we have a high-confidence way to reproduce the issue? Yes. The changed setup/runtime artifact-selection paths and their focused tests provide a high-confidence source reproduction path; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Centralizing the duplicated policy keeps setup control-plane loading separate from stateful runtime resolution while preventing preference drift. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 34ccf63e1379. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: (26 commits) fix(plugins): preserve registry epoch on activation rollback (#129232) refactor(plugins): make discovery invocation-owned (#130486) feat(ui): save appearance preferences per user profile (#130340) fix: Buzz bots recover relay stalls and reject revoked senders (#130467) fix(code-mode): serialize catalog handles nested in final values (#130276) fix(webchat): CLI skill and harness-injected turns render as operator-sent messages (#130427) fix(agents): read the published model catalog owner from session_status (#130277) fix(channels): preserve long presentation text (#130368) fix(agents): route CLI bootstrap truncation notice into the system prompt (#130325) refactor(plugins): unify setup registration and artifact selection (#130474) fix(memory): prevent forgotten session content from returning (#130451) refactor(outbound): consolidate transport completion (#130460) fix(workers): protect in-flight workspace manifests from concurrent retention (#130449) fix(portals): keep worker previews reachable and owned by the active environment (#130434) fix(config): keep core channels keys in the generated config schema (#120736) chore(deps): refresh dependencies after seven-day cooldown (#130296) fix(agents): remind exec models to quote shell metacharacters (#125485) fix(auth): honor shared-store ownership in temp-state exec and agent deletion (#130437) fix(openshell): preserve file writes during concurrent mirror commands (#130447) fix(workers): report full nodes as at capacity, not offline (#130445) ...
What Problem This Solves
Plugin setup registration and runtime artifact selection duplicated the same ownership decisions across the registry and artifact resolver. The parallel layers made setup execution, artifact preference, and fallback ordering harder to keep consistent.
Why This Change Was Made
The setup registry now uses one canonical artifact-selection contract shared with runtime resolution. The new internal selector owns candidate preference and fallback ordering, while the public setup/runtime surfaces and plugin activation boundaries remain unchanged.
User Impact
There is no intended public API or configuration change. Plugin setup and runtime artifact resolution now follow the same deterministic registration contract with fewer private layers.
Evidence
runtime-postbuildverifies 48 built modules across 11 phases, and fullpnpm buildpasses end to end: tsdown 9/9, packages, 63 external plugins, CLI bootstrap, runtime postbuild, SDK 147, UI/build-info, and CLI metadata. No dependency or overlay change is committed.