16 Commits
Author SHA1 Message Date
glm-5.3-flash d72820ddc2 release: v0.5.0 — the correlation gate (forwarded-op establishment phase)
- Cargo.toml: 0.4.1 -> 0.5.0 (minor, not patch: the release adds
  public API — ForwardedGate, ForwardedPlan,
  register_tunnel_forwarded_openable_with_establisher — additive only;
  the base registration stays byte-for-byte, the wire delta is empty)
- CHANGELOG: Unreleased cut to 0.5.0 (the establisher-variant entry +
  the release paragraph; the compare links updated)
- README: the forwarded-op serving snippet shows the recommended gate
  shape (register_tunnel_forwarded_openable_with_establisher) beside
  the base one

Review 003 W1 absorbed in-repo; W2/W3 are the alkssh/alksocks repos'
adoption waves. Verification: cargo test (default + --all-features),
fuzz corpus replay (fuzz/shared), clippy --all-targets -D warnings
(native + wasm32), wasm32 check, fmt --check, cargo doc --no-deps,
taskgraph validate (33 tasks), cargo publish --dry-run --allow-dirty
all green
2026-11-03 17:37:18 +00:00
glm-5.3-flash 9cca6ed3c4 release: v0.4.1 — the dependency-patch (alkcall 0.10.1)
- Cargo.toml: alkcall 0.10.0 -> 0.10.1 (crates.io, the
  adoption-window ordering fix — review 013, routed from alkgit's
  wave-2 gate; install + park-drain are one atomic section so a
  demux-routed chunk can no longer overtake earlier-parked early
  arrivals, plus the parked-forever loss variant closed) and
  0.4.0 -> 0.4.1 (no alktunnels API change, no wire change, backwards-
  compatible dep bump -> patch)
- CHANGELOG: Unreleased cut to 0.4.1 (the alkcall 0.10.1 ride + the
  compare links updated)
- README: the 0.4.1 note (alkcall 0.10.1 adoption-window ordering fix)
- docs/architecture/overview.md: dep tree alkcall 0.10.1

Verification: cargo test (136 pass, default + all-features),
clippy --all-targets -D warnings (default, all-features,
wasm32-unknown-unknown), fmt --check, doc, wasm32 check, and cargo
publish --dry-run --allow-dirty all green
2026-10-22 06:24:41 +00:00
glm-5.3-flash 200d7d3835 release: v0.4.0 — the dependency-major (alkcall 0.10.0)
- Cargo.toml: alkcall 0.9.0 -> 0.10.0 (crates.io, the gateway
  ownership-seam release) and 0.3.0 -> 0.4.0 (breaking dep bump +
  public alkcall re-exports -> minor, matching the 0.3.0 ride on
  alkcall 0.9.0)
- Zero source changes: the 0.10.0 breaking surface (the loud
  ownership-wiring default on the GatewayDispatch spine, behind the
  opt-in gateway feature) is off this crate's paths — tunnel opens
  serve via ChannelCore::register_openable* registry dispatch, which
  0.10.0 leaves untouched
- fuzz/shared/Cargo.toml: alkcall 0.10.0 (path-linked alktunnels must
  see one alkcall version)
- CHANGELOG: 0.4.0 section + compare links
- README + docs/architecture/overview.md + AGENTS.md: the 0.10.0
  notes / dep tree / alkcall refs

Verification: cargo test (136 default / 163 with local, all green),
fuzz/shared corpus replay (5/5), clippy --all-targets -D warnings
(native + wasm32-unknown-unknown), fmt --check, wasm32 check, and
cargo publish --dry-run --allow-dirty all green
2026-10-19 03:43:15 +00:00
glm-5.3-flash 1365272146 release: v0.3.0 — the dependency-major (alkcall 0.9.0)
- Cargo.toml: alkcall 0.8.1 -> 0.9.0 (crates.io, the stub-sweep
  release) and 0.2.1 -> 0.3.0 (breaking dep bump + public alkcall
  re-exports -> minor, matching the 0.7.1 -> 0.8.0 ride on 0.2.0)
- fuzz/shared/Cargo.toml: alkcall 0.9.0 (path-linked alktunnels must
  see one alkcall version)
- src/producer.rs + tests/producer_direct_op.rs: the only code contact
  with the 0.9.0 breaking surface — Establishment no longer derives
  Debug; two expect_err calls -> .err().expect, one untyped
  panic!("{other:?}") fall-through -> typed Err/Ok arms
- CHANGELOG: 0.3.0 section + compare links
- README: the 0.3.0 note
- docs/architecture/overview.md: dep tree alkcall 0.9.0

Verification: cargo test (136 default / 163 with local), fuzz/shared
corpus replay (0 pass, empty target set — no regressions), clippy
--all-targets -D warnings (native + wasm32-unknown-unknown), fmt
--check, wasm32 check, and cargo publish --dry-run --allow-dirty all
green
2026-10-14 05:23:08 +00:00
glm-5.3-flash 05b25465aa release: v0.2.1 — the hardening (fuzzing adopted + alkcall 0.8.1)
- CHANGELOG: Unreleased cut to 0.2.1 (the fuzz/ workspace: three
  cargo-fuzz targets + stable-toolchain corpus replay in fuzz/shared;
  the two wave-2 diagnostics datagram_backlog/retained_bytes; the
  alkcall 0.8.0 -> 0.8.1 bump — duplicate adopt no longer destroys the
  live channel; compare links updated)
- README: the 0.2.1 hardening note (fuzzing + alkcall 0.8.1 + the two
  additive diagnostics)
- docs/architecture/overview.md: dep tree alkcall 0.8.1
- Cargo.toml: 0.2.0 -> 0.2.1

Verification: cargo test (136 default / 163 with local), fuzz/shared
corpus replay (5 pass), clippy --all-targets -D warnings (default,
all-features, wasm32-unknown-unknown, fuzz/shared), fmt --check, doc,
wasm32 check, and cargo publish --dry-run --allow-dirty all green
(42 packaged files — fuzz/, docs/research|reviews|plans/, tasks/,
.opencode/, AGENTS.md all excluded)
2026-09-28 10:21:48 +00:00
glm-5.3-flash 57285d23bd fuzz: adopt fuzzing (wave 1) + alkcall 0.8.1 bump
Bump the substrate dependency to alkcall 0.8.1 — the bug-fix release
whose fix (duplicate adopt/open no longer destroying the live channel)
is directly relevant to this crate's reverse-path adopt flow.

Adopt fuzzing per docs/research/fuzzing.md, scoped smaller than
alkcall's (the envelope/chunk/demux/manager surfaces are upstream and
now fuzzed there; this crate fuzzes its own named downstream target —
the ADR-003 datagram codec — plus the params/reply parsers):

- fuzz/ workspace per the alkcall pattern: nightly-pinned subtree
  (rust-toolchain.toml), thin fuzz_target! binaries, and a
  stable-toolchain shared crate carrying the invariant logic so the
  committed corpus replays as plain `cargo test` (the fuzz gate in
  the release checklist — no hosted CI, alkcall §7.9 posture).
