Skip to content

CSO native build fails on Windows: staged core fails executable check (cso_valid_artifact) #3183

Closed as not planned

Description

@KRAZA2092

Summary

bun run build:cso fails on Windows (Git Bash) at the publish/validation step with:

Staged CSO core is not one executable regular file.

The compile itself succeeds (gstack-cso-core.exe is produced in ~566ms); only the staging validation fails, so ./setup reports "CSO unavailable ... /cso will report not assessed" while everything else installs fine.

Repro

git clone --depth 1 https://github.com/garrytan/gstack.git
cd gstack
bun run build:cso

Result: error: script "build:cso" exited with code 1, full log in bin/.gstack-cso-build.log.

Environment

  • gstack 1.91.100.0 (also reproduced from a fresh clone at main)
  • Windows 11, Git for Windows 2.56.0 (Git Bash), bun 1.4.3, node v24.15.0
  • setup --host opencode otherwise completes with exit 0

Diagnosis (hypothesis)

The failing check is cso_valid_artifact() in scripts/build-cso.sh:

cso_valid_artifact() { [ -f "$1" ] && [ ! -L "$1" ] && [ -x "$1" ]; }

The staged gstack-cso-core.exe exists as a regular non-symlink file, so the likely failing predicate is [ -x "$1" ] as evaluated by MSYS2 bash: a freshly linked .exe does not necessarily carry the POSIX executable bit under Git Bash (depends on ACL mapping), so validation rejects a binary that would otherwise run fine. Possible fixes: chmod +x the staged artifacts after linking on Windows, or exempt *.exe from the -x requirement (existence + non-empty may be sufficient there).

Happy to test a patch on this machine.

Activity

  1. capy-ai commented on Oct 25, 2026

    @capy-ai
    Contributor

    Checked this against current main (c23d7d4) on GitHub's windows-latest runner. bun run build compiles gstack-cso-core.exe, the Windows launcher and the publish lock, and the staging check passes, so the build succeeds there (Windows Setup E2E run https://github.com/garrytan/gstack/actions/runs/40240725079, "Run bun run build"). scripts/build-cso.sh hasn't changed since your report, so the difference is in the environment rather than the code.

    Under Git Bash, [ -x file.exe ] normally holds, because the default noacl mount treats .exe files as executable. So the failing predicate is probably something else on your machine. Could you post:

    1. the whole bin/.gstack-cso-build.log from a failing run;
    2. mount | grep -E ' on / | on /[a-z] ' from Git Bash (this shows whether your drive is mounted with acl or noacl);
    3. the filesystem and location of the checkout (NTFS, exFAT, a OneDrive or network folder?), and whether Defender or another antivirus scans that folder on access.

    With those we can tell which of the three checks (-f, not a symlink, -x) fails and fix it at the cause.

  2. added
    S3
    on Oct 31, 2026
  3. capy-ai commented on Nov 1, 2026

    @capy-ai
    Contributor

    Thanks for the careful report. We've now set support tiers for gstack (docs/support-tiers.md, added in #3812). Windows gets minimal support: with a default Git for Windows install, ./setup installs and the core skills (/ship, /review, /qa-only, /investigate, and /browse on gstack's own browser) start without errors. Windows-only reports that don't break install, startup or one of those workflows close as won't fix.

    This one affects /cso's optional native helper. ./setup still finishes and the core skills work, and we couldn't reproduce it on GitHub's windows-latest runner. So we're closing this as won't fix under that policy. If you hit a case where it does break install, startup or a core workflow on a default setup, please reopen with the steps and we'll take a look.

  4. added
    wontfix
    on Nov 1, 2026
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

    S3wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions