chore(quality): clear real CodeQL quality-scan findings - #17
Merged
Conversation
Fixes the handful of genuine (non-false-positive) findings from the GitHub Code Quality (CodeQL) scan; the rest are framework false positives (alembic revision/down_revision globals) or intentional patterns (keyword-only negative tests that call APIs positionally under pytest.raises(TypeError), BaseException handlers that re-raise, lazy per-function imports), which are dismissed on the Code Quality UI rather than changed. - tests/unit/test_trace_hitl.py: drop unused `datetime`/`timezone` import and the unused `langchain_core` binding from `pytest.importorskip`. - tests/unit/test_redaction_pii.py: import `Any` (used in a local annotation; latent F821 — harmless only because local annotations aren't evaluated). - scripts/demo_for_gif.py: f-string without placeholder → plain string. No behavior change. Full unit suite green. Co-Authored-By: Claude Opus 4.8 <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.
Summary
Triaged all 11 open GitHub Code Quality (CodeQL) rules on
mainand fixed the small set of genuine findings. Everything else is a framework false positive or an intentional pattern — dismissed on the Code Quality UI, not changed.Headline: no real bugs. The two
Error-level findings are intentional negative tests that call keyword-only APIs positionally underpytest.raises(TypeError)(with# type: ignore[misc]) to enforce the Flag-1 contract —test_emit_approval_record.py:61andtest_hitl.py:361.Fixed here (real, zero-behavior-change)
tests/unit/test_trace_hitl.py— drop unuseddatetime/timezoneimport + the unusedlangchain_core = pytest.importorskip(...)binding.tests/unit/test_redaction_pii.py— importAny(used in a local annotation; latentF821, harmless only because local annotations aren't evaluated).scripts/demo_for_gif.py— f-string without placeholder → plain string.Left as-is (dismiss on the Code Quality UI — no public API to do it programmatically)
revision/down_revision/branch_labels/depends_on— framework API globalsBaseExceptionasyncio.CancelledErroron task cancel — correctimport+fromselfself_innerin nested test classesVerification
ruff check .findings 9 → 2 (the 2 remaining are the pre-existing intentionalE402SDK_VERSION re-exports, unrelated).🤖 Generated with Claude Code