Repository navigation
Hold the evidence scope for the whole run when the server offers it - #1258
Conversation
A held scope renews without resolving again, so a session that grows mid-run no longer moves the version; the hold is released on every exit path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoHold evidence scopes throughout eval runs when supported
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Code Review by Qodo
1.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daemon retires entries on request and timer threads, so a slow release must not block them; the client it uses is disposed only after the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Qodo finding 6 (TempDir helpers) fixed in 9834551: the file's Dir/Claude/TempRoot helpers now create through Tmp.CreateDir / TempDirHandle.CreateFile. Findings 2-5 fixed and 1 declined; see the inline replies. |
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 9834551 |
AI-3180 (no GitHub issue exists for this change)
What & why
When the catalog's evidence advertisement carries
scope_holds: true(kurrent-io/kcap-server#2174),kcap evaland the daemon take their viewer scope withPOST evidence-scope/holdsunder a freshrequest_id, renew withPOST evidence-scope/renewalinstead of resolving again, and release withDELETE evidence-scope/holdwhen the run's setup is disposed. A held scope does not move when the session grows mid-run, which is what ended long runs asevidence scope moved. A server answeringheld: false(scope too large to hold) or not advertising holds keeps today's resolve-and-renew behaviour.Where to look
The hold is owned from the first manifest page that reports it, so a run whose later manifest page fails, or whose preparation fails, still releases it. A renewal that answers another version is a moved scope, as a re-resolve onto another version is today.
Verification
EvidenceScopeHoldClientTests: take carries a 32-char request key; renewal keeps the version and advances the token and deadline; renewal onto another version, 409 or 404 is moved; dispose releases once with the latest token; a failed later page still releases;held: falserenews by resolving and releases nothing; no holds advertised sends no hold requests.EvalEvidenceRouteTests: a held run posts its V4 and then releases; a held run that fails to prepare releases. ExistingEvidenceScopeClientTests(12) andEvalEvidenceRouteTests(37) pass. AOT publish shows no IL2xxx/IL3xxx warnings.🤖 Generated with Claude Code