Commit Graph
54 Commits
Author SHA1 Message Date
Nils Andreas Svee 6df16e0205 test(client): model SessionMachine open-session operation sequences
Adds a proptest-based model test that drives generated sequences of
probe sends, valid/duplicate/late/unknown/wrong-token replies, bounded
and unbounded timeout polling, peer/local close, and u32 wire-sequence
wraparound through a real SessionMachine and an independent reference
model, asserting the observable state and every emitted event match
after each operation. This combinatorial interleaving of an open
session's operations was previously untested; existing tests are all
narrow single-scenario cases.
2026-08-20 10:07:20 +07:00
Nils Andreas Svee 2634649852 test(proto): add codec property tests
Add proptest-based property tests for irtt-proto's varint and Params
codecs, covering the full u64/i64 domains for varint/zigzag round trips
and generated valid Params for semantic round trips, presence
omission rules, repeated-tag last-wins behavior, and unknown-tag
tolerance.
2026-08-20 00:45:16 +07:00
renovate[bot] 7b7cb6042e chore(deps): maintain cargo lockfile 2026-08-17 02:55:09 +00:00
Nils Andreas Svee 1753e91d5f fix(tests): break the irtt-client/irtt-server dev-dependency cycle
irtt-client and irtt-server mutually dev-depended on each other for
cross-crate integration tests. That cycle blocks `cargo publish` for
either crate whenever the other doesn't already exist on the registry
at the required version, which is exactly the situation for a crate's
first-ever release (irtt-server has never been published before).

Introduce a new `irtt-integration-tests` crate (publish = false, no
library target) to own tests whose actual subject is the interaction
between two or more irtt-* production crates:

  crate-local behavior          -> crate's own tests/
  cross-crate/system behavior   -> irtt-integration-tests

Move every test that imports both irtt_client and irtt_server there:
the client-side support harness (hmac, large_packets, protocol_options,
fill_negotiation) and the server-side real-socket tests that drive a
real AsyncClient against a real Server (async_client, negotiation_policy,
fill_wire_bytes, traffic_class, wildcard_source). server_set.rs stays in
irtt-server/tests since it only uses irtt_proto as test machinery to
drive irtt-server directly, which is a normal one-directional test
dependency, not a peer relationship.

irtt-server's dev-dependency on irtt-client is dropped entirely now
that nothing under crates/irtt-server/tests needs it, which fully
breaks the cycle from that side.

irtt-client keeps a one-directional dev-dependency on irtt-server: a
handful of white-box unit tests in src/async_client/tests.rs assert on
private AsyncClient internals (socket, remote, test_hooks) while also
needing a real in-tree server for blocking/async equivalence checks, so
they can't move to an external crate without losing that access. Their
InTreeServer helper is duplicated locally rather than shared, matching
the existing precedent of irtt-cli's own tests/support/in_tree_server.rs.
2026-08-17 09:49:32 +07:00
Nils Andreas Svee d66b5ed8de chore(release): move to independent per-crate versioning at 0.5.0
Each workspace crate now owns its own version instead of the previous
lockstep scheme; irtt-proto, irtt-client, irtt-server, irtt-stats, and
irtt-cli all become 0.5.0 as the first independently-versioned release.
Workspace dependency requirements are bumped to match.

Add a root CHANGELOG.md with a real per-crate 0.5.0 section drawn from
archaeology of every merge since v0.4.0, not just path-filtered commits.

Move cargo-dist to a crate-qualified `irtt-cli/vX.Y.Z` tag namespace so
only irtt-cli (the one dist-able application) triggers a GitHub Release;
library crate tags (irtt-proto/irtt-client/irtt-server/irtt-stats) exist
purely to pin the source for a crates.io release and no longer risk
tripping the release workflow. Regenerate the renamed
irtt-cli-release.yml via `dist generate` and update the few other files
that referenced the old release.yml path by name. Also fix a stale
`features = ["full"]` in dist-workspace.toml left over from a feature-flag
refactor that dropped the "full" feature entirely, which was silently
breaking every dist build.

