Repository navigation
ci: a corpus-drift job checks the vendored corpus against its committed baseline (#1034) - #1078
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
niko86
force-pushed
the
ci/corpus-drift-1034
branch
from
October 11, 2026 17:43
799d6ed to
674f1ec
Compare
…ed baseline (#1034) A validator change that moved findings over the vendored python-ags4 fixtures merged green, because nothing in this repo ran corpus-qa's baseline --check. The new corpus-drift job does, path-filtered on what can move the verdict, and tools/check_corpus_drift.py prints an every-run summary line and, on drift, each moved fixture with its findings and the re-freeze command. The baseline README and the corpus-qa wiki page no longer claim CI that did not exist, and the required-checks fixture lists the new context.
niko86
force-pushed
the
ci/corpus-drift-1034
branch
from
October 11, 2026 18:50
674f1ec to
f119669
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A validator change that moved findings over the vendored python-ags4 corpus merged green, because nothing in this repo ran corpus-qa's
baseline --check. The only runner was the dev satellite'scompliance.yml, against its own older copy of the crate and its own baseline. This PR adds acorpus-driftjob toci.yml. A PR that moves findings now has to re-freezepyags4-vendor.jsonin the same PR.What changed
.github/workflows/ci.ymlcorpusfilter in thechangesjob, published aschanges.outputs.corpus. It covers:cargo tree -p laterite-ags4-validatornames no other laterite crate);laterite-ags4-hostopts, which parses the--dict-versionthe baseline is captured under;rust-packages/Cargo.lock;ci.ymlandbuild-accel.corpus-driftjob with the same!cancelled()/ filter-failed-means-runif:asrust/test.laterite-ags4-corpus-qa(debug, sccache via build-accel).crawl --root <fixtures> --all … -q, thenbaseline --check <baseline> --show-warnings --show-fyi --no-check-files … --no-input, both with--json.baseline --checkis captured, so the summary line still prints when the check is red.tools/check_corpus_drift.py(new, stdlib) turns the two JSON outputs into the verdict:corpus-drift: N files checked (M by content), walk_skipped …, not selected …, copy errors …, only_in_committed …, only_in_current …, changed …. "not selected" counts files under the fixture root that the crawl did not take (today that isPROVENANCE.md).-removed /+added findings, and prints the re-freeze commands (--outin place of--check). It exits 1.baseline --checkis passed through, and the summary still prints.tests/test_check_corpus_drift.py(new) drivesreport()through clean, drift, added/severity, only-in-either-side, exit/JSON disagreement, an errored check, and walk-skip/copy-error counts.tests/test_paths_filter.pycorpusfilter must fire on a validator-only, parse, reference, types, corpus-qa, baseline, fixture, lockfile and script path.web/, the docs site, the wiki,laterite-nodeor forge'ssrc/..github/rulesets/main-protection.expected.jsonlistscorpus-drift(withintegration_id: 15368, like the other Actions contexts).rust-packages/laterite-ags4-corpus-qa/baselines/README.mdcompliance.yml, and "what CI runs").corpus-driftjob, its trigger and the skip behaviour, and keeps the local check and re-freeze instructions.ags-wiki/tools/laterite-ags4-corpus-qa.mdsaid this baseline was--checked per-PR in the satellite'scompliance.yml. That was false for this tree. It now names the job and the script.unreleased.added, withCHANGELOG.mdregenerated.Acceptance criteria
web/-only PR skips it, and the skip satisfies the required check.test_corpus_fires_on_what_moves_findings/test_corpus_skips_what_cannotpin the filter.if:shape asrustandtest. A job skipped byif:reports success to a required check.ci.yml, socorpus-driftruns on this PR itself.test_an_errored_check_still_prints_the_summary,test_a_verdict_that_disagrees_with_the_exit_code_is_refused).test_every_executed_tool_fires_its_joband the rest ofpytest testspass. The buildless subset as CI runs it: 899 passed, 26 skipped.main-protection.expected.json. See the maintainer action below.Fail-first evidence
run:block, run locally, extracted fromci.ymlwithRUNNER_TEMPpointed at a scratch dir:AGS Format Rule 8 LOCA L76 f1entry of4.1-rule8-1.ags, restored withgit checkoutafterwards): exit 1.tests/test_check_corpus_drift.pywas run before the tool existed: all 9 cases errored on the missing module.test_paths_filter.pycases were run againstci.ymlwithout thecorpusfilter: 15 failed (14 for the missing filter, 1 for the stale series count). With the filter, 88 passed._matcheswas compared with the realpicomatch4.0.7 (dot: true) over 1868 paths x 62 patterns: zero mismatches. It was falsified first: a planted_matchesinversion on.rspaths gave 14136 mismatches.Maintainer action at merge: the live ruleset
Add the status check
corpus-drift(source: GitHub Actions) to the livemain protectionruleset (19425032). Until then it gates nothing.How the nightly
ruleset-driftbehaves while the fixture is ahead of the live ruleset.normalize.jqand diffs them. The only difference is thecorpus-driftentry (checked locally against the live ruleset withgh api).ruleset-driftjob fails, and the nightly tracking issue picks that up. This is expected until the ruleset is updated.::error::text suggests regenerating the snapshot from the live ruleset. Don't follow that here: it would delete the new entry. Add the check to the live ruleset instead.integration_id: 15368(that is, without choosing GitHub Actions as the source), the nightly diff will show exactly that field. Either re-add it with the source set, or regenerate the snapshot once the check is live.Gates run
tools/check_changelog.py --base origin/main: OK (no shipped surface).ruff check .: clean.ruff format --check .: clean.ty check: clean.pytest tests -m "not needs_env" -o addopts="" -p no:benchmark: 899 passed, 26 skipped.check_doc_refs.py --check: OK.check_issue_refs.py: OK.gen_changelog.py --check: OK.gen_crate_graph.py --check: OK.gen_wiki_tables.py --check: OK.reindex.py --check: OK.lint.py --since origin/main: clean.actionlint: no new findings (one pre-existing SC2046 in another job).Closes #1034