Repository navigation
refactor(plugins): call existing operation owners directly - #176003
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 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. |
|
Codex review: needs changes before merge. What this changesThis PR replaces private operation overrides and forwarding layers with direct calls to existing bundled-plugin owners. Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the maintainer-approved simplification is useful, but the previously reported unused Copilot fixture remains. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherBundled plugin orchestration accepts browser uploads, agent attempts, channel startup and media requests, memory operations, and sandbox file operations, then delegates to their existing execution owners. flowchart TD
Requests[Plugin requests] --> Orchestration[Bundled plugin orchestration]
Orchestration --> Owners[Existing operation owners]
Owners --> IO[Guarded transport and filesystem]
IO --> Results[Plugin results]
Tests[Test fixtures] --> Owners
Technical reviewBest possible solution: Keep the direct owner calls and remove the unused duplicate Copilot fixture and its supporting imports. Do we have a high-confidence way to reproduce the issue? No product bug is claimed; source inspection directly confirms the unused duplicate fixture. Is this the best way to solve the issue? Using existing production owners is the smallest coherent refactor, provided the test migration also removes unnecessary duplicate scaffolding. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3561a19c06ec. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -104, Tests +188. Total +84 across 25 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
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 HistoryReview history (2 earlier review cycles)Reviewed October 18, 2026, 4:09 PM ET / 20:09 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
32a02c9 to
51bfc81
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landing evidence for exact head CI run 39161167966 completed successfully. The refreshed full paginated exact-head check census contains 126 completed records, no failed/cancelled/unfinished suites, and successful aggregate The conflict-integrated 25-file candidate received a fresh independent review through P2 with no actionable findings. Conflicted-graph types, formatting, suppression policy and both cycle checks passed. The incomplete local runtime attempt remains disclosed in the PR; hosted exact-head CI supplies broad proof. The Phase E session-memory backend and all its machinery/tests remain untouched. Native workflow infrastructure and authorized fallbackThe campaign ledger records two earlier infrastructure interruptions of this native landing workflow: the extension initialization terminated with SIGTERM/143 ( The current extension initialization was owner-interrupted after 669.020s without completing its retained checkout recovery; its Git working-tree check had not completed. This is not a product test failure or an automatic-deadline claim. Its exact owned process group was drained. The emitted exact-lock recovery completed successfully through the current origin/main native wrapper after a task-owned frozen tooling install supplied its required dependency version. The operation-lock ref is absent, and there is no accepted or uncertain extension merge request or merge-outcome ref to replay. Under the operator's standing campaign Ending rule 10, use the direct squash endpoint with the exact head-SHA guard after recovery and fresh live head/check/security/review validation. This substitutes for the interrupted workflow, not any check or review. No CI rerun, green-seeking push, extra rebase, security waiver or unattributed-failure exception is involved. Actual change: 104 net production lines removed, 188 test/support lines added, 84 lines added overall. The initial owned fixture/runtime/lint failures and their repairs remain individually recorded in the PR body; the current exact head is green. |
## What Problem This Solves Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. #176447 does not cover them. ## User Impact No user-visible change. ## Why This Change Was Made - `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: #175975 removed its last callers, so it is deleted. - `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: #176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before #176003. - `src/daemon/inspect-markers.ts: classifyGatewayCommand`: #176469 removed the only outside import, so it is now module-private. - `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: #176399 removed the last outside caller, so it is now module-private. No ignores were added. ## Evidence - `pnpm run deadcode:exports` on this branch, diffed against main `48439195832`: only these four entries disappear. - `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean. Co-authored-by: Ayaan Zaidi <[email protected]>
…176003) * refactor(browser): use fixed upload recovery policy * refactor(memory): collapse local index lease acquisition * refactor(matrix): use startup module owners directly * refactor(openshell): construct the filesystem bridge directly * refactor(nextcloud-talk): call the guarded fetch owner directly * refactor(copilot): call attempt operation owners directly * test: repair native extension seam fixtures
…6562) ## What Problem This Solves Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. openclaw#176447 does not cover them. ## User Impact No user-visible change. ## Why This Change Was Made - `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: openclaw#175975 removed its last callers, so it is deleted. - `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: openclaw#176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before openclaw#176003. - `src/daemon/inspect-markers.ts: classifyGatewayCommand`: openclaw#176469 removed the only outside import, so it is now module-private. - `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: openclaw#176399 removed the last outside caller, so it is now module-private. No ignores were added. ## Evidence - `pnpm run deadcode:exports` on this branch, diffed against main `7451c5780e5`: only these four entries disappear. - `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Bundled plugin paths carry private test selectors, constant policy plumbing and forwarding layers around their only production operation owners.
User Impact
No intended user-visible change. Browser upload retention/quota and security checks, Copilot sandbox/tool authority and shutdown settlement, Matrix startup, Nextcloud guarded downloads and OpenShell filesystem behavior remain. Public SDK, config, CLI, protocol, dependencies and persisted shapes are unchanged. The Phase E standalone session-memory backend and its factory, registry, expiry, federation and tests are untouched; the small ordinary Memory Core index queue change is unrelated to that backend.
Why This Change Was Made
Call the existing operation owners directly. Browser recovery uses its existing fixed policy; tests exercise the actual limits. Copilot and Matrix fixtures intercept actual module boundaries instead of production operation selectors. Nextcloud calls the same guarded transport directly, and OpenShell constructs its sole filesystem bridge directly. Ordinary Memory Core index admission keeps the same local FIFO reader/writer queue without forwarding or repeated synchronous native-signal observations.
This is the extension-area slice of an86-path accumulation under the campaign's area-split rule, not a final residue or claim of exhaustion. Current rebased delta:25 paths, 104 net production lines removed, 188 test/support lines added, 84 lines added overall. Moved or test code is not credited as production reduction.
Fresh main had substantially reorganized Copilot's test fixture. The migration preserves its current helper functions, tables and assertions rather than replaying the older fixture. Module registration order, shared override identity, synchronous resolver results and owned teardown remain explicit.
Best-effort tradeoffs accepted
Evidence
Fresh25-root owning-graph semantic types passed27.326s; formatting passed0.433s and whitespace/index checks passed. Independent full25-path review completed scoped-clean through P2 (correctness0.89). Mandatory suppression policy passed14/14 in62.500s. Exact-path check-changed dry-run passed60.401s; this classified the required routes, not execution of its broad recommendations.
All existing production source preimages matched fresh main before composition. Copilot's evolved test was adapted from its exact current-main bytes with27 unique forward/reverse hunks; before formatting all467 assertion call expressions,18 tables and30 existing functions remained byte-identical. Its three related support/integration modules preserve leading registration imports and retrieve the same cached fixture exports without duplicate static value imports. These are source-transfer checks, not runtime proof.
The ordinary extension lint route requires package-wide declaration preparation, prohibited by the campaign's local build budget. Focused runtime has the same known cold-worker compiler prerequisite. Neither is claimed passing, no preparation/cache bypass was used, and no timeout/retry/skip/suppression was added. Current runtime, lint, architecture/SDK and build proof must come from exact-head hosted CI. No live provider/device or full build result is claimed.
Exact-head CI repairs
Run39089902105 at0f00a7ff6f8b049506eb507f53d64d9d9b4a9567 completed with four owned failures and its downstream gate. No inherited exception is requested:
The actual installed Vitest transform rejects the exact original fixture and accepts its repair; that compiler-boundary control passed0.956s, not a runtime-case pass. Four-root semantic types passed36.453s, four-file formatting1.186s and whitespace checks passed. Fresh independent combined repair review completed scoped-clean throughP2 (correctness0.98). Existing assertions, tables, timeouts, cancellation and teardown remain unchanged. Repaired-head runtime and extension lint remain hosted proof gaps; the five cancelled auto-response jobs belong to separate auxiliary runs, not cancelled test suites.
Conflict-only integration
The repaired32a02 head completed exact-head CI39091778131 GREEN:119 check runs, no failed/cancelled/unfinished suites, aggregate gate117573929871 SUCCESS. GitHub later reported conflicts, so the branch was rebased onto main1446ecc; it was not updated merely to chase green.
Preserve current-main #176322's Nextcloud test consolidation, including the surviving matching/mismatching collision-renamed WebDAV identity table. The obsolete bot-tree negative removed by that change is not resurrected. Preserve current-main #175837's admitted Copilot harness wrapper, cancellation after host admission and explicit modelId. The seam migration uses the same module overrides and Date.now boundary without restoring removed production injection options.
Three conflict-file formatting passed1.930s and conflicted-graph semantic types passed171.772s. Focused three-file Vitest reached a cold worker-cache miss and attempted broad worker artifact preparation, prohibited by the campaign's local budget; only the owned compiler/managed runner were stopped and joined after213.703s. No cases completed, so this is incomplete local runtime proof, not a product failure or passing replay. Fresh full-area independent review completed scoped-clean throughP2/correctness0.96; mandatory suppression policy passed14/14 in75.809s; runtime cycle check passed with zero cycles in131.380s and static Madge cycle check passed with zero cycles. No timeout, retry, skip, suppression or preparation bypass was added.
Current-head hosted proof
Exact51bfc819badb4b37c9f464a7e93f8b4965dcfdd8 completed CI39161167966 GREEN, aggregate117778945685 SUCCESS. Full paginated117-check census has no failed/cancelled/unfinished suites; CodeQL aggregate is neutral, other conclusions success/skipped. Runtime, type, lint and PostgreSQL conformance jobs pass, and CI/dependency/security statuses are successful. No rerun, green-seeking source push or extra rebase was used. This hosted proof closes the broad runtime/lint gaps, not the incomplete local attempt or any live provider/device gap.