Skip to content

chore(code-quality): resolve P2 code scanning alerts#810

Merged
manavgup merged 3 commits into
mainfrom
chore/resolve-p2-code-scanning-alerts-805
May 23, 2026
Merged

chore(code-quality): resolve P2 code scanning alerts#810
manavgup merged 3 commits into
mainfrom
chore/resolve-p2-code-scanning-alerts-805

Conversation

@manavgup
Copy link
Copy Markdown
Owner

Summary

  • Resolve 35 P2 CodeQL code scanning alerts with comment/suppression additions only — zero behavioral changes
  • Add # type: ignore[empty-body] to all Protocol and ABC stub methods (16 alerts across storage.py, providers/__init__.py, events.py, ambient.py)
  • Add suppression comments for intentional side-effect imports and re-exports (alembic/env.py, llm_router.py)
  • Remove unused log logger and structlog import from ingest/service.py
  • Rename/annotate unused test variables (test_capture.py, test_wiki_service.py, test_conversation_fork.py)
  • Add file-level purpose comment to vulture_whitelist.py

Closes #805

Test plan

  • ruff check passes with no errors
  • ruff format --check passes with no reformatting needed
  • CI pipeline passes (lint, typecheck, test)

🤖 Generated with Claude Code

Comment thread alembic/env.py Dismissed
Comment thread src/wikimind/api/routes/ws.py
Comment thread src/wikimind/engine/events.py Fixed
Comment thread src/wikimind/engine/events.py Fixed
Comment thread src/wikimind/engine/providers/__init__.py Fixed
Comment thread src/wikimind/storage.py Fixed
Comment thread src/wikimind/storage.py Fixed
Comment thread tests/unit/test_capture.py
Comment thread tests/unit/test_wiki_service.py Dismissed
Comment thread tests/unit/test_wiki_service.py
Comment thread src/wikimind/storage.py
manavgup and others added 2 commits May 23, 2026 23:00
Suppress CodeQL false positives across 12 files with no behavioral changes:

- Add `# type: ignore[empty-body]` to Protocol/ABC stubs (16 alerts)
- Add suppression comments for side-effect imports (5 alerts)
- Add file-level explanation to vulture_whitelist.py (2 alerts)
- Rename unused test var `resp1` -> `_resp1`, add seed comments (5 alerts)
- Remove unused `log` + `structlog` import from ingest/service.py (1 alert)
- Add suppression comment for `await` in `contextlib.suppress()` (1 alert)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot force-pushed the chore/resolve-p2-code-scanning-alerts-805 branch from 1496048 to efa3c4f Compare May 23, 2026 23:00
@manavgup manavgup merged commit d45fba0 into main May 23, 2026
16 checks passed
@manavgup manavgup deleted the chore/resolve-p2-code-scanning-alerts-805 branch May 23, 2026 23:15
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.

chore(code-quality): resolve P2 code scanning alerts — protocol stubs, side-effect imports, test vars

2 participants