Skip to content

Release 2.2.0: transport: air (one-way radio broadcast) - #9

Merged
nc-intezra merged 1 commit into
mainfrom
release-2.2.0
Nov 15, 2026
Merged

nc-intezra merged 1 commit into
mainfrom
release-2.2.0

Conversation

@nc-intezra

Copy link
Copy Markdown
Owner

Summary

Release 2.2.0: transport: air, the one-way radio broadcast from the broadcast-mode design sketch (phases 1–2: codec + carousel over UDP), with all 13 review corrections applied. Scope agreed: runs over wfb-ng's UDP ports; config file only (wizard unchanged); API phase 2 moves to 2.3.0.

  • What it is: every module carried over a one-way, lossy broadcast bearer (wfb-ng udp_direct_tx/udp_direct_rx, FEC off) to any number of receivers that never transmit. DYL1 envelopes and module handlers are unchanged; air replaces lidi underneath. The one-way guarantee still comes from a wired diode in front of the radio box (docs/AIR.md).
  • Sender (src/air/sender.rs):
    • objects sealed in 1 MiB chunks (ChaCha20-Poly1305, per-boot HKDF key), one RaptorQ block each;
    • carousel with balanced interleave windows (corr. 10), ≥8 manifest symbols per pass (corr. 11), K·(1+r) fresh repair symbols per later pass (corr. 4), pass_gap time diversity (corr. 13), per-module carousel: passes | until | latest;
    • spool with a size limit; paced to air.max_mbps.
  • Receiver (src/air/receiver.rs):
    • packets checked by key id and 16-byte tag before decoding;
    • newest-boot rule with sortable boots, saved done table, manifest expiry, future-boot refusal (corr. 2);
    • chunks opened before the manifest; chunk count kept out of the AAD (corr. 1);
    • .part + bitmap resume across restarts;
    • limits on objects, buffered symbols and partial disk;
    • superseded latest objects dropped;
    • complete objects delivered through envelope::Parser.
  • Integration:
    • transport:, air: and per-module carousel config, with validation (symbol size vs wfb-ng's 4045-byte MTU, RaptorQ's 56403-symbol limit);
    • Uplink carries lidi or air;
    • runtime branches; a key is required for air;
    • dyode check prints the real file rate (corr. 3), plus air checks;
    • dyode lidi-config prints the air parameters;
    • firewall-rules air variant;
    • systemd unit without a NIC BindsTo= for air (in systemd-unit, the unit check and the wizard's unit writer);
    • air_* counters.
  • Release prep: version 2.2.0; dated CHANGELOG heading (also releases the dyode probe items); openapi info.version; docs/AIR.md, README, ARCHITECTURE, CAVEATS, config.example.yaml.
  • New direct dependencies: raptorq 2 and ring 0.17. Both were already in the lock via lidi and rustls, so nothing new to vendor.

Deviations from the sketch (documented in docs/AIR.md)

  • ChaCha20-Poly1305 under a per-boot key (nonce = object id ‖ chunk index) instead of XChaCha20 with the boot in the nonce. Same no-reuse guarantee; ring has no XChaCha20.
  • Content-addressed resume across sender restarts is deferred. Resume across receiver restarts is in.

Test plan

  • cargo fmt --check, cargo clippy --all-targets -D warnings (default and --no-default-features)
  • cargo test: 82 unit tests (11 new for air plus config, firewall) and tests/air.rs, run 6× locally without a failure:
    • files + Modbus over a clean link, other key ignored;
    • 4 files over Gilbert-Elliott bursts + periodic fades (~17% loss);
    • receiver crash mid-object → .part resume, under an insider's poisoned symbols (bad-seal counter asserted);
    • full replay after restart delivers nothing;
    • new sender boot, then old boot's recording refused.
  • Real binaries over loopback: dyode out + dyode in with transport: air. A 7 MB file and a small file arrived identical in 5 s; the status channel and the transport hash matched; no warnings.
  • Release build, 2-vCPU sandbox, max_mbps: 2000: 200 MB arrived identical in 5.5 s (~290 Mbit/s of file).
  • tools/check_release.sh v2.2.0 passes.
  • CI green on this PR (tests on amd64/arm64)
  • After merge: a human pushes tag v2.2.0 to run release.yml (offline bundles, installs in 8 clean systems)
  • Not done: any radio test. First step on hardware: dyode probe over wfb-ng, then air.

Generated by Claude Code

Adds `transport: air` (docs/AIR.md): every module carried over a one-way,
lossy broadcast bearer such as wfb-ng's udp_direct_tx/rx, to any number of
receivers that never transmit.  The DYL1 envelopes and module handlers are
unchanged; air replaces lidi underneath them.

- src/air: DYB1 packets with truncated HMAC-SHA256 tags; HKDF-SHA256 keys
  from dyode.key; ChaCha20-Poly1305 chunks under a per-boot key; sealed
  manifest; RaptorQ block per chunk.
- Carousel: balanced interleave windows, at least 8 manifest symbols per
  pass, K(1+r) fresh repair symbols per later pass, pass_gap spacing,
  per-module carousel (passes / until / latest).
- Receiver: newest-boot rule with sortable boots, saved done table,
  expiry, chunks opened before the manifest, .part + bitmap resume,
  limits; delivery through envelope::Parser.
- Config (transport, air:, carousel), check, lidi-config, firewall-rules,
  systemd unit without BindsTo for air, counters.
- Tests: unit, plus tests/air.rs over a lossy loopback relay (bursts and
  fades, restart resume, replay after restart, new boot, poisoned
  symbols).
- Version 2.2.0, dated CHANGELOG (includes dyode probe), docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Q4FHhHAFgBUCsPf3UW67z
@nc-intezra
nc-intezra merged commit 25739c7 into main Nov 15, 2026
23 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.

2 participants