ci: gate dead-code detection with vulture#921
Merged
Conversation
Add a dead-code job to CI that runs `just deadcode`, so a regression that introduces unused code fails the build. The job pins a single Python version because vulture's analysis is version-independent. Also whitelist a justifiability fixture field that landed after the initial vulture setup, so the new gate starts green. The field is set through a constructor keyword and serialized to the fixture JSON, never read by attribute, which vulture cannot see.
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.
What
Follow-up to #915 (which added vulture and a curated whitelist). This wires vulture into CI so a regression that introduces dead code fails the build.
dead-codejob to.github/workflows/ci.ymlthat runsjust deadcode.just check, so localjust checkstays fast and a contributor working on an unrelated change is not surprise-failed mid-work; CI is where the gate is enforced.ubuntu-latest(lightweight; the macOS runners are reserved for the SNARK-heavy filler).is_justifiable, that landed onmainafter chore: add vulture dead-code detection and remove findings #915 merged. It is aJustifiabilityOutputPydantic field set through a constructor keyword and serialized to the fixture JSON, never read by attribute, so vulture cannot see the use. Adding it keeps the new gate green and demonstrates the intended maintenance flow for the tight whitelist.Verification
just deadcode→ clean (exit 0)just check→ passes (whitelist stays excluded from ruff and ty)