Plan updated with the alknet-tty findings: the drainer pattern (single ordered writer) makes outbound chunk-boundary parsing sound; TestStdinSink's try_send→Full→Pending is the inbound backpressure precedent; OQ-01(a) now cites the reference. Task graph (taskgraph-validated, 17 tasks, 6 generations, no cycles): - tasks/server/: core-types, auth, healthz-decoy, adapter - tasks/gateway/: dispatch, routes, publish - tasks/websocket/: byte-adapter (research POC), upgrade-session, overlay-ops - tasks/adapters/: from-openapi, from-jsonschema, to-openapi, from-wss, mcp - tasks/client/: http-host - tasks/infra/: integration-suite (phase 4) Critical path runs through server core → adapter → WS session → overlay tests → integration suite. High-risk tasks are the three WS tasks, de-risked by the ws-byte-adapter POC blocking upgrade-session.
1.4 KiB
1.4 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gateway-routes | The 5 core gateway routes wired into the router | pending |
|
moderate | medium | component | implementation |
|
Description
Port server/gateway_routes.rs from
/workspace/@alkdev/alknet/crates/alknet-http/src/server/gateway_routes.rs:
GET /search (AccessControl-filtered services/list), GET /schema,
POST /call ({operation, input}), POST /batch, and POST /subscribe
(SSE projection: text/event-stream, call.responded → data: frames,
terminal error event, abort on client disconnect). Auth middleware
applied to all five. The route set intentionally excludes /publish
(separate task). Integration tests over DuplexStream: search filtering
by identity scopes, call round-trip, subscribe stream of multiple
events, batch correlation.
Acceptance Criteria
- 5 routes ported and wired in server-adapter's router
- SSE framing tests (multi-event, error-terminates, client-disconnect)
- /search returns only ops the caller's identity can invoke
- Full request→dispatch→response test over DuplexStream
cargo testpasses
References
- docs/architecture/http-server.md (§router list, §Streaming projection)
- docs/architecture/decisions/042-openapi-gateway-pattern.md, 047-remove-direct-call-http-surface.md
Notes
Agent fills during implementation.
Summary
Agent fills on completion.