Commit b012ba8
committed
feat(memory_store): auto-fallback to SQLite when DATABASE_URL absent
Completes the Glama-inspectability work paired with commit A
(plugin.json env schema). When Cortex launches with no DATABASE_URL
(sandbox inspection, CI smoke, first-glance experimenter), the
factory now logs a warning and drops to the existing SQLite backend
rather than raising RuntimeError.
Behaviour matrix:
DATABASE_URL set + reachable → PostgreSQL (unchanged)
DATABASE_URL set + unreachable → raise (unchanged — signals
real config error)
DATABASE_URL unset / empty → SQLite with loud warning
(was: raise)
CORTEX_ALLOW_SQLITE_FALLBACK=1 → SQLite even if PG fails
Rationale: real production users who ran /cortex-setup-project have
DATABASE_URL set to a reachable Postgres, so their path is
unchanged. Misconfigured Postgres still raises loudly. The only
path that flips is "no DATABASE_URL at all," which today leaves
users with an unbootable server — now it boots against SQLite so
tools are discoverable and the install can be tried before wiring
Postgres.
Unlocks Glama's sandbox inspector → expected Quality grade lift
C → B/A once their next evaluation runs.1 parent 04a48dd commit b012ba8
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
73 | 95 | | |
74 | 96 | | |
75 | 97 | | |
76 | 98 | | |
77 | 99 | | |
78 | 100 | | |
79 | | - | |
| 101 | + | |
| 102 | + | |
80 | 103 | | |
81 | 104 | | |
82 | 105 | | |
| |||
0 commit comments