Repository navigation
FIX: name SQLite result codes on analytics OperationalErrors (P311-21) - #3893
Merged
Roman Lutz (romanlutz) merged 3 commits intoNov 4, 2026
Merged
Roman Lutz (romanlutz) merged 3 commits into
Roman Lutz (romanlutz) merged 3 commits into
Conversation
19 of 25 tasks
Roman Lutz (romanlutz)
self-requested a review
November 3, 2026 20:49
Contributor
Author
|
@microsoft-github-policy-service agree |
…P311-21) Non-busy SQLite failures re-raised from the analytics retry loop and session no longer read identically: an add_note built from the stdlib sqlite3 result-code constants surfaces e.g. 'sqlite result code 517 (SQLITE_BUSY_SNAPSHOT)' for stale snapshots vs plain locks. Notes only — exception types, messages, retry decisions and the timeout conversion are unchanged; non-SQLite OperationalErrors pass through untouched. Three regression tests cover the named re-raise, the note-free non-SQLite path, and unchanged plain-BUSY retry behavior.
B Sainath Reddy (Sainath-Reddy7)
force-pushed
the
p311-21/sqlite-errorname
branch
from
November 3, 2026 21:29
b62b28d to
3607a9a
Compare
…1/sqlite-errorname
Use sqlite_errorname instead of overlapping SQLite constants, deduplicate propagated notes, and keep non-SQLite sessions unchanged. Cover real-driver errors and exception identity. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roman Lutz (romanlutz)
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the P311-21 reservation in #3166 with option (b) from the question there — delivered within the reservation window since the steer hadn't arrived by Nov 4.
Description
The recorded survey found no error-message matching left to replace, so per that question this adds the item's literal
...codes/nameshalf: non-plain-SQLITE_BUSYOperationalErrors propagated from the analytics retry loop and session now carry anadd_notenaming the structured result code, built from the stdlibsqlite3constants:sqlite result code 517 (SQLITE_BUSY_SNAPSHOT)sqlite result code 6 (SQLITE_LOCKED)… etc.Same "database is locked" text, now distinguishable in the formatted traceback — using the
add_noteidiom this codebase established in P311-08.Scope discipline: notes only. Exception types, messages, the retry decision, the timeout conversion, and non-SQLite (mssql) OperationalErrors are unchanged — the non-SQLite path attaches nothing.
Verification (commands and outputs)
Full analytics memory suite:
Three new regression tests: the named re-raise (asserts the exact
517 (SQLITE_BUSY_SNAPSHOT)note), the note-free non-SQLite re-raise, and unchanged plain-BUSY retry-to-success. An intermediate control-flow slip (my own) that converted every OperationalError into a timeout was caught by the suite and fixed before this push — the full file passes.Agent disclosure: prepared with an AI coding agent (ZCode) at the direction of the submitting account owner; the survey, this implementation and the test run were reviewed by them.