3.6 KiB
3.6 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| review-002-cov-deployment-knobs | Coverage — with_ws_idle_timeout integration test, call_tool production dispatch, small dark arms (COV-11b/12) | completed |
|
moderate | low | component | implementation |
|
Description
Review 002's deployment-knob coverage gaps — production code paths dark in all binaries:
with_ws_idle_timeout(server/adapter.rs:228-242): the WS-13 server-side knob is called by no test — a regression silently disables the idle timer on the default surface while tungstenite unit tests stay green. Add: integration test building viaHttpAdapter::new(...).with_ws_idle_timeout(Some(small))→ connect a WS client → assert server closes with 1001 ≈ at the knob; plus aNonevariant (session survives a long silence). NOTE: the progress-semantics change from review-002-ws13-idle-progress lands first — the 1001 assert must reflect final semantics (progress-based).call_toolproduction dispatch (to_mcp.rs:459-468): all four tools + unknown-name are tested viainvoke_tool, which bypassescall_tool— the rmcp-entered routing shell (what production runs) has never executed. Test: infrom_mcp_integration.rs's live-server harness, one client-sidepeer.call_tool("search"|"batch"|"schema"| "call"|unknown)round-trip through the real rmcp protocol.- Small dark arms (COV-12), one test each:
to_mcpmissing-argument validation forschema(None args) andbatch(empty/no calls) tools (:175, :221);from_mcpnon-object tool arguments wrapped as{"value": …}(:405-408);routes.rsfirst- line-invalid-JSON/publish400 (:263-266);decoy.rsdirectory→index.html resolution (:133-138);openapi_spec.rsarray-of-$refresolution (:428-433 — the arm the coverage pass initially mis-flagged; the code is correct, add the test) andstyle: simple+explode: truerejection (:561-566).
Acceptance Criteria
- Idle-knob integration test (Some(small) → 1001 per final semantics; None → survives) in ws_upgrade_session.rs
- One rmcp-protocol
call_toolround-trip test per tool + unknown (featuremcp) - Each small arm test lands (list above; skip any proven unreachable during implementation — document which and why)
cargo llvm-cov --all-featuresre-run: http_client.rs function %, adapter.rs 228-242, to_mcp.rs call_tool no longer darkcargo test --all-features,cargo clippy --all-features --all-targets -- -D warnings,cargo fmt --checkpass
References
- docs/reviews/002-post-remediation-review.md (Part G', COV-11b, COV-12)
- src/server/adapter.rs:228-242, src/adapters/to_mcp.rs:459-468, tests/ws_upgrade_session.rs, tests/from_mcp_integration.rs
- tasks/websocket/review-002-ws13-idle-progress.md (lands the semantics this asserts)
- tasks/adapters/review-002-oai11-ref-memoization.md (owns the array-$ref behavior; this adds only its test if not already added there)
Notes
Sequence after ws13 (the idle-knob assert must match final semantics).
The array-$ref test is coverage-only insurance — if
review-002-oai11-ref-memoization already added it, check the box and
skip. The from_mcp/{"value": …} wrap test goes in
from_mcp_integration.rs (real wire behavior).
Summary
COV-11b/12 closed: rmcp production call_tool round-trip for all 4 gateway tools, mcp schema/batch dark arms, /publish first-line JSON arm (updated to 422), decoy index.html, array-$ref + style:simple-import-arm pins. COV-11b idle-knob already covered by ws13's tests. Test-only.