Skip to content

Cover the prefetch timeout-takeover race; harden range-GET validation#45

Merged
russellromney merged 1 commit into
mainfrom
exact-range-validation-and-takeover-test
Jun 15, 2026
Merged

Cover the prefetch timeout-takeover race; harden range-GET validation#45
russellromney merged 1 commit into
mainfrom
exact-range-validation-and-takeover-test

Conversation

@russellromney

Copy link
Copy Markdown
Owner

Two small, durable pieces:

  • Timeout-takeover race test. When a demand read waits on an in-flight full-group prefetch, hits the wait_for_group deadline, and takes over with its own range GET, a later-completing stale prefetch must not overwrite the fresh foreground frame. Adds a deterministic test driving that race (stale full GET pending, replay epoch advanced, foreground serving fresh range bytes) and asserts the fresh frame wins and the stale GET is cancelled. This is the only deterministic coverage of that takeover path.
  • Range-GET validation hardening. Extract validate_range_get_result and extend its test to reject both short and overlong range responses (was overlong only).

Full tiered suite green (588).

🤖 Generated with Claude Code

When a demand read waits on an in-flight full-group prefetch, hits the
wait_for_group deadline, and takes over with its own seekable range GET,
a later-completing stale prefetch must not overwrite the foreground's
fresh frame. Add a deterministic test that drives exactly that race —
stale full GET still pending, replay epoch advanced, foreground takeover
serving fresh range bytes — and asserts the fresh frame wins and the
stale full GET is cancelled.

Also extract validate_range_get_result and extend its test to reject both
short and overlong range responses (was overlong only).

Full tiered suite green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@russellromney russellromney merged commit f67894c into main Jun 15, 2026
2 checks passed
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