Commit fa992f3
authored
refactor: slim Database to control-plane store (#599 PR2/3)
## Summary
PR 2 of 3 for #599. The global Database becomes a control-plane store only
(auth/api-keys/audit/interactive-sessions/token-usage); v2 domain data already
lives per-workspace via core/workspace.py.
- database.py: 863 -> 285 lines. Dropped every dropped-table method + the
*_repository compat properties. Kept connection plumbing and the live
token + audit delegations.
- Deleted 16 v1 repositories + codeframe/enforcement/ (reachable only via the
removed task_repository) + codeframe/git/workflow_manager.py (never
instantiated; only re-exported) and emptied git/__init__.py.
- Trimmed dead fixtures from integration/api/ui conftests and reconciled
the root collect_ignore. Removed ~46 v1 tests of the deleted code.
## Validation
- Tests: pytest -m v2 green (2824 passed); Backend + Frontend CI green
- Lint/Type: ruff + mypy clean (181 files); CI Code Quality green
- Collect: pytest --collect-only clean (3437); zero tracked .py reference any removed symbol
- Boot: TestClient /health -> 200; cf --help / cf status
- Runtime introspection: Database control-plane surface verified
(keep-set repos wired, dropped attrs/methods absent, audit round-trip works)
- Cross-family review: codex (0 findings) + CodeRabbit (Review completed)
- claude-bot advisory: 3 in-scope fixes landed (ef64783), 3 pre-existing
deferred items documented; bot follow-up confirms no blocking findings
- Demo: all 11 acceptance criteria mapped to outcome evidence
Deferred:
- persistence -> platform_store rename + CLAUDE.md repo-structure -> PR3
- pre-existing thread-safety / INSERT duplication / async PRAGMA repetition
in token_repository.py / audit_repository.py / database.py async setup
belong in a separate "harden surviving repos" PR
Part of #599 (PR2 of 3 -- does not close).1 parent b336ce2 commit fa992f3
71 files changed
Lines changed: 38 additions & 24415 deletions
File tree
- codeframe
- enforcement
- git
- persistence
- repositories
- tests
- api
- blockers
- context
- debug
- deployment
- enforcement
- git
- integration
- persistence
- ui
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
0 commit comments