Skip to content

land: replay-exit-marker-recheck - #507

Merged
ualtinok merged 2 commits into
mainfrom
land/replay-exit-marker-recheck
Oct 18, 2026
Merged

ualtinok merged 2 commits into
mainfrom
land/replay-exit-marker-recheck

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Fixes a replay race where a background command that finished during an AFT restart was reported as an unknown outcome instead of its real exit code.

The wrapper writes its exit marker before exiting, but replay could read the marker before it was written, then observe the process as dead and permanently classify the task as fate_unknown. Replay now re-reads the exit marker after detecting the process is gone, covering Starting, Running, and Killing recovery states.

Bug Fixes

  • Reports the real exit code for commands that finish while AFT restarts instead of an unknown outcome.
  • Adds a deterministic regression test covering zero and nonzero exit codes and completion delivery.
  • Adds release notes and a search-quality benchmark descriptor for the replay fix.

Written for commit cbddce0. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Replay now reads the exit marker again after finding a background command’s process gone. This preserves the real exit code when the command finishes between the first marker read and the process check.

  • Background command replay recovers exit results written as processes finish.

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile

ualtinok and others added 2 commits October 18, 2026 02:36
Replay could read an empty exit marker, then see the wrapper dead after it had published the real status. That stale observation permanently classified a normally finished pipes task as fate_unknown. Re-read proof after the liveness probe before choosing a missing-proof outcome, including Starting and Killing recovery.

Keep the session-isolation integration test and its assertions unchanged. Add a deterministic process-probe seam regression covering real zero/nonzero exit codes and completion delivery. Baseline isolated Linux runs: 0/50 failures; with the marker/probe window widened: 3/3 failures before, 0/3 after. Removing the second marker read reddens only the new regression among 36 replay tests.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…check

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 3e427f1 Oct 18, 2026
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant