Skip to content

Windows ships release binaries but no job ever tests them: a windows-latest run fails 14 of 28 packages #344

Closed

Description

@star-nebula

The gap

skillshare ships Windows binaries but never runs its test suite on Windows.

  • .goreleaser.yaml cross-builds windows for amd64 and arm64 and ships them as zip archives, so Windows is a supported release target.
  • Seven files compile only on Windows and no job ever builds them: cmd/skillshare/{console,ui_process,upgrade}_windows.go, internal/childproc/childproc_windows.go, internal/mcp/check_live_windows.go, internal/sync/symlink_windows.go, internal/utils/link_windows.go.
  • test.yaml runs unit + integration tests on ubuntu-latest and macos-latest only.

A Windows-only regression therefore reaches users through release binaries with no signal in CI.

What a windows-latest job reports today

I added the job to my fork and ran it against upstream 7043ca3a:
https://github.com/star-nebula/skillshare/actions/runs/37088491097

  • 14 of the 32 packages the unit-test pattern selects fail (15 pass, 3 carry no test files): cmd/skillshare, internal/{audit,config,devcontainer,git,hooks,install,mcp,oplog,plugin,server,sync,theme,trash}
  • 183 distinct failing top-level tests
  • cmd/skillshare is killed by the 10-minute test timeout inside TestEnsureProjectConfig_NoProjectStillInitializes, so its remaining tests never report
  • the integration step never runs, because the unit step fails first

I reproduced the same failures locally by cross-compiling windows/amd64 test binaries and
running them on a real Windows host, which tracks the runner closely enough to use as a
pre-flight for each fix.

The four PRs filed with this issue

Most of the fixable failures are one class: filepath.IsAbs and filepath.Clean are
platform-dependent, so a guard or a rendering that is correct on Linux is not on Windows. On
Windows a POSIX-style path such as /etc/passwd carries no volume, so IsAbs calls it relative,
and Clean rewrites separators into the OS form.

PR File Symptom on Windows Measured effect
#345 internal/audit/content_integrity.go a file_hashes key of /etc/passwd survives the IsAbs guard and filepath.Join folds it inside the skill dir, so identical metadata audits clean on Linux and noisy on Windows internal/audit 1 failure → PASS
#347 internal/trash/trash.go validateTrashName accepts an absolute name the guard documents as rejected; the test helper also compared filepath.Rel output against a slash-form allow-list, so a canary inside the base was reported as an escape internal/trash 4 failures → PASS
#346 internal/install/source.go install file:///C:/repos/skills handed git file://\C:\repos\skills, because Clean rewrote the separators of what must stay a slash-form URL internal/install 9 → 8 (that test fixed; the rest are other classes)
#348 cmd/skillshare/doctor_shared_paths_test.go two fixtures asserted slash-form literals against filepath.Clean output, so correct Doctor output failed the suite 2 assertion failures → 0; the package still cannot finish (see below)

What is left after those

Not one class, and most need a judgement call about intended Windows behavior rather than a
mechanical fix. From the same host run:

  • Permission bits: TestCopyDir_PreservesPermissions expects an executable mode to survive a
    copy and gets 666. Either the test should assert the Windows equivalent or CopyDir should
    record intent somewhere Windows honours.
  • Git behaviour differences: several TestCloneRepoForSource_* cases, TestResolveWebRef,
    TestInstallTrackedRepo_NameFromSource, TestGetUpdatableSkills_Nested.
  • A blocking TUI in a unit test: TestEnsureProjectConfig_NoProjectStillInitializes reaches
    runChecklistTUI (cmd/skillshare/checklist_tui.go) and waits on bubbletea.Program.Run
    instead of returning. This is what eats the runner's 10-minute budget, and it is
    environment-sensitive rather than purely Windows-specific — it also blocks in a local WSL run
    while the ubuntu job passes. Worth separating, since it caps how much of cmd/skillshare any
    Windows run can report on.
  • The other 10 packages were not investigated; per-package attribution of the 183 failures is not
    available from the annotation log, so the counts above cover only the four packages in the PRs.

Suggested next step

Merging the job on its own would turn CI red, so the practical order is: land the fixes
that are ready, keep chipping at the remaining packages, and add windows-latest once the
set is green (or gate it as a non-blocking job in the meantime).

The job I ran:

  windows-test:
    if: *not-release-duplicate
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ inputs.ref || github.sha }}
      - uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
      - name: Build Binary
        shell: bash
        run: mkdir -p bin && go build -o bin/skillshare.exe ./cmd/skillshare
      - name: Unit Tests
        run: go test -v ./cmd/skillshare/... ./internal/...
      - name: Integration Tests
        run: go test -v ./tests/integration/...
        env:
          SKILLSHARE_TEST_BINARY: ${{ github.workspace }}\bin\skillshare.exe

No -race: the detector needs a C toolchain on Windows, and the raced suite already runs
on ubuntu and macOS.

