Skip to content

Windows engine unbuildable from main: build workflows absent from default branch, npm packages unpublished #1225

Description

@Whua689

What

On a fresh Windows install there is no way to obtain an engine for main, so every verb that builds a graph fails. The prebuilt-engine mechanism proposed in #454 was implemented (PR #478) but never landed on main and never published, so all three routes run-souffle.sh offers are dead at the same time.

Verified at 6553d243 (also held at 2163292b).

Route 1 — CI: the build workflows are absent from the default branch

main has no .github directory at all:

git ls-tree -r --name-only HEAD -- .github     # empty

build-engines.yml and publish-npm.yml exist only on engine-prebuilt:

git ls-tree -r --name-only origin/engine-prebuilt -- .github
.github/workflows/build-engines.yml
.github/workflows/publish-npm.yml

workflow_dispatch only targets workflows present on the default branch, so neither can be dispatched at all. gh workflow run build-engines.yml returns:

HTTP 404: workflow build-engines.yml not found on the default branch

gh workflow list does show engine-binaries as "active", which is misleading — that entry is registered from runs on engine-prebuilt, not from a workflow on main.

Route 2 — npm: the engine packages were never published

package.json lists them as optionalDependencies, so npm install silently skips them and the failure surfaces later, at solve time:

npm view @axiomcode/engine-win32-x64 version   # E404 Not Found
npm view @axiomcode/code-graph version         # E404 Not Found

Nothing under the @axiomcode scope is published, so the "run npm install here" half of the error message in graph/pipeline/run-souffle.sh:448 cannot succeed for any platform.

Route 3 — the existing CI artifacts are for superseded rules

engine-binaries last succeeded on 2026-09-13 (runs 34786932833, 34784266642, 34783648919, 34782429231), all on engine-prebuilt. The binaries have not expired and engine-typescript-windows-x86_64 downloads fine, but they predate the src/ → graph/ restructure and do not match current rules:

engine id (typescript)
artifact build commit 6b0979c2 e66da7e43ad1…
main at 6553d243 de5c048b48f4…

Computed with --print-engine-id --language typescript at each commit (the script lived at src/pipeline/run-souffle.sh then, graph/pipeline/run-souffle.sh now). run-souffle.sh:409-412 compares ENGINE_ID and correctly refuses a mismatch, so these artifacts are unusable by design — and those runs predate the id-verified packaging scheme, shipping only .exe + .sha256 with no ENGINE_ID file.

Reproduce

On any machine with no Soufflé and no engine cache:

git clone <repo> && cd axiom-code-graph
npm install && npm run build
bin/axiomcode <any-source-dir> /tmp/out
▶ engine id = de5c048b48f4b43c6493cdea183fa1d19b840ff329ddf61c8b00a84dd6928793 (rules + souffle 2.5)
❌ no engine for typescript@de5c048b48f4… on this machine. Either:
   • run `npm install` here — it fetches @axiomcode/engine-<platform> for this machine (if these rules have been published), or
   • install souffle 2.5 to compile locally
❌ 1 of 1 languages failed: typescript

Both suggested remedies are unavailable: the packages do not exist, and Soufflé is the dependency the prebuilt scheme was meant to remove.

Impact

  • Every graph-building verb fails: axiomcode index, and the plugin's axiomcode_index plus anything that triggers a build (path, impact, changed, test_impact, graph on a repo with no graph yet).
  • Querying an existing graph is unaffected — it needs no engine. A machine handed a graph.sqlite built elsewhere works normally, as does the plugin's query surface. The parser half also works: it produces full IR, and the run dies at the solve step.
  • Windows is the sharpest case because it has no practical local Soufflé route, but the same holds on any machine without Soufflé 2.5 and a C++ toolchain — which is exactly the audience Prebuilt engine binaries: build in CI for Linux/macOS/Windows on merge, fetch from the script, no Soufflé or compiler needed to run #454 was written for.

