Skip to content

refactor: zero-copy tunnel pipeline overhaul - #39

Merged
lhear merged 7 commits into
mainfrom
dev
Aug 3, 2026
Merged

refactor: zero-copy tunnel pipeline overhaul#39
lhear merged 7 commits into
mainfrom
dev

Conversation

@lhear

@lhear lhear commented Aug 2, 2026

Copy link
Copy Markdown
Owner
  • zero-copy frame decode/seal, no per-frame allocation
  • direct streaming download path (no segment task/channel)
  • 64KiB write coalescing, 32KiB read prefetch, h2-aligned frames
  • UUID stream registry, shared resolved shaper config
  • admission control: max_tunnels/max_connections/in-flight caps
  • fix: rotation Continue truncation, swallowed upstream write errors, DoT hangs, prefetch race killing tunnels, JSON frame cap, IPv6 CONNECT
  • validate in-flight/concurrency config bounds
  • rewrite CONFIGURATION.md

lhear added 7 commits August 3, 2026 02:41
- zero-copy frame decode/seal, no per-frame allocation
- direct streaming download path (no segment task/channel)
- 64KiB write coalescing, 32KiB read prefetch, h2-aligned frames
- UUID stream registry, shared resolved shaper config
- admission control: max_tunnels/max_connections/in-flight caps
- fix: rotation Continue truncation, swallowed upstream write errors,
  DoT hangs, prefetch race killing tunnels, JSON frame cap, IPv6 CONNECT
- validate in-flight/concurrency config bounds
- rewrite CONFIGURATION.md; strip all source comments
- unit: 155 tests across all modules (dispatch routing matrix,
  PQ FSM ticket lifecycle, janitor pruning, DNS parse/transport,
  shaper EOF/Pending/stages, AEAD authentication, upload reorder
  overflow/timeout/replay, stream decoder, h2 error classification)
- integration: 27 end-to-end tests (plain/encrypted/JSON tunnels,
  rotation with prefetch, admission 503, local proxy auth, bypass,
  mock DNS resolution/caching, PQ session resumption)
- fix: classify h2 Kind::Reason errors as silent
- extract ticket_is_valid and janitor prune helpers for testability
parse_response used Ord::clamp with unvalidated config bounds; min_ttl >
max_ttl panicked the server on any successful resolution. Validate the
bounds in init_dns and make the clamp order-safe regardless, with
regression tests for both layers.
- remove tautological udp_recv_error_does_not_panic (assert is_err() ||
  is_ok() never fails, duplicated the timeout path)
- merge frame_cipher_roundtrip into encrypt_decrypt_roundtrip and the
  twin JSON padding tests into one loop (same code path)
- replace always-true deterministic key-derivation asserts with
  domain-separation asserts (flip input byte, key must change)
- add upload loop tests: full payload roundtrip with contiguous seqs,
  configured start_seq, failure propagation, no-request-on-empty-input
- add connection actor tests: auth retry loop on one connection,
  CONNECT early-data buffering, request parse timeout
@lhear
lhear merged commit 9838452 into main Aug 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant