Skip to content

Lint in CI with the shared Conker policy - #1

Merged
alexeybe1kin merged 1 commit into
mainfrom
chore/lint-ci
Sep 25, 2026
Merged

alexeybe1kin merged 1 commit into
mainfrom
chore/lint-ci

Conversation

@alexeybe1kin

Copy link
Copy Markdown
Collaborator

Part of Conker-AI/conker#52.

What changes

  • Pi's ruff policy with explained exceptions: FastAPI dependency defaults, and three reviewed files whose loop closures are called within the same iteration.
  • Pinned ruff runs in CI; the findings are fixed, and explanatory noqa comments are kept as plain comments.

Caught while doing this

Ruff's SIM118 autofix changed for key in current_price.keys() to for key in current_price. current_price is a sqlite3.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

  • Linux: lint clean, 700 passed.
  • scripts/mutation_check.py (not in CI): "invocation scope bypass" is not caught, also on main. The mutant is equivalent: require_current_dispatch_authority re-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

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>
@alexeybe1kin
alexeybe1kin merged commit 9aba91d into main Sep 25, 2026
3 checks passed
@alexeybe1kin
alexeybe1kin deleted the chore/lint-ci branch September 25, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant