Repository navigation
coordinator: an earlier nomination's evict op does not disable the park - #1787
Merged
Merged
Conversation
The eviction scanner reads a session's latest evict op before it mints one. A Done op older than the settle grace meant 'the capture landed and the settle did not', so the scanner minted a capture retry with allow_park false. The read has no nomination scope: a session that parked, came back, and went idle again still holds the earlier Done op. The idle detector moves the session to Evicting and then queues its op. When a scanner pass reads the session between those two writes, it saw the earlier op, minted the capture retry, and the session took a full eviction where it had room to park. Both drivers tick on the same period from the same start, so the overlap is not rare. The scanner now applies the Done rule only to an op that finished at or after the nomination's stamp (last_active_at). An earlier op leaves allow_park true. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNhpmz4QPYaVCE7tFna54D
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.
Problem
A session with room to park took a full eviction when it went idle.
The eviction scanner reads a session's latest evict op before it mints one. A
Doneop older than the settle grace means "the capture landed and the settle did not", so the scanner mints a capture retry withallow_park: false. That read has no nomination scope. A session that parked, came back, and went idle again still holds the earlier nomination'sDoneop.The idle detector moves the session to
Evictingand then queues its own op (allow_park: true). When a scanner pass reads the session between those two writes, it sees the earlier op and mints the capture retry first. The detector's op then finds a capture in flight and is skipped. The two drivers tick on the same period from the same start, so the overlap is not rare.The effect is on latency, not on data: the next message pays a restore from the checkpoint instead of a resume of the paused VM.
Change
The scanner applies the
Donerule only to an op that finished at or after the nomination's stamp (last_active_at). An earlier op leavesallow_parktrue, and the scanner's keyed op is then the same op the detector would queue.Test
an_earlier_nominations_done_op_does_not_disable_the_park: a session completes an evict op, begins a new nomination, and the scanner's op for it carriesallow_park: true. Without the change the scanner mints no op inside the grace, and a capture retry after it.🤖 Generated with Claude Code
https://claude.ai/code/session_01HNhpmz4QPYaVCE7tFna54D