Wait for this action's report, not any run's - #98
Merged
Conversation
EC-28, first lead. WaitForMainReady accepted any of seven final conversion statuses, so it asked "has some run ended" rather than "has the one just started ended". A status outlives the action that wrote it - the window clears it only when the next action starts - so the wait could be satisfied by the previous action's report. Every phase drives one action per window today, which is the only reason that has not bitten. It is EC-26's shape in the one helper that fix did not reach. Each caller now names the headline its own action produces. Measured rather than assumed, by instrumenting the helper and reading a full suite run: declining a review reports "Conversion cancelled", carrying one through reports "Conversion complete", and the refused run in the warning path reports "Conversion did not run". The timeout now also records what could still be established: whether the process is alive, whether the main-window handle reads, whether the review is gone, and whether the status bar can be found and read. EC-28's one failure showed window chrome and nothing else, and left none of those knowable afterwards. Each is gathered separately so one unreadable answer does not cost the others. Control: expecting a headline EC never writes times out against a status reading "Conversion cancelled. No files were modified." - which the previous code accepted - and reports "Process alive: yes; main window handle: 26610754; review present: no; status bar found: yes; status bar readable: yes." This does not close EC-28. The failure was never reproduced, so this removes a known weakness in the failing path and makes the next occurrence legible; it does not show that this was the cause. EC is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
First lead on EC-28, the unexplained phase A timeout.
This does not close it - the original failure was never reproduced, so this
removes a known weakness in the failing path and makes the next occurrence
legible. It does not show that this was the cause, and the entry stays open.
No production code changes;
MainFormwas read and not edited.What was wrong
WaitForMainReadyaccepted any of the seven headlinesIsFinalConversionStatusmatches, so it asked has some run ended rather than has the one just started
ended. A status outlives the action that wrote it - the window clears it only
when the next action starts - so the wait could be satisfied by the previous
action's report and return before the current one had finished.
Every phase drives one action per window today, which is the only reason that has
not bitten. It is EC-26's shape in the one helper that
fix did not reach, sitting directly in the path that failed.
Now
Each caller names the headline its own action produces. That mapping was measured
rather than assumed, by instrumenting the helper and reading a full suite run:
CancelReviewConversion cancelledProceedConversion completeProceedExpectingWarningConversion did not runThe warning path reporting
Conversion did not runrather thanConversion stoppedis the sort of thing reasoning alone would have got wrong.The timeout also records what could still be established - whether the process is
alive, whether the main-window handle reads, whether the review is gone, and
whether the status bar can be found and read. EC-28's one failure showed window
chrome and nothing else and left none of those knowable afterwards. Each fact is
gathered separately so one unreadable answer does not cost the others.
Evidence
Conversion cancelled. No files were modified.- which the previous code accepted as idleProcess alive: yes; main window handle: 26610754; review present: no; status bar found: yes; status bar readable: yes.The mutation required a successful build before running, and the source was
restored byte-for-byte afterwards.
Not in this PR
Three findings against the cancellation state machine merged in #97 are being
handled separately, in order: reading the final status before attempting another
press, reporting
Conversion failedas a conversion failure rather than as"cancellation was not exercised", and renaming
pressedso an uncertain deliveryis described as attempted.
🤖 Generated with Claude Code