Gate CI on new rustqual findings against the base commit
Replace the committed-baseline gate in just qual-ci with qual diff from T-0yh5frr. CI analyses the tree it builds and its base in the same job, and reports only the findings that are new.
Closes T-0yb2pgw: a baseline produced in the same run can't go stale, and it always shares a base with the measured tree.
qual is temporary: T-1dhk659's follow-up folds it into a vendored rustqual. Keep the recipe a thin call to the gate binary, so swapping qual diff for rustqual's own command later touches only that call.
Base revision
pull_request: the checkout isrefs/pull/N/merge, so the base isHEAD^1, the same parent thechangesjob already diffs against.pushtomain: the base isgithub.event.before. On a new branch, wherebeforeis all zeros, there's nothing to compare: analyse only, and fail only on enforced rules.- The
qualtask's checkout needs enough history to reach the base.fetch-depth: 2covers pull requests; on push, fetch thebeforesha explicitly.
Output
::errorannotations for new findings only, so GitHub's display cap no longer hides the regression behind existing findings.- The full new-findings table, with guidance, in
$GITHUB_STEP_SUMMARY. - On success, one line: the head and base counts per pass.
Remove
.config/rustqual/baseline.json,baseline-dry.jsonandregressions.jq.- The
qual-baselinerecipe. - The canary in
qual-ci. The fail-closed behaviour is covered by unit tests in thequalcrate, which move with it into rustqual. - Check the
justfile, the configs anddocs/for any other references to the baselines. Keepjust qualas the exploratory entry point.
Comments
- From: jp
- Date: 2026-11-11T08:22:12Z
Two things differ from the description:
- No-base case:
qual reportdoes not fail on enforced-rule findings, soqual diff --base <rev>accepts git's null object ID (40 or 64 zeros) as "no base": it analyzes only the working tree and fails only on enforced rules. The workflow passesgithub.event.beforethrough unchanged, without branching on the null object ID in shell or workflow YAML. - History on push: fetching only the
beforeSHA on top of afetch-depth: 1checkout leavesgit merge-base HEAD <before>without a common ancestor, so thequaltask usesfetch_depth: '0'on push and'2'on pull requests.
If a force-push to main leaves the previous tip unreachable in the clone, git merge-base fails and qual exits with code 2, failing the job.
- From: jp
- Date: 2026-11-11T15:09:42Z
Verified after merge (#1319): the qual job ran on the push to main, with the full checkout and github.event.before as the base, and failed a pull request on a probe finding with an ::error annotation on its line. qual is a required status check on main.