Skip to content

[Bug] Windows: badcase scaffold fails when TEMP and the repository are on different drives #458

Open

Description

@legend91019

Summary

On Windows, the browser-eval badcase scaffold test fails when the repository and the system temporary directory are on different drives. The generated fixture imports fixtures.mjs using an invalid relative specifier such as ./D:/..., which Node resolves under the temporary case directory.

The impact is limited to the browser-eval scaffold: one deterministic test fails in this layout. BrowserSkill runtime, extension, and daemon behavior are not affected.

Environment

  • Windows 11 x64, build 26200
  • BrowserSkill main: d9a78aed47874459ae1e44523a597e42dd9acf99
  • Node.js v22.22.2
  • pnpm 10.17.0
  • Repository on D:; %TEMP% on C:

Reproduction

node --test --test-name-pattern="badcase scaffold creates" evals/browser/tests/eval.test.mjs

Actual behavior

The test fails while importing the generated fixture:

Cannot find module 'C:\...\Temp\browser-eval-scaffold-...\reported-timeout\D:\...\evals\browser\lib\fixtures.mjs'

The full browser-eval suite reports 22 passed and 1 failed; only the badcase scaffold test fails.

Expected behavior

The generated fixture should use a valid ESM module specifier and load successfully regardless of whether the temporary directory and repository use the same Windows drive.

Root cause

path.relative() returns an absolute path when its Windows inputs use different drive letters. moduleSpecifier() normalizes that path and prefixes ./, producing an invalid relative specifier.

Additional evidence

  • Reproduced repeatedly with the default C: temporary directory.
  • The same unmodified main-branch test passes when TEMP and TMP are moved to D:, matching the repository drive.
  • No private browser data, accounts, or websites are involved; the reproduction uses the repository's deterministic test fixture.

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