Skip to content
SprecherEast
Issue 928

chore: log every firing of the performance checks as right, false alarm or missed

Back to our plan
Open
ciprocesstoolingpriority: medium

A check that fires too often gets ignored, and one that misses gives false comfort. This records, for every pull request, whether each performance check got it right, raised a false alarm or missed a real slowdown, using the same verdicts and counting script the browser-test gate already uses, so we can tune the checks from facts.

Problem

The browser-test gate is measured: its job log prints one greppable summary line, the reviewer writes false alarm or Misses in the review, and scripts/measure-ui-gate.mjs replays merged PRs through the gate. The new performance checks (the shared detector, the page-speed, bundle and query budgets) have nothing like it yet.

Proposed fix

  1. One format for every gate. Each performance job ends its log and job summary with one line in the same shape as e2e-gate: (gate name, decision, result, the files or pages that counted, measured value vs budget for a failure).
  2. The verdict. pr-review's performance section (from the fast-code rule issue) gives each firing one word: right, false alarm, or missed. Use the same words for the browser-test gate, so one tally covers every gate.
  3. The tally. Generalize scripts/measure-ui-gate.mjs into one read-only script that, for the last N merged PRs, reads each gate's summary line from the job logs and the verdict words from the reviews, and prints one line per PR and gate, plus totals. Don't write a second script beside it (guard rail 1).
  4. Where the log lives. The PR reviews and job logs are the record; the script reads them. A short periodic summary (counts and what was tuned) goes on this issue's epic or the milestone as a comment, at the chief of staff's sweep.
  5. Tuning. A false alarm or a miss with a clear cause gets a fix to the detector's paths or the budget, in its own PR, listing the verdicts that justify it.

Acceptance criteria

  • Not done: Every performance job prints the shared summary line; a test checks the format
  • Not done: pr-review uses the three verdict words for all gates, browser-test gate included
  • Not done: One measurement script covers all gates; the old one is replaced, not kept alongside; tests cover reading a line and a verdict
  • Not done: Run on the merged PRs since the checks went live, with the result posted on this issue
  • Not done: docs/guidelines/development.md names where the counts come from, in one sentence

Files likely touched

scripts/measure-ui-gate.mjs (generalized, possibly renamed), the performance jobs' last step in .github/workflows/ci.yml, .agents/skills/pr-review/SKILL.md, docs/guidelines/development.md.

Must not touch

What the gates decide (the detector and the budgets have their own issues).

Open questions

  • Reading verdicts from review text is fragile. If the tally misses verdicts, would a fixed line in the review (for example Gate verdict: <gate> <word>) be acceptable? Decide from the first tally, and if a fixed line is needed, add it to pr-review as a policy change.
See it on GitHub, opens in a new tab