Skip to content

Fix API benchmark host and npm selection - #160

Merged
Andrew Branch (andrewbranch) merged 1 commit into
mainfrom
fix-api-benchmark-host-selection
Oct 19, 2026
Merged

Andrew Branch (andrewbranch) merged 1 commit into
mainfrom
fix-api-benchmark-host-selection

Conversation

@andrewbranch

@andrewbranch Andrew Branch (andrewbranch) commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

API benchmarks can select both an installed Node host and ambient Node when their versions match. In build 169490, the duplicate run picked up an ambient Corepack npm shim, which rejected the consumer's pnpm package declaration; ESLint then masked the invocation failure with a missing results.json error.

Use the existing installed-Node host filter for API benchmarks only, and invoke the selected host's bundled npm CLI with that Node executable. This preserves the upstream npm run workloads and arguments without relying on ambient package-manager shims. ESLint now accepts exit status 1 only when its output file exists, otherwise preserving the original invocation failure. Other benchmark kinds, executable placeholder expansion, and predictable-mode rejection are unchanged.

Use installed Node hosts and their bundled npm CLI for API benchmarks, and preserve ESLint invocation failures when no results are produced.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b28632e4-ef28-4d35-9f4c-b1b5e54191b8

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes have regression coverage and no identified blocking issues.

No open issues 🎉

What changed in this PR

Makes API benchmarks use installed Node hosts and their bundled npm, avoiding ambient package-manager shims while preserving invocation errors.

Changes:

  • Restricts API benchmarks to installed Node hosts and invokes their bundled npm.
  • Preserves ESLint failures when no results file exists.
  • Adds regression coverage and documents host requirements.
File Description
ts-perf/​packages/​commands/​src/​benchmark/​runApiScenario.ts Validates bundled npm and exposes its path.
ts-perf/​packages/​commands/​src/​benchmark/​runApiScenario.test.ts Tests host selection, npm dispatch, and failures.
ts-perf/​packages/​commands/​src/​benchmark/​measure.ts Filters API benchmarks to installed Node hosts.
scripts/​src/​__tests__/​apiArtifact.test.ts Tests ESLint output and failure handling.
README.md Documents installed-host and bundled-npm behavior.
cases/​api/​utils.mjs Runs bundled npm with the selected Node executable.
cases/​api/​eslint.mjs Requires output before accepting exit status 1.

Review effort: Balanced

@andrewbranch
Andrew Branch (andrewbranch) merged commit 7598e79 into main Oct 19, 2026
32 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the fix-api-benchmark-host-selection branch October 20, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants