Repository navigation
test(providers): gate turn account updates in sign-in race test - #715
Merged
Merged
Conversation
This was referenced Nov 16, 2026
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.
The delayed-rejection test sometimes reads
expiredbefore the successful turn's account update runs, even though the turn is already committed. This is a test race: ingestion commits the turn, then awaits settling, broadcasts and agent-bus handling before callingcoreTurnLogin. A database count therefore cannot establish that the success has enteredProviderAccounts.afterTurn; the test's no-op queue barrier can run ahead of it.Observe the real account-update enqueue, keep the rejected account read held until the success is queued, then wait for both real updates to finish before asserting
signed_in. Waiting for both independently also catches a stale rejection when ordering is broken. Remove the database-count helper and the two-second sampling loop. Product ordering inprovider-accounts.tsandturn-logins.tsstays unchanged.Related: #696, #700, #703
Verification
nice -n 10 bun run check:tmp <focused-file> --rerun-each=200; its identical source was staged under a temporary test filename so the unchanged baseline could run alongside it. Both used a privateTMPDIRunder/var/tmp.update()makes the new test fail withExpected: signed_in / Received: expired. The mutation was confined to a temporary test copy and removed.bun install,bun run typecheck,bun run lint,bun run format:check, and the final focused file: passed, all withnice -n 10and temp under/var/tmp. The shared-Postgres runner reported no test temp directories left behind.No UI, protocol or runtime behavior changes.