Severity: medium | Category: data-integrity | Phase: P0.2
Problem
_persist_token_usage does Database(self.workspace.db_path); db.initialize(), which runs SchemaManager.create_schema() — creating control-plane tables (users, api_keys, sessions, audit_logs) and inserting admin@localhost into every per-workspace state.db. This pollutes the domain DB with auth tables and is the mechanism that hid P0.1 (initialize "succeeds" without ever creating token_usage).
Evidence
codeframe/core/react_agent.py:358
Acceptance criteria
- Token usage persists through the per-workspace connection/schema, not the control-plane
Database.
- A workspace DB after an agent run contains no
users/api_keys/sessions tables and no admin row.
Dependencies
blocked by #712 ([P0.1])
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).
Severity: medium | Category: data-integrity | Phase: P0.2
Problem
_persist_token_usagedoesDatabase(self.workspace.db_path); db.initialize(), which runsSchemaManager.create_schema()— creating control-plane tables (users, api_keys, sessions, audit_logs) and insertingadmin@localhostinto every per-workspacestate.db. This pollutes the domain DB with auth tables and is the mechanism that hid P0.1 (initialize "succeeds" without ever creating token_usage).Evidence
codeframe/core/react_agent.py:358Acceptance criteria
Database.users/api_keys/sessionstables and no admin row.Dependencies
blocked by #712 ([P0.1])
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).