Skip to content

Classify SQLite corruption using typed error codes - #49710

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6e8ecd0ee67f3c239183ddea3fc75c4e4cd5744a
Sep 30, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6e8ecd0ee67f3c239183ddea3fc75c4e4cd5744a

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Classify SQLite corruption using typed error codes

What changed

Preserve the underlying error in LocalStateDbStartupError and use its error chain to decide whether CLI startup failures qualify for automatic database backup and recovery.

Replace corruption checks against error-message text with SQLite result-code classification, including SQLx extended result codes and directly wrapped SqliteError values.

Testing

Update the embedded startup corruption test to verify that the startup error retains a detectable SQLite corruption cause and the failed database path.

## What changed

Preserve the underlying error in `LocalStateDbStartupError` and use its error chain to decide whether CLI startup failures qualify for automatic database backup and recovery.

Replace corruption checks against error-message text with SQLite result-code classification, including SQLx extended result codes and directly wrapped `SqliteError` values.

## Testing

Update the embedded startup corruption test to verify that the startup error retains a detectable SQLite corruption cause and the failed database path.

GitOrigin-RevId: 6e8ecd0ee67f3c239183ddea3fc75c4e4cd5744a
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6e8ecd0ee67f3c239183ddea3fc75c4e4cd5744a branch from d65d250 to 596ae94 Compare September 30, 2026 19:00
@copyberry
copyberry Bot merged commit 596ae94 into main Sep 30, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6e8ecd0ee67f3c239183ddea3fc75c4e4cd5744a branch September 30, 2026 19:00
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 30, 2026
@maikama8
maikama8 deployed to issue-triage September 30, 2026 19:09 — with GitHub Actions Active
@maikama8
maikama8 deployed to issue-triage September 30, 2026 19:09 — with GitHub Actions Active
@maikama8
maikama8 deployed to issue-triage September 30, 2026 19:09 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 596ae94f Deployed Sep 30, 2026 by maikama8 via Identify potential duplicates (all issues) #50267
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants