Repository navigation
refactor(plugins): fold single-consumer plugin owners - #177170
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 changes before merge. What this changesThis PR folds single-consumer registration helpers, schemas, and adapters into their existing plugin owners. Example: A ClawRouter request uses perplexity/sonar-pro with an object-valued tool parameter.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-directed refactor consolidates private plugin ownership without an identified correctness or security defect. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherBundled plugin entries register provider hooks, Gateway methods, channel adapters, and agent tools with the host; these owners translate configuration and requests into provider or channel operations. flowchart TD
A[Plugin loader] --> B[Plugin entries]
B --> C[Provider hooks]
B --> D[Gateway methods]
B --> E[Channel adapters]
B --> F[Feishu operation tools]
C --> G[Existing SDK and transport owners]
D --> G
E --> G
F --> G
Technical reviewBest possible solution: Retain the consolidation into existing owners while preserving intervening main changes during conflict resolution. Do we have a high-confidence way to reproduce the issue? This PR proposes a behavior-preserving refactor rather than a bug reproduction; review used source and supplied evidence without executing target code. Is this the best way to solve the issue? The smallest complete change is to move each private single-consumer implementation into its existing owner, migrate its tests, and remove retired references; the patch follows that shape without adding replacement machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d01eb83804ae. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -90, Tests +16, Other -4. Total -78 across 33 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 5:13 AM ET / 09:13 UTC. |
d13c1f9 to
89543e7
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* refactor(plugins): fold private registration helpers into owners * refactor(plugins): keep private schemas with operation owners
What Problem This Solves
Six bundled plugins route registration, schema hooks and channel adapters through private modules with one production consumer. Tests also enter some private helpers rather than the registered plugin surface.
User Impact
No user-visible change. Plugin registration, model configuration, authentication and stream behavior remain unchanged; no migration or operator action is required.
Why This Change Was Made
Keep Geolocation Gateway registration at its plugin entry; Nextcloud configuration, pairing, Gateway and message adapters at the channel owner; ClawRouter schema hooks and pool registration at the entry; MiniMax provider registration and shared stream hooks at its entry; OpenRouter schema hooks at its entry; and Feishu chat/drive/permissions/wiki schemas at their existing operation owners. Remove thirteen private modules and narrow two Geolocation-only type exports. Seven existing suites now exercise the real registered owners, retaining their assertions. Feishu already tests the registered operations, so its tests remain unchanged; Drive keeps the private schema needed for its inferred parameters type.
Nextcloud's three moved config assertions are unnecessary with the existing structural types. ClawRouter's private schema normalizer declares its real object-preservation contract, removing its parameters assertion without runtime changes. Obsolete assertion and watch rows only shrink; no destination allowances increase.
This is the plugin-area slice of a materialized single-consumer family, now 93 distinct paths and 559 net production lines across four area branches, split under campaign rule 11 for CI attribution. Final formatted delta: 90 net production lines removed (+1183/-1273) across 24 production paths, 33 paths total. After the conflict rebase, tests add 20 net lines; metadata removes four. No public SDK, protocol, config or persisted-data change. Phase E is untouched.
Best-effort tradeoffs accepted
Evidence
Complete production owner/retired-helper inspection and migrated-test diff inspection completed. The author simplification pass retains only genuine shared private helpers; no replacement API, wrapper, cast, marker exemption or runtime validation was added. Installed TypeBox's structural schema contract and the pure config/pairing/message constructors were inspected. Whitespace and retired-reference checks pass.
Fresh independent P0–P2 reviews of both the initial candidate and the final Feishu/MiniMax increment completed scoped-clean with final source verification. The candidate was cleanly rebased onto main
f551cc9371bcd24d6b942a92e81f80ee6a1eeff5; range-diff confirmed an identical patch. Frozen dependency refresh and canonical formatting completed. Targeted native types passed all 21 selected roots after repairing the MiniMax fold to retain the original separate readonly-snapshot and supplied-config base-URL reads, without a cast or public type change. All 22 focused files and 256 distinct cases passed, including the 14-case suppression suite. Five serial Vitest shards took 993.09 seconds under host load, predominantly transformation/collection; this is not a performance claim. Syntax lint passed for all changed plugin paths, script typed lint passed, and both runtime and Madge cycle checks found zero cycles. Whitespace checks passed.Local typed plugin lint reported two error-type diagnostics for ProviderThinkingProfile and ProviderRuntimeModel, under both the core and targeted source-backed configs. Both plugins' nearest package-boundary configs resolve SDK imports to generated packages/plugin-sdk declarations, which are absent locally. No source types, suppressions or allowances were changed to hide those diagnostics. Passing source-backed native types supply the focused local type proof; exact-head CI owns package-boundary typed lint and built SDK proof. No local broad suite, build, E2E, whole-graph checker or operator-state access is claimed.
GitHub reported a real conflict after draft publication. The signed rebase onto main d01eb83 preserves main's MiniMax test consolidation from #177103, changing only its registration call to the real plugin entry. Range-diff confirms the production patch is unchanged. The affected two-root native typecheck, both MiniMax suites (34 cases), syntax lint and whitespace checks pass. Runtime and Madge cycle checks both find zero cycles. The earlier full test results above remain prior-head evidence. The focused suites took 383.06 seconds including cold cached-worker preparation; this is not a performance claim.
The post-rebase suppression ratchet found two existing typescript/unbound-method suppressions in ui/src/e2e/chat-managed-media-order.test-support.ts, a file this PR does not change. The ratchet and helper are unchanged from the rebased main baseline. One serial replay on fresh main 43e2d3c reproduced the exact 98-versus-97 failure and the identical extra helper row: 13 cases passed and one failed in 41.01 seconds. This local failure is inherited; the main violation remains unresolved. No allowance, suppression, skip or timeout was changed. The coordinator failure record and latest six completed schedules were checked; its older 98-versus-97 entry concerns different MCP/provider rows, so that entry is not being used as exact-signature proof. Exact-head hosted CI remains the broad gate.
Exact-head CI and native inherited-failure exception
Run 39234298826, attempt 1, tested head
89543e790208a3c7f169be3a10efe48415d5a520. All 216 check runs were enumerated. Extension typed lint, production/test types, package boundaries and independent security checks passed; this closes the local generated-SDK declaration gap above. Two cancelled administrative PR-context runs are superseded by successful same-head job 117999535143; no product suite is missing proof.desktop-resize.real-gateway.e2e.test.ts. Latest completed scheduled main 39232001367 ate87464759b58d376db0c7bd82dcf27addb0de84bhas the identical assertion and missing row.CI checked out merge
e185addcadb4eee242132f80132ef58ebcb1d132, whose inspected ordered parents are protected maindd9272530e9ef2646f8551bbb5c1530d9af176c8and this exact PR head. The inventory assertion, its AST helper, its Vitest inventory config and the desktop-resize source are byte-identical between the main parent and tested merge. The only tooling edit removes a retired MiniMax watch row, unrelated to private-server AST detection. The coordinator flake ledger and latest six completed scheduled main runs were checked; the new scheduled-main log supplies exact-signature reproduction, so no additional local replay was run. No CI rerun, allowance, suppression, skip, retry or timeout change was used. Landing requests the native authorized pre-existing-failure exception; failed CI is not represented as green.