| … | … | @@ -219,15 +212,147 @@ const removePrivateSymlink = Effect.fn("CodexHomeLayout.removePrivateSymlink")(f | |
| 298 | + | yield* input.fileSystem | |
| 299 | + | .rename(entry.backupPath, entry.path) | |
| 300 | + | .pipe( | |
| 301 | + | Effect.catch((cause) => | |
🟠High Drivers/CodexHomeLayout.ts:301
A failed rollback leaves the effective home partially restored, but setup still treats it as usable and continues starting Codex. The restore handler logs and swallows failures from removing created links and renaming backups back, then the outer handler returns false; propagate rollback failures so setup cannot proceed with entries stranded in the backup directory.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/provider/Drivers/CodexHomeLayout.ts around line 301: |
| 2 | |
| 3 | A failed rollback leaves the effective home partially restored, but setup still treats it as usable and continues starting Codex. The `restore` handler logs and swallows failures from removing created links and renaming backups back, then the outer handler returns `false`; propagate rollback failures so setup cannot proceed with entries stranded in the backup directory. |
Note
🤖 Claude Opus 5.5 responding on behalf of Jake
Valid. This is fixed in ee400bff2f.
When a replacement fails and its restore also fails, the shadow home can hold a SQLite base without its WAL, or a base next to the shared WAL link. Continuing setup would start Codex on that state. restore now collects every remove and rename failure. If there are any, it logs them along with the original cause and fails setup with a CodexShadowHomeFileSystemError for the first failure (remove or rename). For a rename, its path is where the entry was left in the backup.
A single failure still restores, logs a warning and continues, because the group is back to its original state. The next setup finishes the move: the base is still a regular file, so the group is resolved again.
There is a new test, fails setup instead of starting Codex on a SQLite family it could not restore. It fails on the previous head because setup succeeded there. It passes now and checks that the WAL is still intact at the reported backup path.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.