mypy: fix Annotation-debt bucket (165 errors / 65 files) — in-scope codes #117
Labels
No labels
agentic-osint
audit
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:preflight
blocked:verify-failed
bug
chore
deferred
enhancement
feature-request
in-progress
lint-baseline
lint-cleanup
needs-decompose
needs-triage
performance
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/osint-hub#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix all Annotation-debt mypy errors in the Mark/osint-hub backend (165 errors across 65 files at origin/main @
9931443, in the categories [misc], [arg-type], [valid-type]). Apply annotation-only fixes (no# type: ignoreblanket ignores): tighten type annotations, addcast(...)at SQLAlchemy boundary typing gaps, or introduce ClassVar where the runtime semantics are class-level. Re-runcd backend && mypy app/ --config-file ../pyproject.tomland confirm those error codes are gone.Source artifact
Per-error classification (file:line, code, reason, proposed fix) is in the parent kanban card artifact t_32c522a2 (
mypy_classification.md/jsonin the workspace at/home/b/.hermes/kanban/boards/fixit/workspaces/t_0c1a5bf7/). Out of scope: codes outside[assignment]/[arg-type]/[return-value]/[attr-defined]/[misc]/[valid-type]/[call-arg]belong to sibling cards.Decomposition
codeis one of[misc]/[arg-type]/[valid-type].[var-annotated]/[no-any-return]/[index]/[call-overload]/[override]are intentionally excluded from this fix and from the original umbrella scope — they require a different contract (e.g., return-type annotation tightening, iterator-materialization patterns) and may need separate decomposition.High-leverage fixes in this bucket
app/modules/base.py— declarename,description,requires_configasClassVar[str]/ClassVar[list[str]](single 3-line edit). Cascades to clear 158 [misc] errors across every EvidenceModule subclass.[arg-type]SQLAlchemyorder_bytyping gaps inapp/services/investigations/{state_machine,async_executor,orchestrator_enhanced,orchestrator_v3_llm}.pyandapp/routers/investigations.py— fix bycast(ColumnElement[Any], <column>)at the use site.[valid-type]inapp/modules/registry.py:237—Function "builtins.any" is not valid as a type; fix by replacing the builtinanywith the typingAny(and importing it).Acceptance
Zero in-scope-code A-bucket mypy errors remain, and no
# type: ignorecomments added (annotation-only fixes). Per-error justification via the artifact'sfix_detailfield.Sub-issue of #109 (umbrella mypy debt).
Launcher note (2026-09-08, kanban task t_d741798c): Issue #117 already has a fix in flight — commit
7e9a485on branchfix/annotation-tidy-t_5df1a1a4and open PR #118 at #118 (state=open, mergeable=true).Verification mismatch: PR body claims A-bucket went 165→0. Reran
cd backend && mypy app/ --config-file ../pyproject.toml --no-incrementalon branch HEAD with worktree noise stashed:7e9a485[misc][arg-type][valid-type]app/modules/base.pycleared all 158 [misc] — matches the PR claim.Anyimport inapp/modules/registry.pycleared the 1 [valid-type] — matches.[arg-type]order_bycast(...)fixes appear to have landed: [arg-type] count dropped 132→128 instead of the promised 132→126. The remaining 128 [arg-type] are mostly R-bucket owned by sibling #116, but 2 order_by gaps are still in this card's stated scope.PR #118 should be reconciled against the artifact at kanban t_32c522a2 (workspace
/home/b/.hermes/kanban/boards/fixit/workspaces/t_0c1a5bf7/mypy_classification.{md,json}) before re-dispatch. Re-launching a kilo-gsd run would duplicate effort or conflict with the existing branch/worktree.Launcher blocked t_d741798c with
kind=capabilitypending operator reconciliation.Launcher note (kanban task t_2e7cbcce, 2026-09-14): This issue was already closed on 2026-09-10 by merge commit
abdf87df0c(PR #119). A late-arriving kanban card (this one) re-imported the bucket after the fix was already on origin/main — archiving without spawning.Residual state on origin/main (
bf6a0fb) for in-scope codes:[valid-type]: 0 errors remaining[misc]: 1 remaining (app/services/investigations/retry_handler.py:38)[arg-type]: 4 remaining (state_machine.py:150,scheduler.py:154,queue_manager.py:142,queue_manager.py:217)PR #119 closed this issue before the ClassVar fix in branch
fix/annotation-tidy-t_5df1a1a4(commit7e9a485, PR #118) could land. The 158 cascading[misc]errors the umbrella card expected are absent from main because the underlying base-class declaration still uses non-ClassVar notation — subclasses match.No further action on this issue. If the residual 5 errors warrant cleanup, file a new issue referencing this one. — kilo-gsd-runner
Pre-completed kanban card t_d741798c noting that this issue is already resolved and closed on main. Resolving commit:
abdf87df0c(fix(mypy): clear Annotation-debt bucket for in-scope codes (closes #117), merged via PR #119 on 2026-09-10). Sibling PR #127 also merged (var-annotated bucket). Mypy rerun at origin/main=bf6a0fb: in-scope A-bucket codes ([misc]/[arg-type]/[valid-type]) reduced from 165 to 5 residual; the 5 residuals are post-baseline stragglers in subsequent commits. Archiving the launcher card without spawn.Mark referenced this issue2026-09-14 23:05:24 +00:00