Telemetry & value
A review that runs on every pull request and is ignored on most of them costs time and catches nothing. From inside one pull request, it looks exactly like a review that works. Redline measures what people act on, not what was flagged, so a rule nobody acts on shows up by name.
Telemetry is GitHub-only today. The CLI onboards and verifies repositories on both GitHub and Azure DevOps, but the metrics pipeline reads GitHub only.
The measures at a glance
| Measure | The question it answers | Measured from |
|---|---|---|
| Acted-on rate | Do people agree with the findings? | review threads on merged pull requests |
| Noise | How much of the review is ignored or unmeasurable? | the same threads, plus the clean corpus |
| Recall | Does the reviewer catch defects we know are there? | the seeded corpus |
| Cost per BLOCKER | What did each caught defect cost? | spend you supply, and the acted-on BLOCKERs |
Deliberately not measured: anything per author. Findings from local review are left out too, because nobody can tell a fixed one from an unread one.
What is measured
Acted-on rate
Every automated finding is posted as a review thread on the pull request. Once the pull request merges, each thread is in one of three states:
| Thread state | Counted as |
|---|---|
| resolved | acted on |
| unresolved, and the code around it has since changed (outdated) | ignored: the author changed the code and nobody closed the thread |
| unresolved, code unchanged | neither |
The acted-on rate is resolved threads divided by all findings. It is counted per severity and per rule id, so “42% of findings are ignored” becomes a list of the rules responsible.
A rule people keep ignoring is either wrong or badly explained. Fix it before blocking on anything: the enforcement ladder asks for a 60% acted-on rate to reach block-blocker and 80% for block-high.
Noise
Three signals that review is producing output nobody can use:
- Ignored findings, as defined above.
- Untagged findings: comments that skipped the output contract, so they cannot be attributed to a rule.
- False positives: findings on code in the seeded corpus that is known to be correct.
Recall
The share of defects planted in the seeded corpus that the reviewer found, with history per pilot repository. See the seeded corpus below.
Where it runs
Nothing runs in a product repository. Every job is a scheduled workflow in one of two estate repositories. The jobs that read the organisation need a token with organisation read access:
| Job | Schedule | Runs in | Produces |
|---|---|---|---|
| Registry | nightly | Redline source repository | registry.json, the list of onboarded repositories |
| Collect | daily | redline-metrics | review outcomes for merged pull requests, as monthly JSONL |
| Dashboard | daily | redline-metrics | a static page on GitHub Pages: tiles, trends, the full tables |
| Weekly digest | Monday morning | redline-metrics | a Teams card: acted-on rate, the noisiest rules, the worst pilot seed score |
| Inbox | every 30 minutes, weekday working hours | Redline source repository | a prioritised pull request inbox for the organisation, on GitHub Pages |
| Seed canary | weekly | redline-metrics | a recall and false-positive score; see below |
The dashboard and inbox refuse to build until someone confirms the Pages site is private or internal: both list repository names, and the inbox lists pull request titles and authors.
To reproduce a scheduled run that looks wrong, run the same commands from a built checkout, with the token in GH_TOKEN:
# from a built checkout of the Redline source repository $ node dist/bin/redline.js registry --org acme --source acme/redline # from the redline-metrics repository, with the CLI built $ node dist/bin/redline.js metrics collect --org acme --days 30 $ node dist/bin/redline.js metrics dashboard --org acme --data data --out dist
Reading the dashboard
The headline figure is findings acted on. The tiles around it, and what each means when it is not healthy:
| Tile | Healthy | What it means when it is not |
|---|---|---|
| Findings acted on | rising, then steady | Low means review runs and is ignored: the failure this whole pipeline exists to expose. It is a rule problem before it is a people problem. |
| PRs with findings | some, not all | Near 0% means the reviewer is not running, or the rules reach nothing this organisation writes. Near 100% means it flags everything, which is the same as flagging nothing. |
| Ignored | falling | Findings left unresolved on code that has since changed. Read it with the tuning queue: one noisy rule usually explains most of it. |
| Gate exemptions | rare | The share of pull requests labelled redline-exempt or no-adr. Rising means the gate asks for something people cannot reasonably give. Exemptions reach process checks only, so this never covers a security check. |
| Seed BLOCKER recall | 100% | The worst pilot repository's latest score. Anything less means the reviewer has stopped catching known defects; the dashboard warns not to widen the rollout. |
| Enforcing | growing slowly | The share of onboarded repositories on a blocking rung. Flat at zero forever means nobody has produced the evidence to promote. |
Below the tiles is the rule tuning queue: rules that fired at least three times in the window and were ignored at least a quarter of the time, named individually. That list is the most useful output of the whole pipeline. Cut, narrow or downgrade what is on it before adding new rules.
Absent, not zero
When a figure cannot be computed, the dashboard shows it as missing and says why. It never shows zero instead.
The difference matters. If the collector stops running, a dashboard that filled the gap with zeros would report a quiet week, and nobody would fix the collector. The same holds for the Enforcing tile: an unreadable register shows — with “not zero, unknown”, because “no repository blocks” and “we cannot read the register” need different people to act.
A dashboard built in week one is mostly empty. That is a small sample, not a failure.
The seeded corpus
The acted-on rate shows whether people agree with the findings. It cannot show what the reviewer missed. The seeded corpus can: code with known defects planted in it, beside correct code that must draw no finding. It is opened as a throwaway pull request on a pilot repository, reviewed, and scored:
$ node dist/bin/redline.js metrics score-seeds --repo acme/pilot --pr 4 BLOCKER recall <caught>/<seeded> (<n>%) overall recall <caught>/<seeded> (<n>%) rule attribution <n>% of caught seeds cited the right rule comments posted <n> (<n> carried a rule id) false positives <n> on seeded/clean/** …
A review system fails in three ways, so the score has three numbers:
| Number | What it counts | The failure it catches |
|---|---|---|
| Recall | planted defects flagged at the expected severity or higher | missing real problems |
| False positives | comments on seeded/clean/** | flagging correct code |
| Attribution | caught defects that cited the correct rule id | right problem, wrong rule, so the per-rule numbers are wrong |
BLOCKER recall and false positives are the evidence a rung promotion asks for. --json prints the full report, with the totals under totals (totals.blocker_recall, totals.false_positives_on_clean). --history <file>.jsonl appends each run, so recall has a trend. The scorer reads the severity prefix, not the vendor, so comparing two reviewers on the same code is one run per reviewer.
The seed canary repeats this weekly against a canary repository. It fails when BLOCKER recall is below 100% or any false positive appears. Nothing else catches a reviewer that quietly stopped working: a repository with no findings looks identical to one with no defects, and a model upgrade can move you from one to the other without anyone changing a rule.
Findings from other scanners
CodeQL, Snyk, Semgrep and similar tools each have their own severity words and their own dashboard, so nobody sees the whole picture. The collector also reads the open code-scanning alerts those tools upload to GitHub, and shows them beside Redline's findings in one severity vocabulary.
Redline never runs a scanner, and no repository is asked to change which ones it runs. metrics collect --skip-sarif leaves them out.
- Always kept apart. Rule tuning reads Redline's findings only. Mixing in another tool's output would tune Redline's rules on that tool's noise. Each ingested finding keeps its tool name and the tool's own rule id, and the dashboard's Finding sources table lists each tool on its own row.
- Measured, never gating. An ingested finding never blocks a merge, at any rung. Gating on another tool's output would make Redline responsible for its false positives.
scripts/validate.mjsfails the build if the gate workflow ever reads code scanning. - Severity is mapped, and the original kept. Each finding records both the mapped severity and the tool's own word, using this table:
| Their word | Redline severity |
|---|---|
| error, critical, high | BLOCKER |
| warning, medium, moderate | HIGH |
| note, none, low, info, informational | SUGGESTION |
| anything unrecognised | SUGGESTION, and reported |
An unrecognised word becomes SUGGESTION, never BLOCKER. A wrong BLOCKER teaches people the numbers are noise; a wrong SUGGESTION is one line in a report.
Cost and value
Showing that review catches defects is half the case. The other half is what it cost. A cost-management tool knows spend but has no findings. Redline knows which findings were acted on, so it can put the two side by side: cost per BLOCKER caught, which is spend divided by BLOCKER findings acted on.
Value counts what was acted on, not what was reported. Counting ignored findings would let the return be inflated by producing more noise.
# from the redline-metrics repository, with the CLI built $ node dist/bin/redline.js metrics roi --data data --days 90 --spend-total 850 --spend-grain org --spend-source "vendor usage report, Q3"
It writes roi.html, a page a finance stakeholder can read, and roi.json. You supply the spend from the assistant vendor's own usage reporting: nothing reads a billing API, and nothing is estimated.
| Flag | Meaning | Default |
|---|---|---|
--spend-total | AI spend for the window | none |
--spend-grain | whether the figure is per repository or organisation-wide | org |
--spend-source | where the figure came from, recorded with it | none |
--spend-currency | currency of the total | USD |
The page also reports delivery figures from the merged pull requests the collector already reads; nothing new is added to a product repository. Each figure that cannot be sourced says so:
- An org-wide spend figure does not answer a per-repository question. Org spend divided by repository count looks precise and is invented.
- Deployment frequency is “unknown, not zero” where a repository does not use GitHub's deployments API. Assuming one deploy per merge would report a trunk-based team and a quarterly-release team as identical.
- Mean time to restore is always shown as missing, with the reason: it needs an incident feed Redline does not have.
- Change failure rate carries a caveat. It is a lower bound: a revert or hotfix is evidence of a failed change, not proof, and a team that fixes forward without saying “hotfix” scores better than one that labels honestly.
Related
redline metrics: every subcommand and flag.- Seeded corpus: the planted defects and the clean files.
- Who runs what: which repository each job lives in.