Repository navigation
land: atomic-save-test-evidence - #620
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 20, 2026
…ach request The views-off atomic-save watcher test flaked on macOS CI with "call_tree still shows the pre-save edge after the watcher delivered the save, but does not say the answer is incomplete" (complete: Null). The cause was the test's evidence ordering, not a product window. Each poll asks call_tree and then callers. The old loop set event_seen from either answer's complete:false and then asserted on BOTH answers. When FSEvents delivered the save between the two requests, call_tree had been answered before the daemon knew about the edit (honest: old edge, no complete field), callers was marked through the flush-window set, and the test then held the earlier tree answer to the later evidence. The log matches: the failure was in the first poll, about 115 ms after the save. That is inside the 250 ms watcher flush window, so the trigram index could not have seen the edit yet, and the evidence came from callers. Each answer is now judged against what was known when it was requested, and it is learned from before the next request. Every stale answer the daemon gave after it provably had the save must still carry complete:false with a gap naming the file or pending watcher work. Every marked stale answer is still checked for its gap and counted. The assertion is unchanged; only answers requested before the daemon could know are no longer held to later evidence. A test-timing-hooks-only seam (AFT_TEST_WATCHER_INTAKE_GATE_FILE) holds the watcher thread's intake while the gate file exists. It logs each path taken in to <gate>.taken. The new test uses it to release the save exactly between the two questions of one round. With the old judging order that test fails with the CI panic (same line, left: Null right: false); with the new order it passes. It also asserts the round really straddled the delivery: call_tree unmarked with the old edge, callers marked naming src/probe.ts. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…ence Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
The pinned-moment atomic-save test released the watcher intake, waited for the save to be taken in, then asked callers. If the test paused there, the daemon could flush and refresh first and callers would return the fresh edge, failing a correct run. A second test seam holds the flush while <gate>.flush-hold exists; the test holds it across the round. With the hold removed and a 1.5 s pause added, the test fails as described. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
The watcher calls the flush path on idle ticks too. Holding there could stop the thread before it took in the save the test was waiting for, so the hold now applies only when taken-in paths are waiting to be flushed. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
ualtinok
force-pushed
the
land/atomic-save-test-evidence
branch
from
October 20, 2026 04:43
af60c6b to
bbfe90c
Compare
jacobocasado
pushed a commit
to starredjaco/aft
that referenced
this pull request
Oct 20, 2026
Rebase the release prep onto origin/main 3faaded and extend .alfonso/release-notes/v0.61.0.md to cover the merges after cortexkit#590: cortexkit#578, cortexkit#596, cortexkit#600, cortexkit#601, cortexkit#612, cortexkit#613, cortexkit#614, cortexkit#616, cortexkit#617, cortexkit#618, cortexkit#619, cortexkit#620, cortexkit#622 and cortexkit#623. Fold and delete the 27 next/ fragments those merges added. Credit cortexkit#465 (@null-axiom) and cortexkit#564 (@iceteaSA), and extend the cortexkit#577 line with the shell timeout task-id fix. Refresh ANNOUNCEMENT_FEATURES in both plugins. Pi leaves out the OpenCode 2 permission line, which does not apply to Pi users. Co-authored-by: alfonso-aft <289616620+alfonso-aft@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.
Accepted agent delivery; branch-keyed search descriptor included.
Summary by cubic
Fixes a flaky atomic-save watcher test on macOS CI. Each poll asks
call_treethencallers; when FSEvents delivered the save between the two requests, the old loop held the earliercall_treeanswer to evidence fromcallersand failed a correct run. Answers are now judged against what the daemon knew when each was requested, and learned from before the next request.test-timing-hooks-only seams (AFT_TEST_WATCHER_INTAKE_GATE_FILEplus a.flush-holdvariant) that hold watcher intake and flush while gate files exist, logging each path taken in; the flush hold applies only while paths are pending so idle ticks never stop the thread before intake.call_treeandcallersare each checked and learned from independently.Written for commit bbfe90c. Summary will update on new commits.


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
This PR fixes how the atomic-save test judges answers received around a watcher event.
Both earlier unnumbered findings are addressed: flush stays held until the answers arrive, and idle watcher ticks skip the flush hold.
Reviews (4) · Last reviewed commit: "Skip the test flush hold on idle ticks" · Reviewed by Greptile