Rescope semver.yml's tag trigger to the same five crate-qualified tags
so semver checks keep running under the new convention.
2026-08-17 09:29:25 +07:00
Nils Andreas Svee fca7a2fcc6 test(client): use real server for compliant peers 2026-08-14 17:17:41 +07:00
Nils Andreas Svee 265b857b84 feat(server): pin wildcard reply source 2026-08-14 00:20:17 +07:00
Nils Andreas Svee 5420387846 feat(server): apply reply traffic class 2026-08-13 20:40:07 +07:00
Nils Andreas Svee a672f78e86 feat(cli): add server applet 2026-08-13 19:01:39 +07:00
Nils Andreas Svee 85c432fcf8 test(server): exercise async client interop 2026-08-13 01:35:34 +07:00
Nils Andreas Svee 4fb5ca6d15 feat(server): add tokio udp runtime 2026-08-13 01:32:05 +07:00
Nils Andreas Svee 59f6e88005 feat(server): add open session core
Add `irtt-server` with the deterministic protocol and session engine the
upcoming Tokio runtime will call. `ServerCore::handle_datagram` takes a source
endpoint and the bytes of one datagram and returns the bytes to send back, or
nothing. It performs no I/O and keeps no clock, so every decision is a pure
function of its state and that input apart from drawing session tokens.

Rejection is silence. The protocol defines no error reply, no reset and no
NACK, so malformed, unauthenticated and policy-refused datagrams are discarded
without a response and without disturbing any live session; a client tells
"rejected" from "lost" only by timing out. `ServerError` is reserved for
internal failures on the server's own side, so an inbound `ProtoError` never
surfaces as a server failure.

Open handling authenticates before decoding parameters, so a packet that fails
authentication is discarded without parsing untrusted data and no reply
behavior reveals which stage rejected it. Duration and Interval are accepted
when absent and rejected when explicitly present and not positive, which is
what the presence-aware parameter decode is for. Negotiation currently rewrites
only the protocol version; the restriction knobs the specification describes
are deliberately left for their own slices, with one obvious place to add them.

Sessions are bounded to a finite default. A single unauthenticated datagram
creates one and opens are never deduplicated, so an unbounded table is a
liability rather than a compatibility feature; upstream's absence of session
bounds is explicitly not a target. A full table drops new opens silently and
evicts nothing. No-test opens keep working at capacity because they create no
state.

Session tokens come from the operating system's random source, since a token is
the only thing standing between an off-path attacker and a usable session on an
unauthenticated server. A drawn value that is zero or collides with a live
session is redrawn within a finite budget; there is no predictable fallback,
and a colliding token never overwrites the session that holds it. The reply is
encoded before the session is inserted, so an internal failure cannot leave a
half-created session behind.

