Repository navigation
Anchor lock-expiration validation to the first claim - #76
Thom Chiovoloni (thomcc-work) wants to merge 2 commits into
Conversation
Measure the concurrent checks from the first completed claim rather than the startup barrier. Connection acquisition could otherwise consume the expiry margin and make a correct provider fail validation. Add a delayed-fetch regression and compare the recovered token with the original claim's token. Lease durations and timing margins are unchanged.
6a8b915 to
fd5799a
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Todd J. Green (tjgreen42)
left a comment
There was a problem hiding this comment.
Review by GPT-6.1 Sol.
No actionable findings in this revision. The claim notification removes the task-start/connection-acquisition race, both competing fetches use the same claim-relative clock, and the recovered token is compared against the actual original token. The gated regression covers an initial fetch delay exceeding the lease and recovery margin.
Scope: static review of the diff and surrounding validation/gate/provider code at 5728a64. I did not run tests locally.
|
Nit — this validation now requires a recovered claim to use a different token than the expired claim. That aligns with the provider guide’s unique-token requirement, but custom providers should ensure they generate a fresh token on reacquisition rather than reuse the prior token. Non-blocking. — GPT-6 Luna |
Summary
Fix a timing assumption in the multi-threaded lock-expiration provider
validation. Previously, the recovery wait started at a task-start barrier,
before the first fetch had acquired its lease. A slow connection acquisition
could consume the 100 ms expiry margin, causing the recovery fetch to run
while the lease was still valid.
This change:
completed claim.
lease duration plus recovery margin.
The requested lease duration and existing timing margins remain unchanged.
There are no production provider or runtime behavior changes.
Checklist
cargo nt)cargo test --doc --all-features)docs/if introducing a new areadocs/README.mdDiscovered while reviewing microsoft/duroxide-pg#41.