Skip to content

test: count the probes that miss before the streaming cache hit - #44

Merged
fylorn merged 1 commit into
devfrom
test/stream-cache-probe-race
Sep 24, 2026
Merged

fylorn merged 1 commit into
devfrom
test/stream-cache-probe-race

Conversation

@fylorn

@fylorn fylorn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

streaming_cache_hit_replays_assembled_sse polls until a request comes back X-Cache: HIT. A probe sent before the first stream's post-flight task has written the cache is itself a MISS and calls the upstream, so the "exactly one upstream call" assertion failed whenever that write lost the race (seen locally once in a full run). Each MISS now accounts for one upstream call; the HIT still has to make none, which is what the test is about.

Local: full integration suite green on own containers.

🤖 Generated with Claude Code

The test polls until a request comes back X-Cache: HIT. A probe sent
before the first stream's tail has written the cache is itself a MISS
and calls the upstream, so asserting exactly one upstream call failed
whenever the write lost that race. Each MISS now accounts for one call;
the HIT still has to make none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 28d4387 into dev Sep 24, 2026
6 checks passed
@fylorn
fylorn deleted the test/stream-cache-probe-race branch September 24, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant