Skip to content

Windows: the query cases answer as on Linux, and the release gate runs them (0.2.0) - #1949

Merged
swapnilpaliwal-sd merged 3 commits into
apps/integration-0.2.0from
fix/windows-test-links-0.2.0
Oct 14, 2026
Merged

swapnilpaliwal-sd merged 3 commits into
apps/integration-0.2.0from
fix/windows-test-links-0.2.0

Conversation

@swapnilpaliwal-sd

@swapnilpaliwal-sd swapnilpaliwal-sd commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

0.1.10 passed its release e2e on Windows, but that gate indexes one case per language. Run against the published
packages, the query cases fail 43 of 1,844 checks on Windows (all pass on Linux). Every cause is how Windows
writes paths and command lines, or how it holds files. None of it is platform-specific code.

What changes

Symptom on Windows Cause Fix
--tests / test-impact miss tests that reach the change through a file (spawned script, runner setupFiles/globalSetup, an import chain) query scripts joined and normalised graph paths with os.path → \ posixpath for repository-relative paths (the idiom axiomcode-test-impact already uses)
importlib-loaded modules and Django include() routes unresolved; C# derived test attributes missed the Python and C# parsers wrote pkg\changed.py into the IR IR file paths written with /
an absolute file:line under the repo is "outside the indexed repository" root + '/' prefix test commonpath on normcased paths
any argument with ' or " is mangled (context "the user's cart" loses every argument after the apostrophe; "Key" arrives as \Key\), CLI and MCP alike Git Bash parses a native program's command line by msys rules on Windows the arguments travel in AXIOMCODE_ARGV (ax_exec.bash_argv); the bash entry points rebuild "$@"
a rebuild after an edit can fail (.progress / base-commit: No such file) the build lock locked nothing (Git Bash's fd 9 is not a descriptor in native python) ax_fresh.py hold holds a real lock for the build's lifetime; building() sees it

POSIX behaviour is unchanged by construction: path.sep is already /, AXIOMCODE_ARGV is used only on Windows,
and the lock keeps flock outside Git Bash.

The gate

  • The release e2e on win32-x64 now runs every query case against the installed packages, plus the
    Windows-only tests (.github/scripts/e2e-cases.sh). This is the check that would have caught 0.1.10.
  • tests/run.py starts the CLI as the product does (Git Bash found by find-bash.js, MSYS=noglob, arguments via
    bash_argv), reads and prints UTF-8, and waits for a case's background refresh before removing its graph.
  • New tests/windows_argv.py: the argument hand-over through both entry points, with the command line as the control.
    It fails 6 of 10 checks against dev's entry scripts.

Port

The same change as #1948 (0.1.11), cherry-picked onto apps/integration-0.2.0, without the 0.1.11 version commit:
this branch is already at the untagged 0.2.0, and the version gate passes. One conflict, in ax_fresh.py: 0.2.0 renamed
watched() to watched_from() on the lines that gained .replace(os.sep, '/'); resolved by keeping both. The web layer
0.2.0 adds already writes its paths with /.

On this branch: windows_argv 10/10; Python cases 445/445 in three runs, as on 0.2.0 itself. The results below are
#1948's; the Windows VM pass on this branch follows in a comment.

Verified

Windows (Windows Server 2022 VM; the published engine-win32-x64@0.1.10 engines; Soufflé hidden):

0.1.10 this branch
Python cases 30 failing 445/445
C# cases 14 failing 319/319
JavaScript cases 27 failing 354/354
TypeScript cases 22 failing 352/352
Java cases 5 failing 374/374
mixed_separators / no_symlink / no_exec / windows_argv — all pass
asserted-links*, 5 rounds × 5 languages back to back 3–6 failing per round 25/25
e2e-cases.sh as the release job runs it — 1844/1844, and all four Windows-only tests pass (exit 0)

Linux (dev and this branch, same VM, CI's flags): the five engine suites (--oracle where CI uses it), the query
cases and the standalone tests give identical results on all 51 (exit codes and pass/fail counts).

macOS: the query cases for every language pass, as on dev; parser csharp-tests, python-tests,
discovery-tests and gradle-tests pass.

…s them

0.1.10 passed its release e2e on Windows while 43 of the query cases' 1,844 checks
failed there: the e2e is one case per language. Every cause is how Windows writes
paths and command lines, or how it holds files; none is platform-specific code.

Paths: repository-relative paths are written with `/`, as the graph stores them.
- parser: the Python and C# analyzers recorded `pkg\changed.py` in the IR, so rules
  joining a module's directory to a string (importlib's SourceFileLoader, Django's
  include()) matched nothing, and C# derived test attributes were missed.
- query scripts: os.path joined and normalised graph paths with `\` (runner
  setupFiles/globalSetup, spawned scripts, the JS/TS import resolver, the freshness
  snapshot), so tests reached through a file were not linked. posixpath now, the
  idiom axiomcode-test-impact already used.
- path/impact: an absolute file:line under the repository was refused as outside it
  (a `root + '/'` prefix test); commonpath on normcased paths.

Arguments: a native program cannot hand Git Bash an argument holding ' or ": msys
parses the command line by its own rules, so `context "the user's cart"` lost every
argument after the apostrophe and a quoted string arrived as \Key\. On Windows the
CLI, the MCP server and every build Python starts pass them in AXIOMCODE_ARGV
(ax_exec.bash_argv); the bash entry points turn them back into "$@". Elsewhere the
command line is used as before.

Build lock: on Windows it locked nothing (Git Bash's fd 9 is not a descriptor in a
native python), so a refresh and a second build of one repository could run at once.
A helper (ax_fresh.py hold) now holds a real lock for the build's lifetime; building()
sees it and a second build waits. POSIX keeps flock.

Tests and the gate:
- tests/run.py starts the CLI as the product does (Git Bash found by find-bash.js,
  MSYS=noglob, arguments via bash_argv), reads and prints UTF-8, uses the sqlite3
  module, and waits for a case's background refresh before removing its graph.
- tests/windows_argv.py: the argument hand-over through both entry points, with the
  command line as control.
- no_symlink / no_exec start Git Bash and UTF-8 Python as the product does.
- the release e2e on win32-x64 now runs every query case against the installed
  packages, and the Windows-only tests (.github/scripts/e2e-cases.sh).

Verified: Windows VM, every language's query cases (1,844 checks), the Windows-only
tests and the gate script; repeated asserted-links runs 25/25. Linux: the five engine
suites, the query cases and the standalone tests identical to dev (51 of 51 results).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swapnilpaliwal-sd and others added 2 commits October 14, 2026 00:20
relpath raises across drives on Windows, so a --library whose compiled IR sits in
the user cache on C: while the repository is on D: (as on GitHub's runner) failed the
whole index. axiomcode-index and axiomcode-graph read it as outside the repository, as
a `..` path is; a link or a changed file given absolutely on another drive is kept as
given. no_exec's control starts Git Bash, not a bare `bash` (WSL on GitHub's image).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ightly runs every case

Every query case on Windows took 37 of the e2e job's 50 minutes, against 2-6 for the
smoke test on every other platform. A release now runs the 39 case names that have
failed on Windows (.github/e2e/windows-cases.txt: 63 of 356 case directories, every
language), about 7 minutes; the nightly (fresh) still runs every case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 0adeb80 into apps/integration-0.2.0 Oct 14, 2026
35 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/windows-test-links-0.2.0 branch October 14, 2026 20:28
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