Skip to content

Phase A0: tooling & CI foundation (ruff · mypy · coverage · frontend tests) - #4

Merged
mandarwagh9 merged 1 commit into
mainfrom
feat/phaseA-0-tooling-ci
Jun 19, 2026
Merged

mandarwagh9 merged 1 commit into
mainfrom
feat/phaseA-0-tooling-ci

Conversation

@mandarwagh9

Copy link
Copy Markdown
Owner

What & why

First chunk of the OVERWATCH 10× roadmap (see docs/superpowers/specs/2026-06-19-overwatch-10x-design.md). This PR establishes the comprehensive verification gate that every subsequent PR must clear — nothing else can be trusted until the gate exists.

Changes

Tooling (pyproject.toml)

  • ruff lint config (E4/E7/E9/F, scripts/archive/ excluded)
  • mypy config (pragmatic baseline: ignore_missing_imports, check_untyped_defs)
  • coverage config (branch coverage on app)

CI (.github/workflows/ci.yml) — split into two jobs:

  • backend: ruffmypypytest with a 40 % coverage floor
  • frontend: npm cijest/RTL → npm run build (eslint runs in build, CI=true)

Frontend test infra (none existed)

  • Added @testing-library/react + @testing-library/jest-dom, src/setupTests.js
  • Smoke tests: pure domain helpers (entities.test.js, incl. IoU math) + a ConnectionStatus render test
  • New test:ci script

Debt the gates surfaced (no behaviour change)

  • ruff: removed unused imports, replaced 4 bare except:, dropped dead vars
  • mypy (fixed 3 genuine latent issues): undefined PerceptionSnapshot in ports.py; unguarded None model/detector access in detection_adapter; asyncio.gather BaseException-union handling. Also removed the no-op env_parse_json SettingsConfigDict key (not a real option in installed pydantic-settings).
  • frontend: removed unused WebSocketEvents/useCallback imports and the dead handleToggle

Verification (local)

  • ruff check backend scripts → clean
  • mypy → clean (16 files)
  • pytest backend/tests/unit57 passed, coverage 42.35 %
  • npm run test:ci12 passed (2 suites); npm run build → compiles, eslint clean

Notes

  • Coverage floor starts at 40 % (just under current 42 %) and ratchets up in later phases (A4).
  • Ruff rule set is intentionally correctness-focused for now; I/UP/B land in a later quality PR to keep this diff reviewable.

🤖 Generated with Claude Code

… debt

Phase A0 of the OVERWATCH 10x roadmap
(docs/superpowers/specs/2026-06-19-overwatch-10x-design.md).

Tooling:
- pyproject: ruff (E4/E7/E9/F), mypy (pragmatic, ignore-missing-imports),
  coverage config
- CI split into backend (ruff + mypy + pytest w/ 40% coverage floor) and
  frontend (jest/RTL + eslint-via-build) jobs
- frontend: add @testing-library/react + jest-dom, setupTests, smoke tests
  (entities + ConnectionStatus); add test:ci script

Fixes surfaced by the gates (no behaviour change):
- ruff: remove unused imports, replace 4 bare excepts, drop dead vars
- mypy: fix undefined PerceptionSnapshot in ports.py; guard None model/detector
  access in detection_adapter; correct gather() exception-union handling;
  remove no-op env_parse_json SettingsConfigDict key
- frontend: remove unused WebSocketEvents/useCallback imports and dead handleToggle

57 backend tests + 12 frontend tests green; ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant