Repository navigation
Test: settings fence tests never ask the OS about their fake pids - #875
Merged
Merged
Conversation
The fixture's clock is fixed in January 2026, but the reused-pid check fell back to the real process table. On a machine where pid 200 is a real process (it started after the fixture's timestamps), five tests saw a live fake writer as a reused pid and the fence opened. Inject the start-time lookup like layout-fence.test.ts does.
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.
Five tests in packages/core/src/tests/settings-move-fence.test.ts failed on parity CI run 45231373628 with the fence open instead of closed. The fixture clock is fixed at 2 Jan 2026, but its liveness object had no processStartedAtMs, so the reused-pid check in layout-fence.ts asked the real process table about fake pid 200. Wherever pid 200 is a real process, it started after the fixture timestamps, so the live fake writer looked like a reused pid.
Proof: with the injected lookup returning a start after the fixture times, exactly those five tests fail, matching CI. With null (unknown, as layout-fence.test.ts injects), all 40 pass. Test-only change.
Other fixtures that don't inject the lookup (settings-move-run.test.ts) use the real clock, so a real process can't look newer than a file the test just wrote.
Summary by cubic
Fixes flaky fence tests that failed when a fake pid happened to be a real process on the test machine.
settings-move-fence.test.tsnow injects a start-time lookup returningnullso the reused-pid check never asks the OS about fake pids.Written for commit 31aaf61. Summary will update on new commits.


Confidence Score: 5/5
The test-only change appears safe to merge.Summary
Makes the settings-fence tests independent of real processes that happen to share their fake pids.
Reviews (1) · Last reviewed commit: "Test: settings fence tests never ask the..." · Reviewed by Greptile