Skip to content

amicode-vaults.test.ts hardcodes POSIX path separators — unit (windows) red #76

Description

@jack-champagne

packages/opencode/test/server/amicode-vaults.test.ts asserts on literal /-separated paths, so it fails on Windows where the resolver correctly returns \-separated ones.

From the unit (windows) job on #2:

amicode-vaults.test.ts:14
  [
    "/x/bin/av",
-   "/y/ops/scripts/amico-vault",
-   "/home/u/.amico/ops/scripts/amico-vault",
+   "\y\ops\scripts\amico-vault",
+   "\home\u\.amico\ops\scripts\amico-vault",
  ]
(fail) candidates > resolution order: AMICO_VAULT_BIN, then AMICO_OPS, then the canonical ops path

amicode-vaults.test.ts:21
(fail) candidates > unset env vars are skipped; canonical path is always last

This is a test bug, not a product bug — the resolver is doing the right thing per-platform; the assertion isn't platform-agnostic.

Pre-existing. It is not caused by #2. It was invisible until now only because the fork's workflows requested blacksmith-4vcpu-* runners that this org has none of, so no job ever ran. #2 moves CI to GitHub-hosted runners and therefore makes this failure visible for the first time.

Fix: normalise with path.join / path.sep in the expectations, or skip the case on process.platform === "win32".

Agreed with @jack-champagne to land #2 with this check red rather than widen its scope.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions