Repository navigation
Conversation
Exercise real checked-BEGIN contention with the interactive timeout and a short-timeout control. Advance logical time from actual failure callbacks so the admission assertions do not depend on scheduler timing, and verify that a refused write leaves no row and the same handle recovers afterward. Co-Authored-By: Codex <noreply@openai.com>
Reduce the default BEGIN retry-admission budget to 4.5 seconds so the interactive two-second timeout cannot admit a third full wait. Preserve short-timeout retries, custom budgets and the no-replay transaction fence. Co-Authored-By: Codex <noreply@openai.com>
Owner
Author
|
Consolidated in #88 (reserving interactive busy-write retry headroom within the 6s budget). |
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.
The interactive writer could admit three full two-second BEGIN waits plus backoff, consuming about 6.4–6.5 seconds before response overhead. The existing persistence integration requires a busy response in under six seconds; a recorded request returned the expected busy error in 6.579 seconds and failed that check.
The fix lowers only the default retry-admission cap from 6.5 to 4.5 seconds. Two full two-second attempts plus their first backoff fit; a third full wait is refused. Short-timeout retries retain three attempts. The maximum attempt count, per-attempt timeout, custom caps, exact contention classification, no-replay rule after a body starts, and busy response format remain unchanged. The separate durable-operation ledger policy is outside this request path and remains unchanged.
A deterministic regression uses a real independent SQLite transaction to hold the write lock. Actual failed-BEGIN callbacks advance a logical clock by the configured timeout; injected backoffs advance that clock without sleeping. The two-second case requires two attempts and no mutation; a 100 ms control requires three attempts. Both verify successful checked writes after releasing the holder with the same configuration.
At test-only head
83380a3f43c32b36fbdba8f09bbb29d795a11dfe, Linux attempt 1 compiled and failed exactly the new two-second case: three attempts instead of two, both backoffs, and 6.4 logical seconds instead of 4.1 (five issues). The 100 ms case reported no issue. The test is unchanged in the product-fix commit.This is an admission bound, not a hard deadline for scheduler pauses, embedding, successful transaction work, or response transport. The existing end-to-end six-second assertion remains the integration gate. No test threshold or workflow changed.
Validation at
49089e297d1d9ad1fbf44af9e0a60112bba9e514:Native's only issue is
SpawnAdmissionResourceTests.darwinCPUAndMemoryPressureRefuseWithoutTimestampOrLaunch, line 86: expected resource-unavailable admission, received concurrency refusal because a shared lifetime lease was held. No rerun or waiver is claimed. The broad selection reports 811 declarations: 796 pass (890 expanded passing cases), one fails, 14 framework skips. Four benchmark declarations counted as passes returned early because fixture inputs were absent. All six later serial invocations pass (10, 1, 1, 1, 1, 1 declarations); these are separate invocations, not additional unique tests.The new backend regression executes on Linux and is only compiled by native validation. Native's existing retry tests and actual MCP integration execute. The optional read-visibility check in the warm-multistore MCP case remains unverified. Source, lockfile, SDK mirror and all 43 dependency checkout pins are unchanged in the native receipt.
Syntax and whitespace checks pass. No workflow or test threshold changed; no local runtime result or rerun is claimed. This draft is not an all-green native qualification.