(motir-core) TAKE the fast-lane latency reading on the engine — the six figures, from inside the deployment, on a tail worth reading
Opened by Zhu Yue ·
Produce the six figures the fast lane's latency budget is judged against, from inside the motir-core deployment, and record them on this card. No PR — this is an operator action, marked done on Yue's confirmation. Transcribing the figures into lib/jobs/latencyBudget.ts is MOTIR-3464's job and explicitly not this card's.
Why this is its own card
It was scope on MOTIR-3463, whose cutover finished on 2026-08-26 with every other criterion discharged. The reading needs HOURS of whole-lane tail that the cutover does not — the lane became whole at 15:36:59Z — and leaving it attached kept MOTIR-3463 open, which held MOTIR-3475 and MOTIR-3418 blocked on work they do not need. Splitting it lets the cutover close on what it actually achieved.
⚠️ WAIT for a tail worth reading — this is the card's main judgement
The budget is a p95, and a p95 over a quiet evening is not the same statistic as a p95 over a working day. docs/decisions/job-lane-occupancy.md §6 attributes the Inngest tail to arrival burstiness, so a window containing no burst measures the thing the budget was NOT written about.
Measured on the day of the cutover, work-item/transitioned arrived at 12Z n=1 · 13Z n=12 · 14Z n=39 · 15Z n=14 — a 39× spread across four consecutive hours. Take the reading over a window that spans at least one working period, state the window, and say whether it contained a burst. A --hours 24 window taken late in a working day is the cheapest way to get one.
⚠️ Two traps that produce a WRONG answer rather than an error
Both were hit and proved on 2026-08-26; neither announces itself.
1. The pooled url returns nothing and says so in a sentence that sounds like a measurement. scripts/experiments/engine-fastlane-lag.mjs:161 reads process.env.DATABASE_URL, which inside the machine is the POOLED url — motir_app, rolbypassrls = false — while job_run / job_event are relforcerowsecurity. Every policy matches nothing, so the script prints:
ledger rows matched: 0
samples: 0 — no fast-lane engine runs in this window. Nothing to report.
over a window containing dozens of successful engine runs. Override with DATABASE_URL_UNPOOLED. Filed as MOTIR-3593; if that lands first this trap is gone, so check its status before working around it.
2. The script is not in the image, and it self-guards on its own filename. /app/scripts does not exist — the runtime is a Next standalone output. Upload the file, and the basename must end engine-fastlane-lag.mjs:
if (process.argv[1] && process.argv[1].endsWith('engine-fastlane-lag.mjs')) { await main(); }
Saved as anything else it exits 0 and prints nothing at all. Also: curl is not installed in the image — use node with fetch for any HTTP.
The command
git -C <motir-core> show origin/main:scripts/experiments/engine-fastlane-lag.mjs > /tmp/lag.mjs
B64=$(base64 -w0 /tmp/lag.mjs)
fly ssh console -a motir-core --machine 7817663f103648 -C \
"sh -lc \"echo $B64 | base64 -d > /app/engine-fastlane-lag.mjs && \
DATABASE_URL=\\\$DATABASE_URL_UNPOOLED node /app/engine-fastlane-lag.mjs --hours 24 2>/dev/null\""
⚠️ Every fly secrets set replaces the containers and wipes /app, so re-upload after any roll — and prove the probe answers before trusting an empty result. A silent instrument and a silent system are indistinguishable.
Acceptance criteria
- All six figures are recorded on this card verbatim:
measuredOn,windowHours,samples,medianMs,p95Ms,maxMs. - The exact command that produced them is recorded beside them, including which connection string was used.
- The window is stated, and whether it contained an arrival burst — with the per-hour
job_eventcounts forwork-item/transitionedover that window as the evidence, not an assertion. samplesis greater than zero and the card says how many events the window held, so a thin sample cannot be mistaken for a good one.- The figures are compared against the recorded Inngest baseline (median 1 300 ms, p95 29 400 ms, max 93 300 ms, n=556, 72 h) and against
FAST_LANE_LATENCY_BUDGET.p95Ms(5 000 ms), stating plainly whether the budget is met. lib/jobs/latencyBudget.tsis NOT edited by this card.
Context refs
scripts/experiments/engine-fastlane-lag.mjs— the probe, its HOW TO RUN block (currently wrong on both counts above), and the:161connection-string readlib/jobs/latencyBudget.ts— the budget and the Inngest baseline this reading is compared against; NOT edited heredocs/decisions/job-lane-occupancy.md§6 — the burstiness attribution the window must be chosen against- MOTIR-3593 — the probe defect; may remove trap 1
- MOTIR-3463 — the cutover that made the lane whole, and where this scope came from
Discussion
No comments yet.
Adding to this discussion signs you in on app.motir.co and brings you back to this request.