Repository navigation
test: add MCP query-registry agent/runtime test fixture - #99815
hanZeng-08 wants to merge 4 commits into
Conversation
|
Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask. Close this stale, proof-deficient test PR: its current head imports a deleted test harness, manually scripts the call order it claims to protect, and has had no contributor update after the proof request. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again. Review detailsBest possible solution: If the linked coverage request is sponsored, implement a rebased agent-level fixture on the current MCP runtime that observes planner-selected ordering and validates each query’s required parameters. Do we have a high-confidence way to reproduce the issue? Yes: current main lacks the harness imported at src/agents/mcp-query-registry.test.ts:11, so the branch cannot resolve that module after rebase. Is this the best way to solve the issue? No: direct scripted tool calls are not the requested planner test, and the fixture does not enforce required parameters per query. Security review: Security review cleared: The test-only diff adds no dependency, workflow, permission, package, or secret-handling change. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 72d55fc12a47. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Fixes #99770
What Problem This Solves
Issue #99770: OpenClaw had no test fixture for MCP query-registry workflows. Without one, planner and tool-materialization regressions could silently break the expected context → list → describe → execute ordering for read-only query registries.
Why This Change Was Made
src/agents/mcp-query-registry.fixture.ts: a self-contained stdio MCP server exposing the four canonical tools (demo_context,demo_queries_list,demo_query_describe,demo_query_execute) withAUD004/CAD005query ids.src/agents/mcp-query-registry.test.ts: five runtime integration tests using a realSessionMcpRuntimeandmaterializeBundleMcpToolsForRunto cover catalog discovery, happy-path ordering, and negative controls (undescribed execute, missing params, unknown query id).{queryId, params}shape, and why errors surface indetails.status.User Impact
No user-facing behavior change. This adds deterministic test-only coverage that protects the query-registry agent pattern from future regressions.
Evidence
node scripts/run-vitest.mjs src/agents/mcp-query-registry.test.ts --reporter=verbose node scripts/run-oxlint.mjs src/agents/mcp-query-registry.fixture.ts src/agents/mcp-query-registry.test.ts pnpm exec oxfmt --check --threads=1 src/agents/mcp-query-registry.fixture.ts src/agents/mcp-query-registry.test.tsAll 5 tests pass; lint and format checks pass.
Closes #99770.