Commit Graph
509 Commits
Author SHA1 Message Date
Nils Andreas Svee b1e32d543c test(client): verify async lifecycle equivalence 2026-08-04 15:34:20 +07:00
Nils Andreas Svee 62a9c8899e feat(client): add Tokio async client 2026-08-04 15:34:19 +07:00
Nils Andreas Svee a542d4edf1 feat(client): add optional Tokio socket support 2026-08-04 15:29:35 +07:00
Nils Andreas Svee 56f54a7b4e fix(managed): classify opening overflow as configuration 2026-08-04 14:24:40 +07:00
Nils Andreas Svee 04e7893e3e fix(managed): bound opening receiver drains 2026-08-04 14:22:23 +07:00
Nils Andreas Svee 3948e3dec9 fix(client): timestamp close events after send 2026-08-04 13:44:33 +07:00
Nils Andreas Svee ef19c45c1f fix(managed): transact group session close 2026-08-04 13:08:38 +07:00
Nils Andreas Svee 357e1356ea fix(client): transact blocking session close 2026-08-04 13:03:51 +07:00
Nils Andreas Svee da731edd0d refactor(session): prepare close transactions 2026-08-04 12:59:27 +07:00
Nils Andreas Svee 185e0bf3e4 fix(managed): drain queued opening replies before retry 2026-08-04 12:34:13 +07:00
Nils Andreas Svee dd74f3800e fix(client): preserve no-test opening semantics 2026-08-04 12:18:31 +07:00
Nils Andreas Svee e270183f5d refactor(managed): transact group session opening 2026-08-04 12:12:05 +07:00
Nils Andreas Svee ff27ec24c6 refactor(client): transact blocking session opening 2026-08-04 12:11:32 +07:00
Nils Andreas Svee dad4d2a298 refactor(session): prepare opening transactions 2026-08-04 12:11:32 +07:00
Nils Andreas Svee e642f962d4 fix(client): separate probe admission and send timing 2026-08-04 11:36:25 +07:00
Nils Andreas Svee 9bc2ac90b3 refactor(client): commit probe sends transactionally 2026-08-04 01:04:42 +07:00
Nils Andreas Svee b5d0b1e52e refactor(probe): preflight pending insertion 2026-08-04 00:53:26 +07:00
Nils Andreas Svee cabe0f6c24 feat(proto): add directional echo codecs 2026-08-04 00:34:12 +07:00
Nils Andreas Svee cc7f7fc9b2 feat(proto): add directional open and close codecs 2026-08-04 00:30:08 +07:00
Nils Andreas Svee e908c4ce4f refactor(proto): centralize packet envelope handling 2026-08-04 00:27:45 +07:00
Nils Andreas Svee 1920d5e33c test(managed): make probe pacing assertions deterministic 2026-08-04 00:11:27 +07:00
Nils Andreas Svee 22b8bb80ea refactor(client): separate probe scheduling from session state 2026-08-04 00:11:27 +07:00
renovate[bot] 1cb4d01746 fix(deps): update rust crate clap to 4.6.5 2026-08-04 00:06:02 +07:00
Nils Andreas Svee 4b4adc518c refactor(session): consolidate client session lifecycle 2026-07-31 11:10:23 +07:00
Nils Andreas Svee dc827908d9 refactor(session): separate negotiation from session state 2026-07-31 11:08:25 +07:00
Nils Andreas Svee dfe0534905 test(managed): cover group late replies during final drain
Exercise a real one-target ManagedClientGroup through timeout, Draining, a gated retained reply, LateReply classification, local close, and authoritative TargetFinished publication. Synchronize release after EchoLoss and a scheduler-handled no-op update so the ordering is deterministic rather than delay-dependent.

Add a silent-server control that verifies completion only after the final-drain deadline, and assert bounded join, queued-event draining through disconnection, target counters, terminal outcome equality, and group aggregates in both cases.

Harden the analogous single-client late-drain test with a viable one-probe run window and packet-shape checks. No production final-drain behavior change was required.
2026-07-28 15:55:18 +07:00
Nils Andreas Svee 7cc55bd619 fix(managed): decouple peer-close control from event delivery
Add a scheduler-owned saturating peer-close counter shared with the group session. Update it before best-effort TargetFinished publication so bounded subscriber overflow cannot hide the live shutdown condition, while retaining the existing events, bounded history, and aggregate accounting.

Make grouped CLI and TUI supervision consult the durable count on each existing activity loop and funnel both count and event observations through one-shot stop policy. Preserve interruption suppression, queued-event draining, structured failures, drop reporting, and peer-close diagnostic precedence.

