feat: producer-listen — listen establisher (shape 2) + AcceptQueue contract
- AcceptFn: the injected accepted-connection source (the assembly layer owns the listener + accept loop; the protocol never binds — OQ-TN-04). - AcceptQueue: the protocol-side queue contract (async push/pop/ close; FIFO always-before-take ordering; close-while-waiting resolves None). Empty-queue posture is assembly-owned (a late accept is legitimate; resource_shortage is the closure's mapping; the wrapper's 10s establishment timeout is the backstop). - listen_establisher: same open op, same params, same typed errors — registry namespace gate → accept() → Establishment::new(plan); the pump handler is untouched (plan-flow with a different source). - register_tunnel_listen_openable: same spec/pump registration with the listen establisher (the honest shape vs a dial/accept enum: the establisher is the only difference; one establisher per op id per session registry — documented). - Tests (tests/producer_listen.rs, 6): listen flow end-to-end, FIFO ordering across two opens (R-01 plan-flow, listen-flavored), empty queue -> resource_shortage, closed listener -> dial_failed, unknown resource -> unknown_resource, late-push wait-then-resolve. - Harness: RegistrationMode enum + wire_listen. - TargetHandle gains a structural Debug impl (test ergonomics). Verified: cargo test green (44), clippy -D warnings (native + wasm32), fmt clean, wasm32 check passes.
This commit is contained in:
@@ -188,7 +188,7 @@ async fn open_denied_without_any_identity() {
|
||||
.await;
|
||||
let topo = wire_with(
|
||||
registry,
|
||||
echo_dial(),
|
||||
harness::RegistrationMode::Dial(echo_dial()),
|
||||
None,
|
||||
None,
|
||||
Arc::new(alkcall::core::auth::NoopIdentityProvider),
|
||||
@@ -239,7 +239,7 @@ async fn open_token_overrides_transport_identity() {
|
||||
.await;
|
||||
let topo = wire_with(
|
||||
registry,
|
||||
echo_dial(),
|
||||
harness::RegistrationMode::Dial(echo_dial()),
|
||||
None,
|
||||
None,
|
||||
Arc::new(harness::TestIdProvider),
|
||||
|
||||
Reference in New Issue
Block a user