Repository navigation
refactor(mcp): remove test-only session runtime seams - #174347
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 maintainer review before merge. What this changesThis PR removes MCP runtime testing controls and moves fixture inspection and deadline overrides into test support. Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes private testing machinery without a concrete introduced regression, while the failed exact-head lint gate still needs classification. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe session MCP manager acquires requester-scoped runtimes, which discover tools and execute requests through transport clients; lifecycle owners retire their leases and connections. flowchart LR
A[Agent and cron callers] --> B[Session MCP manager]
B --> C[Session MCP runtime]
C --> D[Catalog listing owner]
C --> E[Client lifecycle owner]
D --> F[MCP server]
E --> F
G[Test fixtures] --> D
G --> E
Technical reviewBest possible solution: Land the fixture-owned replacement after the failed lint gate is resolved or supported by evidence of an inherited failure. Do we have a high-confidence way to reproduce the issue? No user-facing bug is claimed; source inspection confirms that the removed controls serve fixtures and that production deadlines remain equivalent. Is this the best way to solve the issue? The change follows the repository's test-boundary policy by removing production testing controls while retaining real listing, disposal, and lifecycle owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 02f671cd22a7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -78, Tests +65, Other 0. Total -13 across 21 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed October 16, 2026, 11:24 AM ET / 15:24 UTC. |
Exact-head landing evidenceReviewed head: 1ed4e83. Full CI 38925363564 completed successfully. Every exact-head check run was enumerated: none failed, cancelled, or running; CodeQL aggregate neutral; applicable Critical Quality, all six Security High jobs, security-fast, runtime, types, lint and gate succeeded. Dependency, security-sensitive review and CI-gate statuses succeeded. No requested review is pending and no submitted review requests changes. The original head's lint failure was ours: two callback-local cancellation signal names shadowed a Vitest import. The repair only renames those locals and forwards the same signal. One-file lint/types, formatting and the suppression suite passed; fresh independent repair review completed scoped-clean through P2. Original full review was also scoped-clean. No CI rerun or inherited-failure exception is used. Local worker-dependent runtime proof remains unrun under the broad-artifact-build prohibition; current hosted runtime suites passed. The lane's native submission workflow repeatedly stalled at managed-worktree startup/capacity admission on earlier Crabbox and Telegram attempts. Its previous MCP invocation was owner-interrupted while startup/provisioning was still pending because the head needed repair; it was not an automatic deadline or native approval. Those processes settled and native exact-token recovery retired lock a8ab72b4c8d755de33ef715884d9cb7cd6ec2a78. No current MCP operation lock or merge outcome exists. Use the coordinator-authorized exact-head fallback for that established repeated common-workflow infrastructure blocker after current head, writer, security and review observation. No native readiness artifact is invented and no CI/security/review gate is bypassed. Pin the exact reviewed SHA; reconcile any response and verify remote squash ancestry afterward. Area split: 78 net production lines removed (3 added, 81 removed). Real catalog/request/disposal deadlines, live host authority, cancellation, leases and write-work settlement remain. Phase E memory machinery and assertions are untouched; the memory fixture only follows the private MCP getter removal. |
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
The dependency check found three exports without production importers. All three implementations still have same-module production callers: Enterprise identity validation was added with its current sign-in caller in 23a5696 (#173513), and the MCP merge remains used by catalog loading and peeking after b646675 (#174347) removed its test facade. No trust decision or caller was lost. Keep the live helpers private and exercise catalog merging through the combined runtime, preserving every existing test assertion. Do not remove the Enterprise proxy, issuer or account-id checks. Proof: 97 focused tests passed with --maxWorkers=1 (138.97s), dependency scans, core and owning test types, lint/format, and clean P2 review. The stricter full-tree exports audit still reports two unrelated Discord namespace members in unchanged owners; production/script scans pass.
…tion-order proof Main removed the agent-bundle-mcp-runtime testing facade (openclaw#174347). Co-Authored-By: Claude Opus 5.5 <[email protected]>
* refactor(agents): remove private MCP test facades * test(mcp): avoid shadowing test cancellation signals
The dependency check found three exports without production importers. All three implementations still have same-module production callers: Enterprise identity validation was added with its current sign-in caller in b985092 (openclaw#173513), and the MCP merge remains used by catalog loading and peeking after d3c8c52 (openclaw#174347) removed its test facade. No trust decision or caller was lost. Keep the live helpers private and exercise catalog merging through the combined runtime, preserving every existing test assertion. Do not remove the Enterprise proxy, issuer or account-id checks. Proof: 97 focused tests passed with --maxWorkers=1 (138.97s), dependency scans, core and owning test types, lint/format, and clean P2 review. The stricter full-tree exports audit still reports two unrelated Discord namespace members in unchanged owners; production/script scans pass.
What Problem This Solves
The session MCP runtime exposed a private testing facade, mutable test deadlines, global test override state and manager bookkeeping inspection solely for fixtures. Production always used the same catalog timeout and client disposal implementation.
What Changed
Remove those private test controls and the default-only disposal wrapper. Retained tests observe the existing manager and actual lifecycle store through fixture-owned module-boundary spies, and shorten test I/O deadlines at the real client/listing module boundary.
The real 10-second catalog bound, configured request deadlines, 5-second disposal bound, current resource-host authority, cancellation, held leases and teardown settlement are unchanged. Public SDK exports, config, CLI, Gateway protocol and persisted shapes do not change. No migration or user action is needed.
This is one MCP-owner area slice of a wider cleanup family, split for bounded CI attribution: 21 files, including three production owners and their cross-area cleanup fixtures. Against pinned main base 7cbbf3b, production is +3/-81 (78 net lines removed); tests/support are +246/-177 (69 net lines added). The single assertion-safety row shrinks 3 to 2 without increasing a budget. Overall: 9 lines removed.
The memory private-transcript fixture changes only its MCP manager getter import/lookup. Its memory setup, inference, transcript, foreground-context and settlement assertions remain unchanged. The standalone session-memory backend and all its machinery are untouched.
Best-effort tradeoffs accepted
None. Test-only injection and inspection are removed; no runtime guard, recovery, durability or security boundary is relaxed.
Evidence
signalnames shadowing Vitest's cancellation signal; the downstream CI gate also failed. Both failures are ours, not inherited. The repair renames only those parameters. Targeted one-file lint (309 seconds), types (180 seconds), formatting, required suppression proof (191 seconds) and fresh independent P0-P2 review passed. The repair head requires new exact-head CI; no CI rerun was requested.Release-note context: internal cleanup only; user-visible MCP and memory behavior remains unchanged.