Echo and close requests pass admission and are then deliberately ignored: this
slice creates sessions, and lifecycle and receive semantics belong to the
slices that implement them. Tests pin that so a half-implemented lifecycle
cannot appear by accident.
2026-08-12 00:47:46 +07:00
renovate[bot] e0332b4360 chore(deps): maintain cargo lockfile 2026-08-11 14:25:00 +00:00
Nils Andreas Svee 373bf32d0f refactor(client): replace unsafe libc calls with nix for Linux ancillary data
Eliminate unsafe code blocks and manual pointer arithmetic in Linux-specific receive paths by utilizing nix for socket options and control message parsing. This improves safety and maintainability while preserving the existing kernel RX timestamp and traffic class functionality.
2026-08-11 13:38:56 +07:00
renovate[bot] 49826a5b3d fix(deps): update rust crate thiserror to 2.0.20 2026-08-10 11:15:42 +07:00
renovate[bot] d4cef6c2e7 fix(deps): update rust crate clap to 4.6.6 2026-08-10 11:15:26 +07:00
Nils Andreas Svee a542d4edf1 feat(client): add optional Tokio socket support 2026-08-04 15:29:35 +07:00
renovate[bot] 561e405d18 chore(deps): maintain cargo lockfile 2026-08-03 17:10:21 +00:00
renovate[bot] 1cb4d01746 fix(deps): update rust crate clap to 4.6.5 2026-08-04 00:06:02 +07:00
renovate[bot] 7f797644ad chore(deps): maintain cargo lockfile
(cherry picked from commit c4e3e1e629)
2026-07-27 20:44:40 +07:00
renovate[bot] 2ee97f281a chore(deps): maintain cargo lockfile 2026-07-23 12:33:47 +07:00
renovate[bot] b6c88794e6 fix(deps): update socket dependencies 2026-07-23 12:33:13 +07:00
renovate[bot] bbb8a6a458 fix(deps): update rust crate thiserror to 2.0.19 2026-07-23 12:30:30 +07:00
renovate[bot] c895faa5d1 fix(deps): update rust crate clap to 4.6.4 2026-07-23 12:27:29 +07:00
renovate[bot] c779bf08b8 chore(deps): maintain cargo lockfile 2026-07-05 22:53:23 +00:00
Nils Andreas Svee 68c7f92cb4 chore: bump version to 0.4.0 across all workspace packages
Update the version of irtt-proto, irtt-client, irtt-stats, and irtt-cli to 0.4.0 in preparation for a new release.
2026-07-05 00:30:19 +07:00
Nils Andreas Svee c483a12173 chore(deps): update time crate to 0.3.53
Update the time dependency in Cargo.lock to the latest patch version to maintain the lockfile and incorporate upstream fixes.
2026-07-03 00:58:05 +07:00
renovate[bot] 6602b7496a chore(deps): maintain cargo lockfile 2026-06-28 17:30:52 +00:00
Nils Andreas Svee 5dce8d55ee build: update time crate from 0.3.50 to 0.3.51
Update the time dependency in Cargo.lock to the latest patch version.
2026-06-23 21:14:28 +07:00
Nils Andreas Svee d05d6a941b chore(deps): maintain cargo lockfile 2026-06-22 13:31:14 +07:00
renovate[bot] f9f7d35793 chore(deps): maintain cargo lockfile 2026-06-22 12:20:07 +07:00
Nils Andreas Svee cfbac69ac6 build: update lockfile to version 4 and deduplicate dependencies
Upgrade Cargo.lock to version 4 and remove redundant versions of crossterm, rustix, and windows-sys to reduce binary size and build complexity.
2026-06-21 00:12:23 +07:00
Nils Andreas Svee e3b74441a7 fix(deps): update rust crate ratatui to 0.30.2 2026-06-20 22:32:43 +07:00
renovate[bot] 5595d6e78e fix(deps): update rust crate crossterm to 0.29.0 2026-06-20 22:31:44 +07:00
Nils Andreas Svee 5efb8a1870 build: bump workspace and crate versions to 0.3.0 2026-06-10 00:44:10 +07:00
Nils Andreas Svee c31ad07d61 feat(irtt-cli): add optional tui output mode 2026-06-09 13:29:00 +07:00
renovate[bot] ece9fd6db0 chore(deps): maintain cargo lockfile 2026-06-09 11:32:29 +07:00
renovate[bot] b544df7cc9 fix(deps): update socket dependencies to 0.6.4 2026-06-05 10:43:53 +07:00
renovate[bot] 6bb4e70df3 chore(deps): maintain cargo lockfile 2026-05-25 01:56:28 +00:00
Nils Andreas Svee b508a94198 build: bump version to 0.2.0 2026-05-11 15:11:58 +07:00
renovate[bot] c04e8f7084 chore(deps): maintain cargo lockfile 2026-05-11 08:00:31 +00:00
Nils Andreas Svee 2258509021 chore: bump version to 0.1.1 across all crates
Update workspace members and dependencies to version 0.1.1 to prepare for a new release.
2026-05-10 21:17:22 +07:00
Nils Andreas Svee 831fd0cc45 build(deps): update hmac and md-5 dependencies 2026-05-10 20:56:43 +07:00
Nils Andreas Svee fe418d650d refactor(client): upgrade socket2 to 0.6 and use version-specific API 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 13404297c4 build: update windows-sys dependencies and consolidate versions 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 995293676d feat(cli): handle interrupt as graceful shutdown 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 3ff6a07225 feat(client): add Linux ancillary receive metadata 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 91a3e6f383 build(cli): add irtt-stats dependency and feature flag 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 7d3a9f8da0 build(stats): add irtt-client dependency to irtt-stats 2026-05-10 20:56:43 +07:00
Nils Andreas Svee 4b90187d1d chore(cli): add dependencies for CLI implementation 2026-05-10 20:56:43 +07:00