Skip to content

Do not hide unexpected accessibility-test dispatcher failures - #82

Closed
Blackspirits wants to merge 1 commit into
upl/review-base-45f7from
test/accessibility-drainjobs-45f7
Closed

Blackspirits wants to merge 1 commit into
upl/review-base-45f7from
test/accessibility-drainjobs-45f7

Conversation

@Blackspirits

@Blackspirits Blackspirits commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

The accessibility sweep added in upstream SubtitleEdit#14825 introduced a helper that drains Avalonia dispatcher jobs while windows are opened/closed headlessly. A follow-up intentionally tolerated one known race: a background Video OCR callback can try to show a dialog after its owner has closed, and Avalonia throws InvalidOperationException("Cannot show a window with a closed owner.").

The helper currently catches Exception, however, so any unrelated dispatcher failure is silently swallowed. That can let the accessibility test pass while asynchronous window code is actually failing.

This change:

  • catches only the exact Avalonia closed-owner InvalidOperationException;
  • leaves the known headless timing race tolerated;
  • lets every other dispatcher exception fail the test normally;
  • updates the helper comment to match the narrowed contract.

Validation

  • based on upstream 45f7430aa7ec8d32f0079563f12ff7c0bfd1dc8e
  • Avalonia's current Window.EnsureParentStateBeforeShow throws this exact exception type/message for a closed owner
  • diff is limited to tests/UI/Logic/AccessibleNamesTests.cs
  • full solution restore passed
  • full solution build passed
  • full solution test suite passed on the first run
  • UI suite: 5,150 passed, 9 skipped, 0 failed (5,159 total)
  • retry step was not used
  • validation run: #34762192646

No production behavior is changed.

AI assistance: ChatGPT was used to adversarially review the newly merged accessibility test infrastructure and identify the overly broad exception suppression.

@Blackspirits Blackspirits left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent adversarial re-check: the change remains limited to the accessibility test harness. The tolerated race is narrowed to Avalonia's exact closed-owner InvalidOperationException; unexpected dispatcher failures are no longer swallowed. Full CI run #34762192646 passed restore, build and the complete test suite on the first run; retry was not used. No blocker identified. Keep draft; no merge or upstream change performed.

Copy link
Copy Markdown
Owner Author

Superseded by draft PR #85 after upstream commit 6840e79 fixed the Video OCR closed-owner race at the source. #85 removes dispatcher exception suppression entirely rather than retaining the narrower exception filter proposed here, and full solution CI #34767627147 is green (UITests: 5,149 passed, 9 skipped, 0 failed). Keeping this PR draft/unmerged for audit history; no upstream action performed.

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