Consume the dead-code gate from ops instead of vendoring it - #22
Merged
Merged
Conversation
…b417ty) The vendored copy reported success when vulture was absent. It is now a pinned pre-commit hook from offworldlabs/ops, so there is one copy and the gate fails closed.
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.
Part of 86cb417ty. Same change as the merged pilot, retina-analytics#13.
Why
tools/check-dead-code.shreported success whenvulturewas not onPATH— the shell's command-not-found went to/dev/nulland|| truediscarded exit 127, so the gate printedno dead code foundand exited 0. It only ever produced false passes, so nothing surfaced it until CI disagreed with a local run.The header also claimed a canonical copy lived in
offworldlabs/ops. It never did: the file was vendored byte-identically in six repos with no upstream, so there was no single place to fix it.What changed
opsis now a pre-commit hook repository, and this repo pins it:The vendored copy is deleted. The
rev:pin is the source of truth, so drift is impossible rather than merely detectable — the mechanismclaude-shared's scaffold already uses for ruff. Future fixes reach every repo by bumping one line;pre-commit autoupdatedoes that for you.The gate now fails closed: absent vulture exits 127 naming the tool.
Not in scope
ruff stays a separate CI step. Aligning these repos with
claude-shared'sci-python.ymlis worth doing but belongs in its own ticket, not a bug fix.Verification
pre-commit run --all-files→dead code (vulture)....Passed, exit 0, no findings. UpstreamopsCI runs the gate's 9-test suite pluspre-commit try-repo, withREQUIRE_VULTURE=1so a broken vulture install fails the job instead of silently skipping.🤖 Generated with Claude Code
https://claude.ai/code/session_013ZcazeseXVpu8XrYA2tE1V