Skip to content

Gate warm-up test waits on the flag it asserts, not on the committed mark - #1175

Merged
jeremydmiller merged 1 commit into
mainfrom
gate-flip-test-waits-on-the-flag
Nov 10, 2026
Merged

jeremydmiller merged 1 commit into
mainfrom
gate-flip-test-waits-on-the-flag

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Flake fix for the failure on #1174's build job (EventTests.Daemon.SideEffectGateWarmupThrottleTests.the_gate_flip_is_driven_by_committed_progression_not_by_what_was_loaded, ShouldBeFalse on SideEffectsSuppressed). #1174 is a one-line version bump, so the failure is not its doing; the same source passed on main's push run and on #1173.

Cause. In SubscriptionAgent's RangeCompleted pass the committed write (LastCommitted = …), a _tracker.PublishAsync and the gate flip in completeSideEffectGateAsync are three steps on the command loop. The test polled LastCommitted >= GateMark every 20 ms and asserted the flag immediately, so on a loaded runner it could land between step one and step three. Inserting a 60 ms delay after the committed write locally reproduces the CI failure on every run.

Change. Test-only. The fact now waits for the flag to drop and then asserts committed progression had reached the mark, the same contract observed from the other side. The hold-phase assertion (plenty enqueued, nothing committed, still suppressed) and the per-page checks (everything up to the mark suppressed, everything past it live) are unchanged. With the delay still in place the fixed test passes 3/3; clean, the class passes 3/3.

Not changed. The agent's ordering: pages past the mark are only loaded after the flip in the same pass, so production is consistent and the published ShardState already stamps a consistent pair.

🤖 Generated with Claude Code

…mark that drives it

#1174's CI run failed the_gate_flip_is_driven_by_committed_progression_not_by_what_was_loaded
on an unrelated one-line version bump: SideEffectsSuppressed was still true the instant LastCommitted
reached the mark. In the RangeCompleted pass the committed write, a tracker publish and the gate flip
are three steps on the command loop, so a poller keyed on LastCommitted can observe the first before
the third. Widening that window locally with a delay reproduces the failure every time; the test now
waits for the flag to drop and then checks that committed progression had reached the mark, which is
the same contract read from the other side. The agent's ordering is unchanged, since pages past the
mark are only ever loaded after the flip in the same pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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