Lint in CI with the shared Conker policy - #1
Merged
Merged
Conversation
Adds Pi's ruff.toml policy with explained exceptions (FastAPI dependency defaults; three reviewed files whose loop closures run within the same iteration), runs pinned ruff in CI, and fixes the findings. Explanatory noqa comments are kept as plain comments. Caught by the test suite while doing this: ruff's SIM118 autofix turned `for key in current_price.keys()` into `for key in current_price`, but `current_price` is a sqlite3.Row, which iterates values. The spending price-integrity check now keeps `.keys()` with a comment explaining why. Refs Conker-AI/conker#52 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 Conker-AI/conker#52.
What changes
Caught while doing this
Ruff's SIM118 autofix changed
for key in current_price.keys()tofor key in current_price.current_priceis asqlite3.Row, which iterates values, so the spending price-integrity check broke and 19 tests failed. It's restored with a comment explaining why.keys()stays.Verification
scripts/mutation_check.py(not in CI): "invocation scope bypass" is not caught, also on main. The mutant is equivalent:require_current_dispatch_authorityre-checks scope at dispatch, so removing the route-level check still returns 403. This is defense in depth, not a vulnerability. The drill should mutate both layers before it can join CI.🤖 Generated with Claude Code