chore(mypy): clear the strict-mode typing backlog (63 errors) #65

Closed
opened 2026-06-09 00:52:33 +00:00 by coilysiren · 1 comment
Owner

pre-commit run mypy --all-files reports 63 errors across 15 files on main (a pre-existing backlog, surfaced while adopting the agentic-os hook block in #63). The repo runs mirrors-mypy under [tool.mypy] strict = true.

Dominant categories:

  • untyped-decorator (most of them) - FastAPI route decorators (@app.get, @app.post, @router.*) and pytest fixtures make the decorated functions untyped under strict. Affects core/src/.../server.py, agent.py, channels/.../router.py, examples/luca-flow/.../peer.py, and many test files.
  • Class cannot subclass "BaseModel" (has type "Any") - channels/.../models.py, core/tests/test_routing.py (pydantic / MockTransport not typed for mypy).
  • Missing type arguments for generic type "dict" - scripts/check_luca_spans.py (bare dict returns).
  • no-untyped-def / no-untyped-call - scripts/render_topology.py (helper functions lack annotations).
  • unused-ignore - core/tests/test_routing.py:417,523.

These don't block normal commits (the hook runs per-staged-file), but --all-files is red, and edits to an already-red file (e.g. scripts/check_luca_spans.py) can be blocked at commit time.

Out of scope for #63 (comment-discipline). Filing to track the typing backlog separately.

`pre-commit run mypy --all-files` reports **63 errors across 15 files** on `main` (a pre-existing backlog, surfaced while adopting the agentic-os hook block in #63). The repo runs `mirrors-mypy` under `[tool.mypy] strict = true`. Dominant categories: * **untyped-decorator** (most of them) - FastAPI route decorators (`@app.get`, `@app.post`, `@router.*`) and pytest fixtures make the decorated functions untyped under strict. Affects `core/src/.../server.py`, `agent.py`, `channels/.../router.py`, `examples/luca-flow/.../peer.py`, and many test files. * **Class cannot subclass "BaseModel" (has type "Any")** - `channels/.../models.py`, `core/tests/test_routing.py` (pydantic / MockTransport not typed for mypy). * **Missing type arguments for generic type "dict"** - `scripts/check_luca_spans.py` (bare `dict` returns). * **no-untyped-def / no-untyped-call** - `scripts/render_topology.py` (helper functions lack annotations). * **unused-ignore** - `core/tests/test_routing.py:417,523`. These don't block normal commits (the hook runs per-staged-file), but `--all-files` is red, and edits to an already-red file (e.g. `scripts/check_luca_spans.py`) can be blocked at commit time. Out of scope for #63 (comment-discipline). Filing to track the typing backlog separately.
coilysiren added
P3
and removed
P2
labels 2026-06-17 08:39:39 +00:00
Author
Owner

Closing. o2r is archived in the June 2026 surface reduction - an optional agent channel, unused autonomously. Handover doctrine moves to human-mediated.

Closing. o2r is archived in the June 2026 surface reduction - an optional agent channel, unused autonomously. Handover doctrine moves to human-mediated.
Commenting is not possible because the repository is archived.
No description provided.