- Rewrote em dash prose across the whole tree outside docs/reviews/
(the historical reviews stay verbatim, matching the alktunnels and
alktty precedent): src doc comments and inline comments (587),
docs/architecture (319), docs/research + sdd_process (484), tests
(361), tasks (899), fuzz (28), README/CHANGELOG/Cargo.toml (77),
AGENTS.md (85), and the .opencode/agents prompts (109)
- Fenced content follows the precedent: comments, ASCII-diagram label
separators, and template placeholders rewritten; wire data, JSON/BAST
documents, byte diagrams, and transcripts survive verbatim; assert,
expect, panic, error-display, and format message literals rewritten
as prose; no code, fixture, or test data change
- src/rfc1928/LICENSE: the two dashes in alksocks' own provenance
header rewritten; the MIT legal text untouched
- AGENTS.md adds Project Convention 18: no em dashes in prose; varied
restructure, no spaced-hyphen substitutes, fenced prose rule, en
dash numeric ranges exempt, docs/reviews/ exempt from the greps
- tasks/*.md frontmatter: the name values rewritten by the sweep are
now quoted (a raw colon inside an unquoted YAML scalar parsed as
null); taskgraph validate reports 37 tasks, no issues
Verification: cargo test; cargo clippy --all-targets -D warnings;
cargo fmt --check; cargo doc --no-deps; fuzz corpus replay
(cargo test --manifest-path fuzz/shared/Cargo.toml); wasm check and
clippy for wasm32-unknown-unknown with -D warnings; em dash grep over
the repo returns matches only in docs/reviews/ and the bast.md BAST
JSON data fence
- Additive upstream API only (the forwarded-op establisher variant,
register_tunnel_forwarded_openable_with_establisher + ForwardedGate);
no alkcall bump (0.10.1 rides on), no wire change, and no change on
this crate's paths: our composed accept keeps the base
register_tunnel_forwarded_openable byte-for-byte.
Verification: cargo test (default + composed: 145/148 lib tests, all
suites green), cargo clippy --all-targets -D warnings (default +
composed), cargo fmt --check, cargo check/clippy wasm32-unknown-unknown.
- alkcall 0.9.0 -> 0.10.0 (the gateway ownership-seam release): the
GatewayDispatch ownership-provider threading + the loud unwired-spine
default are not on this crate's paths (no gateway module use; registry
dispatch on the native wire untouched). Zero API/wire change here.
- alktunnels 0.3.0 -> 0.4.0 (its dependency-major ride): no alktunnels
API/wire change; the composed providers see none of it.
- fuzz/shared: the harness's own alkcall pin bumped in lockstep (its
ChannelOpenError construction makes a drifting pin a duplicate-type
compile failure, not silent drift) — the only bump contact.
- Docs: CHANGELOG 0.3.0 entry, README version blurb (alktunnels style),
AGENTS.md pin update, deps tree in overview.md.
- Minor-not-patch for the established reason: semver-incompatible
dependency bumps + this crate's public ChannelOpenError re-exports
(SocksOpenError::Open/open_ref) are semver-visible downstream.
Verification: cargo test (default 145 unit + suites green), --features
local, --all-features (171 unit + all suites), clippy --all-targets
--all-features -D warnings, fmt --check, wasm32-unknown-unknown check +
clippy, fuzz corpus replay 3/3, publish --dry-run clean.
Adopt the alk*/fuzzing posture (alkcall 0.8.1 + alktunnels 0.2.1
precedent) before the v0.1 publish — the cheapest moment this crate
will ever have for it:
- alkcall 0.8.1 + alktunnels 0.2.1: the duplicate-adopt/open fix is
directly relevant to this crate's consumer open/adopt paths
- fuzz/ workspace (the sibling layout): nightly-pinned subtree, stable
fuzz/shared library (corpus replay = the fuzz gate), detached runner,
JSON dict, deterministic seed generator; 129 committed seeds
- three wave-1 targets over already-pub APIs: datagram_codec (the
ASSOCIATE frame codec — the alkcall-fuzz-doc-assigned downstream
target), rfc1928_codec (the forked RFC 1928 core's handshake state
machines, both protocol directions), params_parse (the wire-stable
open-op surface)
- one diagnostic: DatagramReader::retained_bytes() (the decoder-state
bound's assertion target, the alktunnels retained_bytes() posture)
- docs/research/fuzzing.md: the scoped plan + implementation log;
AGENTS.md gains the corpus-replay verification line
- campaigns: 3 × 10-min detached runs exited 0 (datagram ~1.9M execs,
rfc1928 ~2.0M, params ~3.1M; oom/timeout/crash 0/0/0 on all 33 fork
jobs per target; coverage saturated on both codec targets). No crate
bugs; three harness-model defects found + fixed (2 pre-campaign by
corpus replay, 2 campaign-found, crash inputs promoted as seeds 900/
901): the len==0 well-framed decode partition, the fieldless-struct
serde-seq form, the BadAtyp re-frame arm, the short-domain count-walk
gate
- wave 2 (session_pumps stateful target) deferred to post-0.1 — the
byte-level targets carry the attacker-reachable load for the publish
Verification: cargo test (15 suites ok, default + all-features), clippy
(all-targets + wasm + fuzz/shared), fmt, cargo doc, publish --dry-run,
corpus replay 129 seeds green, cargo fuzz build clean.
Refs: alkcall docs/research/fuzzing.md (§7.9 posture), alktunnels
docs/research/fuzzing.md; docs/research/fuzzing.md (this crate's copy)
- README.md: the alktunnels-shape quick start (producer registration,
the three consumer sessions, both doors, the producer-side
listener), the architecture table, the feature matrix, the
verification commands — self-contained, since docs/architecture/
rides the package but docs/reviews|research|plans do not
- CHANGELOG.md: the Keep-a-Changelog 0.1.0 entry (the sibling shape:
Unreleased section + tag links)
- LICENSE-MIT / LICENSE-APACHE: copied from the siblings (crates.io
license-file convention; the crate license is dual from Cargo.toml)
- Cargo.toml: `readme = "README.md"` (the sibling pattern; the
packaged crate showed `readme = false`)
Verification: cargo test + cargo test --all-features (15 suites each),
clippy --all-targets --all-features -D warnings, fmt --check, doc
--no-deps (0 warnings), wasm32-unknown-unknown check (default +
composed), publish --dry-run (64 files, 278.3 KiB).
The `composed` feature's ASSOCIATE egress (ADR-008's composed
variant, ADR-009's gate): `composed::direct_egress` — each
destination dials through an alktunnels 0.2.0 direct-op channel
(`TunnelSession::open_direct`, `Substrate::Udp`), per-target ACL
for free, the POC #2 `ComposedEgress` shape ported to the landed
seam types.
- `Cargo.toml` — `composed = ["dep:alktunnels"]` (alktunnels pinned
"0.2.0"; rides `composed` alone, `cargo tree --edges normal`
spot-checked); dev-dep for the composed suite.
- `src/composed/mod.rs` — the lazy destination→tunnel table
(LRU-capped, `DEFAULT_MAX_TUNNELS` = 256), per-tunnel relay tasks
draining a shared inbound queue, `SessionOwner` (the owner wrapper
shared with the composed accept — the batch-1 review's
Sync-bound wrinkle), the readiness contract (real async park;
ended relays → association-end `Err`, never a hot `Ok(None)`),
framing-once, domain pass-through unresolved (ADR-012), the
backpressure bound documented on the constructor.
- Two deliberate deviations from the POC shape, documented in the
task's Notes: the closed-queue condition is a live-relay count
(the egress holds its own `Sender`, so the POC's queue-close arm
was unreachable through this surface); the tunnel codec is
alktunnels' (`[len]` + payload), not the RFC-framed reader.
- `tests/composed-egress.rs` — round-trips per destination → one
tunnel each, table reuse, LRU eviction/re-dial, the readiness
park, the closed-relay-set `Err`, framing-once through the wire
layer, domain pass-through — over a `wire_tunnel_direct` harness
topology (the consumer-side shape with the direct op on the
producer's serving registry).
Verification: `cargo test` + `--all-features` pass (13 suites);
`cargo check --features composed --target wasm32-unknown-unknown`
clean (the hard gate); clippy `--all-targets --all-features
-- -D warnings` clean; `cargo fmt --check` clean; `cargo doc
--no-deps` clean.
The `local` feature's first-party providers (ADR-008's local variants,
ADR-009's gate): the three seams' faithful-RFC assembly-layer
constructors over the landed seam types; the protocol layer never
sees them.
- Cargo.toml: `local = ["tokio/net"]` (no socket2 — the POCs ran
tokio-only); the default graph stays net/mio/socket2-free
(cargo tree spot-checked both ways)
- src/local/: `tcp_dial()` (real TcpStream per CONNECT, domain
resolution at the provider — the ssh -D semantic; the resolved
address set iterated, faithful SocksDialError mapping,
NotAllowed never synthesized), `udp_egress()` (one real UdpSocket
per association bound 127.0.0.1:0 — the explicit bind decision;
the POC #2 LocalEgress readiness shape: park on readable(),
try_recv_from, WouldBlock -> spurious Ok(None); inner bytes
to_be_bytes() + data, framing-once; resolve at the egress),
`bind_accept(bind_host)` (real TcpListener per BIND session,
ADR-007 variant 1: requested port honored when non-zero, local_addr
as reply#1's BND.ADDR, the accept future owning the listener
end-to-end, peer byte-exact; two-stage failure mapping; the bind
host is the caller's explicit choice)
- lib.rs: cfg-gated module + re-exports; crate doc updated
- tests: 12 unit (real-socket round-trips, the readiness contract's
park-then-datagram, the drop-closes-the-listener witness, the
refusal mappings) + 6 integration (tests/local-providers.rs,
feature-gated: the three commands end to end through the producer's
real dispatch path with real targets, connect-refused -> 0x05
through the producer's reply, the readiness contract re-pinned
through the datagram stage, client-gone -> the advertised port
frees)
- task status -> completed (acceptance criteria checked; Notes +
Summary filled)
Verification: cargo test (157 green) + --all-features green,
clippy -D warnings clean (default + all-features), fmt --check clean,
both wasm checks clean, the dependency-graph spot-checks green.
The TCP BIND dispatch arm replaces its refusal with the full phase
model (POC #5-validated scope), plus the command gate at dispatch:
- The command gate: TCP BIND requires socks5:bind from the per-call
opener identity (CF-005/CF-006) — the pump handler resolves it
from the open-op AuthContext; serve_socks5_over<T> takes the
resolved can_bind boolean explicitly. A scope-less identity gets
the RFC-faithful ConnectionNotAllowed (0x02) with no factory call
(the gate precedes the seam) while CONNECT still serves it.
- The phase model (wire.md §BIND): the BindAcceptFactory at the
command-read interception point → reply#1 carrying BND.ADDR (the
factory's bind_addr) → the quiet wait (single-shot select!, exactly
two exits: the one accept, or the control stream's EOF/garbage/
error; any byte = protocol garbage → session ends, no data plane;
the accept future's drop IS the client-gone teardown) → reply#2
carrying the peer address (via the fork's published new_reply) →
pump_bidi inline (the CONNECT shape, R-02).
- Two-stage RFC-faithful failure mapping: factory failure → reply#1's
mapped code; accept-stage failure → reply#2's mapped code, no data
plane. No phantom listeners, no phantom data planes.
- The no-factory default is the wrapper-aware in-band variant
(ADR-007 variant 3, documented): sentinel reply#1 + sentinel reply#2
(0.0.0.0:0), the full phase model preserved — the channel is the
connection.
- The accept wait lives in the teardown-governed pump phase, never
under the establishment bound (ADR-007).
Tests: 16 unit tests (raw RFC client over duplex) + 7 harness
integration tests over channels — happy path, the gate (0x02 while
CONNECT serves, both scopes), quiet-wait garbage, client-gone
teardown (owner-flag witness), both failure stages over channels,
no-factory variant 3, and the three-command regression guard (CONNECT
serves, BIND serves under its gate, ASSOCIATE still refuses).
Verification: cargo test green (96 lib + 26 harness + 37
differential); clippy -D warnings clean (all targets, native +
wasm32-unknown-unknown); cargo fmt clean; wasm check clean.
Task: tasks/implementation/core-producer-bind.md (status → completed)
- Cargo.toml: alkcall = "0.8.0" (convention 11 — pinned, first
consumption of the 0.8.0 surface), serde/serde_json, bytes, and
the std-only futures subset (BoxFuture seam shape). tokio's
wasm-clean subset and the empty local/composed features unchanged.
- lib.rs: the six skeleton modules per overview.md §Module Map
(params, wire, producer, consumer, egress, error) — stub files
with module docs naming their filling tasks; no re-exports yet
(each implementation task adds its own).
Verified: cargo test (76 tests), clippy --all-targets -D warnings,
fmt --check, cargo doc --no-deps, both wasm checks
(check + clippy on wasm32-unknown-unknown), and the dep-graph
spot-checks (no mio/socket2/tokio::net in the default normal graph;
normal tokio features = bytes/io-util/macros/rt/sync/time only).
alkcall 0.8.0 from crates.io confirmed wasm-clean via probe build
before wiring.
Task: tasks/implementation/core-crate-deps.md (completed)