Skip to content

fix: prevent command cancellation deadlocks and flaky test failures - #365

Merged
Seb-GRAF merged 1 commit into
mainfrom
fix/command-cancellation-tests
Oct 28, 2026
Merged

Seb-GRAF merged 1 commit into
mainfrom
fix/command-cancellation-tests

Conversation

@Seb-GRAF

Copy link
Copy Markdown
Collaborator

Problem

Command cancellation can deadlock the main actor when the command queue resumes the same task. Fixes #364.

Main also fails intermittently on window-event delivery and five-second process assertions. The latest failed run, 40669727906, failed the widget selection test; 40668895166 exceeded the command pipe-cleanup test's five-second limit.

Changes

  • Enqueue command cancellation on its existing serial queue, avoiding the lock cycle between task cancellation and continuation resumption. Exercise cancellation racing with process exit.
  • Keep output-limit, timeout-error and child-cleanup assertions without the three observed five-second performance checks. Cleanup tests have a one-minute ceiling and children that outlive that ceiling.
  • Check first-click acceptance alongside the existing direct mouse-selection assertions instead of routing synthetic events through a live window. Native window-server click delivery is no longer covered by this unit test.
  • Check both independently launched OmniWM commands without assuming execution order.

CI parallelism is unchanged. No configuration, schema, settings or documented feature contract changes.

Testing

  • Updated onto main at 0fe1fed.
  • Full swift test: 295 XCTest tests and 538 Swift Testing tests passed with normal parallelism, using system tools via PATH=/usr/bin:/bin:/usr/sbin:/sbin.
  • The default local PATH causes existing release tests to emit Git diff output unexpectedly; those pass with system Git. No release code or machine configuration was changed.
  • Captured a stack sample of the original deadlock before changing cancellation.
  • git diff --check passed. GitHub CI remains to be verified.
  • No visible app changes; no screenshots required.

Merging

One fix commit. Squash merge using the PR title after CI passes.

GPT-6 Astra via the Codex harness in T3 Code.

@Seb-GRAF
Seb-GRAF enabled auto-merge October 28, 2026 10:39
@Seb-GRAF
Seb-GRAF merged commit a934b97 into main Oct 28, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the fix/command-cancellation-tests branch October 28, 2026 10:40
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cancelling a command as it exits can deadlock the bar and tests

1 participant