Repository navigation
Conversation
…already forgot the lease (#898)
Contributor
Author
Review ledgerRound 1: 72751f8
Runs: 7. Cost USD: 1.8734. Agent seconds: 616.
{"findings":[
{"id":"R1","role":"code","class":"relayed event removes entry before mark","outcome":"fixed","path":"src/gateway/lease-index.ts","round":"1","fix":"5463be2052481d0ad57d0f1de1ea2c918c86328c"},
{"id":"R2","role":"spec","class":"diff does nothing unrequested","outcome":"nonblocking","path":"e2e/gateway-smoke.test.ts","round":"1"}
]}Written by an agent. |
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.
Closes #898
A worker view read before a release can land after it and still list the released lease. The gateway's lease index added it back, so the requester's next request got
409 REQUESTER_ALREADY_LEASEDuntil two more views missed it. That is the gateway-smoke #253 flake.Now a lease the worker answered released (or
UNKNOWN_LEASE) is not added back by a later view. Granting the same caller-chosen id again clears that.The issue's first diagnosis (release does not record the id in
#removedByEvent) was not enough on its own: an id in that set is still re-added, only logged.src/gateway/lease-index.ts:removeremembers the id,#addReportedskips it,addclears it.fleet-coordinator.test.ts"grants a requester's next lease when a worker view read before its release lands after it (flaky: gateway-smoke #253 test gets 409 on the second lease request after a release #898)" (failed withRequesterAlreadyLeasedErrorbefore the fix);lease-index.test.ts"a caller-chosen ID released and granted again is rebuilt from a later snapshot (flaky: gateway-smoke #253 test gets 409 on the second lease request after a release #898)".e2e/gateway-smoke.test.ts: a non-201 submit now prints the response body.Status
Built. Unit tests for the gateway and
pnpm test:e2e e2e/gateway-smoke.test.tspass locally. Review pending.Assumptions
lease.expired/lease.releasedkeep today's log-and-re-add — an existing test pins it, and the flake comes from the release path.Review
Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 2.5M.
Round 1 found R1 (the worker-answer mark was set only when the entry still existed); fixed at 5463be2 and verified in round 2 by the Opus code lens. Assessment: complete.
Written by an agent.