Repository navigation
fix(desktop): pin hidden-events superseded write race test - #5215
Merged
Merged
Conversation
Hold the in-flight unhide PUT until the superseding hide is queued so the test matches HiddenEventsStore generation semantics instead of relying on async let scheduling order. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Re-check write generation after the remote setHiddenEvents call so an older commit returns superseded instead of applied when a newer hide was queued during the network round trip. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
Parallelize CompassData and CompassUI swift test, skip rebuild when .build artifacts are restored, and prebuild packages beside xcodebuild so merge-group swift-packages avoids cold compiles. Hidden event coordination tests use explicit tasks, bounded gate waits, and post-PUT supersede checks so xctest cannot hang until the job timeout. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Wait for the mock replace handler to reach its gate before calling resume so an early resume cannot noop and leave xctest blocked until the job timeout. Run package tests serially again and add teardown resumes on coordination gates. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Keep #5215 pinned supersede test sequencing with gate waitForTest before rehide. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Drop branch-keyed stress steps and the stress shell helper from this PR; the deterministic test pin stays in HiddenEventsStoreTests only. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
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.
What and why
HiddenEventsStoreTests.testSupersededWriteReturnsWithoutApplyingflaked onswift-packagesbecauseasync letdoes not guarantee whichsetEventHiddencall receives the first write generation on the main actor. When the hide write won the race, expectations flipped (appliedvssuperseded) even though the store behaved correctly.This pins the scenario the test name describes: the unhide PUT stays in flight until the superseding hide is queued, matching the generation chain in
HiddenEventsStore(post-PUT supersede guard is already onmainfrom #5216).Verify
swift-packageson this PRbf9d4bb072760d183a0f43f5819ff6ff829b6fb1, jobswift-packages, stepStress HiddenEventsStore superseded test (50x)— log lineStress complete: 50 iterations passed.Fixes the pre-existing flake seen on PR #5177 (unrelated to wide viewport work).