Skip to content

v5.0.0

Latest

Choose a tag to compare

@SAY-5 SAY-5 released this 08 Sep 22:19
· 4 commits to main since this release

Observability and deterministic replay.

  • Prometheus GET /metrics on all three services (prometheus-client, aggregated across uvicorn workers via PROMETHEUS_MULTIPROC_DIR). Counters: rideloop_matches_total, rideloop_match_latency_seconds (histogram), rideloop_matches_per_minute (trailing-minute gauge from the sweep loop), rideloop_unmatched_total, rideloop_claim_conflicts_total, rideloop_ttl_expiries_total, rideloop_offers_total{outcome}, sweep/position/ride counters, and per-route HTTP request counts and latency.
  • TTL expiries are now observable: the nearby read filters ttl client-side and deletes an expired row on first sight with a conditional delete (ttl unchanged), so each expiry is counted once and stale rows stop costing reads while DynamoDB's own sweep lags.
  • sim/replay.py: JSON-lines ride streams (driver positions and ride requests with relative timestamps) replayed through the matcher on a virtual clock. Same file, same matches, same rider-to-driver assignments; the summary carries a fingerprint and a later run exits 1 on drift. make replay synthesizes a stream, replays it twice and compares; sim.demo --record captures a live run.
  • Tests: /metrics on every service with request counting, matcher counters after a sweep, claim conflicts under a 8-thread race, an expiry counted once, replay determinism across a wiped store, the CLI round trip including a tampered summary. 94 tests total.
  • Also in this release: the simulated fleet runs in worker processes (a single-process load generator starved its own pings and made offers expire), expired driver rows are stamped rather than deleted so a resumed driver keeps its status, and the compose file waits for DynamoDB Local to answer before starting the services.

make demo on this release: 600 rides submitted at 10/s, 600 matched and completed, 586 matches per minute, match latency p50 62 ms / p95 1101 ms (the p95 is the one ride in ten whose driver declined and that was rematched), 51 declines re-queued with 0 timeouts, 14305 position posts from 300 drivers with 3 errors, and the silenced driver gone from the map once its TTL passed.

Correction — 2026-09-29

The figures above are an unverified historical documentation transcript, not
a retained benchmark. No raw run log, UTC execution timestamp or machine
metadata was retained for it. Documentation commit time does not establish
run time. The p95 attribution to declined rides was not established by retained
latency samples and should not be read as a measured causal explanation.

The earlier 601/min and 59/101 ms figures describe a different documented,
pre-offer/decline workload and are also unverified. The portfolio's former
“p50 54 ms” headline has no supporting retained record. None of these figures
is a valid comparison with the browser's virtual-clock model or a backend
capacity claim. See measurement provenance.

The TTL paragraph above also contains a superseded description: the release
stamps expired rows using a conditional update; it does not delete them on
read. This preserves driver status until DynamoDB's own expiry processing.
The later “Also in this release” paragraph describes the shipped behavior.

This dated correction preserves the original release text as history and
makes no new throughput claim.