Merge fix/annotation-tidy-t_5df1a1a4 -> main #141

Closed
Mark wants to merge 1 commit from fix/annotation-tidy-t_5df1a1a4 into main
Owner

Auto-opened batch merger.

Auto-opened batch merger.
fix(mypy): clear Annotation-debt bucket for in-scope codes (closes #117)
Some checks failed
CI / Frontend Lint (pull_request) Failing after 23s
CI / Frontend Tests (pull_request) Has been skipped
CI / Backend Lint & Format (pull_request) Failing after 30s
CI / Golden Fixture Validation (pull_request) Has been skipped
CI / Backend Tests (pull_request) Has been skipped
CI / Backend Security Tests (pull_request) Has been skipped
CI / Dependency Security Scan (pull_request) Has been skipped
Stress Tests / Stress & Pipeline Tests (pull_request) Failing after 6s
Stress Tests / Full Data Pipeline Validation (pull_request) Has been skipped
Performance Regression Tests / Performance Regression Detection (pull_request) Failing after 2m18s
CI / Frontend E2E Tests (pull_request) Has been skipped
Performance Regression Tests / Compare with Baseline (pull_request) Has been skipped
CI / All Checks Passed (pull_request) Failing after 1s
7e9a485ab8
Sub-issue of #109 (umbrella mypy debt). Tries to close out 165 mypy errors
classified as Annotation-debt for in-scope error codes [misc], [arg-type],
[valid-type] per the per-error artifact produced by t_32c522a2.

Fixes
------
1. app/modules/base.py: declare EvidenceModule.name / description /
   requires_config as ClassVar (single 3-line edit). Cascades to clear
   158 [misc] 'Cannot override instance variable with class variable'
   errors across every EvidenceModule subclass.

2. Six [arg-type] SQLAlchemy order_by typing gaps. Fix by
   cast(ColumnElement[Any], <model column>) at the use site:
   - app/services/investigations/state_machine.py:149
     InvestigationCheckpoint.step_number
   - app/services/investigations/async_executor.py:98
     InvestigationTask.created_at
   - app/services/investigations/orchestrator_enhanced.py:327
     EntityActionQueue.created_at
   - app/services/investigations/orchestrator_v3_llm.py:767
     InvestigationStep.step_number (legacy Query overload)
   - app/routers/investigations.py:861 InvestigationTask.created_at
   - app/routers/investigations.py:889 EntityActionQueue.created_at

3. app/modules/registry.py:237 [valid-type] 'Function builtins.any is
   not valid as a type' — replace builtin 'any' with typing 'Any' and
   import it.

Out of scope (per parent card body)
-----------------------------------
[assignment], [return-value], [attr-defined], [call-arg] — these codes
are entirely Real-bug bucket; sibling card t_43df672f and issue #116
own those fixes. Annotation-debt rows whose code is [var-annotated],
[no-any-return], [index], [call-overload], or [override] are
explicitly excluded by the card body's 'stay within scope' clause and
require separate decomposition.

Verification
------------
- cd backend && mypy app/ --config-file ../pyproject.toml: 666 -> 498
  errors (net -168; +41 sibling R-bucket errors unmasked by mypy's
  per-statement short-circuit when the A-bucket error was removed; no
  new errors introduced — see commit-message notes / artifact diff).
- All 165 A-bucket in-scope rows in mypy_classification.json (t_32c522a2
  workspace artifact) are no longer reported at their original file:line.
- All 165 artifact rows verified against post-fix log via the
  fuzzy-match script in /tmp/verify_a_remaining.py.
- 77 unit tests pass for app/modules/base.py + app/modules/registry.py.
- 48 unit tests pass across state_machine / async_executor /
  orchestrator / investigations modules.
- ruff check on touched files: 88 -> 88 (no new ruff errors;
  pre-existing ruff debt on origin/main is owned by #100).

Refs #109, #117
Mark closed this pull request 2026-09-21 01:09:04 +00:00
Some checks failed
CI / Frontend Lint (pull_request) Failing after 23s
CI / Frontend Tests (pull_request) Has been skipped
CI / Backend Lint & Format (pull_request) Failing after 30s
CI / Golden Fixture Validation (pull_request) Has been skipped
CI / Backend Tests (pull_request) Has been skipped
CI / Backend Security Tests (pull_request) Has been skipped
CI / Dependency Security Scan (pull_request) Has been skipped
Stress Tests / Stress & Pipeline Tests (pull_request) Failing after 6s
Stress Tests / Full Data Pipeline Validation (pull_request) Has been skipped
Performance Regression Tests / Performance Regression Detection (pull_request) Failing after 2m18s
CI / Frontend E2E Tests (pull_request) Has been skipped
Performance Regression Tests / Compare with Baseline (pull_request) Has been skipped
CI / All Checks Passed (pull_request) Failing after 1s

Pull request closed

Sign in to join this conversation.
No reviewers
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!141
No description provided.