| … | … | @@ -363,6 +478,9 @@ export const materializeCodexShadowHome = Effect.fn("materializeCodexShadowHome" | |
| 364 | 479 | const path = yield* Path.Path; | |
| 365 | 480 | ||
| 481 | + | // Refuse dangerous legacy SQLite layouts before materialization mutates any shadow-home entry. | |
| 482 | + | yield* codexHomeEnvironment(layout, {}).pipe(Effect.asVoid); | |
🟠 High Drivers/CodexHomeLayout.ts:482
When CODEX_SQLITE_HOME redirects SQLite to another directory, this preflight still rejects legacy *.sqlite-wal files in the shadow home, so provider creation fails before the override-aware environment check runs. Passing {} hides the launch override from codexHomeEnvironment; pass the effective launch environment into this preflight instead.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/provider/Drivers/CodexHomeLayout.ts around line 482: |
| 2 | |
| 3 | When `CODEX_SQLITE_HOME` redirects SQLite to another directory, this preflight still rejects legacy `*.sqlite-wal` files in the shadow home, so provider creation fails before the override-aware environment check runs. Passing `{}` hides the launch override from `codexHomeEnvironment`; pass the effective launch environment into this preflight instead. |
Fixed in f3d14d2e7e. materializeCodexShadowHome now receives the effective launch environment from the managed runtime, driver, and adapter paths, so an explicit nonblank CODEX_SQLITE_HOME is visible during preflight. I also added coverage proving a regular dormant legacy WAL is preserved under an explicit override. Legacy SQLite symlinks are still refused even with an override, matching #24486's structural safety requirement.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.