- Targets (both over already-pub APIs; no #[cfg(fuzzing)] exposure):
  - datagram_codec — DatagramReader::feed + frame_datagram: no-panic,
    infallible decode, size bound, F-2 sentinel layering (empty
    datagram only from a length-0 header at a frame boundary),
    3-byte-slice splitting transparency, re-frame round-trip,
    oversize rejection at the bound, is_mid_datagram framing state,
    and the decoder-state retained-bytes bound.
  - params_parse — serde params/reply parsers + establishment_reason:
    no-panic on raw bytes and bounded structured Values, clean typed
    failure, round-trips, listen: 0 pin, loud/lenient projection-pair
    agreement, pass-through reason extraction model.
- New public diagnostic: DatagramReader::retained_bytes() (decoder-
  state byte count; the fuzz bound asserts against it).
- 96 committed seeds (gen_fuzz_seeds.py) + the campaign-found crash
  input promoted as datagram_codec/seed-900; grown corpora gitignored.
- run-detached.sh: setsid+nohup runner so campaigns never share fate
  with the agent session process tree (fuzzing.md §5).

Campaign findings this session were harness-model defects, not crate
bugs (both invisible to example-based review; the alkcall
"fuzzer as harness-checker" pattern confirmed):

- the F-2 empty-datagram invariant first counted [00 00] pairs in the
  raw stream — a pair inside a payload region is payload, not a
  header; corrected to walk the framing (crash artifact saved).
- establishment_reason is a pass-through extractor of details.reason,
  not a validated table (harness first asserted a closed set).
- is_mid_datagram means a partial datagram, not buffered header bytes
  (a 1-byte header fragment is buffered, not in flight).

Verification: cargo test 135 passed; clippy -D warnings and fmt clean
(main + fuzz/shared); corpus replay green; cargo fuzz build clean;
wasm32-unknown-unknown check clean. Wave-1 campaigns (10-min detached,
fork mode): params_parse 3.14M execs / datagram_codec 827k execs,
0 crashes/OOMs/timeouts; coverage saturated on the codec state space.
2026-09-28 08:09:11 +00:00
glm-5.3-flash d789031863 release: v0.2.0 — the graduation (direct op + bind-first/forwarded metadata flow)
- README sync: the direct op (ADR-007), the bind-first establisher +
  the forwarded op (ADR-008), TunnelListener + the reply-field
  projection, the 0.2 summary section, the local bind-first helpers
- CHANGELOG: Unreleased cut to 0.2.0 (the graduation + the alkcall
  0.8.0 bump; compare links updated)
- Cargo.toml: 0.1.0 -> 0.2.0

Verification: cargo test (135 pass default / 162 with local), clippy
(all targets, -D warnings, both feature sets), fmt, doc, the
wasm32-unknown-unknown check + clippy, and cargo publish --dry-run
--allow-dirty all green
2026-09-20 09:30:21 +00:00
glm-5.3-flash c31dd5e100 chore: bump alkcall 0.7.1 -> 0.8.0; mark the review-008 asks landed
alkcall 0.8.0 lands both graduation upstream asks (review 008):
- U-2: the establisher → reply projection (ADR-049 amendment 3,
  Establishment::with_reply_field + open_channel_with_reply) — the
  bind-first 'bound' carrier
- U-1: flavor-form open-op ids in discovery (ADR-047 amendment 3) —
  the direct/forwarded ops reconstruct their marker through discovery
plus the bonus: in-tree ChannelRelay + HubLegTemplate (ADR-051) — the
hub re-produce machinery is upstream now; 'bound' flows end-to-end
per-hop truthful, realizing ADR-008 §6's sentence.

OQ-TN-12 resolves upstream (the composition helper a hub proxy needed
is alkcall's ChannelRelay); spec docs note the asks landed. No
alktunnels API or wire change in this bump — the graduation
implementation (tasks/tunnels) follows.

Verification: cargo test 71 passed (91 all-features), clippy
--all-targets -D warnings, fmt --check, wasm32-unknown-unknown check
+ clippy clean
2026-09-18 13:33:06 +00:00
glm-5.3-flash 40677e416b chore: lockfile alkcall 0.7.0 -> 0.7.1
The 0.7.1 lockfile resolution behind the MSRV floor raise. The
alkcall requirement in Cargo.toml stays "0.7.1" only after the floor
commit paired it there; the lockfile is the piece that actually moves
the resolved 0.7.x to the version whose MSRV (1.88) this crate now
declares. alkcall 0.7.1 changed no type alktunnels touches
(version-requirement- and patch-level only; full suite green on both
toolchains in the previous commit).
2026-09-10 03:52:07 +00:00
glm-5.3-flash 8f14fd1913 test: coverage weak spots — datagram EOF, UDP take_halves framing, reverse pump_against, queue contracts
Closes the behavioral test gaps the 2026-09-09 coverage review found
(88.28% → 92.86% lines; details in tasks/tunnels/coverage-weak-spots.md):

- Datagram EOF paths (consumer.rs:377-382, 255) — previously
  zero-covered documented contracts: a clean stream EOF resolves
  `Ok(None)` (the pump-less session's shutdown signal), a mid-datagram
  EOF fails loud with `TruncatedDatagram` (OQ-TN-13), both over a new
  closable UDP echo dial (`closing_udp_echo_dial`, both shapes).
- UDP `take_halves` (consumer.rs:201-205) — pins the N-3 framing
  contract: taken halves carry raw `[len: u16 BE]` wire bytes, and
  the data-plane accessors fail `ChannelTaken` after the take.
- Reverse UDP `pump_against` (consumer.rs:289) — the framed side
  round-trips end-to-end (payload + the F-2 empty datagram `len=0`
  survives the pump), the N-11 boundary contract.
- `AcceptQueue::push` after close returns `Err(handle)`, closed pop
  resolves `None`, and the accept loop's queue-closed mapping ends
  the loop with the handler error (producer.rs:279-288, local
  accept_loop).
- `establishment_reason` wrapper (params.rs) — unit test over the
  typed surface (open_failed reason / non-establishment /
  AdoptFailed); plus the schema-gate preemption probe in
  producer_open_op (missing substrate is `INVALID_INPUT` before the
  establisher runs).
- `UdpHalf` write machinery (local/mod.rs) — four poll-driven tests:
  queue accept + flush drain to the wire + shutdown best-effort,
  repeated flush cycles, the unconnected-socket error mapping
  (deterministic EDESTADDRREQ), and the shutdown-drain-swallows-
  errors posture. Host probes recorded in the task doc: no UDP
  sender-blocking shape is reachable on this host (loopback/veth
  drop silently; the fresh-socket try_send quirk is timing-tolerated,
  never asserted), so the stash/high-water paths stay uncovered by
  host limitation, not by oversight.

Verified: cargo test (default + --all-features), clippy --all-targets
-D warnings, fmt --check, wasm32 check + clippy, llvm-cov 92.86%.
2026-09-09 06:48:58 +00:00
glm-5.3-flash fb2389bd62 feat: consumer-session — TunnelSession (open/adopt, data planes, teardown)
- TunnelSession (src/consumer.rs): open (ChannelClient::open_channel)
  + adopt (ChannelManager::adopt_channel) construction, substrate-
  shaped data planes (raw halves for stream; ADR-003 codec + pending
  frame queue for UDP), pump_against (session-owned pump_bidi handle),
  and teardown ownership per ADR-005: close (abort + ungraceful reap),
  join (await + reap + copy counts, pump-less (0,0,reaped)), Drop
  (abort + sync reap, never leaks). No Clone (compile_fail doc-test).
- open_reverse_channel on the CallConnection (the reverse path's
  two-step: call then adopt — the POC's honest shape).
- Error surfaces (src/error.rs): TunnelOpenError (typed ADR-049 §4
  surface via open_ref/establishment_reason), TunnelIoError (wrong-
  substrate, TruncatedDatagram fail-loud, ChannelTaken), ReverseOpenError.
- Tests: tests/consumer_session.rs (12) over two harness topologies —
  forward (wire_forward/ForwardTopology: consumer connect-side pure
  client, producer serving via adapter) and reverse (the POC shape);
  teardown matrix, W4 half-close, out-of-band close + self-reap (W3),
  F-2 empty datagram, AdoptFailed-on-collision (bogus-id adopt parks
  by design — documented), concurrent sessions. Harness: all_substrate_dial.
- Adopt takes substrate (task-note deviation: the data plane shape
  rode the open call; cannot be inferred from the ID).

Verified: cargo test green (38), clippy -D warnings (native + wasm32),
fmt clean, cargo check --target wasm32-unknown-unknown passes.
2026-09-08 09:33:12 +00:00
glm-5.3-flash 50909ab1ca feat: crate-init — module skeleton (params, wire, producer, consumer, error)
- src/{params,wire,producer,consumer,error}.rs skeletons with module
  docs per overview.md §Module Map; lib.rs crate docs + re-exports
- constants in params.rs (OP_TUNNEL_OPEN, TUNNEL_ALPN,
  TUNNEL_OPEN_SCOPE) + establishment_reason helper (delegates to
  alkcall 0.7.0's ChannelOpenError::establishment_reason)
- MAX_DATAGRAM_LEN (65535) in wire.rs (ADR-003's frame-time bound)
- async-trait dropped: skeleton confirms no trait (ADR-004)

Verified: cargo check, clippy --all-targets -D warnings (native +
wasm32), fmt --check, test, wasm32 check — all clean
2026-09-08 06:48:13 +00:00
glm-5.3-flash dc2eab3b21 chore: consume alkcall 0.7.0; W1/CF-005 resolved — identity seam validated
alkcall 0.7.0 resolved every open downstream-consumer finding,
including this crate's reverse-flow POC W1 (filed as ledger CF-005,
with the CF-006 corollary):
- CF-005 (a): ServingConfig.identity — the explicit override
- CF-005 (b): transport Connection::identity() propagates to
  channel 0 — set_identity before dialing is the mTLS/QUIC path
- CF-006: the establisher/pump handler receive the per-call opener
  identity (dispatch-resolved), not the install-time context
- CF-007: ADR-016 code list completed (doc-only)
- F-1 (POC finding): the ChannelPlan type doc now carries the
  Send + Sync payload constraint

alktunnels updates:
- Cargo.toml: alkcall 0.6.0 -> 0.7.0 (lockfile resolves 0.7.0)
- AGENTS.md convention 11: pin note updated; the 0.7.0 identity
  surface marked load-bearing (precedence order + per-call opener)
- AGENTS.md architecture context: CF-005/CF-006 row added; the
  'What the POC does NOT settle' list replaced with the accurate
  settled state (Phase 0 complete; Phase 1 = the spec)
- reverse-poc-summary: W1 marked RESOLVED with the remediation
  validated from the POC's topology (16 tests over 0.7.0: transport
  identity alone authorizes, ServingConfig.identity overrides,
  identity-less fails closed, CF-006 witness); F-1 marked documented
  upstream; what-the-POC-does-not-validate and verification blocks
  updated
- phase-0-findings OQ-TN-10: reverse POC entry notes the 0.7.0
  re-validation and W1 resolution

The reverse POC (/workspace/alktunnels-reverse-poc, 8b35818) re-
validated: the default harness now authorizes on transport identity
alone — the 0.6.0-era auth_token workaround is dead code.

Verification: cargo test, clippy --all-targets -D warnings,
fmt --check, wasm32 check, doc --no-deps — all clean
2026-09-07 17:59:53 +00:00
glm-5.3-flash b3b00f37bd chore: consume alkcall 0.6.0; OQ-TN-06 resolved by ADR-050
alkcall 0.6.0 landed the review 007 remediation (filed from this
crate's UDP POC pass):
- R-01: Establishment carries the plan (ADR-049 amendment 2) —
  typed-opaque ChannelPlan, OpenHandler gains the plan param, the
  wrapper threads it; the POC's side-channel HandleHandoff and its
  same-resource race are dead (the establisher returns the dialed
  handle: Ok(Establishment::new(plan)))
- R-02: OpenHandler JoinHandle lifetime contract documented (early
  return = teardown-at-birth) + yield-once acceptance flag and
  debug! birth-teardown hint
- R-03: pump_bidi pinned upstream (ADR-050) — two pumps,
  shutdown-on-completion, (u64, u64) copy counts, errors EOF-shaped

alktunnels updates:
- Cargo.toml: alkcall 0.5.0 -> 0.6.0 (lockfile resolves 0.6.0)
- AGENTS.md convention 8: use alkcall channels::pump_bidi, do not
  hand-roll; await it inline inside the OpenHandler's task
- AGENTS.md convention 11: pin note updated; amendment 2 marked
  load-bearing (Establishment::new replaces side-channel handoff)
- AGENTS.md convention 13: fixed ADR citation bug (was "alkcall
  ADR-024, ADR-050" — those are peer-graph-routing and pump-bidi;
  intended targets are alknet ADR-024/ADR-050 with their alkcall
  ports ADR-019/ADR-011)
- AGENTS.md architecture context: ADR-050 + ADR-049 amendment 2 rows
- phase-0-findings OQ-TN-06: RESOLVED — pump_bidi landed upstream;
  the POC is cited as convergence input alongside alktty and the
  assembly-layer copies; Phase 1 consumes the helper
- phase-0-findings OQ-TN-09: implementation note updated —
  Establishment::new(plan) replaces the handoff sketch
- poc-summary: resolutions addendum for both upstream findings
  (R-01/R-02/R-03 with the typed-opaque and (u64, u64) deviations
  recorded); references note 0.6.0 supersession

Verification: cargo test (0 tests, ok), clippy --all-targets
-D warnings, fmt --check, wasm32 check, doc --no-deps — all clean
2026-09-07 09:27:08 +00:00
glm-5.3-flash d88e148fdc chore: consume alkcall 0.5.0; OQ-TN-09 resolved by ADR-049
alkcall 0.5.0 landed the review 006 remediation (filed from this
crate's Phase 0 pass):
- E-01/N-1: channel-open establishment phase (ADR-049) —
  register_openable_with_establisher, bounded await, teardown-on-
  failure, typed channel:open_failed reply (reason in details);
  ChannelClient::open_channel returns ChannelOpenError
- E-02: OperationSpec.description disclosed via discovery
- E-03/E-04/N-2: teardown-race log, early-arrival bound docs,
  count accessor

alktunnels updates:
- Cargo.toml: alkcall 0.4.0 -> 0.5.0 (lockfile resolves 0.5.0)
- AGENTS.md convention 11: pin note updated; ADR-049 marked
  load-bearing (tunnel opens use register_openable_with_establisher)
- phase-0-findings OQ-TN-09: RESOLVED by ADR-049 — the in-band
  control-frame hunch is superseded (establishment is the open op's
  reply, not a stream frame); residual for Phase 1 narrowed to
  half-open semantics; v1 needs no mid-stream control frame
- phase-0-findings OQ-TN-08: per-op metadata residue resolved by
  E-02 (description field; OQ-40 enumerate half stays deferred)
- tun2proxy prior-art + alktty-pattern sections: frame-vocabulary
  notes updated to point at the ADR-049 supersession
- upstream posture paragraph updated: review 006 is the working
  proof of the ask-early rule

Verification: cargo test (0 tests, ok), clippy --all-targets
-D warnings, fmt --check, wasm32 check, doc --no-deps — all clean
2026-09-06 20:05:41 +00:00
glm-5.3-flash 43a5e4204e scaffold: AGENTS.md, Cargo.toml, licenses, agent conventions adapted for alktunnels
- AGENTS.md adapted from alkcall (via alktty's pattern) for the tunnel
  protocol crate: substrate-agnostic conventions, two-pump contract,
  no-forced-binding requirement, alkcall 0.4.0 dependency, wasm-clean
  default crate, ALPN naming
- .opencode/agents/implementation-specialist.md conventions section
  adapted from alkcall's call-protocol rules to tunnel-crate rules
  (mirroring alktty's adaptation)
- docs/sdd_process.md package reference fixed to alktunnels
- Cargo.toml scaffold: wasm-clean tokio subset, alkcall 0.4.0
- LICENSE-MIT / LICENSE-APACHE copied from alktty
- src/lib.rs protocol-only stub; docs/architecture/ lands in Phase 1

Verification: cargo test (0 tests, ok), cargo clippy --all-targets
-- -D warnings, cargo fmt --check, cargo clippy
--target wasm32-unknown-unknown -- -D warnings — all clean
2026-09-05 19:40:38 +00:00