Skip to content

ci: make the mypy/ruff audits colour-proof and always run them clean (#4551) - #4552

Merged
squid-protocol merged 2 commits into
mainfrom
ci/4551-audit-false-pass
Oct 6, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
ci/4551-audit-false-pass

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #4551

  • mypy/ruff audits: --no-color-output/--color=never, NO_COLOR=1, colour env vars unset, ANSI stripped before parsing; fail loudly when the tool failed/reported errors but zero lines parsed.
  • pr_gates: mypy and ruff gates always run under env -i (matching version or not) and always print " used: ()".
  • Tests: tests/test_audit_colour_proof.py (FORCE_COLOR=3 fixtures; the mypy one fails before the fix) and a pr_gates env -i test.
  • Proof: FORCE_COLOR=3 TERM=xterm-256color pr_gates.py --fast --only lint audits prints "mypy used: mypy 2.4.0" / "ruff used: ruff 0.16.0" and passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR

…4551)

Audits pass --no-color-output/--color=never with a colourless env, strip ANSI
before parsing, and fail loudly when the tool failed but nothing parsed.
pr_gates always runs both under env -i and prints "<tool> used: <ver> (<path>)".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
@@ -0,0 +1,50 @@
"""#4551: the mypy/ruff audits must report known errors even when the caller forces colour."""

import importlib
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 6, 2026 08:32
@squid-protocol
squid-protocol merged commit f856e11 into main Oct 6, 2026
18 checks passed
@squid-protocol
squid-protocol deleted the ci/4551-audit-false-pass branch October 6, 2026 08:32
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.

mypy audit silently passes when FORCE_COLOR is set: ANSI output parses as zero findings; pr_gates skips env -i when versions match

2 participants