Skip to content

Wait for this action's report, not any run's - #98

Merged
amrali-eg merged 1 commit into
masterfrom
fix/ec28-idle-evidence
Sep 9, 2026
Merged

Wait for this action's report, not any run's#98
amrali-eg merged 1 commit into
masterfrom
fix/ec28-idle-evidence

Conversation

@amrali-eg

Copy link
Copy Markdown
Owner

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; MainForm was read and not edited.

What was wrong

WaitForMainReady accepted any of the seven headlines IsFinalConversionStatus
matches, 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:

Caller Expects
CancelReview Conversion cancelled
Proceed Conversion complete
ProceedExpectingWarning Conversion did not run

The warning path reporting Conversion did not run rather than Conversion stopped is 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

Control Result
Expect a headline EC never writes Times out against a status reading Conversion cancelled. No files were modified. - which the previous code accepted as idle
Same control's diagnostics Process alive: yes; main window handle: 26610754; review present: no; status bar found: yes; status bar readable: yes.
Full suite 10/10
Unit tests 756 passed

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 failed as a conversion failure rather than as
"cancellation was not exercised", and renaming pressed so an uncertain delivery
is described as attempted.

🤖 Generated with Claude Code

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>
@amrali-eg
amrali-eg merged commit d87933d into master Sep 9, 2026
3 checks passed
@amrali-eg
amrali-eg deleted the fix/ec28-idle-evidence branch September 9, 2026 23:27
pull Bot pushed a commit to jnnycn007/EncodingChecker that referenced this pull request Sep 10, 2026
Two of the four original leads were acted on in PR amrali-eg#98 and neither explained the
failure. WaitForMainReady no longer accepts any final conversion status - each
caller names the headline its own action produces - and the timeout now records
whether the process is alive, the main-window handle reads, the review is gone,
and the status bar can be found and read. Both were real weaknesses in the
failing path; removing them makes the next occurrence legible rather than mute,
which is not the same as finding the cause.

The entry also cited EC-26 as still open. It is fixed.

What remains is one untested theory - that the AutomationElement held for the
main window from startup goes stale, which would match a diagnostic that saw
window chrome and nothing inside it - and the observation that reproduction needs
the whole ten-phase suite rather than phase A alone. The theory's test is to
compare the held object against a freshly found one at the moment of failure;
reacquisition is worth adding only if they disagree.

The entry now also says how this closes: a cause reproduced and controlled closes
it as fixed, and a stress run without recurrence is recorded as not reproduced
and left under watch. Passing runs are not a fix.

Two paragraphs leaned on twelve phase-A-only runs to support a conclusion the
entry itself calls the wrong shape of evidence. They now rest on the code
argument, which is what actually carries them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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