Skip to content

coordinator: an earlier nomination's evict op does not disable the park - #1787

Merged
nikhilunni merged 1 commit into
mainfrom
fix/earlier-evict-op-does-not-disable-park
Nov 10, 2026
Merged

nikhilunni merged 1 commit into
mainfrom
fix/earlier-evict-op-does-not-disable-park

Conversation

@nikhilunni

Copy link
Copy Markdown
Contributor

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 Done op older than the settle grace means "the capture landed and the settle did not", so the scanner mints a capture retry with allow_park: false. That read has no nomination scope. A session that parked, came back, and went idle again still holds the earlier nomination's Done op.

The idle detector moves the session to Evicting and 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 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, 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 carries allow_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

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
@nikhilunni
nikhilunni merged commit 8968555 into main Nov 10, 2026
28 checks passed
@nikhilunni
nikhilunni deleted the fix/earlier-evict-op-does-not-disable-park branch November 10, 2026 21:27
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