- docs/reviews/003-…alkssh-input.md: Status block now resolved —
W1 absorbed (plan 003 §Decisions 1–4 + ADR-008 Amendment 2); W2/W3
pointed at the plan's §W2/§W3, open until those repos land
- docs/plans/003-…: status header planned → W1 landed (W2/W3 open);
the W1 plan-level AC box ticked; W2/W3 + family-coherence boxes
left unticked (sibling-repo sessions)
- Stale-comment sweep (src/ + docs/architecture/) aligned three
stragglers still riding the pre-amendment miss vocabulary:
- src/producer.rs: the accept-loop arm's "correlation miss →
handler_error-class" comment → the typed unknown_resource
open_failed under the establisher variant (Amendment 2)
- wire.md §The Forwarded Op reply/errors: the miss is the typed
unknown_resource open_failed (establisher variant); base shape's
in-session miss = the assembly-side post-open decline,
correlation-miss at debug
- producer.md §The Forwarded Op: "no establisher" → the two-shape
posture (Amendment 2 pointer); last_updated bumped
Verification: cargo test (14 suites, 0 failures), clippy --all-targets
-D warnings clean, cargo fmt --check clean, cargo doc --no-deps clean.
5.6 KiB
Review 003 — The correlation-miss arrival class: alkssh consumer input on the forwarded-arrival event vocabulary
Status
Resolved — W1 absorbed in alktunnels (2026-11-03); W2/W3 pointed at
the sibling repos. The ask rode
docs/plans/003-correlation-miss-resolve.md §Decisions 1–4 and ADR-008
Amendment 2 (docs/architecture/decisions/008-listen-metadata-forwarded-op.md):
- The forwarded op's serving side gained a correlation-gate establisher
variant (
register_tunnel_forwarded_openable_with_establisher): a stale/missing token fails the open as a typedchannel:open_failedwithdetails.reason = "unknown_resource"before the channel is born — framing question 2 answered (the class rides the existing typed vocabulary;unknown_resourcereused, no wire extension). - Framing question 1 answered:
correlation-miss(alkssh's shipped name — published wins) is the canonical event name for the residual post-open decline class; framing question 3's posture is recorded: declines atdebug, assembly-side; the producer-side generic arm stayswarn, now carrying the typed reason. - The base (establisher-less) serving shape stays byte-for-byte for compatibility + as the residual-race fallback.
W2 (alkssh) and W3 (alksocks) are the sibling repos' adoption waves
and remain open — pointed at
docs/plans/003-correlation-miss-resolve.md §W2/§W3; the plan's
plan-level AC records them unticked until those repos land.
Doc-only in code impact. No wire contract, no API shape, no ACL behavior rides it — the ask is observability vocabulary alignment at the arrival boundary, so a composed deployment's traces name the same failure the same way in both crates.
The situation
The -R leg composes across this crate's fabric and the door's
arrival handling. A forwarded-tcpip / forwarded-streamlocal
arrival can outlive its correlation partner on either side, and each
crate currently names the resulting class differently:
- alkssh's door side (verified at
src/tunnel_map.rs): the shared per-fabric-legListenRouterremoves a session's tokens at teardown (the handler'sDrop), so a fabric arrival for a token that no longer routes — or an echo-shape mismatch against the held route — is thecorrelation-missclass:observe::decline_arrival(row, "correlation-miss", listen)+ teardown-at-birth, never a half-open SSH channel (also thecap-exceededsibling class on a routed-but-full arrival). - alktunnels' fabric side (
src/producer.rs, the bind-first accept loop): a forwarded open that fails against a stale/expired token lands in the generic failure arm — warn"tunnel bind-first: forwarded open failed; dropping the accepted connection", drop, keep serving. The comment records the class distinctions ("scope-less opener → FORBIDDEN; old opener → NOT_FOUND; correlation miss → handler_error-class") — i.e. the distinction exists as a code comment and flows into the generichandler_errortyped class (the producer error-mapping tables usedial_failed/resource_shortage/unknown_resource/handler_error).
The mismatch arms are the "unreachable" ones in a healthy run — a
vanilla client never initiates forwarded-tcpip (an inbound open is
the unvanilla class, declined), and a correlation miss requires a
fabric arrival racing its session's teardown — which is exactly why
the naming was left unsettled during implementation. But when it does
happen (teardown races, retries, a hub relaying arrivals after a
door restart), it is an operator-visible event and the one place a
composed -R deployment's logs mix vocabularies: alkssh-side the
trace says correlation-miss, fabric-side it says
handler_error at warn level with the distinction recoverable only
from prose in a comment.
What a resolution decides (framing, not prescription)
- The shared name and semantics for the stale-token arrival class —
alkssh's
correlation-missis a candidate already shipped in a published consumer's events; adopting it (or ruling a different canonical name) is this repo's call. - Whether the class distinction rides the typed error vocabulary
(e.g. a
unknown_resource-adjacent class for the stale-token forwarded open, which the bind-first arm could surface without behavior change) or stays a logging convention. - Whether the bind-first failure arm's level/posture aligns with the
door's (alkssh logs these declines at
debugunder its decline classes; alktunnels logs the generic arm atwarn). Either answer is fine; the value is that it becomes recorded posture rather than two undocumented choices.
References
- alkssh
src/tunnel_map.rs— theListenRouterdoc (tokens removed at session teardown; "a fabric arrival after the session is gone is the correlation-miss class") and thedecline_arrivalsites (correlation-miss,cap-exceeded) - alkssh
src/observe.rs— the door's field/level vocabulary (rows,decline_class,reason; declines atdebug) - alkssh
docs/architecture/mapping.md— theforwarded-tcpiprow ("correlation-miss → teardown-at-birth") and the request-levelsignalrow's fidelity notes (OQ-10 lineage) - alkssh
tasks/implementation/review-wave-3.mditem 5 anddocs/plans/implementation.md("Still booked with their owners") — the original booking src/producer.rs— the bind-first accept-loop failure arm (the in-comment class distinction) and the establisher error-mapping tables (docs/architecture/producer.mdshape 3, ADR-008)- ADR-008 (bind-first + forwarded op; the mint discipline whose staleness races this class guards)