Repository navigation
Description
Problem
Every automated promotion gate we have is an integrity check. Not one reads a user-outcome number.
desktop_qualify_beta.yml— tag format, asset digest match, hermetic rebuild of the exact SHA, T2 and fault-injection suites, immutable evidence JSON. Zero telemetry.desktop_promote_prod.yml— select trusted qualification, fetch retained manifest, CAS the stable pointer, verify hashes and feed. Its only network calls are/v2/desktop/releases/.... No PostHog, no Sentry, no crash-rate or soak-age threshold.release-eligibility.yml— commit and CI status only.
The macOS release-velocity operating contract defines Stage 2 "Beta fitness and soak" as prose bullets and Stage 3 as "judgment only… twenty-minute maximum." Integrity is fully mechanized. Fitness is the only unimplemented stage in the pipeline.
This is not an instrumentation gap. The instruments exist and are good:
omi_journey_*(backend/utils/metrics.py:30) covers four journeys with success defined at the user boundary —chat_response,pusher_session,live_transcription(success = first nonempty transcript sent),capture_finalization. Consumed by Grafana (backend/charts/monitoring/dashboards/omi-services/resilience-fallbacks.json:553), four paging alert rules, and a CI contract test.web/adminalready computes channel-split response reliability — success rate, failure rate, average full-answer seconds, failure-reason breakdown (web/admin/lib/response-reliability.ts).
The gap is that nothing connects the number to the decision.
The blocker nobody has noticed
The channel-split metric cannot currently attribute an outcome to a release candidate. Before anyone considers gating on it:
web/admin/app/api/omi/stats/response-reliability/route.tsassigns each event to a channel by reading the actor's current Firestoreupdate_channel— not the channel or build identity captured when the event happened. A user who moves Beta → Stable retroactively relabels their entire history.route.ts:51-52:if (!channelByActor.has(actorId)) channelByActor.set(actorId, "production");— every unknown actor is silently counted as production.route.ts:74-81floors the window at 7 days, so the series cannot isolate the candidate currently under evaluation.response-reliability.ts:145-156computessuccessRateoversuccess + failureonly, excluding cancellations and unresolved attempts. A candidate that stops terminalizing queries can look more reliable, not less.
Gating on this today would gate on an artifact of Firestore's current state, not on a signal about the candidate.
What to build
Three PRs, strictly in order.
PR 1 — Repair the two known-misleading charts
Both were diagnosed on 2026-07-09 and are still live and still wrong:
- MAU
YkcjKEX6carries the same all-events distinct-user defect we already fixed for DAU (AusK7SI8→Ljh22BGA). Apply the same fix; preserve the old chart as legacy rather than overwriting. - macOS chat error rate
LXEMscAjlacks a macOS/production filter and materially understates the real rate.
This is PostHog configuration, not code. Record before/after links and a spot-check note for each.
PR 2 — Make outcomes candidate-bound
Emit channel and build identity on the event itself. Stop inferring channel from current user state. Unknown actors must be reported as unknown, never silently folded into production.
Nothing downstream is trustworthy until this lands.
PR 3 — A non-blocking Stable fitness report
Attach a report to the promotion decision containing: candidate-bound channel/build identity, unique users, attempts, successes, failures, cancellations, unresolved attempts, confidence intervals, soak age, and explicit data-partiality warnings.
It reports. It does not block. It turns Stage 3 from a vibe into a bounded decision with the evidence in front of the decider — which is exactly what the operating contract asks for, since it states Stable remains a bounded human decision with automation producing a summary.
Anti-patterns — these will be rejected
- Wiring the existing metric into
desktop_promote_prod.ymlas a veto. This is the single most likely wrong move. See the blocker above. - Making promotion depend on PostHog or Firestore availability. That converts an analytics outage into a distribution outage. The operating contract demands every gate justify its critical-path cost.
- Adding a veto now "and calibrating later." The contract requires a demonstrated failure before a new release control plane. We do not have one yet.
- Inventing a threshold. "95% success" pulled from nowhere is worse than no number, because it launders a guess as a standard.
- Reporting
successRatewithout cancellations and unresolved attempts. That is the metric's blind spot; surfacing it without them reproduces the bug. - Overwriting the broken charts in place. Preserve as legacy; create replacements.
Reward-hacking guardrails
| Hack | Block |
|---|---|
| Ship the veto immediately because it is the visible deliverable | PR 3 is explicitly non-blocking. A PR that adds a promotion-blocking telemetry gate before calibration is rejected regardless of how good the number looks. |
| Pick a threshold that the current data happens to pass | No threshold is authored in these three PRs. None. |
| Declare the metric fixed without fixing attribution | PR 3 must consume candidate-bound identity from PR 2. A report built on the current channel inference is the same defect with a nicer surface. |
| Improve the number by narrowing the denominator | Cancellations and unresolved attempts are required fields in the report. Shrinking the denominator makes them visible, not hidden. |
| Report a rate on 4 beta users and call it signal | Unique-user count, attempt count, and confidence intervals are required fields. Sample sufficiency is a reported fact, not an assumption. A report that cannot say how confident it is has not done its job. |
| Fix the charts by deleting them | Preserve as legacy and create replacements; record before/after links. |
| Treat "no data" as a pass | Idle or no-data is inconclusive, never success — the same rule the deployment-ops project already applies to real-traffic acceptance. |
What good looks like
Good. A promotion decision arrives with: "Candidate v0.12.108. Beta cohort: 231 unique users, 4,180 chat attempts over 3.2 days. Success 96.1% [95% CI 95.5–96.7]. Cancellations 3.1%, unresolved 0.4%. Production baseline 96.4%. No updater or data-loss vetoes. Data partiality: 12 actors unresolved." A human reads it in 90 seconds and decides with evidence.
Bad. A CI step queries PostHog, compares a number to a hardcoded 0.95, and blocks the release. PostHog rate-limits during an incident. Distribution stops. Nobody can explain whether the candidate was actually bad.
Definition of done
- PR 1: both charts corrected, old versions preserved as legacy, before/after links recorded.
- PR 2: channel and build identity emitted on the event; unknown actors reported as
unknown; no consumer infers channel from current user state. - PR 3: non-blocking report attached to the promotion decision with every required field including cancellations, unresolved, and confidence intervals.
- No promotion gate is added by any of these three PRs.
Future work — deliberately not authorized here
Promotion to a veto requires: the report catching a demonstrably harmful candidate, an acceptable false-block rate over 2–3 calibration releases, and an explicit decision. Privacy, data-loss, credential, and updater-integrity failures remain immediate hard vetoes regardless — those never needed a statistical argument.
Motivation and full evidence: the "Guard Economics" project in the private knowledge base.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsSomeday
Activity
RatnamOjha commentedon Jul 23, 2026
@Git-on-my-level - need human response.
I’d like to work on #10339, starting with PR 1 and continuing through PRs 2 and 3 in the specified order.
PR 1 requires access to the relevant PostHog charts. Could you grant me the minimum necessary access, or connect me with someone who can help make and verify those changes? I’ll preserve the existing charts as legacy, create corrected replacements, and document before/after links and spot-check results.
I’ll keep the fitness report non-blocking, introduce no thresholds or promotion vetoes, and follow the issue’s sequencing and guardrails exactly. Please also confirm whether the issue is available to claim.