Add 10 new tasks under tasks/architecture/ for Phase 0a (ADR writing): - 9 ADR tasks (026-034) with dependency-ordered structure - 1 review checkpoint task before Phase 0b spec writing ADR dependency graph (3 generations): Gen 1 (parallel): 026, 029, 030, 031, 032, 034 Gen 2 (depends on 029): 027, 028 Gen 3 (depends on 027+028): 033 Gen 4: review checkpoint Also mark all 34 prior implementation tasks as completed — they were finished but still showing as pending in the taskgraph.
2.3 KiB
2.3 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | ||
|---|---|---|---|---|---|---|---|---|---|
| server/control-channel | Implement alknet-control reserved channel for pubsub event bus bridging (ADR-018) | completed |
|
narrow | medium | component | implementation |
Description
Implement the control channel routing per ADR-018. When the server receives a channel_open_direct_tcpip request for alknet-control:0:
- The handler detects the reserved
alknet-prefix destination - Instead of making a TCP connection, it bridges the SSH channel to an internal event bus handle
EventEnvelopeJSON flows bidirectionally over the SSH channel
The entire alknet- prefix is reserved — no TCP connections should be attempted for alknet-* destinations. The control channel is optional; servers without pubsub configured should accept the channel and provide a configurable behavior (reject or provide a loopback pipe).
At this stage, implement the routing logic and a ControlChannel trait that consumers can implement. The actual pubsub bridge implementation would be in a separate crate or behind a feature flag.
Acceptance Criteria
crates/alknet-core/src/server/control_channel.rsexportsControlChannelHandlertrait and routing logicALKNET_CONTROL_DESTINATIONconstant defined as"alknet-control"(ADR-018)ALKNET_PREFIXconstant defined as"alknet-"for namespace reservationControlChannelHandlertrait:async fn handle_channel(stream: Box<dyn AsyncRead + AsyncWrite + Unpin + Send>)- Server handler detects
alknet-*prefix and routes toControlChannelHandlerinstead of TCP proxy - If no
ControlChannelHandlerconfigured, reject the channel open request (SSH channel open failure) - Non-reserved destinations continue through normal TCP proxy path
- Server constraint enforced: no TCP connections to
alknet-*destinations - Unit tests: reserved destination detected, non-reserved passes through, prefix matching works
References
- docs/architecture/server.md — Channel Handling section (reserved destinations), Constraints section
- docs/architecture/decisions/018-control-channel-for-pubsub.md — control channel rationale
- docs/architecture/napi-and-pubsub.md — server-side control channel behavior
Notes
To be filled by implementation agent
Summary
To be filled on completion