Skip to content

fix: the lease race eval waits for the first write instead of 10 ms - #107

Merged
sloweyyy merged 1 commit into
mainfrom
fix/lease-race-eval-waits-for-the-write
Oct 8, 2026
Merged

sloweyyy merged 1 commit into
mainfrom
fix/lease-race-eval-waits-for-the-write

Conversation

@sloweyyy

@sloweyyy sloweyyy commented Oct 8, 2026

Copy link
Copy Markdown
Owner

evals/lease.test.ts › "a concurrent writer that won the race is caught by the read-back" failed once in a full gate run while a mutation run loaded the machine.

Cause: the eval wrote the rival's lease after a fixed 10 ms. If the first instance's own write landed later than that, it overwrote the rival's lease, read itself back, and won.

Fix:

  • The eval now waits until the first write is on disk, then writes the rival's lease.
  • The read-back delay is 500 ms, so the rival's write always lands inside it.
  • New mutant: holding without checking the read-back must go red (388).

Gate: typecheck clean, 769 evals passed. The lease suite passed 3/3 on its own.

Co-Authored-By: Truong Le Vinh Phuc truonglevinhphuc2006@gmail.com

…e has landed

It wrote after a fixed 10 ms. On a loaded machine the first instance's write landed after
the rival's, so it won and the eval failed. It now waits for that write and gives the
read-back 500 ms. The read-back itself gets a mutant.

Co-Authored-By: Truong Le Vinh Phuc <truonglevinhphuc2006@gmail.com>
@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

Deployment failed for project scriptorium with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/sloweyyy?upgradeToPro=build-rate-limit

@sloweyyy
sloweyyy merged commit 2554d4a into main Oct 8, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant