Repository navigation
TEST: Cover SQLite branch contention and cancellation - #3344
Open
Roman Lutz (romanlutz) wants to merge 3 commits into
Open
Roman Lutz (romanlutz) wants to merge 3 commits into
Roman Lutz (romanlutz) wants to merge 3 commits into
Conversation
Exercise controlled SQLite writer contention without changing production lock acquisition, retries, or correctness-test timeouts. Verify SQLITE_BUSY propagation, rollback/commit membership ordering, and cancellation cleanup for branch registration and promotion. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 53404e18-54fd-4013-aae7-97be8c012f4d
Keep the production async connection factory and cleanup hooks in the branching fixture while preserving its existing busy timeout. Observe SQLite's native UPDATE execution before releasing a competing writer or cancelling, and verify that completed and cancelled calls preserve the holder's committed branch membership without retrying. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 53404e18-54fd-4013-aae7-97be8c012f4d
Richard Lundeen (richlundeen)
approved these changes
Oct 19, 2026
Roman Lutz (romanlutz)
enabled auto-merge
October 20, 2026 05:49
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 20, 2026
This branch has not been deployed
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.
Description
Add controlled SQLite contention coverage for conversation branch registration and promotion, protecting atomic membership updates when writes fail, wait, or are cancelled.
SQLITE_BUSYerror propagates without partial changes. Cover both holder commit and rollback, then explicitly resubmit and verify reference ordering.This is test coverage, not a fix for the historical CI lock failure. Controlled probes did not establish a production locking defect; the cause of that CI failure remains unresolved. Production locking/retry behavior and the original concurrent test's assertions and timeouts are unchanged. No API or schema changes.
Tests and Documentation
Added eight parameterized contention cases covering lock errors, commit/rollback, native waiting, and cancellation. Validation on Windows with Python 3.14.4:
uv run --frozen pytest tests\unit\memory\test_conversation_branching.py tests\unit\memory\test_async_memory.py tests\unit\memory\test_sqlite_cancellation.py tests\unit\memory\memory_interface\test_interface_attack_results.py -q: 337 passed, 44 existing deprecation warnings.uv run --frozen ruff check tests\unit\memory\test_conversation_branching.py: passed.uv run --frozen ruff format --check tests\unit\memory\test_conversation_branching.py: passed.uv run --frozen ty check tests\unit\memory\test_conversation_branching.py: passed.git diff --check: passed.Full unit suite, live SQL Server integration tests, and JupyText were not run. Documentation changes are not applicable to this test-only change.