fix(client): separate probe admission and send timing #44

Merged
Lochnair merged 1 commits from fix/probe-send-timestamps into main 2026-08-04 04:48:09 +00:00
Lochnair commented 2026-08-04 04:42:51 +00:00 (Migrated from github.com)

Summary

Separate scheduling admission time from the committed probe-send timestamp
across blocking, singleton-managed, and managed-group sends.

Timing model

  • permission_at controls scheduling admission and missed-slot handling.
  • sent_at is sampled after preparation and reservation, immediately before
    timestamp-dependent finalization and socket submission.
  • send_call_start and send_finished_at bracket only the socket call.

Transaction boundary

After successful kernel acceptance, the only operation before machine and
schedule commits is the infallible monotonic completion-time sample. Short
successful sends still commit before datagram-length validation.

Metrics behavior

EchoSent.sent_at, pending timeout metadata, RTT inputs, and timer error now
use the late committed timestamp. send_call excludes machine and scheduler
commit work.

Testing

Adds deterministic four-timestamp regressions for blocking, singleton-managed,
and managed-group sends, including timeout anchoring, overflow rollback,
wrapped-history cleanup, send failures, short sends, and exact send-call
durations. Full workspace and no-default verification pass.

## Summary Separate scheduling admission time from the committed probe-send timestamp across blocking, singleton-managed, and managed-group sends. ## Timing model - `permission_at` controls scheduling admission and missed-slot handling. - `sent_at` is sampled after preparation and reservation, immediately before timestamp-dependent finalization and socket submission. - `send_call_start` and `send_finished_at` bracket only the socket call. ## Transaction boundary After successful kernel acceptance, the only operation before machine and schedule commits is the infallible monotonic completion-time sample. Short successful sends still commit before datagram-length validation. ## Metrics behavior `EchoSent.sent_at`, pending timeout metadata, RTT inputs, and timer error now use the late committed timestamp. `send_call` excludes machine and scheduler commit work. ## Testing Adds deterministic four-timestamp regressions for blocking, singleton-managed, and managed-group sends, including timeout anchoring, overflow rollback, wrapped-history cleanup, send failures, short sends, and exact send-call durations. Full workspace and no-default verification pass.
Sign in to join this conversation.