Repository navigation
mac tests: waitUntil throws, helper-exit bound logs instead of failing, carried-hold release tests (#809) - #812
Merged
Merged
Conversation
Non-blocking follow-ups from the #808 review: waitUntil now throws after recording its XCTFail so a timeout stops the test instead of cascading; the post-detach helper-exit bound is 20s (was 5s) and logs via XCTContext instead of failing when a slow runner exceeds it, force- killing the helper so it's never left running; DisplayCandidateTests gains model-level cases for carried hold work released by a v2 frame arriving and by invalidation (only the timeout path was covered). Implementation-Agent: Claude Sonnet 5 (daniel-parent subagent) Commit-Executor: daniel-parent subagent (Claude Sonnet 5) Co-authored-by: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
This was referenced Sep 17, 2026
ItsAkilesh
pushed a commit
to ItsAkilesh/flashtex
that referenced
this pull request
Sep 18, 2026
…ash-tex#800) `testLateSaveReceiptIsReconciledWithoutLosingLaterEdits` waited three fixed 1.6 s sleeps for a receipt the fake helper delays by 1.2 s. On a loaded runner that margin is not the real problem: the fake's own write fires the live `DocumentWatcher`, whose status check goes back to the same fake and so answers late too — appending a `status` entry to `lateReplies` and overwriting `captureNote` with "Could not check paper.tex on disk: no status reply from the project-files helper within 0.4 s", which is exactly how main CI failed at :437/:450. Which of the two timers wins (the watcher's single retry after max(helperTimeout, 0.5) s versus the fake's 1.2 s delay) is decided by load, so widening the sleep makes it worse: a wider window lets the extra round trip complete and breaks the test's own reply-count invariant. - Wait on the observable condition instead: the late receipt is reconciled when the text it confirms has become the baseline (`savedText`), and, in case 3, when the late conflict is surfaced. `waitUntil` follows the shape flash-tex#812 added in NavigationMultiFileV2Tests — generous bound, XCTFail plus throw, with the late-reply list in the message. - Stop the watcher for this test, which is about the save path only; its own timing is covered by DocumentWatcherTests, and no save here succeeds, so nothing re-arms it. The reply-count invariant is kept and tightened: exactly one late reply per save, now asserted in case 3 as well. No product change: the status check the watcher made was correct (it reported `unchanged`); it only clobbered a transient note and a test-visible counter. Evidence: 12/12 sequential runs of the single test pass, 3.70-4.96 s (was a fixed 6.1 s); full DocumentFilesTests 13 tests, 4 skipped (no Rust helper locally), 0 failures. With the delay shortened to 0.6 s, which forces the watcher's retry to land after the reply, the old test failed deterministically with the CI message and lateReplies == 2; the new one passes. Implementation-Agent: Claude Opus 5 (daniel-parent subagent) Commit-Executor: daniel-parent (Claude Opus 5) Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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.
Fixes #809, items 1–3. Item 4 (stale completion ordering, pre-existing) is out of scope.
waitUntilthrows after recording its XCTFail, so a timeout stops the test instead of cascading.waitForControllerExit: the bound goes from 5 s to 20 s. When it's exceeded, the test records an XCTContext activity instead of failing, then SIGKILLs the helper so it never survives into the next test.DisplayCandidateTestscover carried hold work released by candidate arrival and by invalidation.Tests:
DisplayCandidateTests|NavigationMultiFileV2Testsran 16 tests with 0 failures. 8 were skipped because the real-helper binaries weren't set locally.This PR only changes tests. Reviewed by the Commander (diff read).
🤖 Generated with Claude Code