MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-3464

(motir-core) Re-measure the fast lane on the engine and RECORD the figure — flip the honesty assertion, or say why it still stands

Done
Description

Transcribe the fast lane's measured latency on the Postgres engine into lib/jobs/latencyBudget.ts, and settle the honesty assertion that MOTIR-3247 left standing.

This is the record leg of a release trio: the prep was code and ended at a pull request, the cut was an operator action needing the deploy, and this needs the READING — which the latency-reading operator card produces and records on itself (this card is blocked_by it). Do not take a fresh measurement here. Take the six figures from that card, and if they are missing or older than the completed cutover, stop and say so rather than substituting a reading of your own.

⚠️ The producing card CHANGED. The reading was originally scope on MOTIR-3463, the cutover task; it was split onto its own operator card so the finished cutover could close and stop blocking MOTIR-3475 and MOTIR-3418. Read the figures from this card's blocked_by, not from MOTIR-3463.

What to record, and what NOT to overwrite

FAST_LANE_LATENCY_BUDGET.baseline currently holds the Inngest measurement (2026-08-23, 72 h, n=556, median 1 300 ms, p95 29 400 ms, max 93 300 ms). Its own comment says it exists "so a later reader can tell movement from noise."

Keep it. Add the engine reading beside it rather than over it — the comparison IS the deliverable, and a constant holding only the current number cannot support the sentence the epic will be judged on. Name the two so which substrate each describes is unambiguous from the field name alone, and label each with its substrate in the comment.

Then update the file header, which currently states the gap as a live fact ("a budget the deployment does NOT currently meet", "the tail is four to six times outside it"). Whichever way the reading goes, that paragraph is now a statement about a substrate we have left.

The assertion, and the two ways it can go

tests/jobs/fast-lane-latency-budget.test.ts asserts baseline.p95Ms > p95Ms — deliberately, so nobody can quietly relax the budget to match reality. It reads whichever baseline the constant exposes, so adding a second field means deciding which one it reads, and that decision is this card's: it must read the baseline for the substrate now in production, or the guard silently keeps asserting a gap on a lane nothing runs on.

  • If the engine's p95 is at or under 5 000 ms, the budget is MET. Flip that test to assert it, and say in the PR body what closed the gap — the criterion asks for the reason, not just the number. Name it from the evidence: the measured p95, and what changed about occupancy. docs/decisions/job-lane-occupancy.md §6 attributes the Inngest tail to arrival burstiness against a single unpartitioned account-level capacity; if the reading supports that, say so, and if it does not, say that instead. Do not attribute the improvement to the migration merely because the migration is what happened.
  • If it is still over, the assertion STAYS and the card still closes. Record the figure, update the header to describe the engine's gap rather than Inngest's, and file a follow-up card for the remaining distance, citing its key here. A budget still unmet is a finding, not a failure of this card — the one outcome that would be a failure is quietly moving the number to whatever the system does.

Scope boundary

ENDS at: the merged constant, the settled assertion, and — if the budget is still unmet — the follow-up card's key written into the file.

Does NOT re-run the cutover, change any routing, or modify the engine. Does NOT delete scripts/experiments/inngest-fastlane-lag.mjs or the Inngest baseline; both stay until MOTIR-3418 retires the lane they describe.

Acceptance criteria

  • lib/jobs/latencyBudget.ts carries BOTH readings, each labelled with its substrate, the Inngest figures unchanged.
  • The engine reading's six fields match the ones recorded on the latency-reading card verbatim, and the constant names the window and the script that produced them.
  • The file header no longer states the Inngest gap in the present tense as the system's condition.
  • tests/jobs/fast-lane-latency-budget.test.ts reads the baseline for the substrate in production, and asserts the true relation — flipped if the budget is met, unchanged if it is not.
  • If the budget is met, the PR body names what closed the gap and the evidence for that attribution. If it is not, a follow-up card exists and its key is cited in the file.
  • FAST_LANE_CONSUMER_IDS and the lane's membership / concurrency / debounce assertions are untouched and still pass.

Context refs

  • lib/jobs/latencyBudget.ts — the constant, its header, and the Inngest baseline that stays
  • tests/jobs/fast-lane-latency-budget.test.ts — the honesty assertion, and the suite's own note on what CI cannot measure
  • scripts/experiments/engine-fastlane-lag.mjs — the probe that produced the figures; see MOTIR-3593 for a defect in how it must be invoked
  • docs/decisions/job-lane-occupancy.md §6 — the burstiness attribution to confirm or contradict
  • MOTIR-3245 · MOTIR-3247 — the bug that started this and the card that wrote the budget down