Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved 979c487 Straightforward bug fix that prevents SQLite state files created in the shadow home from being incorrectly replaced with symlinks. The change is well-scoped to one file with comprehensive test coverage demonstrating the fix. You can customize Macroscope's approvability policy. Learn more. |
|
Please merge this, its annoying af. |
|
Note 🤖 GPT-6 Astra (preview) responding on behalf of Theo This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened. Closing as a duplicate of #9229, the retained Codex SQLite-home fix. It uses the shared SQLite home and removes stale SQLite symlinks while preserving real files. This branch's repeated-setup and unrelated-conflict cases are recorded there. Review continues in that PR, so this is not a claim that the fix has shipped. |
Preserves the regression coverage from pingdotgg#7201 against this PR's shared-home design: repeated materialization with a Codex-created database in both homes, the pingdotgg#5817 sidecar-only shape where the shadow home has no database of its own, and recovery after an unrelated config.toml conflict is cleared. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This is still hitting me repeatedly on a shared-home + shadow-home dual-account setup (Windows). Three separate occurrences so far:
Each time, the workaround is purging everything in the shadow home except |
Problem
Codex can add a top-level SQLite runtime database after a shadow home was first materialized. If Codex creates regular copies in both homes, the next materialization rejects the shadow copy and disables that provider.
Root cause
The home layout treated each shared-home entry separately. It had no ownership rule for a new SQLite base file and its WAL and SHM sidecars.
Fix
Treat each top-level
.sqlitebase name,-wal, and-shmsidecar as one family. A regular shadow database keeps the complete family local. Both homes retain their files, and repeated materialization stays idempotent. Unrelated regular-file conflicts still return the existing typed error.Tests
queue_1.sqlite, WAL, and SHM files in both homes, then materializes twice.The regression test fails on the pinned base with
CodexShadowHomeEntryConflictErrorforqueue_1.sqlite.Risks
Low. The rule applies only to top-level SQLite families whose shadow base is already a regular entry. It removes only family symlinks when local ownership is selected. Shared targets and regular files remain unchanged. Non-SQLite conflict behavior is unchanged.
Release note
Codex shadow-home providers no longer disable when new SQLite runtime databases appear.
Fixes #5817
Checklist
Implemented with GPT 5.6 Sol via Codex.
Note
Preserve shadow-local SQLite file families in
materializeCodexShadowHomematerializeCodexShadowHomenow detects the base.sqlitefile as a real (non-symlink) file and marks the entire family (base,-wal,-shm) as local.sqliteFamilyBaseNamehelper in CodexHomeLayout.ts that strips-wal/-shmsuffixes to resolve the base name of a SQLite file family.removePrivateSymlinkis renamed toremoveSymlinkwith generalized parameter naming to support both auth and SQLite family entries.Macroscope summarized 979c487.
Note
Low Risk
Scoped to auth-overlay shadow homes when a shadow
.sqlitebase is already a regular file; only removes symlinks for that family and leaves non-SQLite conflict behavior unchanged.Overview
Codex shadow-home materialization no longer fails when Codex adds a top-level SQLite runtime database (and WAL/SHM sidecars) in the shadow home after the first pass.
materializeCodexShadowHomenow treats each top-level*.sqlitename plus-waland-shmas one SQLite family. If the shadow base file is already a real file (not a symlink), the whole family stays shadow-local: existing family symlinks are removed and symlink creation is skipped for those entries, while shared-home copies are untouched. Unrelated real-file conflicts (e.g.config.toml) still raiseCodexShadowHomeEntryConflictError.Adds regression coverage for inter-pass SQLite creation, partial sidecars, and recovery after a non-SQLite conflict;
removePrivateSymlinkis renamed toremoveSymlinkfor reuse.Reviewed by Cursor Bugbot for commit 979c487. Bugbot is set up for automated code reviews on this repo. Configure here.