diff --git a/CHANGELOG.md b/CHANGELOG.md index 450c798..f9e94fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ this crate adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +## [0.5.0] - 2026-11-03 + +The correlation-gate release: the forwarded op's serving half gains an +establishment phase (review 003 W1 absorbed in-repo, ADR-008 Amendment +2), prompted by alkssh's consumer input on the composed `-R` +deployment's failure vocabulary. Additive public API only (the minor +bump, not a patch); the wire delta is empty and the base registration +stays byte-for-byte. The rest of the wave is doc-only: the em-dash +prose sweep across repo docs, spec docs, doc comments, and task files +(no code-path change), and review 003's doc trail closure (W2/W3 are +the sibling repos' adoption waves and remain booked there). + ### Added - **The forwarded-op establisher variant (`register_tunnel_forwarded_openable_with_establisher` + `ForwardedGate` + `ForwardedPlan`, ADR-008 Amendment 2)**: the serving side of `channels/tunnel/forwarded` gains an establishment phase: the assembly injects a correlation gate (`ForwardedGate`, a sync closure over the parsed `TunnelForwardedParams`) and the crate wraps it into the alkcall `OpenEstablisher` dance, so a stale/missing `listen` token fails the open as a typed `channel:open_failed` with `details.reason == "unknown_resource"` BEFORE any channel is born (no phantom channel, extending ADR-049's posture to the forwarded op's serving side; the wire vocabulary is unextended). An establisher parse failure is likewise typed (`handler_error`), an improvement over the base shape's success-then-silent-birth-teardown for malformed ingress. Gate order pinned: the registry runs the `tunnel:forwarded` ACL before the establisher (pinned by test with a gate-invocation witness). The base `register_tunnel_forwarded_openable` stays byte-for-byte compatible as the compatibility + residual-race-fallback posture (the narrow gate-pass→handler-run `correlation-miss` race keeps teardown-at-birth); the establisher variant is the recommended shape and new assemblies take it by default. The wire delta is empty. Five gate tests pin the typed miss/no-phantom/no-handler, the unchanged gate-pass serving flow (full byte round-trip), the residual-race reap, the scope-gate ordering, and the malformed-params delta. @@ -362,7 +374,8 @@ complete (Phase 2, review 001 findings remediated). matrix). Wasm-clean default crate verified (`wasm32-unknown-unknown` check + clippy). -[Unreleased]: https://git.alk.dev/alkdev/alktunnels/compare/v0.4.1...HEAD +[Unreleased]: https://git.alk.dev/alkdev/alktunnels/compare/v0.5.0...HEAD +[0.5.0]: https://git.alk.dev/alkdev/alktunnels/compare/v0.4.1...v0.5.0 [0.4.1]: https://git.alk.dev/alkdev/alktunnels/compare/v0.4.0...v0.4.1 [0.4.0]: https://git.alk.dev/alkdev/alktunnels/compare/v0.3.0...v0.4.0 [0.3.0]: https://git.alk.dev/alkdev/alktunnels/compare/v0.2.1...v0.3.0 diff --git a/Cargo.lock b/Cargo.lock index 9ac4ee2..c7cb993 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ dependencies = [ [[package]] name = "alktunnels" -version = "0.4.1" +version = "0.5.0" dependencies = [ "alkcall", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 96e504a..3c79c4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alktunnels" -version = "0.4.1" +version = "0.5.0" edition = "2021" rust-version = "1.88" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index 44295a0..7509a2b 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,20 @@ register_tunnel_bindfirst_openable(&core, ®istry, &op_registry, auth, injecti // The forwarded op's opener-side serving half (on the consumer's // connection): correlate the token, pump against the local socket. +// The establisher variant (recommended; the gate runs first) fails a +// stale/missing token as a typed `channel:open_failed` BEFORE the +// channel is born: register_tunnel_forwarded_openable( &core, &op_registry, auth, /* ForwardedHandler: (params, BiStream) -> pump task */, )?; + +// With the correlation gate (stale token = `unknown_resource`); the +// handler shape is unchanged: +register_tunnel_forwarded_openable_with_establisher( + &core, &op_registry, auth, gate /* ForwardedGate */, + /* ForwardedHandler: (params, BiStream) -> pump task */, +)?; ``` ### Consumer: open a tunnel channel (the `-L` path)