The factory scorecard counts each merge batch once in its red rate, not every re-run (GST-4128) (#4880)

The factory scorecard's red rate now counts each tested batch of PRs
once, by its branch, so re-testing the same batch (a bisect or a
rebuild) no longer moves it.

Why: a red batch that was bisected and rebuilt added extra runs to both
the red count and the total, so the rate could swing without any new
batch running (#4767).

Nothing to do: the row's name, its target and the published week's
number (1 red of 22, recounted) stay the same.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-28 16:34:00 +00:00
1 parent 5bf787370c
commit e8319ea59a
4 files changed
+30 -4

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ measured later does not count anything that happened after that week.
| Review passes per PR | the largest count `--pass-marker` captures in the PR body (the ship receipt's `"passes": N` once /gstack-ship writes it) or a PR comment (`passes=N`, `REVIEW_PASSES: N`), median and p90, plus how many PRs reached `--pass-cap` (2, the [review policy](../../docs/review-policy.md)'s cap of two rounds, a fix-check included: pass 1 reviews the whole diff, pass 2 only the range since, and a pass that finds nothing blocking is the exit) | median 1 pass; few at the cap |
| Gate runs green / red / cancelled | completed runs of the gate workflow (`workflow_dispatch` by default; `--gate-event any`); cost from the run's `report-verdict-a*` artifact (`collector-outcomes.json` `.verdict.costUsd`), else the `**$N** rule/judge cost` or `cost=$N` line of the PR's verdict comment | green on 95%+ of runs, cancelled near 0, cost known for every run |
| Known gate cost per merged PR | known cost / merged PRs; unknown-cost runs make it a floor | known, stable or falling week over week |
| Red-train rate | runs whose head branch starts with `--train-prefix`, cancelled excluded; red = conclusion other than success; red backstops and screens shown beside it | under 5% (each red train is a bisect plus a rebuild, about two gates) |
| Red-train rate | distinct head branches starting with `--train-prefix`, each counted once, since a train's bisect and rebuild run on its own `train/<nonce>` branch; cancelled runs excluded, and a branch with only cancelled runs left out; a train is red when any of its non-cancelled runs did not succeed, even if a later rebuild did; red backstops and screens shown beside it | under 5% (each red train is a bisect plus a rebuild, about two gates) |
| Flaky events | `flake-records-a*` records of the newest gate runs (count, known rerun spend) and `flake-ledger-*` entries of free runs on the default branch; a run whose artifacts cannot be read is counted and named, never scored 0, and a main push that reused its pull request's run (no shard artifacts, `reuse` job green) is left out and named | 0 repeat cases; under 1 flaky case per 10 gates; free retries under 1% of runs |
| Issues opened / closed | GitHub search, created and closed in the window | closed ≥ opened; nothing severe older than a week |
| Releases cut | releases published in the window, drafts excluded | at least one tagged release a week, on schedule |