Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped desktop persistence bug fix that safely quarantines malformed catalog envelopes, preserves the original bytes, serializes recovery with catalog operations, and flushes atomic writes. Existing valid-catalog and decryption-error behavior remains unchanged, with extensive targeted regression coverage. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe connection catalog store now serializes reads, writes, and clears. It quarantines malformed catalog files and syncs temporary files before replacing the catalog. Tests cover recovery, write failures, and retries. ChangesConnection catalog store
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to The catalog recovery and write changes are ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The PR implements the main [ ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Additional validation on the affected Windows 10 installation:
Two remaining observations distinguish the recovery result from other failures:
The final live UI could not be inspected with Computer Use: Windows returned |
|
Note Written by Hi! We are cleaning up open PRs, and this one appears to have been created with an older model ( |
What Changed
A malformed
connection-catalog.jsoncurrently fails the desktop catalog IPC call and prevents the client from registering its local connection. This change preserves the damaged file under a unique.corrupt.<pid>.<uuid>name, then uses the existing missing-catalog path to restore legacy records or start an empty catalog.Recovery succeeds only after the damaged file is preserved. Read, base64, and decryption failures keep their existing error behavior. Catalog reads, writes, and clears share a semaphore to prevent recovery from moving a concurrent replacement. Writes flush and close the temporary file before replacing the previous catalog, with a writable handle for Windows.
Why
Fixes #4750.
Supporting investigation: Windows 10 incident evidence and isolated reproduction, including catalog contents, startup errors, database checks, and the distinction between confirmed recovery failure and the unproven corruption trigger.
The reported restart left a 1,552-byte, zero-filled catalog while the project and thread database remained readable. That document alone blocked startup. Preserving it and restoring the normal missing-catalog behavior lets the desktop reconnect without changing project or thread data. Remote connection details cannot be reconstructed from zero-filled bytes unless legacy records remain available.
Verification
No visual UI changes. Computer Use used accessibility and keyboard controls because screenshot capture was unavailable on this Windows 10 host. Physical power-loss behavior was not tested; flushing does not establish a power-loss guarantee.
Checklist
Written with assistance from GPT-6 in Codex.
Summary by CodeRabbit