Loading
Score approvals against the pilots' approval rules, and each case once
Stacked on !102 (merged). Fixes what a review of bin/eval from !97 (merged) found in how it scores a run.
What does this MR do and why?
- Approval rules.
approval_ruleskeeps gitlab-bot from approving some low bumps on the pilot projects, so a flow with that step was scored as missing approvals it was right to withhold. 4 of the 14 low-labelleddeps-pilotscases are stopped by one: bench-167 (goreleaser), bench-107 (a minor bump on a patch-only project), es-indexer-859 and es-indexer-865 (gitaly).- Each deps case names the rule that stops it as
approval_rule, in the wordsapproval_rulesuses. - Like
upstream, it binds only a variant whose flow has the step, whichmeta.jsonnow records. There, approving such a case is a wrong approval, and "Approvable cases approved" leaves it out. spec/eval/suites_spec.rbrunsApprovalRules.reason_foron every saved deps case, so a change to the rules fails the spec until the suite follows it.
- Each deps case names the rule that stops it as
- By case. A new section counts each case once, however many of its passes went wrong, says how many of the wrong ones hang on a provisional label, and gives the exact binomial upper bound, at 95% confidence, on the rate of wrong cases. A suite of a couple of dozen cases with none wrong still leaves a rate in the teens possible, and the report now says so.
- Upstream stage. "As expected" is split into "Judge as expected" (
keep,raise) and "Fetch as expected" (check,incomplete). A run replays the fetch from saved output, so the second shows only that the flow reads that output as the fetch wrote it. - Summary. "Unlabelled approved" counts approvals of cases with no labels, whose tier nothing checks. "Unstable cases" is
n/aafter a single pass. - The README's
deps-upstreamexample runs the default three passes, since the judge's answer varies.
Effect on an earlier run
Rescoring a three-pass deps-pilots run of the working tree's flow, with approval_rules recorded for its variant, "Approvable cases approved" goes from 27/39 to 27/27: the 12 misses were the four stopped cases' three passes. By case shows 0/23 cases approved wrongly, up to 12%. A results directory written before this MR has no approval_rules in meta.json, so it scores as it did.
Not in this MR
- Confirming the provisional labels, which needs the rubric's owner.
- More borderline cases that must not be rated low, such as runtime dependencies below 1.0 and minor bumps of auth or crypto libraries. Each needs a label and
bin/eval snapshot. - Labels from outcomes, such as reviewer overrides and reverts, which gitlab-org/gitlab#637889's sample is for.
How to set up and validate locally
make checkruby bin/eval score .scratch/evals/<run>rewrites an existing run'sreport.mdwith the new sections. It reads each session's recorded model, and makes no model call.