Add M10.6c probe-marker prediction traces and close M10.6
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 12m33s
Foundation / checks (network) (push) Canceled after 10m23s
Foundation / checks (client) (push) Canceled after 12m33s

evo-motion-trace drives the engineering client's own session code through
the owned impairment relay against a real-time 50 ms loopback region:
exact without loss, 94-99 % exact at 60-200 ms RTT with 2-5 % loss, every
profile converging after stopping, restart resync about 2-3 s
(docs/networking/M10_PREDICTION_TRACES.md). The CTest motion-trace-smoke
checks convergence, bounds and a majority of exact predictions.

The relay lets a new sender take over after the current client has been
silent for 1 s (reconnects); the client counts refusal receipts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-06 17:03:45 -04:00
co-authored by Claude Opus 5.5
parent 96237ca10a
commit 61d899de3c
12 changed files with 518 additions and 12 deletions
+15
View File
@@ -61,6 +61,9 @@ struct RemoteStatus {
double marker_x_mm{}, marker_y_mm{};
std::size_t inputs_pending{}, other_markers{};
std::uint64_t lead{}, corrections{}, max_error_um{}, snaps{};
// Refusal receipts (each, whether or not the input was still pending), inputs the
// predictor removed as refused or dropped as never applied, and repeated vectors.
std::uint64_t refused_inputs{}, rejected_inputs{}, dropped_inputs{}, resends{}, max_pending{};
};
// A probe marker to draw: the own one predicted and smoothed, others as replicated.
struct MarkerView {
@@ -146,8 +149,17 @@ class RemoteSession {
s.corrections = predictor_.stats().corrections;
s.max_error_um = predictor_.stats().max_error_um;
s.snaps = smoother_.snaps();
s.rejected_inputs = predictor_.stats().rejected_inputs;
s.dropped_inputs = predictor_.stats().dropped_inputs;
s.max_pending = predictor_.stats().max_pending;
s.resends = resends_;
s.refused_inputs = refused_;
return s;
}
// Prediction error samples since the last call (micrometres; for measurements).
[[nodiscard]] std::vector<std::uint64_t> take_prediction_errors() {
return predictor_.take_errors();
}
// Markers to draw this frame (empty without a session or snapshot).
[[nodiscard]] const std::vector<MarkerView>& markers() const noexcept {
return markers_;
@@ -293,6 +305,7 @@ class RemoteSession {
if (!sequence)
return;
static_cast<void>(predictor_.input({*sequence, tick, want}));
resends_ += want == sent_ ? 1 : 0;
sent_ = want;
sent_tick_ = server_tick_;
const auto entry = next_entry_++;
@@ -316,6 +329,7 @@ class RemoteSession {
lead_.admitted(it->tick, r.server_tick);
} else {
predictor_.rejected(r.sequence); // It never takes effect.
++refused_;
if (r.status == network::AdmitStatus::outside_window)
lead_.too_late(); // Arrived after its tick: schedule further ahead.
log_.record({it->entry, client::OutcomeState::rejected,
@@ -468,6 +482,7 @@ class RemoteSession {
client::CorrectionSmoother smoother_;
client::InputLead lead_;
std::optional<Clock::time_point> last_present_;
std::uint64_t resends_{}, refused_{};
std::vector<network::ReplicatedMarker> others_;
std::vector<MarkerView> markers_;
bool established_{}, welcomed_{}, exhausted_{};