Full-surface integration suite (tests/full_surface.rs, mcp feature): - one HttpAdapter over real TCP (ProtocolHandler::handle path) serving gateway endpoints, /openapi.json, /mcp, and the WS channels session - gateway: search/schema/call/subscribe/batch/publish presence, envelope shapes, error fidelity end-to-end - from_openapi import -> Internal-by-default invisible from the wire -> External facade composes it via env.invoke -> upstream HTTP API called end-to-end (ADR-015 composition model exercised) - to_openapi 6-path doc validated against openapiv3 over the wire - to_mcp: MCP client connects to /mcp on the served adapter, lists the 4 gateway tools, search returns ACL-filtered ops (Sub excluded) Production fix: the WS upgrade route was reserved but never wired into HttpAdapter's router (the ws-upgrade-session tests built their own router). Now wired with ws_bearer_auth (401 without a resolvable token) around ws_upgrade_handler. Docs sync: all 28 'Port notes' sections/blockquotes stripped from ported ADRs/specs; OQ-01/OQ-02 statuses corrected to resolved in overview.md, websocket.md, and the README table (open-questions.md was already current). Publish prep: cargo publish --dry-run --allow-dirty succeeds; cargo doc --no-deps warning-free (ADR link targets fixed); feature combinations (default / test-support / mcp / wss / all) compile warning-free under clippy -D warnings. Verified: cargo test (182 lib default), --all-features (227 lib + 29 integration), clippy -D warnings x3 feature sets, fmt, doc, publish --dry-run.
3.8 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| infra-integration-suite | Full-surface integration suite + docs sync + publish prep | completed |
|
moderate | medium | project | review |
|
Description
Phase 4 hardening. (1) Integration suite exercising the full surface
over DuplexStream + in-process WSS: gateway 6 endpoints, WS session
(call + data channel + overlay), from_openapi import → call → error
fidelity, from_wss import over the WS server, mcp feature interplay.
(2) Docs sync: port-notes sections stripped from ported ADRs/specs
after review, open-questions.md statuses updated (OQ-01/02 → resolved),
README doc table final. (3) Publish prep: cargo publish --dry-run --allow-dirty, semver/API surface check against AGENTS.md conventions,
Cargo.toml metadata polish.
Acceptance Criteria
cargo test --all-featuresgreen; clippy-D warningsgreen; fmt green- Full-surface integration test passing (gateway + WS + one adapter each direction)
- Port notes stripped; OQ statuses updated
cargo publish --dry-run --allow-dirtysucceeds- taskgraph shows all tasks completed
References
- docs/plans/implementation.md (§Build order, Phase 4)
- AGENTS.md (verification commands, commit conventions)
Notes
The full-surface suite surfaced a real gap: the WS upgrade route was reserved but never wired into HttpAdapter's router (the ws-upgrade-session tests built their own axum server). Now wired in build_router with its own ws_bearer_auth layer (401 without a resolvable token — stricter than the shared bearer middleware, which permissively stashes Option for the gateway endpoints).
Summary
Phase 4 hardening complete.
Integration suite (tests/full_surface.rs, mcp feature, 7 tests over real TCP with each accepted connection driven through ProtocolHandler::handle — the production path):
- gateway 6 endpoints over HTTP: search (ACL-filtered), schema (GET + name query), call (round trip), batch, subscribe (SSE), publish surface presence; /openapi.json 6-endpoint projection validating against openapiv3; gateway error fidelity end-to-end (unknown op 404 NOT_FOUND); unauthenticated calls follow the ACL model (unrestricted op → allowed, unknown op → NOT_FOUND)
- WS session over the same HttpAdapter (upgrade → channels → echo round-trip on channel 0) — required wiring the WS upgrade route into HttpAdapter's router (it was reserved but only wired in tests): WS_UPGRADE_PATH now serves ws_upgrade_handler under ws_bearer_auth (401 without a resolvable token), while gateway endpoints keep the permissive shared bearer middleware
- from_openapi import → Internal-by-default (invisible from the wire, ADR-015) → External facade composing it via env.invoke → the upstream HTTP API called end-to-end
- to_openapi projection over /openapi.json (6 paths, openapiv3-valid) and to_mcp over /mcp: MCP client initialize + tools/list (4 gateway tools) + search excluding Sub ops — the tool-gateway pattern
Docs sync: all "## Port notes" sections stripped from the 28 ported ADRs/specs (inline port-note blockquotes rephrased as plain statements); OQ-01/OQ-02 statuses corrected to resolved across open-questions.md, overview.md, websocket.md, and the architecture README's OQ table.
Publish prep: cargo publish --dry-run --allow-dirty succeeds (90 files); cargo doc --no-deps warning-free (crate::docs link targets resolved); no alknet references remain in src/; Cargo.toml metadata already complete (license, repository, keywords, categories, rust-version).
Verified: cargo test (182 lib default), --all-features (227 lib + 29 integration across 4 suites), clippy -D warnings (default / test-support / all-features), fmt, doc, publish --dry-run.