Cover scheduler-only accounting, non-peer exclusions, receiver and removal races, deterministic capacity-one DropOldest eviction with an active target, frontend one-shot policy, and the existing process-level peer-close and interruption behavior.
2026-07-28 15:49:53 +07:00
Nils Andreas Svee bbe3261eb3 fix(managed): record peer closure in the receiver
After publishing the authenticated reply classification and session-close events, mark the target PeerClosed while the receiver still holds its lock. Wake the scheduler to publish and account for the single authoritative terminal outcome.

Add controlled-order regressions proving later scheduler sends and target removal cannot overwrite peer-close provenance, counters remain intact, and ordinary replies stay active.
2026-07-28 14:55:30 +07:00
Nils Andreas Svee dfe9adb36e fix(managed): block while dynamic groups are idle
Block the group scheduler on its control channel when no opening, pacing, or final-drain deadline exists. Preserve bounded timed waits whenever scheduled work remains.

Cover no-deadline blocking, channel disconnection, deadline wakeups, and empty dynamic-group update, stop, and drop behavior with bounded tests.
2026-07-28 14:48:57 +07:00
Nils Andreas Svee 6af4663b6e fix(cli): drive single-target runs with ManagedClient
Replace the manual single-target ClientSession loops in the stream and TUI adapters with ManagedClient::start_with_subscription so the existing worker owns opening, deadline-aware pacing, receive handling, timeout polling, draining, and close.

Use bounded subscription waits for interruption and input polling, drain queued events before and after join, and report per-subscription drops without changing output, statistics, labels, summaries, warning, or peer-close policy. Add process and unit regressions for 10 ms cadence, interruption, final-event draining, TUI terminal state, and overflow visibility.
2026-07-28 14:42:02 +07:00
Nils Andreas Svee 080d45ca67 fix(cli): stop continuous groups on peer closure
Record a continuous peer-closed TargetFinished event as the reason for requesting group shutdown and stop each CLI/TUI group at most once. Drain the managed subscription and join before applying exit policy so queued output and target failures are preserved.

Give peer closure precedence over the cancellation caused by that internal stop while keeping explicit interruption and finite-run behavior distinct. Add bounded process regressions for partial closure, mixed failures, queued rows, and interruption plus focused TUI policy coverage.
2026-07-28 14:29:15 +07:00
Nils Andreas Svee 83fb98dbfd test(managed): cover silent opening timeouts
Exercise the ordinary OpenTimeout path with a bound UDP peer that receives every configured opening attempt but never replies.

Bound event disconnection and join completion with one strict deadline, then verify the authoritative terminal event, structured failure, aggregate counters, and retained outcome.
2026-07-28 10:23:56 +07:00
Nils Andreas Svee 58d11f1dec fix(cli): fail continuous runs on peer closure
Keep PeerClosed as a distinct successful library outcome while treating it as an error at the CLI and TUI boundary for uninterrupted continuous runs.

Track aggregate peer-close outcomes independently of bounded recent history and cover finite, continuous, grouped, mixed-failure, interruption, and TUI status behavior.
2026-07-28 10:23:47 +07:00
Nils Andreas Svee 8ea4c2f8a4 docs(managed): document lifecycle outcome contracts
Document terminal group events, structured failure decisions, explicit static versus dynamic completion, empty desired-set behavior, bounded join history, dropped-event detection, and missed-slot pacing.
2026-07-28 01:04:44 +07:00
Nils Andreas Svee 6adec06442 fix(managed): expose dropped subscription events
Track a monotonic discarded-event count per bounded subscription for all overflow policies, including after hub sealing or disconnection. Preserve nonblocking publication and existing queue policies.

Warn once in streaming CLI output and mark TUI summaries/status as incomplete when DropOldest discarded events. Add exact overflow-counter and incomplete-marker regressions.
2026-07-28 01:04:43 +07:00
Nils Andreas Svee 41cd2a9589 fix(managed): skip missed probe slots
Advance delayed managed schedules to the latest due cadence slot and then directly to the first future deadline. Apply the same absolute-cadence behavior to the single runner and group burst/staggered pacing, while leaving the manual Client send API caller-paced.

Bound receive waits by the next send deadline so 10 ms intervals are not hidden behind the managed socket timeout. Add deterministic delayed-slot, finite-end, burst, staggered, and receive-bound regressions.
2026-07-28 01:04:43 +07:00
Nils Andreas Svee 5381cfc992 fix(managed): bound completed target retention
Retain only the 256 most recent target outcomes in the final group snapshot while tracking total, successful, failed, and discarded outcome counts. Publish each authoritative TargetFinished event before inserting into the bounded history.

