21 review-001 tasks across server/adapters/client/gateway/websocket/infra, chunked from the 7-unit remediation plan in docs/reviews/001-initial-implementation-review.md. - Scope split by mechanism, not one-per-finding: 15 tasks in generation 1 (parallelizable), 6 sequenced after their file-sharing precursors - Deliberately deferred until dependent fixes land: projection/doc fidelity partial (Unit 6 beyond dependency hygiene), coverage backfills (COV-01..07 via in-task acceptance for forward.rs), and per-finding minors (OAI-06/07, HY-02/04/06/10/11, CON-08) - Cross-crate WS-12 (alkcall demux 4 GiB discard alloc) noted for filing in alkcall, not here taskgraph: validate clean, no cycles, 6 generations
4.0 KiB
4.0 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| review-001-consumer-adapter-hygiene | from_wss/from_mcp consumer fixes — plaintext ws://, 401 classification, token hygiene (CON-03, CON-05..CON-13) | pending | moderate | low | component | implementation |
|
Description
Review 001 consumer-adapter findings, minus the hang fix (its own task — review-001-ws-robustness carries WS-02/CON-02), grouped as the small CON cleanup list:
- CON-01 (one-liner):
from_mcp/mod.rs:86imports only the firsttools/listpage;next_cursoris never followed. rmcp 1.8 provideslist_all_tools()for exactly this. Servers that paginate silently truncate the import — no error, no log. Fix and add a paginating-server test (COV gap 11). - CON-03 (security):
from_wss.rs:114-128accepts plaintextws://and attaches the Bearer token unconditionally. A config typo silently ships a long-lived bearer credential over plaintext. Refusews://when a token is present — or unconditionally unless explicitly allowed — with a clear error. - CON-04 (
from_mcp/mod.rs:240-248): the audio variant ofcontent_block_union_schemarequires non-existent"audio"(property isdata) — valid audio blocks never satisfy the publishedoutput_schema. Fix and validate a real audio block. - CON-05/CON-07: docs claim per-call credential reads; reality is
import-time credentials (
from_mcptransport-pinned token,from_wssbundles carry no capabilities at all). Correct docs, remove the dead capability read (mod.rs:139-143). - CON-06 (
mod.rs:103-116): 401 classified viaformat!("{error:?}").contains("401")— a:4010/port in a URL misclassifies as Unauthorized and real auth failures can be missed. Match typed variants; substring only as last resort. - CON-11: transport-level
tools/callfailures → undeclaredCallError::internal; declare the failure mode (and preserve JSON-RPC error fidelity where cheap). - CON-12: remote tool names interpolated into op names unsanitized —
a
/in a tool name breaks the two-segmentns/opconvention. Sanitize/validate at import. - CON-13 (
from_wss.rs:48,from_mcp/mod.rs:37): held tokens are plainOption<String>; useSecret<String>to match the crate's posture (noDebugderives exists — keep it that way). - CON-10:
[[test]] full_surfaceis missingtest-supportinrequired-features→cargo test --features mcpfails to compile (empirically verified; masked by CI's--all-features). - CON-08/CON-09: no teardown path on
FromMCP(eachimport()leaks an open server-side session + GET SSE stream) andfrom_wssimport stacks duplicate sessions on reconnect by design (ADR-070 v1). Either add explicit close/teardown handles or write the ADR-070 note + module docs that make the limitation explicit — do not silently expand scope into a reconnect layer.
Acceptance Criteria
- Paginated
tools/listfully imported (paginating-server test) ws://+ token refused (or explicit opt-out) with a clear error (test)- Audio variant of
content_block_union_schemasatisfied by a valid block (test) - No substring-based 401 classification on typed paths; a URL containing
:401xno longer misclassifies (test) - CON-05/07 docs corrected; dead capability read removed
- CON-11/12: transport-failure error declared; remote tool names sanitized (test)
- Tokens held as
Secret<String> cargo test --features mcpcompiles and passes (CON-10), as doescargo test --all-features- CON-08/09: close handles exist or docs/ADR-070 note state the limitation
References
- docs/reviews/001-initial-implementation-review.md (Part G, CON-03..CON-13)
- docs/architecture/decisions/070-from-wss-consumer-adapter.md
Notes
Agent fills during implementation. Independent of the WS tasks. The from_wss notify/pending fixes are tracked separately in review-001-ws-robustness (WS-02/CON-02 share one mechanism).
Summary
Filled on completion.