Repository navigation
Conversation
…ches, and the audit's regression tests The fixtures are small and written to be judged; the corpus is the other half of the regression suite: real repositories, one or more for every ecosystem profile, pinned to a commit. Nothing is recorded in the repository: `python -m corpus record DIR` writes what the validator says about each project (the project map, the results judged with --allow-unknown, and what strict judging adds), `python -m corpus diff BASE HEAD` compares two recordings, and the CI job records a pull request's head and its base over the same checkouts and shows what changed, which also runs every parser over real inputs each time. A crash, or a project not detected as the ecosystem it stands for, fails the job. tests/test_corpus.py checks the manifest offline; cli.report_dicts exposes the --format json shape. An audit of every project's results against its repository found 556 discrepancies, filed as upstream issues cpp-best-practices#180 to cpp-best-practices#290; the manifest names the open issues per project. tests/regressions/ holds 149 expected-failure tests over 93 of the issues (three more sit beside the code they test); a fix turns one into an unexpected success, which fails the suite until its decorator goes, and shows in the corpus diff of its pull request. haskell/cabal and rust-lang/cargo wait for cpp-best-practices#181 (quadratic unit ownership). History item 15. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 273 273
Lines 14063 14065 +2
Branches 1544 1544
=======================================
+ Hits 14031 14033 +2
Misses 32 32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
The regression corpus: real repositories, pinned, validated as they are, compared between branches, and audited against what is true in them.
What this adds
corpus/:projects.tomllists 233 GitHub repositories (one or more for each of the 44 ecosystem profiles, plus mixed-language ones), each pinned to a commit, with the ecosystems it stands for and the open issues about what the validator gets wrong on it. Nothing is recorded in the repository:python -m corpus record DIRfetches the checkouts shallowly (about 5 GB, cached under~/.cache/project_validator/corpus), validates them in parallel and writes, per project, the project map, the results judged with--allow-unknownand what strict judging adds (each check's status and the distinct "not read" reasons);python -m corpus diff BASE HEADsays what changed between two recordings, per project and per check.recordfails when a project crashes the extraction or is not detected as the ecosystem it stands for. The checkouts are git checkouts, not archives: an archive drops what.gitattributesexport-ignores, often.github/itself.corpus: records the pull request's head and, in a worktree, its base over the same checkouts, and puts the diff in the job summary; the head recording is an artifact. It fails only on a crash or an undetected ecosystem; what changed is for the review, since a change in what is recognised is meant to show there. Every run also exercises every parser over real inputs.tests/test_corpus.py(offline): every project is pinned, every ecosystem has a project that stands for it, the issue lists are numbers;shortfallsanddiffon a recording made by hand.cli.report_dicts: the--format jsonstructure as a function, used by the corpus.issueslists the open issues per project (226 of 233 projects have at least one).tests/regressions/: 149 expected-failure tests covering 93 of the issues, each asserting the right behaviour on a small project and marked@unittest.expectedFailure # upstream #N; the fix makes it an unexpected success, which fails the suite until the decorator goes. Three more sit in the modules of the code they test (dangling symlink crash,[[ ]]as a command, quadraticcovers()).Nothing in
project_validator/changes behaviour: the bugs are logged and pinned, not fixed.Decisions
haskell/cabalandrust-lang/cargoare left out of the manifest until ToolRun.covers()/owner() is quadratic in the units: monorepos take minutes (cabal, cargo > 10 min) #181 (quadratic unit ownership; they take more than ten minutes each).The largest classes found
[[ ]]tests and heredocs, customshell:wrappers,${PREFIX}tool, unknown composite actions,uses: ./([[ … ]]conditional expressions (also across lines) and array assignments are read as commands with a variable program #190 to Make variables are neither expanded nor reported unknown:$(GO) test,GO ?= godefaults, command-line overridesmake test FLAGS=…#197,uses: ./(the repository's own action) is never read:_local("./")yields "" and the path becomes "/action.yml" #210).$/same-repository references "not pinned", caller inputs of reusable workflows,&&/||returning booleans,continue-on-error, multi-line setup versions (action-pinning:$/.github/actions/xand$/.github/workflows/x.yml(same-repository references) are reported "not pinned" #209 to platform-matrix counts "default" as a version and the same version spelled two ways as two (1.22 vs 1.22.x, 3 vs 3.x, JDK default vs default, current vs current CS); 3.14t is folded into 3.14 #222).MIT + file LICENSEstub, -or-later, LICENSE-CODE/LICENSE-TEXT pairs, Data Packagelicenses, dist.ini #238, JVM test discovery is hard-wired to src/test/{java,kotlin} + @Test: JUnit 3 (guava-tests/test), Kotlin multiplatform jvmTest, @TestFactory, Groovy/Spock are missed #252 to XML schemas: DTD, NVDL and RELAX NG validation through a Gradle plugin are not recognised (docbook) #289).Part of the testing roadmap; the next step after this is fixing the issues, each fix removing a decorator and changing an expectation.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt