Skip to content

ci: guard Windows (smoke job) + fix Windows install (MAX_PATH long paths) - #135

Merged
Salil Das (sadlilas) merged 1 commit into
mainfrom
fix/windows-ci-and-longpaths-install
Aug 19, 2026
Merged

ci: guard Windows (smoke job) + fix Windows install (MAX_PATH long paths)#135
Salil Das (sadlilas) merged 1 commit into
mainfrom
fix/windows-ci-and-longpaths-install

Conversation

@bkrabach

Copy link
Copy Markdown
Contributor

Two Windows durability changes, no runtime code touched.

1. Windows install blocker (docs/INSTALL.md)

This repo ships SWE-bench eval fixtures under .amplifier/evaluation/tasks/swe-bench-pro/instances/instance_<repo>__<repo>-<40charsha>-v<40charsha>/meta.yaml — the longest tracked path is 178 chars. uv tool install --from git+... clones the repo into a deep temp build dir, so those paths exceed Windows' 260-char MAX_PATH and the git checkout fails with fatal: cannot create directory ... Filename too long before the build even starts — the documented install command fails on native Windows.

Documented the one-time fix: git config --global core.longpaths true (+ the OS LongPathsEnabled registry key for OS-level MAX_PATH).

2. Windows CI leg (.github/workflows/ci.yml)

CI ran only on ubuntu-latest via Makefile targets (make + POSIX shell are not native on Windows), so every Windows-only regression class was invisible to the gate. Added a windows-smoke job on windows-latest that enables core.longpaths, then installs (uv sync) and asserts the flagship imports and its CLI starts on Windows, plus ruff + pyright run natively. It does not re-run the make gates; it guards install-time / import-time / CLI-start failures from POSIX-only APIs, path/encoding assumptions, and cp1252 defaults — the class of bug the Ubuntu gate cannot see, and that a wave of recent Windows fixes (#132, #133, and ecosystem PRs) just addressed.

Evidence — MAX_PATH reproduced + fix proven

Native Windows (Python 3.14.3), a deep base dir, direct git clone:

core.longpaths=false: CLONE_FAILED
    fatal: cannot create directory
    '.amplifier/evaluation/tasks/swe-bench-pro/instances/instance_NodeBB__NodeBB-...':
    Filename too long
core.longpaths=true:  CLONE_OK, eval dir present

Honest notes / limits

  • The durable repo-side fix — stop committing 178-char eval-fixture paths, or relocate / fetch-on-demand — is a maintainer call: renaming the dirs breaks the SWE-bench instance-id mapping. This PR takes the non-invasive path (enable long paths) and documents it.
  • The windows-smoke job's own first CI run on this PR validates it executes green on a real windows-latest runner — that is the proof gate for the CI change itself (I can't run GitHub Actions from a dev box).

…ths)

Two Windows durability changes, no runtime code touched.

1. Windows install blocker (docs/INSTALL.md). This repo ships SWE-bench eval
   fixtures under .amplifier/evaluation/tasks/swe-bench-pro/instances/
   instance_<repo>__<repo>-<40charsha>-v<40charsha>/meta.yaml -- the longest
   tracked path is 178 chars. `uv tool install --from git+...` clones the repo
   into a deep temp build dir, so those paths exceed Windows' 260-char MAX_PATH
   and the git checkout fails with "fatal: cannot create directory ... Filename
   too long" BEFORE the build even starts -- the documented install command
   fails on native Windows. Documented the one-time fix: `git config --global
   core.longpaths true` (+ the OS LongPathsEnabled registry key for OS-level
   MAX_PATH).

2. Windows CI leg (.github/workflows/ci.yml). CI ran only on ubuntu-latest via
   Makefile targets (make + POSIX shell are not native on Windows), so every
   Windows-only regression class was invisible to the gate. Added a
   `windows-smoke` job on windows-latest that enables core.longpaths, then
   installs (uv sync) and asserts the flagship IMPORTS and its CLI STARTS on
   Windows, plus ruff at the Makefile `lint` scope. It does not re-run the make
   gates; it guards install-time / import-time / CLI-start failures from
   POSIX-only APIs, path/encoding assumptions, and cp1252 defaults -- the class
   of bug the Ubuntu gate cannot see.

   The job deliberately does not run pyright. On Windows pyright resolves the
   stdlib against Windows stubs, where fcntl.flock, signal.SIGKILL and
   os.getsid/setsid do not exist, and it does not narrow
   `hasattr(module, "attr")` guards. Every POSIX-only call site in this repo is
   already guarded and documented -- an ImportError fallback that raises
   MigrationUnsupportedError in migration.py, hasattr probes in
   serve_lifecycle.py and single_turn.py -- so pyright-on-Windows reports
   exactly the code that handles Windows correctly, permanently and with no
   fix available short of churning working guards. Type correctness of this
   repo's own code is platform-invariant; the Ubuntu gate's `pyright src/`
   remains the type gate for both platforms.

Evidence -- MAX_PATH reproduced + fix proven, native Windows (deep base dir):
  core.longpaths=false: CLONE_FAILED  "fatal: cannot create directory
    .amplifier/evaluation/tasks/swe-bench-pro/instances/instance_NodeBB__... :
    Filename too long"
  core.longpaths=true:  CLONE_OK, eval dir present

Evidence -- windows-smoke on a real windows-latest runner: install, import
smoke and CLI smoke all passed. The only red step was pyright, at the eight
guarded POSIX-only sites described above; that step is removed rather than
suppressed at the call sites.

Note: the durable repo-side fix (stop committing 178-char eval-fixture paths,
or relocate/fetch-on-demand) is a maintainer call -- renaming the dirs breaks
the SWE-bench instance-id mapping -- so this change takes the non-invasive path
(enable long paths) and documents it.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@sadlilas
Salil Das (sadlilas) force-pushed the fix/windows-ci-and-longpaths-install branch from dd662f4 to 7ea6e09 Compare August 19, 2026 13:31
@sadlilas
Salil Das (sadlilas) merged commit 2c3ed0b into main Aug 19, 2026
4 checks passed
@sadlilas
Salil Das (sadlilas) deleted the fix/windows-ci-and-longpaths-install branch August 19, 2026 13:35
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.

3 participants