Decomposition of docs/reviews/002-post-remediation-review.md per its 5-unit remediation plan: - Unit 1 (security-critical): gw15-publish-body-cap, prj16-schema-via-call (CF-004 filed alkcall-side), fwd13-dot-segments, fwd16-missing-capability, oai11-ref-memoization - Unit 2 (timeout/terminality): ws13-idle-progress, fwd15-stream-timeout, cli01-retry-after-budget, con17-mcp-pagination, con18-wss-sweep-exit - Unit 3 (projection/docs): projection-truthfulness, mcp-batch-cap, gw16-status-drift - Unit 4 (spec-import): yaml-normalization, oai13-path-item-wildcards, import-loudness-cluster, js01-placeholder-check, fwd17-19-contract-decisions - Unit 5 (WS polish + tests): con18b-ws-polish, client-policy-wire-tests, cov-deployment-knobs, cov13-dead-code, srv11-srv12-router-ordering - review-002-bracketed-followup: tentatively planned post-bulk pass (stale-check, OQA-18 enforcement decision, CON-08/09 close() lever, cross-crate re-checks) — deliberately not serialized against the bulk Also: review-002 numbering repair (CON-14 was double-booked; MCP pagination now CON-14, from_wss monitor renumbered CON-18, missing CON-14 section added). taskgraph: 66 valid, no cycles; 24 pending (all review-002); gen-1/gen-2 parallel waves identified; workflow-cost hotspots are prj16 (12.8) and ws13 (11.1), both carrying the reviewed slicing guidance in their Notes.
1.7 KiB
1.7 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| review-002-mcp-batch-cap | Cap MCP batch tool at MAX_BATCH_OPERATIONS (PRJ-22) | pending | single | low | component | implementation |
|
Description
Review 002 PRJ-22 [minor]. The MCP batch tool has no cap on the
calls array (to_mcp.rs:215-247 executes serially) while HTTP
/batch rejects at 101 (routes.rs:173-184,
MAX_BATCH_OPERATIONS). A 10,000-entry MCP batch occupies the
dispatch spine serially (each invoke up to the 30 s deadline) — the
doc (PRJ-09's fix) advertises no limit either.
Acceptance Criteria
- The
batchtool enforces the sameMAX_BATCH_OPERATIONScap (share the constant; do not duplicate the literal) — over-cap → structuredINVALID_INPUT-family error consistent with the tool's other argument errors (includingretryable, per PRJ-13) - Tool description states the limit (mirroring how
/batchdocs it) — ADR-041 shape unchanged (4 fixed tools) - Test: over-cap
callsarray → structured error, no dispatch happened (spy/gateway-count assert via the existing invoke_tool harness) cargo test --features mcp,cargo clippy --all-features --all-targets -- -D warnings,cargo fmt --checkpass
References
- docs/reviews/002-post-remediation-review.md (Part F', PRJ-22)
- src/adapters/to_mcp.rs:215-247 (the loop), src/gateway/routes.rs:42,173-184 (the cap to share)
- tasks/adapters/review-001-mcp-tool-fidelity.md (the PRJ-07..10/13 work whose conventions to follow)
Notes
One of the smallest tasks in the batch — a good first warm-up slice or fold-in candidate if a session runs short (but keep the commit separate; it is its own unit of work).