Skip to content

Gate releases on a live benchmark regression check - #125

Merged
morgaesis merged 1 commit into
mainfrom
bench-release-gate
Jul 30, 2026
Merged

Gate releases on a live benchmark regression check#125
morgaesis merged 1 commit into
mainfrom
bench-release-gate

Conversation

@morgaesis

Copy link
Copy Markdown
Contributor

The release workflow runs the live diff-file benchmark and compares it against a committed baseline, and the build job depends on that comparison, so a review-quality regression blocks the release. The comparison gates authored-target detection rate, false and unrelated finding counts, gate-verdict correctness, mean provider cost per case, and p95 latency, and fails loudly when the fixture corpus hash no longer matches the baseline so a stale comparison cannot pass quietly; re-baselining is a deliberate documented step. The baseline records a real run of the current binary over all seventy fixtures at $0.29 of provider cost: 55 of 57 authored-target detections, four false positives, 76.8 percent gate-verdict correctness, and p50/p95 latency of 4.5 and 48.6 seconds, the last of these lower than detection rate because it also penalizes a must-block defect reported at warn.

Add bench/src/compare-baseline.ts and a bun run bench:compare script that
compares a diff-file live benchmark run against a committed bench/baseline.json:
authored-target detection rate, false/unrelated finding count, gate-verdict
correctness (does the CLI's exit code agree with the authored must-block
classification), mean provider cost per case, and p95 latency. Tolerances are
loose enough to absorb ordinary run-to-run inference variance from a single
nondeterministic model call per case, but catch a real regression; a fixture-
corpus or evaluator-source hash mismatch fails loudly instead of silently
comparing against a stale baseline. --record is the only path that writes
baseline.json, keeping re-baselining a deliberate operator action.

Wire a bench-live job into the release workflow, between tag validation and
the build matrix, that builds the plain release binary, runs the full 70-
fixture corpus against z-ai/glm-5.2 through bench:live, and blocks the release
on bench:compare exiting non-zero.

bench/baseline.json is populated from a real live run against this worktree's
binary (70 cases, $0.29 provider cost): 55/57 authored-target detections,
4 false positives, 76.8% gate-verdict correctness, and p50/p95 latency of
4.5s/48.6s.

@postil-dev postil-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info 1 advisory finding open
1 finding in review details

  • PR description claims p95 latency is lower than detection rate in pull request description: The description says 'p50/p95 latency of 4.5 and 48.6 seconds, the last of these lower than detection rate because it also penalizes a must-block defect reported at warn.' The 'last of these' refers to p95 latency (48.585s per bench/baseline.json line 21), but 48.585 seconds is not 'lower than' the detection rate of 0.965 (line 15) — the units are incomparable. The explanation about penalizing a must-block defect applies to gate-verdict correctness (76.8%, line 17), which is indeed lower than detection rate (96.5%). The sentence as written contradicts baseline.json. Fix the referent: clarify that gate-verdict correctness, not p95 latency, is lower than detection rate because it penalizes must-block defects reported at warn.

Review details

@morgaesis
morgaesis merged commit 2ddbff3 into main Jul 30, 2026
10 checks passed
@morgaesis
morgaesis deleted the bench-release-gate branch July 30, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant