[claude] Three-Strike Detector for Repeated Manual Work (#962) #1163

Closed
claude wants to merge 2 commits from (deleted):claude/issue-962 into main

2 Commits

Author SHA1 Message Date
Alexander Whitestone
f3a7a26108 feat: Three-Strike Detector for Repeated Manual Work
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
Implements the three-strike detector that tracks recurring manual
actions by category and blocks the action on the third occurrence,
requiring an automation artifact to be registered first.

- src/timmy/sovereignty/three_strike.py: SQLite-backed ThreeStrikeStore,
  ThreeStrikeError, FalseworkChecklist (pre-cloud-API checklist),
  and module-level get_detector() singleton
- src/timmy/sovereignty/__init__.py: new sovereignty subpackage
- src/dashboard/routes/three_strike.py: REST API endpoints under
  /sovereignty/three-strike (list, blocked, record, register automation,
  events)
- src/dashboard/app.py: router registered in FastAPI app
- tests/timmy/test_three_strike.py: 52 unit tests covering all strike
  states, blocking, automation registration, and falsework checklist
- tests/timmy/test_three_strike_routes.py: 7 unit tests for API routes;
  fixed test isolation via monkeypatched get_detector() per-test temp DB

Fixes #962

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 15:44:55 -04:00
Alexander Whitestone
ab014788df WIP: Claude Code progress on #962
Automated salvage commit — agent session ended (exit 124).
Work in progress, may need continuation.
2026-03-23 14:59:06 -04:00