Skip to content

Run on Windows as on Linux and macOS: Python resolution, portability check, Windows CI - #5

Merged
agorischek merged 11 commits into
mainfrom
cross-platform-coverage
Nov 17, 2026
Merged

agorischek merged 11 commits into
mainfrom
cross-platform-coverage

Conversation

@agorischek

@agorischek agorischek commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Makes sure Projections works on Windows, macOS and Linux, and adds a check that catches OS-specific assumptions as they're written.

Python on Windows

projections init --language python scaffolded ["python3", ...], and the django-schema extractor defaults to python3. A standard python.org Windows install has no python3. Now a bare python3 or python in an extractor or prepare command runs the machine's Python 3: the name as written, then the other name, then py -3. Each is checked by --version, which turns away Python 2 and the Microsoft Store alias. Containers run the command as written. doctor and the environment report use the same resolution. The three Python suites that were ignored on Windows now run there, and the Action's end-to-end check on Windows runs a python3 extractor with only python, py and the Store alias on PATH.

Portability check

npm run check:portability (part of npm run check and the tools gates) reads shipped code: packages/ without tests, fixtures and snapshots, plus the Action. Rules:

  • posix-shell, shell-string
  • bare-launcher (npm, npx, .cmd shims, python3, tar), rust-bare-launcher
  • posix-path-module, native-path-slash
  • file-text-lf, path-equality, rust-path-slash
  • npm-script-posix

Exceptions go in .portability.yaml with a reason each; a stale entry fails the check. The rules have tests. Docs are in docs/maintainers/runner-coverage.md#platform-coverage and CONTRIBUTING.

CI

Linux macOS Windows
Rust suites public-product public-product windows
Node suites, installed proof public-product public-product windows-node
Portability, boundaries, casing, links, READMEs, versions, comparators public-product public-product windows-node
Format, lint, types, considered, TSDoc, notices public-product public-product — (text only)
Browser, Chromium browser (all) — windows-integration: CLI suite and a renderer smoke test
Browser, WebKit browser (all) browser-macos (renderers, 2 shards) —
VS Code extension in VS Code — — windows-integration
GitHub Action end to end (uses: ./) public-product public-product windows-integration
Release binary without Node release-proof release-proof release-proof

Every Windows skip names its reason.

Found and fixed

  • Python: python3 is missing on standard Windows installs.
  • Action: snapshots with trust: true passed --trust to show --from, which refuses it, so trusted snapshots never rendered (every OS).
  • Scaffold: init --renderer custom wrote file:C:/?/C:/... on Windows (\\?\ verbatim paths).
  • serve --stdio: reported the repository as \\?\C:\... on Windows.
  • Viewer header: the ascender room (0.35em above the trimmed cap height) was short of Segoe UI's ascent (0.38em), so accents could be clipped on Windows; it's now 0.4em, with no layout change.
  • Paths: Path::join("a/b") produced mixed-separator paths (7 places); two entry-point checks compared paths with === and now use import.meta.main.
  • check-pack: ran Git Bash's GNU tar on Windows, which reads C: as a remote host.
  • Test harnesses: they assumed POSIX in many ways:
    • spawning npm.cmd without a shell, which Node refuses (EINVAL), and missing .exe on the CLI path;
    • which, /bin/sh stand-ins and execute bits;
    • native paths passed to import() and --import;
    • Vite and Windows 8.3 short temp paths;
    • drive-letter case in VS Code URIs;
    • removing a running process's directory (EBUSY);
    • races with the agent's view state.
  • CI environment: the Windows runner's 1024×768 display (narrower than the Inspector's two-panel layout) and its animations off (reduced motion) are now set as on a desktop.

Open, not fixed here

  • .NET on Windows: dotnet fails in the extractor environment (PATH, SystemRoot, DOTNET_*): "An issue was encountered verifying workloads". Fixing it likely means giving extractors Windows' machine locations (ProgramData, ProgramFiles), which changes the documented extractor-environment contract. The installed proof runs the .NET helper on Linux and macOS only, with the reason stated.
  • Pre-existing flakes, unrelated to this PR: starter-dev HMR (also fails on main), Linux WebKit timeouts, a host/core reduced-motion load race, and one intermittent comparator Wasm trap in macOS WebKit (call_indirect signature mismatch in ring-pixels api, 1 of 5 runs; it passed on retry), which may be a WebKit JIT bug and deserves its own issue.

agorischek and others added 11 commits November 16, 2026 13:17
…check, Windows CI

- A bare python3 or python in an extractor or prepare command runs the machine's
  Python 3 (python3, python, then py -3, checked by --version), so the scaffolded
  ["python3", ...] and the django-schema default work on a standard Windows
  install. doctor and the environment report use the same resolution. The Python
  suites no longer skip Windows.
- npm run check:portability flags OS assumptions in shipped code (POSIX shells
  and paths, shell strings, bare npm/python launchers, path.posix on native
  paths, '/'-split native paths, LF-only file text, resolved-path equality,
  Path::join("a/b"), POSIX-only npm scripts), with reasoned exceptions in
  .portability.yaml. Fixes what it found: mixed-separator Path::join calls and
  entry-point checks by path equality (now import.meta.main).
- CI: windows-node (Node suites, installed proof, file-system checks),
  windows-integration (CLI browser suite, a renderer smoke test, VS Code smoke
  test, the Action end to end), browser-macos (renderers in WebKit), and the
  Action end to end on Linux and macOS too.
- Test harnesses: the CLI path gets .exe on Windows, npm runs through
  npm_execpath (Node refuses .cmd without a shell), and POSIX-only tests name
  their reason.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- init --renderer custom wrote file://?/C:/... into the renderer's package.json
  on Windows: canonical paths carried the \\?\ verbatim prefix. Use the
  extractor SDK's canonical() and compare drive paths whichever way they're
  spelled.
- Vite refuses Windows 8.3 short names (RUNNER~1 in the runner's temporary
  directory): the Vite suites use the native realpath.
- doctor looks up an extractor's program in its own function (complexity).
- windows-integration removes the runner image's python3 before the Action's
  end-to-end run, as a standard Windows install has none.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ative paths with sep

- workspaces.mjs --keep-going runs every workspace's task and then names each that failed.
- The portability rule native-path-slash also flags a native path extended with '/'.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- The Action's snapshots passed --trust with show --from, which the CLI
  refuses, so trust: true never rendered snapshots. Saved documents run no
  repository code; the flag is gone.
- The viewer header's ascender room (0.35em above the trimmed cap height) was
  short of Segoe UI's ascent (0.38em): 0.4em now, with the matching margin.
- check-pack ran Git Bash's GNU tar on Windows, which reads C: as a remote host;
  it uses %SystemRoot%\System32\tar.exe. The portability rule flags a bare tar.
- Tests: import() and --import take file URLs, not native paths; the Inspector
  harness puts Git's own directory on PATH on Windows instead of a symlink; the
  viewer spec waits for the page to apply the agent's state and for the viewer
  to exit before cleanup; the scaffold test expects the non-verbatim root; the
  snapshot test passes the variables the CLI finds Chrome with; POSIX-only checks
  (execute bits, /bin/sh gh and git stand-ins) are skipped with their reason.
- CI: the CLI's Node suites time out per test; windows-node gets 90 minutes;
  browser-macos runs in two shards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…suites

- The SDK and TypeScript helper tests imported native paths, which Windows
  reads as a d: URL scheme.
- The VS Code smoke test reports what the Details panel shows when the evidence
  doesn't appear.
- windows-integration runs the VS Code smoke test and the Action end to end
  whatever the steps before them did; windows-node runs the CLI's Node suites
  one file at a time with TAP output, a per-test timeout and a forced exit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…st fixes

- serve --stdio's initialize named the repository \\?\C:\...: it uses the
  extractor SDK's canonical(), as clients compare it with folders they have open.
- CLI tests: fixture repositories are removed after the file's tests, once the
  processes their tests started have stopped (Windows refuses to remove a
  running process's directory); the MCP test passes the variables the CLI finds
  Chrome with on Windows.
- The installed proof runs the .NET helper on Linux and macOS only, for now:
  on Windows dotnet fails in the extractor environment (runner-coverage.md).
- windows-integration gives VS Code a desktop-sized display, and accepts the
  Microsoft Store's python3 alias, which runs no Python, after removing python3.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…eports motion

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…r in separators and drive-letter case

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@agorischek
agorischek marked this pull request as ready for review November 17, 2026 06:43
@agorischek
agorischek requested a review from a team as a code owner November 17, 2026 06:43
@agorischek
agorischek merged commit db5b654 into main Nov 17, 2026
93 of 94 checks passed
@agorischek
agorischek deleted the cross-platform-coverage branch November 17, 2026 06:44
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