Update CLI/TUI exit decisions to use aggregate counts and add a dynamic churn regression proving every outcome remains observable while join retention stays bounded.
2026-07-28 01:04:42 +07:00
Nils Andreas Svee 8e58c0f04b fix(managed): keep empty dynamic groups idle
Track desired membership separately from active target state and make natural completion an explicit group policy. Empty authoritative updates now remove all targets without terminating the scheduler, while static CLI groups retain all-target completion.

Document that construction still requires an address-family-defining target and add regressions for empty replacement, later re-addition, idle control responsiveness, idle cancellation, and finite static completion.
2026-07-28 01:04:42 +07:00
Nils Andreas Svee 4398d25d4b fix(cli): report multi-target failures and return nonzero
Consume structured per-target outcomes in the streaming CLI and TUI so mixed failures remain visible while successful targets still produce output. Return a failure status when every target fails, and keep interruption behavior distinct.

Add strict-timeout integration coverage for mixed continuous completion and all-open-failure exit status, plus focused TUI outcome-state tests.
2026-07-28 01:04:42 +07:00
Nils Andreas Svee 97aac829ec fix(managed): publish terminal outcomes for failed targets
Extend the managed group stream with authoritative per-target terminal outcomes and structured failure classifications. Final client events are published first, followed by exactly one TargetFinished outcome for success, peer close, no-test, opening/runtime failure, removal, or cancellation.

Scheduler-owned cleanup now stops the receiver and seals subscriptions on natural completion, eliminating the event-consumer/join circular wait while preserving queued drain. TargetEventSubscription now yields ManagedGroupEvent, so consumers must handle Client and TargetFinished variants.

Strict-timeout regressions cover mixed success/failure, all-open failure, runtime failure, no-test ordering, removal, cancellation, and disconnection before join.
2026-07-28 00:07:18 +07:00
Nils Andreas Svee 3e0047e505 fix(managed): seal completed event hubs
Store hub closure under the same lock as subscriber registration so permanent shutdown cannot race with a late subscription. Sealing remains idempotent, wakes current consumers, preserves queued events for draining, rejects future subscribers, and ignores later publications.

Regression tests cover queued drain, blocking wakeup, idempotent sealing, and late subscription rejection.
2026-07-27 23:59:51 +07:00
Nils Andreas Svee 1bf44a1746 fix(client): honor authenticated close before correlation
Treat a decoded, authenticated, token-matched close flag as a session-level signal after classifying the packet. Classification events now deterministically precede SessionClosed for pending, duplicate, retained-timeout, evicted-late, and untracked sequences.

Wrong-token and bad-HMAC close packets remain non-terminal. Public event documentation records the ordering contract, and focused regressions cover every correlation class.
2026-07-27 23:58:16 +07:00
Nils Andreas Svee 91db85cc63 fix(client): preserve peer-close counters and provenance
Snapshot sent counters when a runtime leaves its live session state, and expose PeerClosed from the single managed runner instead of folding it into TestComplete. Group timeout polling now recognizes a peer-closed runtime before attempting another operation, preserving the same provenance and counters.

Regression coverage verifies single and group peer-close outcomes, finite completion, cancellation, no-test completion, and final counters.
2026-07-27 23:55:04 +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
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 d2ae68a05f feat(tui): refactor graph metrics and simplify view navigation
Consolidate graph modes into a single GraphMetric enum to support more granular metrics like one-way delays and server processing. Replace the "full graph" toggle with a dedicated TuiView system to improve UI state management and status line clarity.
2026-07-05 00:28:22 +07:00
Nils Andreas Svee f9c6728855 feat(tui): add time-based graph navigation and zooming
Implement a scrollable and zoomable viewport for the TUI graphs, allowing users to pan through historical data using arrow keys and adjust the time window with zoom controls. This transitions graph rendering from sample-count based to timestamp-based for more accurate temporal visualization.
2026-07-04 23:44:18 +07:00
Nils Andreas Svee b9f5367ed1 feat(tui): add manual Y-axis scaling and improve graph axis logic
Introduce a toggleable graph scale (Auto, 100ms–2s) via the 's' key to provide better control over visualization ranges and implement smarter Y-axis bounds that handle signed versus non-negative metrics.
2026-07-04 22:54:47 +07:00