tasks/architecture/: - oq-promotion-sync (planning): back-pointers from the phase-0 ledger + AGENTS.md to the promoted OQ tracker (the convergence checklist's final half) - oq-tn-14-tracker: the Safe-Exit external-trigger tracker task for OQ-TN-14 (unix/stdio placement; [external-trigger, deferred-oq], risk trivial, level research per the two-halves rule) tasks/tunnels/ (the implementation graph, 8 generations): - crate-init: module skeleton per overview.md's module map - params: TunnelParams + open-op spec (ADR-001 wire-stable surface) - wire-codec: frame_datagram/DatagramReader + the 8 POC-pinned test families (ADR-003) - producer-open-op: establisher (dial, plan flow R-01) + pump handler (pump_bidi inline R-02) + registration; POC-ported integration tests - consumer-session: TunnelSession (open/adopt, data planes, teardown matrix — ADR-005); generalizes the reverse POC's ReverseTunnel - producer-listen: the listen establisher + AcceptQueue contract (ADR-004 shape 2) - local-socket-halves: the local feature (TCP/UDP/unix halves functions; truncation fail-loud per OQ-TN-13; unix ships per OQ-TN-14's lean-yes, stdio deferred) - review-core-crates: review-injection point before the downstream tasks build on the high-risk producer/consumer shapes - end-to-end-suite: 6 suites / >=20 tests consolidating both POC suites against the public API (the spec's executable form) - review-impl: the phase-gate review (wire/API/conventions/docs sync; findings doc per the alkhttp/alkcall house pattern) Graph verified with taskgraph: 12 tasks valid, no cycles, 8 generations; critical path = oq-promotion-sync -> crate-init -> params -> wire-codec -> producer-open-op -> consumer-session -> review-core-crates -> review-impl; risk concentrated in the two session tasks (both POC-validated); parallel groups available at generations 1 and 6
80 lines
3.2 KiB
Markdown
80 lines
3.2 KiB
Markdown
---
|
||
id: tunnels/end-to-end-suite
|
||
name: End-to-end suite — forward, reverse, listen, datagram, teardown matrix
|
||
status: pending
|
||
depends_on: [tunnels/consumer-session, tunnels/producer-listen, tunnels/local-socket-halves]
|
||
scope: broad
|
||
risk: medium
|
||
impact: phase
|
||
level: implementation
|
||
tags: [tests, integration, phase-gate]
|
||
---
|
||
|
||
## Description
|
||
|
||
Consolidate the integration coverage into `tests/` as the crate's
|
||
end-to-end suite: every validated POC behavior, re-expressed against the
|
||
crate's public API (not the POCs' internals). This is the quality gate
|
||
before the implementation review — the suite is the spec's executable
|
||
form.
|
||
|
||
### Suites
|
||
|
||
1. **Forward (`-L`)**: consumer `open` → producer establisher dials →
|
||
`pump_bidi` → round-trip; 1 MiB backpressure; typed errors
|
||
(unknown_resource / dial_failed / FORBIDDEN / timeout-adjacent);
|
||
per-call opener identity witness (CF-006).
|
||
2. **Reverse (`-R`)**: hub initiator — `open_reverse_channel` +
|
||
`adopt` + `pump_against`; odd-ID allocation asserted (ADR-047 §5);
|
||
identity precedence chain (transport alone / `ServingConfig.
|
||
identity` override / token override / identity-less fail-closed);
|
||
half-close (W4); out-of-band `channel/close` + self-reaping (W3);
|
||
concurrent same-resource opens (R-01, no handoff race).
|
||
3. **Listen producer**: the accept-queue flow end-to-end + its typed
|
||
errors (from `tunnels/producer-listen`).
|
||
4. **Datagram (`udp`)**: forward + reverse datagram sessions via the
|
||
codec — round-trip, empty datagram (the F-2 layering), chunk-split
|
||
survival, TCP+UDP concurrent channels on one connection.
|
||
5. **Teardown matrix** (ADR-005): close / join (with + without pump) /
|
||
Drop — `channel_ids()` asserts no leaks on either side after each.
|
||
6. **`local` feature suite**: real sockets end-to-end (from
|
||
`tunnels/local-socket-halves` — runs after that task lands; the
|
||
duplex-transport suites above do not need it).
|
||
|
||
Transport stand-in: `tokio::io::duplex` (both POCs' harness; the
|
||
alkcall layer owns real transports — unchanged scope). The suite may
|
||
share one harness module (`tests/common/`); the POC harnesses
|
||
(`/workspace/alktunnels-udp-poc/src/harness.rs`,
|
||
`/workspace/alktunnels-reverse-poc/src/harness.rs`) are the two
|
||
topologies to unify.
|
||
|
||
### The spec-conformance assertions to keep visible
|
||
|
||
- A failed open never returns a `channel_id` (no phantom channel —
|
||
both sides' `channel_ids()` hold only 0 afterward).
|
||
- A failed adopt never leaks the session (Drop reaps).
|
||
- The pump handler's `JoinHandle` tracks the data plane (a test that
|
||
simulates early-return would hang/EOF-instantly — the R-02 shape;
|
||
assert the correct shape survives).
|
||
|
||
## Acceptance Criteria
|
||
|
||
- [ ] All 6 suites present; ≥20 integration tests total
|
||
- [ ] `cargo test` green; `cargo test --features local` green
|
||
- [ ] Repeat-run stable (3× clean — the POCs' flakiness bar)
|
||
- [ ] Clippy/fmt clean; wasm32 check passes
|
||
|
||
## References
|
||
|
||
- docs/architecture/wire.md + consumer.md + producer.md (the normative
|
||
behaviors under test)
|
||
- POC test suites: `/workspace/alktunnels-udp-poc/tests/tunnel_poc.rs`
|
||
(10), `/workspace/alktunnels-reverse-poc/tests/tunnel_poc.rs` (16)
|
||
|
||
## Notes
|
||
|
||
> Agent fills during implementation.
|
||
|
||
## Summary
|
||
|
||
> Agent fills this on completion. |