[WRONG BRANCH] fix: tolerate incompatible Codex history schemas - #172
[WRONG BRANCH] fix: tolerate incompatible Codex history schemas#172luvs01 wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
state_5.sqliteeven when no backup manifest existed, which throws on databases missing thethreadstable or thefirst_user_messagecolumn and causesocx stop/restoreto fail.Description
hasCompatibleHistorySchema(stateDbPath: string): booleanwhich performs a readonly probe of the expectedthreadsschema and returnsfalsefor absent/incompatible schemas while rethrowing recoverable lock/permission errors to preserve retry semantics.restoreCodexHistoryProviderso that when the backup manifest is empty we skip opening/working the DB unless the compatibility probe returns true, making the no-backup path a safe no-op for incompatible or corrupt DBs.tests/codex-history-provider.test.tscovering a DB with nothreadstable, athreadstable missingfirst_user_message, and a corrupt sqlite file to assert the no-backup restore becomes a no-op.Testing
node_modules/@oven/bun-linux-x64-baseline/bin/bun test --isolate tests/codex-history-provider.test.ts, and all 26 tests in that file passed.bun run typechecksucceeded.bun run privacy:scansucceeded.bun run test) was attempted but an unrelated test timed out / failed elsewhere in the suite; the history-provider focused tests continued to pass.Codex Task