fix(ci): make pre-push portable on Windows - #10574
Conversation
cab048b to
45fbe17
Compare
|
Thanks for tightening the Windows pre-push path here. I reviewed this as workflow-sensitive CI/hook code rather than a normal app change. What looks good:
I also locally ran the relevant portable checks on the PR head (
All passed in my Linux review environment, and GitHub's native Windows portability check is also green. Because this adds/changes CI and pre-push control-plane behavior, I am not formally approving; a human maintainer should still review the workflow/hook surface before merge. My maintainer signal is positive pending that human workflow review. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
3d2a92d to
52815b5
Compare
daf8833 to
429b15e
Compare
1c00de1 to
a0a4622
Compare
|
CI follow-up on refreshed head The same test already failed on current |
Fixes #10724. ## What changed and why - wait until the injected CoreAudio probe has actually entered its wedged semaphore before checking responsiveness - replace the fixed `> 10` timer/read throughput requirements in a 300 ms window with three explicit main-actor heartbeat completions and three explicit `currentSnapshot` completions - keep snapshot reads off-main so a blocking regression times out without preventing the test from releasing and joining the parked HAL probe - exempt the real Swift package test path, `desktop/macos/Desktop/Tests/`, from the user-facing changelog gate and cover that path classification with regression cases `testMainRunLoopKeepsPumpingWhileTheHALIsWedged` was testing a binary liveness contract with host-throughput thresholds. Under macOS runner contention, the main actor and snapshot path still made progress, but the isolated suite completed too few iterations. The production contract is that the main actor and turn-start snapshot reads both keep completing while the HAL probe remains blocked off-main, so the new test observes those two completions independently instead of measuring scheduler throughput. The changelog gate already exempts internal test paths because its post-merge push run cannot see a PR-only `no-changelog-needed` label. It covered the legacy lowercase `desktop/macos/tests/` directory but not the Swift package tests under `Desktop/Tests/`, so this test-only patch exposed the same open failure class on the actual Swift test path. ## Failure evidence - current `main`: [run 30276084659](https://github.com/BasedHardware/omi/actions/runs/30276084659), `reads == 10` - unrelated #10574 head: [run 30280746072](https://github.com/BasedHardware/omi/actions/runs/30280746072), `ticker.count == 5`, `reads == 4` - unrelated #10574 rerun: [run 30283186121](https://github.com/BasedHardware/omi/actions/runs/30283186121), `ticker.count == 7`, `reads == 7` All sibling `PTTInputDeviceProbeTests` cases passed in those failures. ## Product invariants affected none ## How it was verified - `python3 .github/scripts/test_desktop_changelog.py` passed: 4 tests - `python3 .github/scripts/check-desktop-changelog.py --base origin/main --head HEAD` passed: no desktop changes require a changelog entry - `python3 desktop/macos/scripts/check_desktop_test_quality.py` passed - `git diff --check origin/main...HEAD` passed - reviewed the semaphore ordering: `started` is fulfilled immediately before `release.wait()`, main-actor heartbeat and snapshot-read expectations settle before `release.signal()`, and `finished` is awaited afterward This contribution was prepared on Windows, so the local commit hook could not run the Xcode-only `swift-format` command (`xcrun` is unavailable). Desktop Swift CI is the authoritative compile, formatter, and XCTest verification for the Swift test change. ## Tests - `ChangelogRequirementTests` now covers both a top-level and nested Swift package test path. - The rewritten PTT test is the regression proof for the three linked flaky runs; it fails in bounded time if either the main actor stalls or snapshot reads block while the injected HAL probe is parked. ## Failure class (fixes) Failure-Class: FC-push-gate-internal-path-scope ## Scoped cleanups The changelog path exemption is a separate commit because the initial test-only head demonstrated that relying on `no-changelog-needed` would pass only the PR lane and could still redden the post-merge push lane. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10742?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
|
Reviewed the refreshed head Positive maintainer signal from my side:
I am still not formally approving because this touches CI/pre-push control-plane behavior and the PR already carries by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Failure-Class: none
Failure-Class: none
Exercise the real manifest subprocess path on native Windows and verify python3 resolves to the active interpreter even when PATH is empty. Tests: python .github/scripts/test_run_checks.py (33 passed, 1 skipped).
Merge the mainline forwardable-signals and send-signal behavior with Windows Job Object process-tree ownership after rebasing the portability branch. Keep PR preflight fixtures executable on native Windows. Tests: manifest pr-preflight-contract-tests, preflight-runner-portability, and check-manifest-contract on native Windows; actionlint 1.7.12. Failure-Class: none
Carry the complete BasedHardware#10293 root-resolution fix from BasedHardware#10491 into the portable pre-push chain, adapting its regression to the explicit Windows Python launcher contract and running it in the native Windows lane. Tests: native Windows manifest checks pre-push-worktree-fallback, preflight-runner-portability, and check-manifest-contract; Python preflight and manifest unit suites; actionlint. Failure-Class: none Co-authored-by: Nik Shevchenko <kodjima33@gmail.com>
Use the selected interpreter for the PR-preflight hatch and replace wall-clock process polling with pipe and process-handle synchronization. Failure-Class: none
a0a4622 to
4ca8e0a
Compare
4ca8e0a to
e4609d8
Compare
|
CI is now fully green on refreshed head |
|
Reviewed refreshed head Updated maintainer signal:
I am still not formally approving because this changes CI/pre-push control-plane behavior and the PR carries by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Fixes #9724.
Fixes #10293.
Summary
os.kill(pid, 0)probingPRE_PUSH_SKIP_PR_PREFLIGHT=1failure-class hatchforwardable_signalsand direct-child fallback contracts while extending Windows ownership to the full process treeshow-toplevelexit 128 does not force contributors toward--no-verifyWaitForSingleObject, without wall-clock polling or leaked handlesRoot cause
The pre-push control plane assumed POSIX signals, process groups, executable script launching, virtualenv layout, and
python3naming at native Windows boundaries. It also let Python decode Git's UTF-8 output with the active Windows code page, so a worktree path containing non-ASCII characters could fail before any check ran.A second gap remained after #10401: the installed hook dispatcher could recover when
git rev-parse --show-toplevelfailed in a linked worktree, butscripts/pre-push,scripts/pre-push-singleflight,scripts/pr-preflight,.github/scripts/preflight_runner.py, and.github/scripts/pr_preflight.pyrepeated the unguarded lookup and aborted later in the same chain.Fixing only the first Windows exception or only the Makefile/dispatcher boundary would expose the next launch, liveness, decoding, root-resolution, or hatch failure. This PR closes that reachable portability chain.
Attribution
The linked-worktree root-resolution slice preserves Nik Shevchenko's original #10491 implementation through the rebased commit lineage, with
Co-authored-by: Nik Shevchenko <kodjima33@gmail.com>. Its regression was adapted to the explicit Windows Python launcher introduced by this PR and registered in both manifest lanes plus native Windows CI.Verification
origin/main(ffc13daf4c) and reran the native Windows checkspre-push-worktree-fallback,preflight-runner-portability, andcheck-manifest-contract-> 3 checks passedtest_preflight_runner.py-> 23 tests passed withResourceWarningpromoted to an error, including a real Job Object parent/descendant termination proof, explicit hatch interpreter coverage, and runner/direct PR-preflight execution from a Chinese worktree path withPYTHONUTF8=0pre-push-singleflight -> preflight_runner -> pre-pushchain with nopython3onPATHtest_run_checks.py-> 33 tests passed, 1 POSIX-only fixture skipped; the real manifest subprocess path also resolvedpython3to the active interpreter with an emptyPATHtest_pr_preflight.py-> 26 tests passed, 3 explicit host-capability skipstest-pre-push-worktree-fallback.shpassed against all five downstream root resolvers under the reproduced exit-128 conditiontest_pre_push_ci_prediction.py-> 14 tests passedscripts/test-pre-push-diff-base.shpassed under Git Bashbash -npassed for all four touched shell scriptspython -m py_compilepassed for all touched Python filesscripts/failure-class validate --base origin/main --head HEAD ...passed withFailure-Class: nonegit diff --check origin/main...HEADpassedGNU Make is not installed on the local Windows host, so
scripts/test-make-setup.shcould not be rerun there. The new regression exercises every downstream root resolver directly on native Windows; Linux CI remains authoritative for the existing Make fixture and the full manifest.The committed diff changes the manifest, so the legacy local selector intentionally attempts every manifest check. On native Windows that broad run currently stops while collecting the existing
dev-harness-unit-testsbecause its qualification module imports POSIX-onlyfcntl; the path-scoped Windows workflow therefore executes the portability contracts by manifest check ID, while Linux CI remains the full-manifest authority.Product invariants affected
none
Failure class (fixes)
Failure-Class: none