Severity: high | Category: infra | Phase: P1.6
Problem
get_v2_workspace → get_workspace() unconditionally calls _ensure_schema_upgrades, running ~30 DDL/PRAGMA statements plus unconditional CREATE TABLE IF NOT EXISTS/CREATE INDEX + multiple commit() (each an fsync in WAL) on every v2 request, even when the schema is current.
Evidence
codeframe/core/workspace.py:833
Acceptance criteria
- Migrations are gated behind a
PRAGMA user_version check (or run once at startup / cached workspace load).
- Steady-state requests issue zero DDL and zero write commits.
Dependencies
None
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).
Severity: high | Category: infra | Phase: P1.6
Problem
get_v2_workspace→get_workspace()unconditionally calls_ensure_schema_upgrades, running ~30 DDL/PRAGMA statements plus unconditionalCREATE TABLE IF NOT EXISTS/CREATE INDEX+ multiplecommit()(each an fsync in WAL) on every v2 request, even when the schema is current.Evidence
codeframe/core/workspace.py:833Acceptance criteria
PRAGMA user_versioncheck (or run once at startup / cached workspace load).Dependencies
None
Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).