Activity

  1. added
    feature
    on Oct 3, 2026
  2. star-nebula commented on Oct 3, 2026

    @star-nebula
    ContributorAuthor

    Status refresh, measured at the current tip.

    I re-ran the whole ./internal/... pattern on windows-latest at 6e176ddb (my fork,
    run 37108486253,
    go test -v -count=1 ./internal/...):

    • 16 packages ok, 13 FAIL, 3 with no test files (internal/{github,targetsummary,testutil}).
    • cmd/skillshare is not part of this run (it hangs on a blocking TUI and eats the timeout; still the
      cap on what any Windows run can report for that package).

    Three corrections to the table in this issue's body, all measured on a real Windows host with
    cross-compiled windows/amd64 test binaries:

    1. internal/trash is green now (fix(trash): reject POSIX-absolute names on Windows too #347) — it can join the ci(test): test the packages that already pass on windows-latest #351 allow-list at any time.
    2. internal/audit is flaky, not broken, and the failing test is not the one fix(audit): skip absolute metadata keys on Windows too #345 fixed. It is
      TestParallelScan_SingleSkill, which asserts a strictly positive Elapsed for a scan of one tiny
      skill directory (internal/audit/parallel.go:81 records time.Since). On a Windows host it fails
      ~4 of 1000 runs (0 of 1000 on Linux), which is why the package was ok at e77e9128
      (run 37098433003) and FAIL
      at 6e176ddb (run 37108486253).
      Fix proposed in test(audit): stop requiring a positive scan duration #356 (keep the non-negative check, drop the timing promise; 0/1000 after).
    3. internal/memory is new (arrived with feat(extras): share Markdown memory across agents #349, after this issue was filed) and fails on Windows on
      every run: TestInitPreservesExistingIndex compares Instructions(root, "") against the raw
      OS-native root, while the renderer applies filepath.ToSlash
      (internal/memory/guidance.go:36). 5 failures in 5 runs; fix proposed in test(memory): compare instructions against the slash-form root #355 (compare against
      filepath.ToSlash(root), the form its sibling guidance_test.go:16 already asserts).

    Once #355 and #356 land, internal/{audit,memory,trash} can be added to the windows-test allow-list
    in one growth PR — that list is designed to take its next step exactly here.

  3. runkids commented on Oct 5, 2026

    @runkids
    Owner

    internal/sourcewalk on windows-latest (first real run, from the first commit of #412, https://github.com/runkids/skillshare/actions/runs/37258495903):

    • TestWalkParity, TestWalkDirParity, and TestSymlinkRoot fail. The walker hands callbacks paths under the canonical root (C:\Users\runneradmin\AppData\Local\Temp\...) while the test passed the t.TempDir() spelling of the same directory, so filepath.Rel(root, path) in the test yields ..\..\..\..\..\..\runneradmin\... instead of ., a, a\child, and so on. TestSymlinkRoot reports every visited path as unexpected for the same reason.
    • The other sourcewalk tests pass there.

    #412 reverted the package from the windows-test list; it goes back once the root spelling is settled (either the walker reports paths under the root it was given, or the tests canonicalize the root first).

  4. added
    help wanted
    on Oct 11, 2026
  5. star-nebula commented on Oct 30, 2026

    @star-nebula
    ContributorAuthor

    Update: #673 restores internal/sourcewalk to the windows-test allow-list after canonicalizing aliased test roots.

    The full Test workflow is green, including windows-test. Codex review also completed with no findings.

    The PR intentionally uses Refs #344 rather than closing the issue: this covers the internal/sourcewalk failures reported above, while broader Windows package coverage remains open.

  6. added
    testing
    windows
    on Nov 2, 2026
  7. star-nebula commented on Nov 13, 2026

    @star-nebula
    ContributorAuthor

    Status: the premise of this issue no longer holds, and what is left is incremental coverage.

    windows-test now runs on every push and PR and is green. Its list at main covers 25 packages plus ./cmd/skillshare, one targeted internal/oplog regression, and the native-links smoke test:

    cmd/skillshare
    internal/{audit, backup, check, childproc, config, hub, install, instructions,
              mcp, memory, projectdir, projects, resource, search, skill,
              skillignore, sourcewalk, sync, theme, trash, ui, uidist, utils,
              validate, version}
    

    Landed since this issue was filed: #345 and #347 (audit, trash fixes), #346 (install), #348 (doctor), #351 (the allow-list itself), #355 + #575 (memory), #356 (audit timing), #589 (theme), #673 (sourcewalk), plus the cmd/skillshare entry that used to be capped by the blocking TUI.

    Packages with tests that are still not exercised on windows-latest:

    internal/devcontainer, internal/git, internal/gitenv, internal/hooks, internal/oplog (only TestLogDir_WindowsLegacySelectedGlobal runs today), internal/plugin, internal/server, internal/skillmove, internal/skillpkg, internal/skillserve, internal/sourcefs, internal/sourcelink, internal/textdiff, internal/uninstall, internal/update.

    One caveat on that list: I have no Go toolchain on this machine right now, so it is derived from the workflow file, not from a fresh full-pattern run. The last measured run was 6e176ddb (37108486253), before most of the fixes above landed. I can repeat that run at today's main if a fresh failure list is useful for prioritising the remaining fifteen.

    Question for @runkids: keep this as the umbrella for the remaining packages, or close it now that Windows CI exists and open one issue per failing package as they come up? The allow-list comment says each fix adds its package back, which works either way.

  8. star-nebula commented on Nov 13, 2026

    @star-nebula
    ContributorAuthor

    Closing: the premise no longer holds — windows-test now runs on every push and PR and is green across the 25-package allow-list. Remaining gaps are incremental coverage and are tracked separately.

  9. runkids commented on Nov 13, 2026

    @runkids
    Owner

    Thanks for carrying this through, and for the status updates along the way. Closing is fine: windows-test runs on every push and PR and is green on main.

    To answer your earlier question: one issue per package as each gets picked up, no umbrella. I don't see a separate issue for the remaining fifteen yet, so your list above stays the reference and the workflow comments keep pointing here. A fresh full-pattern run can wait until someone starts on one of them.

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

Metadata

Metadata

Labels

featurehelp wantedtestingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions