feat(core): warn when running on an untested Node.js version - #90
Conversation
Merging this PR will regress 5 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | long body |
1.2 KB | 1.8 KB | -34.75% |
| ❌ | WallTime | fibo darwin |
7.8 ms | 9.1 ms | -14.57% |
| ❌ | WallTime | switch 1 |
72 ns | 84 ns | -14.29% |
| ❌ | WallTime | switch 2 |
84 ns | 96 ns | -12.5% |
| ❌ | WallTime | switch 1 |
84 ns | 96 ns | -12.5% |
| ⚡ | Memory | test sync baz 100 |
25,080 B | 656 B | ×38 |
| ⚡ | Memory | short body |
784 B | 656 B | +19.51% |
| ⚡ | Memory | short body |
784 B | 656 B | +19.51% |
| ⚡ | WallTime | switch 2 |
96 ns | 84 ns | +14.29% |
| ⚡ | WallTime | test_iterative_fibo_10 |
108 ns | 96 ns | +12.5% |
| ⚡ | WallTime | test sync baz 100 |
228 ns | 204 ns | +11.76% |
| ⚡ | WallTime | test sync baz 10 |
120 ns | 108 ns | +11.11% |
| ⚡ | Memory | long body |
1.3 KB | 1.2 KB | +10.39% |
| ⚡ | WallTime | short body |
2.1 µs | 1.9 µs | +10.32% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing cod-3399-warn-when-running-codspeed-node-with-unsupported-nodejs (818217e) with main (3735985)
7adf1ef to
5d4a240
Compare
|
@greptileai review |
Greptile SummaryThe PR adds a one-time warning when CodSpeed runs on a Node.js major outside the ABI-pinned and tested Node.js 22 and 24 set. The warning runs before core native-binding validation and is also integrated into Playwright’s independent setup path.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, compatibility, or security issues identified. The warning is reached through both supported integration setup models, is deduplicated per process, and preserves the existing native-binding failure behavior while adding the requested diagnostic.
|
| Filename | Overview |
|---|---|
| packages/core/src/nodeVersion.ts | Adds supported-major detection and process-wide warning deduplication without an identified correctness issue. |
| packages/core/src/index.ts | Exposes the version helpers and emits the warning before native-binding validation as intended. |
| packages/playwright-plugin/src/index.ts | Adds the warning to Playwright’s independent integration setup path. |
| packages/core/tests/nodeVersion.integ.test.ts | Covers warning generation for the supported and representative unsupported Node.js majors. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Runner integration starts] --> B{Uses setupCore?}
B -- Yes --> C[Warn once if Node major unsupported]
C --> D[Check native binding]
B -- Playwright --> E[ensureIntegrationSetup]
E --> F[Warn once if Node major unsupported]
F --> G[Register integration and environment]
Reviews (1): Last reviewed commit: "feat(core): warn when running on an unte..." | Re-trigger Greptile
9fb3388 to
818217e
Compare
The plugins ship ABI-pinned prebuilds for Node.js 22 and 24 only, so any other major silently fails to load the native addon with no hint that the runtime version is the cause. Emit the warning before the native-binding check in setupCore, so the version is still printed on the majors where the addon cannot load and setupCore throws. The playwright plugin gets its own call because it registers the integration itself and bypasses setupCore. COD-3399
console.warn only reaches the raw job log, where it is buried in the test runner output and easy to miss. Route it through warnCi, which uses the surface each provider offers: a workflow-command annotation on GitHub Actions, so it shows up in the checks and merge request UI, and yellow on GitLab CI, mirroring how the runner renders its own warnings there. COD-3399
818217e to
6e78041
Compare
The plugins ship ABI-pinned prebuilds for Node.js 22 and 24 only, so any
other major silently fails to load the native addon with no hint that the
runtime version is the cause.
Emit the warning before the native-binding check in setupCore, so the
version is still printed on the majors where the addon cannot load and
setupCore throws. The playwright plugin gets its own call because it
registers the integration itself and bypasses setupCore.
COD-3399