Remaining ruff violations keep CI lint gate red (ruff check . exits non-zero after PR #99) #100

Closed
opened 2026-08-14 06:13:45 +00:00 by Mark · 3 comments
Owner

Finding from kanban card t_cc6ee6c4 (fixit board). The fix for #97 (PR #99) hoisted the 5 PLC0415 imports to top-level, but the card acceptance criterion "ruff exits 0 across the repo" is still not met — the repo carries a large pre-existing ruff debt, so the CI lint job stays red even after the PR merges.

Reproduction steps

  1. git checkout fix/97-plc0415-imports (or main at b81dc67)
  2. From the backend dir, run the repo-wide lint: cd backend && ruff check .
  3. Run the CI lint job exactly as .forgejo/workflows/ci.yml does: cd backend && ruff check app/ --config ../pyproject.toml

Actual behavior

  • ruff check .: exit code 1 — Found 219 errors (ruff 0.15.17); 270 errors with ruff 0.16.1 (repo-root run during the fix).
  • CI lint command ruff check app/ --config ../pyproject.toml: exit code 1 — Found 326 errors (ruff 0.15.17); 368 errors with ruff 0.16.1.
  • PR #99 introduces no new errors (base b81dc67 had 275), but the gate still fails.

Expected behavior

  • ruff check . exits 0 across the repo; CI lint job (ruff check app/) passes.

Context

  • Kanban card: t_cc6ee6c4
  • Issue #97 "Fix the lint on osint-hub" — PR #99 closes it, but only covers the PLC0415 hoists
  • PR #99: #99
**Finding from kanban card t_cc6ee6c4 (fixit board).** The fix for #97 (PR #99) hoisted the 5 PLC0415 imports to top-level, but the card acceptance criterion "ruff exits 0 across the repo" is still not met — the repo carries a large pre-existing ruff debt, so the CI lint job stays red even after the PR merges. **Reproduction steps** 1. `git checkout fix/97-plc0415-imports` (or `main` at b81dc67) 2. From the backend dir, run the repo-wide lint: `cd backend && ruff check .` 3. Run the CI lint job exactly as `.forgejo/workflows/ci.yml` does: `cd backend && ruff check app/ --config ../pyproject.toml` **Actual behavior** - `ruff check .`: exit code 1 — Found 219 errors (ruff 0.15.17); 270 errors with ruff 0.16.1 (repo-root run during the fix). - CI lint command `ruff check app/ --config ../pyproject.toml`: exit code 1 — Found 326 errors (ruff 0.15.17); 368 errors with ruff 0.16.1. - PR #99 introduces no new errors (base b81dc67 had 275), but the gate still fails. **Expected behavior** - `ruff check .` exits 0 across the repo; CI lint job (`ruff check app/`) passes. **Context** - Kanban card: t_cc6ee6c4 - Issue #97 "Fix the lint on osint-hub" — PR #99 closes it, but only covers the PLC0415 hoists - PR #99: https://forgejo.tail018ac4.ts.net/Mark/osint-hub/pulls/99
Author
Owner

Bucket 4 of 5 complete: SIM/C/PLR/PLW/RUF/ISC/COM/PIE/RET/PERF → 0 errors at ruff 0.15.17.

PR: #114 (branch fix/100-ruff-sim-plr @ c81e024, 242 files)

Sibling PRs (already open):

  • PR #111 — S-rules (security)
  • PR #112 — F401/F811/E402/PLC0415/I001 (imports)
  • PR #113 — E/W (style)

AC satisfied: cd backend && ruff check . --select SIM,UP,PIE,RET,PERF,RUF,ISC,COM,C,PLR,PLW,B exits 0.
Tests: 935 passed, 1 skipped, 0 failed.

Verifier child t_7755ce59 (gated on this bucket + 3 siblings) is now unblocked and can run its convergence check after all 4 sibling PRs merge.

Bucket 4 of 5 complete: SIM/C/PLR/PLW/RUF/ISC/COM/PIE/RET/PERF → 0 errors at ruff 0.15.17. **PR**: https://forgejo.tail018ac4.ts.net/Mark/osint-hub/pulls/114 (branch `fix/100-ruff-sim-plr` @ c81e024, 242 files) Sibling PRs (already open): - PR #111 — S-rules (security) - PR #112 — F401/F811/E402/PLC0415/I001 (imports) - PR #113 — E/W (style) AC satisfied: `cd backend && ruff check . --select SIM,UP,PIE,RET,PERF,RUF,ISC,COM,C,PLR,PLW,B` exits 0. Tests: 935 passed, 1 skipped, 0 failed. Verifier child t_7755ce59 (gated on this bucket + 3 siblings) is now unblocked and can run its convergence check after all 4 sibling PRs merge.
Author
Owner

PR #126 opened — fix/100-ruff-autofixes-rebased is the rebased-onto-current-main successor to draft PR #125. Head 0c83e23c, mergeable=true.

Acceptance (card-spec gates):

$ cd backend && ruff check .                          # All checks passed!
$ cd backend && ruff check app/ --config ../pyproject.toml  # All checks passed!

Test results: 18 failed, 1279 passed, 5 skipped, 490 deselected — same 18 failures as baseline git stash (without my changes); pre-existing on main, not introduced by this PR.

Residual addressed:

  • PLR0917 too-many-positional-arguments: 51 → 0
  • F401 unused-import: 103 → 0 (config-duality fix via path-glob **/app/...)
  • PLC0415 import-outside-top-level: 13 → 0 (per-file-ignores for lazy-import patterns)
  • I001 unsorted-imports: 18 → 0 (isort.known-first-party = ["app"])

Out-of-scope: ruff format --check app/ remains RED on main (129 files unformatted) and on this branch (117). Card acceptance does not include the format gate — that's a separate, larger lane.

Draft PR #125 closed; this is the new contract.

Refs #100

**PR #126 opened** — `fix/100-ruff-autofixes-rebased` is the rebased-onto-current-main successor to draft PR #125. Head `0c83e23c`, mergeable=true. **Acceptance** (card-spec gates): ``` $ cd backend && ruff check . # All checks passed! $ cd backend && ruff check app/ --config ../pyproject.toml # All checks passed! ``` **Test results**: `18 failed, 1279 passed, 5 skipped, 490 deselected` — same 18 failures as baseline `git stash` (without my changes); pre-existing on main, not introduced by this PR. **Residual addressed**: - PLR0917 too-many-positional-arguments: 51 → 0 - F401 unused-import: 103 → 0 (config-duality fix via path-glob `**/app/...`) - PLC0415 import-outside-top-level: 13 → 0 (per-file-ignores for lazy-import patterns) - I001 unsorted-imports: 18 → 0 (`isort.known-first-party = ["app"]`) **Out-of-scope**: `ruff format --check app/` remains RED on main (129 files unformatted) and on this branch (117). Card acceptance does not include the format gate — that's a separate, larger lane. Draft PR #125 closed; this is the new contract. Refs #100
Author
Owner

PR opened: #128 (fix/ruff-autofix-wave1 → main).

Both card-spec ruff gates exit 0 locally:

  • cd backend && ruff check . → All checks passed!
  • cd backend && ruff check app/ --config ../pyproject.toml → All checks passed! (this is the CI-exact command)

CI backend-lint job is GREEN on the ruff check step. The ruff format --check sub-step is RED with a pre-existing failure on origin/main — flagged in the PR description; tracking in a follow-up card on the fixit board.

PR opened: https://forgejo.tail018ac4.ts.net/Mark/osint-hub/pulls/128 (`fix/ruff-autofix-wave1` → main). Both card-spec ruff gates exit 0 locally: - `cd backend && ruff check .` → All checks passed! - `cd backend && ruff check app/ --config ../pyproject.toml` → All checks passed! (this is the CI-exact command) CI `backend-lint` job is GREEN on the `ruff check` step. The `ruff format --check` sub-step is RED with a pre-existing failure on origin/main — flagged in the PR description; tracking in a follow-up card on the fixit board.
Mark closed this issue 2026-09-12 16:43:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/osint-hub#100
No description provided.