Repository navigation
test(runtime): await commit-lock recovery settlement - #2208
Merged
hidb4ai merged 1 commit intoOct 23, 2026
Merged
Conversation
Allow the existing recovery test to wait beyond the default write budget instead of treating the short best-effort flush as proof of persistence. Constraint: Keep runtime defaults and the blocked-write latency assertion. Scope-risk: One test fixture; rollback and connection checks remain intact. Tested: Existing test red/green with 0.65s controlled consumer delay. Tested: Usage recorder module, 32 passed; scoped Ruff, format and Python 3.11 Ty.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Which issue or RFC does this PR close?
Refs #2084 and #2168. This is an independent test repair against master; it does not close either issue.
Rationale for this change
The commit-lock recovery regression can read an empty usage result after
flush()returns. The default flush is best effort and waits only 0.5 seconds, while a healthy usage write has a one-second budget. A returning flush therefore does not establish settlement.This occurred in #2168's Python 3.13 unit job at
1f6c89ce: job 120342714916. The test and runtime files are identical on master464cd152.What changes are included in this PR?
Give this test a two-second flush allowance so its recovery assertion waits beyond the default write budget. Keep the one-second write allowance, the blocked attempt's 40ms override, its 0.5-second latency assertion, rollback checks and connection-restoration checks unchanged.
Are there any user-facing changes?
Test fixture only. Runtime deadlines and best-effort statistics behavior remain unchanged.
How was this change tested?
A local diagnostic delays only the healthy recovery consumer by 0.65 seconds, with real SQLite. The original test fails with the same
IndexError; the repaired fixture passes. The diagnostic is not added to the test suite.pytest -q tests/builtin/runtime/test_model_usage_recorder.py: 32 passed, zero failures/errors/skips.Scoped Ruff, Ruff formatting, Python 3.11 Ty and
git diff --checkpass.Full
prek run -awas attempted. Its Ty hook cannot discover package VCS metadata through this Windows-linked checkout under WSL. A full pre-commit pass is not claimed; the tracked diff contains only the intended test fixture.GitHub Actions at
49e40d74: all checks have finished, with 30 successful and 18 skipped jobs. Python 3.11-3.14 unit jobs each report 5,347 passed / 152 skipped. SeekDB and OceanBase JUnit artifacts each include 47 clean migration and 8 long-query cases with no failures, errors or skips. The OceanBase artifact also includes two Scope-search and one background-metrics case, all passing. These checkout results do not establish full Server installed-release upgrade acceptance.AI usage statement
Implemented and validated with OpenAI Codex under maintainer direction.