tools(sentry): grade the noise gate against install-base uptake, not raw volume - #173
Closed
dzianisv wants to merge 1 commit into
Closed
tools(sentry): grade the noise gate against install-base uptake, not raw volume#173dzianisv wants to merge 1 commit into
dzianisv wants to merge 1 commit into
Conversation
…raw volume
The gate ships inside the app binary, so it only runs on devices that took
v0.4.14. Grading it on a raw event count is a measurement error in both
directions: a still-high number at 30% uptake is the gate WORKING (~70% of
baseline is the model's own prediction), and a dip from a quiet weekend is not
efficacy. The scheduled re-reads on 08-17 / 08-21 / 09-05 would have hit the
first one first.
noise-gate-report.mjs folds Play's version share into the comparison
expected_post = baseline x (1 - gated_share x 0.969)
where 0.969 is measured, not guessed (90d replay in sentry-noise.test.ts), and
grades the measured rate against that instead of against the 100%-uptake
endpoint. It reports the endpoint separately, so 'is it on track today' and
'will it clear the 3,500/mo org gate' stop being the same question, and it
inverts the model to print the IMPLIED on-device efficacy so the constant is
checked rather than trusted.
It refuses to grade two windows that look like results but are not: no
client_discard/before_send (nothing ran the gate) and 0% Play share. Absence of
evidence gets its own verdict, UNGRADED.
Runs in CI because neither credential (Sentry org token, Play service account)
exists outside GitHub Secrets — an agent picking up the 08-21 read locally is
stuck otherwise. Weekly cron records the trend regardless.
Verified against the live org: 1.2h after the production rollout it reads
UNGRADED, before_send=0, 4.95/h vs a 4.71/h baseline — which is exactly right,
no device has the build yet.
Refs AGE-105
Owner
Author
|
CI note: this PR gets no checks, and that is a repo config fact rather than a failure — every workflow here is Ran the equivalent locally in the meantime:
|
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #172 (needs its
--json/--by-reasonvolume report). Refs AGE-105.The bug this fixes is in the measurement, not the code
The noise gate ships inside the app binary. It only runs on devices that installed v0.4.14 (Play versionCode 150/151, production 2026-08-14 14:22 UTC). So the scheduled re-reads on 08-17 / 08-21 / 09-05 are about to compare a raw event count against a target that assumes 100% install share — which Play reaches slowly and never fully.
Both readings of that mistake are wrong in a way that costs a heartbeat:
What it does
scripts/noise-gate-report.mjsgrades against the uptake-adjusted expectation:src/lib/sentry-noise.test.ts. It counts only the transport drop-list, ignoring dedup/rate-cap, so it is deliberately conservative.gated_share= share of active users on versionCode >= 150, from Play vitals (play-version-share.mjs). Sentry cannot answer this: while the org is over quota nothing is stored, so release tags stop.client_discard/before_send == 0(nothing ran the gate) or 0% Play share →UNGRADED. Absence of evidence is neither pass nor fail.Why a workflow
Neither credential exists outside GitHub Secrets. An agent picking up the 08-21 read on a laptop is stuck (I was).
.github/workflows/sentry-noise-gate-report.ymlruns it on dispatch and weekly, tests the grading model in the same job that publishes the number, and writes the table to the run summary.Verification
OFF_TRACK), and a gate that does nothing at 90% uptake (implied efficacy 0).UNGRADED,before_send=0, 4.95/h vs 4.71/h baseline — correct, no device has the build yet.npm test291 pass.