Skip to content

fix(cli): launch Biome reliably in Windows architecture guards #881

Closed

Description

@kevin-lozada-santos

Following the request in #863 (comment), this tracks the launcher defect separately from architecture path normalization.

At 83b0246e532d3f76491baabbc8b0b266f00e3590, cli/tests/architecture/biome-guards-bite.arch.test.ts builds BIOME from node_modules/.bin/biome and passes that path directly to spawnSync. On native Windows the launch returns status: null and error.code: ENOENT. Invoking the installed package through Node succeeds with exit 0 and prints Version: 2.5.11.

Environment: Windows, Node 22.23.1, pnpm 12.3.4 for the latest architecture-suite run. Existing dependencies were originally installed with pnpm 11.19.0 and --ignore-scripts; this is not a claim of a fresh installation under 12.3.4.

From cli/, this launch-only reproduction uses the same installed dependency for both attempts:

import { spawnSync } from "node:child_process";
import { resolve } from "node:path";

const direct = spawnSync(resolve("node_modules/.bin/biome"), ["--version"], {
  encoding: "utf8",
});
const viaNode = spawnSync(process.execPath, [
  resolve("node_modules/@biomejs/biome/bin/biome"), "--version",
], { encoding: "utf8" });
for (const [name, result] of [["shim", direct], ["node", viaNode]]) {
  console.log(name, result.status, result.error?.code, result.stdout, result.stderr);
}

biomeFindings() does not inspect result.error or verify that the process started. It parses stdout/stderr and returns [] after a failed launch, which is indistinguishable from a successful invocation with no findings to a caller expecting a clean result. The planted positive cases do fail: the three tests for process.exit, process globals, and default exports all receive empty arrays instead of their expected diagnostics.

Expected: use a launcher that works on supported platforms, and surface process-start failures as explicit failures before parsing findings. Preserve ordinary nonzero lint results, since those carry the violations the guard is designed to assert.

The control above proves only executable startup, not lint correctness. No Biome launcher changes are included in the separate path-normalization contribution.

Affected file: cli/tests/architecture/biome-guards-bite.arch.test.ts

AI tool: Codex. CLI checkout version: 5.3.0. OS: Windows. Path normalization PR: #880.

Activity

  1. added theissue type on Sep 22, 2026
  2. moved this from Ideation to Todo in AIDD Roadmapon Sep 24, 2026
  3. blafourcade commented on Oct 12, 2026

    @blafourcade
    Contributor

    Fixed by #1000.

    • Biome now runs through its own Node launcher. A run that neither comes back clean nor reports a finding fails the guard instead of reading as no findings.
    • On Windows, Biome's GitHub reporter writes the drive colon as %3A; the guard decodes it before resolving the path.
    • .gitattributes checks text files out with LF on every platform, which fixed three other architecture tests on Windows.
    • The cli / Windows job now runs the whole architecture suite, and all 27 files pass.
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

    Fields

    Priority

    None yet

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions