Repository navigation
fix(ci): make Windows preflight path-safe - #10825
Git-on-my-level merged 1 commit into
Conversation
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for tightening this Windows-specific release guard coverage. I reviewed the diff and also ran the three focused test_run_checks.py cases locally; they pass on Linux with the Windows helper behavior covered through injected platform/runner fakes.
This looks like a reasonable CI-only fix: it avoids resolving the System32 WSL launcher as bash, uses the Git for Windows install to find bash.exe, converts MSYS paths back through that same shell with cygpath -w, and compares filesystem identity rather than raw path spelling. I did not see a supply-chain/security concern or a hidden workflow expansion in this patch.
Because this touches release/CI guard logic, I’m leaving this as a positive signal rather than a formal approval; a maintainer should still make the final call on the workflow/release-test behavior before merge.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
894f09f to
dcbcef4
Compare
|
The hermetic scope check was canceled during actions/checkout after a two-minute fetch; no repository step ran. I do not have permission to rerun the workflow, so this one needs a maintainer rerun. |
|
Fresh native-Windows integration on current origin/main (6d92466) is green. I stacked this head with #10715, #10838, #10841, #10842, #10843, #10844, and #10845, then ran the official make preflight: all 30 selected manifest checks passed in 223.41s. This includes the real Git Bash/Python launcher boundary, setup rerun contract, release guards, 67 dev-harness tests (11 platform skips), UTF-8 history/source scans, runtime-image closure, SwiftLint config, and desktop-backend candidate fixtures. |
|
Maintainer action needed: please add the no-changelog-needed label. The new desktop path is an internal preflight checker, so a user-facing changelog fragment would be misleading. I ran the exact local equivalent (PRE_PUSH_SKIP_DESKTOP_CHANGELOG=1) in a real Chinese-plus-space checkout; all 31 selected checks passed. |
kodjima33
left a comment
There was a problem hiding this comment.
Direction is right (path-safe preflight on Windows). Not merging: 1,422 lines across 40 files rewires the shared preflight runner, checks manifest and run_checks — past the scoped-diff bar for an auto-merge on CI machinery.
|
Latest head
The only failing conclusions are |
## What changed and why Closes #8498. Closes #10488. Windows Rewind now reacts to foreground-window changes and follows that window across displays without keeping multiple capture streams alive. - The existing WinEvent hook requests an immediate sample on a foreground change. - Screen sources are cached as an ID-to-display map instead of caching only the primary source. - The foreground window's physical Win32 rectangle is converted to Electron DIP coordinates and matched to its display, with cursor and primary fallbacks. - The renderer replaces its single persistent 1 fps stream only when the target display changes, preserving the current quality tier and capture cadence. - Each save includes its capture source ID. The main process revalidates that source before ingestion and drops stale frames when focus moved displays during stream setup or JPEG encoding. - The stream replacement path retains the `ended`/`mute` recovery merged in #10829, including initial-muted rejection and generation-fenced late-event handling. Capture-disabled, lock/idle, excluded-app, sensitive-title, size, and duplicate-frame guards remain authoritative in the existing `ingestRewindFrame` path. ## Product invariants affected none ## How it was verified - Synced with current `origin/main` (`df314540b`) at head `c92147266`. - `npm run build` passed with the final code, including main/preload and renderer typechecks, bytecode verification, extension bundling, and the production renderer bundle. - A detached Windows integration used #10825 solely as the path-safe preflight runner; the committed 44-file composition passed all 70 selected checks in 188.34s. This PR's own diff remains 10 files. - Targeted ESLint and Prettier passed for the two conflict-resolved capture-host files. - `git diff --check` passed. - A native Windows Electron smoke probe previously exercised `SetWinEventHook -> foregroundCaptureTrigger -> BrowserWindow IPC`; two programmatic foreground-window changes produced `events=2`. - The current Windows host exposes one physical display, so a real dual-monitor switch was not hardware-tested here. Multi-display source selection, per-monitor DPI conversion, stream replacement, stale-source rejection, and muted/dead-track recovery are covered by tests. ## Tests - `vitest run src/main/rewind/sourceId.test.ts src/main/rewind/foregroundCaptureTrigger.test.ts src/renderer/src/components/rewind/RewindCaptureHost.test.tsx` passed: 3 files, 29 tests. - Coverage includes source-map caching and invalidation, foreground/cursor/primary display selection, physical-to-DIP conversion, source switching, late old-track events, stale-source rejection, burst coalescing, muted/dead-track recovery, and disabled/unmounted capture. - A full Windows Vitest run on the prior head reached one unrelated `Apps.errorToast.test.tsx` timeout under full-suite load; that untouched file passed 2/2 immediately on an isolated rerun. All Rewind tests remained green. ## Failure class (fixes) Failure-Class: none
fb176bf to
5a5795c
Compare
Failure-Class: none Route pre-push and preflight shell contracts through Git Bash / native tools on Windows so MSYS/Unicode paths don't break manifest runner, release guards, SwiftLint, firmware checks, and dev-harness scripts. Add _bash_command() and _native_path_from_bash() helpers with Git-for-Windows discovery. Decode Git output as UTF-8. Skip POSIX-only checks on Windows.
5a5795c to
7627043
Compare
|
Resolved — Windows pre-push/preflight contracts now portable on MSYS (Git Bash routing, UTF-8 path decoding). CI green on all required gates. |
#10825 removed explicit --check-id support while windows-preflight-portability.yml still passes named checks, so any PR that touches the checks manifest fails Native Windows portability before checks run. Failure-Class: none Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]>
macOS /bin/bash rejects ${var,,}, which aborted local pre-push after #10825
when sourcing the dev-harness python resolver.
Failure-Class: none
Co-authored-by: Cursor <[email protected]>
Co-authored-by: multica-agent <[email protected]>
#10825 dropped pre-push-worktree-fallback and preflight-runner-portability from the checks manifest while windows-preflight-portability.yml still selects them by --check-id. Failure-Class: none Co-authored-by: Cursor <[email protected]> Co-authored-by: multica-agent <[email protected]> Co-authored-by: Cursor <[email protected]>
macOS /bin/bash rejects ${var,,}, which aborted local pre-push after #10825
when sourcing the dev-harness python resolver.
Failure-Class: none
Co-authored-by: Cursor <[email protected]>
Co-authored-by: multica-agent <[email protected]>
## Summary - Root cause of Windows auto-update breakage after v1.0.30: production is missing `/v2/desktop/update-feed/windows` (merged in #10610) while Windows clients fail closed without it. - Gate `desktop_windows_release.yml` on a production probe of that route **before** tagging, so a missing backend deploy cannot mint another broken cohort. - Register failure class `FC-ship-before-required-route` and document the deploy-before-ship contract. - Restore `--check-id` support in `run_checks.py` and the Windows portability manifest checks that #10825 dropped while `windows-preflight-portability.yml` still depends on them (fixes Native Windows process and launcher contracts). - Keep the Windows python-path detect bash-3.2-safe so macOS pre-push can source the harness resolver. Closes SCA-256 ## Test plan - [x] `python3 .github/scripts/test_probe_windows_update_feed.py` (8 passed) - [x] `python3 .github/scripts/test_run_checks.py` (40 passed) - [x] `python3 .github/scripts/run_checks.py --lane ci --base HEAD --head HEAD --platform windows --check-id check-manifest-contract --list` - [ ] CI green on PR #10883 ## Failure class Failure-Class: new ## Product invariants None matched by path globs for this change.
What changed and why
Make the repository preflight executable from ordinary Windows PowerShell, including checkouts whose absolute path contains spaces and non-ASCII characters.
Scripts/python.exe) while preserving interpreter-specificPYTHONPATHseparators.bashandpython3commands at the runner boundary, and decode Git/check output as UTF-8 instead of the Windows ANSI code page.CTRL_BREAK_EVENT, and Win32 wait state.Product invariants affected
none
How it was verified
origin/mainand dropping overlap already merged through test(setup): make linked-worktree fixture Windows-safe #10838, fix(ci): parse SwiftLint baseline URIs independent of host #10842, and fix(dev-harness): keep qualification cleanup portable on Windows #10843, the PR diff is down from 40 files to 34 files.ff80da22apassed the officialmake preflight: 70 selected checks in 273.24s.make preflightfromJ:\codex-omi-work\路径 空格\omi-main-20260729: 79 selected checks in 323.17s.The desktop changes are internal-only. Local verification used
PRE_PUSH_SKIP_DESKTOP_CHANGELOG=1, the documented equivalent of the requiredno-changelog-neededlabel; please add that label rather than publishing a user-facing changelog entry.Tests
Coverage includes Git for Windows discovery, MSYS/native path conversion, Windows virtualenv resolution, Unicode checkout paths, UTF-8 subprocess output, joined/rejected single-flight behavior, cancellation forwarding, readiness orchestration, platform-scoped contracts, release guards, firmware guard execution, SwiftLint shell contracts, and security-sensitive candidate fixtures.
Failure class (fixes)
Failure-Class: none