Worth noting Soufflé on Windows is not the blocker (#16 covers that separately): build-engines.yml generates the C++ with Soufflé on Linux and compiles it on Windows with MSVC, which is how engine-*-windows-x86_64 was produced at all. The blocker is only that main's rules have never been compiled anywhere reachable.

Which side this is

Not the IR and not the resolution rules — repo build/infrastructure. No parser behaviour and no engine rule is implicated; the rules are fine, they have simply never been built for consumption.

Suggested fix

One-time, in this order:

  1. Land .github/workflows/build-engines.yml and publish-npm.yml on main (merge engine-prebuilt, or cherry-pick the two workflow files). Until they are on the default branch nothing can be dispatched.
  2. Run build-engines.yml on main to produce engines for current rules, and confirm each carries an ENGINE_ID matching --print-engine-id for its language.
  3. Publish @axiomcode/engine-<os>-<cpu> under the scope graph/pipeline/engine.conf pins, so the optionalDependencies already in package.json resolve.
  4. Re-run the repro above; the solve should find the packaged engine instead of reporting none.

Step 1 is the real gap — 2 through 4 are what #454/#478 already built and are blocked only on it.

Related

Activity

  1. added
    bugSomething isn't working
    platformOS / toolchain portability
    buildBuild, packaging and developer setup
    windowsMicrosoft Windows support
    on Sep 24, 2026
  2. added theissue type on Sep 24, 2026
  3. swapnilpaliwal-sd commented on Sep 24, 2026

    @swapnilpaliwal-sd
    Contributor
    1. CI - PRs exist and will be merged into main later.
    2. The NPM package will be published with the release.
    3. Not an issue with this repo - likely a setup issue.
  4. Whua689 commented on Sep 24, 2026

    @Whua689
    CollaboratorAuthor

    Publish-day check: a successful install is not a successful rollout

    Before or right after publishing, verify that every language directory's ENGINE_ID equals --print-engine-id for that language on main:

    # on main, per language
    bash graph/pipeline/run-souffle.sh --print-engine-id --language typescript
    # vs what the published package carries
    cat node_modules/@axiomcode/engine-<os>-<cpu>/typescript/ENGINE_ID

    They must match exactly. This is worth an explicit step because an engine built from the wrong tree installs perfectly cleanly and is only refused later, at solve time — so a green npm install says nothing about whether the rollout worked.

    Demonstrated end to end rather than predicted. I assembled a real package around the Windows TypeScript binary from run 34786932833 (2026-09-13, engine-prebuilt, pre-restructure) using the committed tooling:

    packaging/assemble-engine-package.sh win32-x64 0.1.0 <engines> <out>
    assembled …: LICENSE.md README.md package.json typescript
    

    The script works as-is on Windows/Git Bash and emits a correct manifest (os:["win32"], cpu:["x64"]). Installing it succeeds with no warning. Then:

    ▶ engine id = de5c048b48f4b43c6493cdea183fa1d19b840ff329ddf61c8b00a84dd6928793 (rules + souffle 2.5)
      ! @axiomcode/engine-win32-x64 holds typescript at e66da7e43ad1…, these rules are de5c048b48f4…
        — not using it (publish a new engine version for these rules)
    ❌ no engine for typescript@de5c048b48f4… on this machine.
    ❌ 1 of 1 languages failed: typescript
    
    engine id (typescript)
    packaged Sept-13 binary e66da7e43ad116c7e4d13314ca54a04a7c8d0d4c7f098181c3705961c679dac4
    main at 6553d243 de5c048b48f4b43c6493cdea183fa1d19b840ff329ddf61c8b00a84dd6928793

    The guard at graph/pipeline/run-souffle.sh:409-412 behaved exactly as designed. The point is only that the failure surfaces one step later than the install, so publishing engines built from engine-prebuilt rather than main would look like a clean rollout and still leave every consumer unable to solve.


    Positive finding: unpublished optional deps do not block a consumer install

    Worth recording, because it means the package half is already rollout-ready. With @axiomcode/engine-* still absent from the registry, a clean consumer install of the packed @axiomcode/code-graph tarball is green:

    npm install axiomcode-code-graph-0.1.0.tgz     # exit 0, engine-* skipped silently
    node_modules/.bin/axiomcode --help             # resolves and runs
    

    Pointed at a real source tree it parses, stamps the IR with the source's git commit, and stops only at the solve. The package ships bin/axiomcode, dist/, parser/dist/, graph/ and the plugin (3,148 files, 19.4 MB unpacked) — the gaps from #886 are not present in this tree.

    Pre-publish-only footgun: npm crashes adding an engine tarball to a tree with unresolved optional deps

    Only reachable while the packages are unpublished, noted so it is not mistaken for a package defect if someone hits it before the registry catches up. Installing an engine tarball into a project that already has code-graph — whose optionalDependencies could not resolve — crashes npm itself, inside its own dedupe:

    npm error Invalid Version:
    npm error   at new SemVer (semver/classes/semver.js:40:13)
    npm error   at Object.eq (semver/functions/eq.js:4:29)
    npm error   at Node.canDedupe (@npmcli/arborist/lib/node.js:1140:32)
    npm error   at PlaceDep.pruneDedupable (@npmcli/arborist/lib/place-dep.js:426:14)
    

    npm 11.6.2, node v24.11.1, Windows. The unresolved optional-dep node carries an empty version, and semver.eq throws on it.

    Two orderings that work:

    • engine package alone into a clean project — exit 0
    • engine package first, then code-graph on top — exit 0, both resolve, binary and ENGINE_ID in place

    The broken order is code-graph first (with its optional deps unresolved), engine second. Once the engine packages are on the registry, npm install resolves them as ordinary optional deps and this path should not be reached at all — so this is expected to disappear on publish rather than need a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuildBuild, packaging and developer setupplatformOS / toolchain portabilitywindowsMicrosoft Windows supportwontfixThis will not be worked on

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions