Skip to content

fix(guardrails): load package.json at module level for proxyquire compat on Node 26#9096

Closed
rochdev wants to merge 1 commit into
masterfrom
rochdev/fix-guardrails-proxyquire-node26
Closed

fix(guardrails): load package.json at module level for proxyquire compat on Node 26#9096
rochdev wants to merge 1 commit into
masterfrom
rochdev/fix-guardrails-proxyquire-node26

Conversation

@rochdev

@rochdev rochdev commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Moves require('../../../../package.json') from inside the guard() function body to module level in packages/dd-trace/src/guardrails/index.js
  • Fixes the unit-guardrails CI failure introduced in v5.110.0 proposal #9095 on Node.js v26

Root Cause

Node.js v26 changed how require() inside function bodies is wired — it no longer calls module.require dynamically. Proxyquire stubs modules by patching module.require via the require.extensions['.js'] handler at load time. Since the require('../../../../package.json') call was inside guard() (called after load), proxyquire's patch had no effect on Node 26. The real package.json (nodeMaxMajor: 27) was used instead of the test stub, so NODE_MAJOR (26) >= 27 evaluated to false, the guard didn't abort, and the test failed.

Moving the require to module level ensures it runs during the window when proxyquire's patch is active, fixing the test on all Node versions. It's also a minor perf improvement (reads package.json once instead of on every guard() call).

Test plan

  • mocha packages/dd-trace/test/guardrails/index.spec.js — 1 passing
  • eslint packages/dd-trace/src/guardrails/index.js — 0 errors

🤖 Generated with Claude Code

Node.js v26 changed how require() inside function bodies is wired —
it no longer goes through module.require dynamically, so proxyquire's
stub interception (which patches module.require via require.extensions)
had no effect for the require('../../../../package.json') call inside
guard(). Moving it to module level ensures the stub is applied during
the load-time window when proxyquire's patch is active, making the
unit-guardrails test pass on all supported Node.js versions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rochdev rochdev marked this pull request as ready for review June 26, 2026 18:32
@dd-octo-sts

dd-octo-sts Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.37 MB
Deduped: 7.43 MB
No deduping: 7.43 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-official

datadog-official Bot commented Jun 26, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9f2f81f | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jun 26, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-26 18:42:40

Comparing candidate commit 9f2f81f in PR branch rochdev/fix-guardrails-proxyquire-node26 with baseline commit 6e114b3 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2251 metrics, 35 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-20

  • unstable execution_time [-192.043ms; +185.654ms] or [-5.176%; +5.004%]

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-177.194ms; +186.023ms] or [-6.758%; +7.095%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-204.345ms; +208.652ms] or [-8.126%; +8.297%]

scenario:appsec-control-20

  • unstable execution_time [-152.011ms; +174.823ms] or [-8.709%; +10.016%]

scenario:appsec-control-24

  • unstable execution_time [-103.654ms; +99.950ms] or [-8.560%; +8.254%]

scenario:appsec-control-26

  • unstable execution_time [-111858.249µs; +110478.849µs] or [-9.288%; +9.173%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2661.804ms; +3721.178ms] or [-29.345%; +41.024%]
  • unstable execution_time [-2726.425ms; +3786.884ms] or [-27.920%; +38.780%]
  • unstable instructions [-22.6G instructions; +32.0G instructions] or [-30.517%; +43.179%]
  • unstable max_rss_usage [-10.179MB; +13.560MB] or [-6.284%; +8.371%]
  • unstable throughput [-1104.503op/s; +801.611op/s] or [-31.557%; +22.903%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-2142.921ms; +3448.771ms] or [-23.138%; +37.239%]
  • unstable execution_time [-2149.349ms; +3458.133ms] or [-21.578%; +34.718%]
  • unstable instructions [-19.1G instructions; +30.2G instructions] or [-24.839%; +39.202%]
  • unstable max_rss_usage [-6.671MB; +11.181MB] or [-4.194%; +7.030%]
  • unstable throughput [-767.473op/s; +475.221op/s] or [-23.208%; +14.370%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-2621.007ms; +2592.047ms] or [-31.045%; +30.702%]
  • unstable execution_time [-2649.030ms; +2637.079ms] or [-28.994%; +28.864%]
  • unstable instructions [-22017.5M instructions; +22111.5M instructions] or [-31.918%; +32.054%]
  • unstable max_rss_usage [-9948.535KB; +10013.335KB] or [-6.226%; +6.267%]
  • unstable throughput [-778.894op/s; +789.138op/s] or [-21.164%; +21.442%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-3.278s; +0.489s] or [-32.617%; +4.869%]
  • unstable execution_time [-3.332s; +0.511s] or [-30.961%; +4.748%]
  • unstable instructions [-29.0G instructions; +4.0G instructions] or [-34.550%; +4.760%]
  • unstable throughput [-117.289op/s; +694.305op/s] or [-3.726%; +22.059%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-388.734ms; +311.310ms] or [-7.997%; +6.404%]
  • unstable execution_time [-387.897ms; +308.300ms] or [-7.857%; +6.245%]
  • unstable throughput [-104652.587op/s; +131767.412op/s] or [-6.154%; +7.748%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-24

  • unstable cpu_user_time [-457.334ms; +264.971ms] or [-10.177%; +5.896%]
  • unstable execution_time [-484.149ms; +285.318ms] or [-10.132%; +5.971%]
  • unstable max_rss_usage [-56.873MB; +33.906MB] or [-10.561%; +6.296%]
  • unstable throughput [-2.759op/s; +4.625op/s] or [-6.148%; +10.306%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-13.896MB; +5.028MB] or [-9.398%; +3.400%]

scenario:plugin-graphql-long-with-depth-off-26

  • unstable max_rss_usage [-15.306MB; +22.330MB] or [-9.416%; +13.737%]

scenario:plugin-redis-mixed-26

  • unstable throughput [-302889.819op/s; +94886.556op/s] or [-8.997%; +2.818%]

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.86%. Comparing base (6e114b3) to head (9f2f81f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9096      +/-   ##
==========================================
- Coverage   93.17%   92.86%   -0.32%     
==========================================
  Files         889      889              
  Lines       50853    50858       +5     
  Branches    10014    10015       +1     
==========================================
- Hits        47381    47227     -154     
- Misses       3472     3631     +159     
Flag Coverage Δ
aiguard-integration-active 41.68% <ø> (+<0.01%) ⬆️
aiguard-integration-latest 41.69% <ø> (+<0.01%) ⬆️
aiguard-integration-maintenance 41.77% <ø> (+0.01%) ⬆️
aiguard-macos 34.58% <ø> (-0.03%) ⬇️
aiguard-ubuntu 34.72% <ø> (-0.03%) ⬇️
aiguard-windows 34.40% <ø> (-0.03%) ⬇️
apm-capabilities-tracing-macos 48.30% <ø> (+<0.01%) ⬆️
apm-capabilities-tracing-ubuntu-active 48.29% <ø> (+<0.01%) ⬆️
apm-capabilities-tracing-ubuntu-latest 48.29% <ø> (-0.18%) ⬇️
apm-capabilities-tracing-ubuntu-maintenance 48.51% <ø> (+<0.01%) ⬆️
apm-capabilities-tracing-ubuntu-oldest 48.52% <ø> (+<0.01%) ⬆️
apm-capabilities-tracing-windows 48.29% <ø> (+0.01%) ⬆️
apm-integrations-aerospike-18-gte.5.2.0 33.10% <ø> (?)
apm-integrations-aerospike-20-gte.5.5.0 33.13% <ø> (-0.03%) ⬇️
apm-integrations-aerospike-22-gte.5.12.1 33.13% <ø> (-0.03%) ⬇️
apm-integrations-aerospike-22-gte.6.0.0 33.13% <ø> (-0.03%) ⬇️
apm-integrations-aerospike-eol- 42.41% <ø> (ø)
apm-integrations-child-process 34.03% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript-18 40.01% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript-20 40.02% <ø> (?)
apm-integrations-confluentinc-kafka-javascript-22 ?
apm-integrations-confluentinc-kafka-javascript-24 39.92% <ø> (-0.03%) ⬇️
apm-integrations-couchbase-eol 33.17% <ø> (-0.19%) ⬇️
apm-integrations-couchbase-oldest 33.29% <ø> (-0.03%) ⬇️
apm-integrations-dns ?
apm-integrations-elasticsearch 34.15% <ø> (-0.03%) ⬇️
apm-integrations-http-latest 41.93% <ø> (-0.03%) ⬇️
apm-integrations-http-oldest 41.94% <ø> (-0.03%) ⬇️
apm-integrations-http2 ?
apm-integrations-kafkajs-latest 40.06% <ø> (?)
apm-integrations-kafkajs-oldest 40.14% <ø> (-0.13%) ⬇️
apm-integrations-net 33.65% <ø> (-0.03%) ⬇️
apm-integrations-next-11.1.4 36.36% <ø> (ø)
apm-integrations-next-12.3.7 36.36% <ø> (ø)
apm-integrations-next-13.0.0 29.14% <ø> (-0.03%) ⬇️
apm-integrations-next-13.2.0 29.14% <ø> (-0.03%) ⬇️
apm-integrations-next-13.5.11 29.27% <ø> (-0.07%) ⬇️
apm-integrations-next-14.0.0 29.20% <ø> (-0.03%) ⬇️
apm-integrations-next-14.2.35 29.24% <ø> (-0.03%) ⬇️
apm-integrations-next-14.2.6 29.20% <ø> (-0.03%) ⬇️
apm-integrations-next-14.2.7 29.20% <ø> (-0.03%) ⬇️
apm-integrations-next-15.0.0 29.20% <ø> (-0.03%) ⬇️
apm-integrations-next-15.4.0 29.27% <ø> (-0.03%) ⬇️
apm-integrations-next-latest ?
apm-integrations-oracledb 33.99% <ø> (-0.03%) ⬇️
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 34.80% <ø> (-0.03%) ⬇️
apm-integrations-prisma-latest-all 34.24% <ø> (-0.03%) ⬇️
apm-integrations-restify 35.63% <ø> (-0.03%) ⬇️
apm-integrations-sharedb 32.57% <ø> (-0.03%) ⬇️
apm-integrations-tedious 33.91% <ø> (-0.03%) ⬇️
appsec-express 51.23% <ø> (-0.02%) ⬇️
appsec-fastify 48.02% <ø> (-0.03%) ⬇️
appsec-graphql 47.72% <ø> (-0.02%) ⬇️
appsec-integration-active 36.08% <ø> (+<0.01%) ⬆️
appsec-integration-latest 36.08% <ø> (+<0.01%) ⬆️
appsec-integration-maintenance 36.14% <ø> (+<0.01%) ⬆️
appsec-integration-oldest 36.14% <ø> (+<0.01%) ⬆️
appsec-kafka 40.25% <ø> (-0.03%) ⬇️
appsec-ldapjs 39.79% <ø> (-0.03%) ⬇️
appsec-lodash 39.70% <ø> (-0.03%) ⬇️
appsec-macos 57.15% <ø> (-0.04%) ⬇️
appsec-mongoose 44.72% <ø> (-0.03%) ⬇️
appsec-mysql 47.04% <ø> (-0.03%) ⬇️
appsec-next-latest-11.1.4 27.44% <ø> (-0.02%) ⬇️
appsec-next-latest-12.3.7 27.47% <ø> (ø)
appsec-next-latest-13.0.0 29.22% <ø> (-0.03%) ⬇️
appsec-next-latest-13.2.0 29.24% <ø> (?)
appsec-next-latest-13.5.11 29.33% <ø> (-0.03%) ⬇️
appsec-next-latest-14.0.0 29.26% <ø> (-0.03%) ⬇️
appsec-next-latest-14.2.35 29.26% <ø> (-0.03%) ⬇️
appsec-next-latest-14.2.6 29.26% <ø> (-0.03%) ⬇️
appsec-next-latest-14.2.7 29.26% <ø> (-0.03%) ⬇️
appsec-next-latest-15.0.0 29.26% <ø> (-0.03%) ⬇️
appsec-next-latest-latest 29.30% <ø> (-0.03%) ⬇️
appsec-next-oldest-11.1.4 27.49% <ø> (-0.03%) ⬇️
appsec-next-oldest-12.3.7 29.28% <ø> (-0.03%) ⬇️
appsec-next-oldest-13.0.0 ?
appsec-next-oldest-13.2.0 29.54% <ø> (?)
appsec-next-oldest-13.5.11 29.63% <ø> (?)
appsec-next-oldest-14.0.0 29.57% <ø> (?)
appsec-next-oldest-14.2.35 29.57% <ø> (-0.03%) ⬇️
appsec-next-oldest-14.2.6 29.57% <ø> (-0.03%) ⬇️
appsec-next-oldest-14.2.7 29.57% <ø> (-0.03%) ⬇️
appsec-next-oldest-15.0.0 29.57% <ø> (-0.03%) ⬇️
appsec-next-oldest-latest 27.67% <ø> (ø)
appsec-node-serialize 38.99% <ø> (-0.03%) ⬇️
appsec-passport 42.61% <ø> (-0.03%) ⬇️
appsec-postgres 46.86% <ø> (-0.07%) ⬇️
appsec-sourcing 38.48% <ø> (?)
appsec-stripe 40.52% <ø> (?)
appsec-template 39.29% <ø> (-0.03%) ⬇️
appsec-ubuntu 57.18% <ø> (-0.03%) ⬇️
appsec-windows 56.93% <ø> (-0.02%) ⬇️
debugger-ubuntu-active 43.87% <100.00%> (+<0.01%) ⬆️
debugger-ubuntu-latest 43.87% <100.00%> (+<0.01%) ⬆️
debugger-ubuntu-maintenance 43.99% <100.00%> (+<0.01%) ⬆️
debugger-ubuntu-oldest 44.34% <100.00%> (?)
instrumentations-instrumentation-ai 45.50% <ø> (ø)
instrumentations-instrumentation-aws-sdk 45.08% <ø> (ø)
instrumentations-instrumentation-bluebird 27.66% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-body-parser 35.65% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-child_process 33.34% <ø> (?)
instrumentations-instrumentation-connect 48.45% <ø> (ø)
instrumentations-instrumentation-cookie-parser 29.56% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-couchbase-18 46.20% <ø> (ø)
instrumentations-instrumentation-couchbase-eol 46.20% <ø> (ø)
instrumentations-instrumentation-crypto 27.63% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-express ?
instrumentations-instrumentation-express-mongo-sanitize 29.67% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-express-multi-version 41.81% <ø> (ø)
instrumentations-instrumentation-express-session 35.48% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-fastify 48.41% <ø> (ø)
instrumentations-instrumentation-fetch 45.18% <ø> (ø)
instrumentations-instrumentation-fs 27.35% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-generic-pool 27.54% <ø> (+0.04%) ⬆️
instrumentations-instrumentation-hono 28.87% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-http 37.90% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-http-client-options 37.51% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-kafkajs 49.13% <ø> (ø)
instrumentations-instrumentation-knex 27.65% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-koa 46.08% <ø> (ø)
instrumentations-instrumentation-light-my-request 35.29% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-mongoose 28.75% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-multer 35.33% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-mysql2 33.45% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-openai-lifecycle 46.18% <ø> (ø)
instrumentations-instrumentation-otel-sdk-trace 25.55% <ø> (+0.07%) ⬆️
instrumentations-instrumentation-passport 39.25% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-passport-http 38.97% <ø> (-0.01%) ⬇️
instrumentations-instrumentation-passport-local 39.40% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-pg 33.18% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-promise 27.61% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-promise-js 27.61% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-q 27.64% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-restify 47.70% <ø> (ø)
instrumentations-instrumentation-router 43.70% <ø> (ø)
instrumentations-instrumentation-stripe 28.15% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-url 27.47% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-when 27.63% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-zlib 27.51% <ø> (-0.03%) ⬇️
instrumentations-integration-esbuild-0.16.12-active ?
instrumentations-integration-esbuild-0.16.12-latest 24.71% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-0.16.12-maintenance 18.76% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-0.16.12-oldest 18.76% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-latest-active 24.71% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-latest-latest 24.71% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-latest-maintenance 18.76% <ø> (+<0.01%) ⬆️
instrumentations-integration-esbuild-latest-oldest 18.76% <ø> (+<0.01%) ⬆️
llmobs-ai 35.14% <ø> (-0.03%) ⬇️
llmobs-anthropic 36.52% <ø> (-0.03%) ⬇️
llmobs-bedrock 36.07% <ø> (-0.03%) ⬇️
llmobs-google-genai 35.96% <ø> (-0.03%) ⬇️
llmobs-langchain 35.50% <ø> (-0.02%) ⬇️
llmobs-openai-latest 39.40% <ø> (-0.03%) ⬇️
llmobs-openai-oldest 39.48% <ø> (-0.03%) ⬇️
llmobs-sdk-active 43.32% <ø> (-0.03%) ⬇️
llmobs-sdk-latest 43.32% <ø> (-0.03%) ⬇️
llmobs-sdk-maintenance 43.43% <ø> (-0.03%) ⬇️
llmobs-sdk-oldest 43.41% <ø> (-0.03%) ⬇️
llmobs-vertex-ai 35.63% <ø> (-0.03%) ⬇️
master-coverage 92.86% <100.00%> (?)
openfeature-macos 37.45% <ø> (+0.01%) ⬆️
openfeature-ubuntu 37.58% <ø> (+<0.01%) ⬆️
openfeature-unit-active 49.98% <ø> (ø)
openfeature-unit-latest 49.98% <ø> (ø)
openfeature-unit-maintenance 50.33% <ø> (ø)
openfeature-unit-oldest 50.33% <ø> (ø)
platform-core 46.43% <ø> (ø)
platform-esbuild 18.72% <ø> (+0.02%) ⬆️
platform-instrumentations-misc 29.25% <ø> (-0.31%) ⬇️
platform-integration-active 47.22% <100.00%> (+0.04%) ⬆️
platform-integration-latest 47.20% <100.00%> (+<0.01%) ⬆️
platform-integration-maintenance 46.95% <100.00%> (-0.05%) ⬇️
platform-integration-oldest ?
platform-shimmer 47.45% <ø> (ø)
platform-unit-guardrails 45.33% <100.00%> (ø)
platform-webpack 18.37% <ø> (+0.02%) ⬆️
plugins-aws-durable-execution-sdk-js 32.87% <ø> (-0.03%) ⬇️
plugins-axios ?
plugins-azure-cosmos 35.95% <ø> (-0.05%) ⬇️
plugins-azure-event-hubs 34.80% <100.00%> (+<0.01%) ⬆️
plugins-azure-service-bus 35.34% <100.00%> (+0.04%) ⬆️
plugins-body-parser 36.44% <100.00%> (+0.04%) ⬆️
plugins-bullmq ?
plugins-cassandra 33.60% <ø> (-0.18%) ⬇️
plugins-cookie 40.74% <ø> (ø)
plugins-cookie-parser 40.57% <ø> (ø)
plugins-crypto 42.71% <ø> (ø)
plugins-dd-trace-api 33.19% <ø> (-0.03%) ⬇️
plugins-express-mongo-sanitize 40.62% <ø> (ø)
plugins-express-session 40.48% <ø> (ø)
plugins-fastify 37.76% <100.00%> (-0.03%) ⬇️
plugins-fetch 34.53% <ø> (-0.03%) ⬇️
plugins-fs 33.61% <ø> (?)
plugins-generic-pool 40.05% <ø> (ø)
plugins-google-cloud-pubsub 41.29% <ø> (-0.03%) ⬇️
plugins-grpc 36.47% <ø> (-0.03%) ⬇️
plugins-handlebars 40.62% <ø> (ø)
plugins-hapi 35.76% <ø> (-0.03%) ⬇️
plugins-hono 35.87% <ø> (-0.03%) ⬇️
plugins-ioredis 34.24% <ø> (-0.03%) ⬇️
plugins-jest 27.06% <ø> (ø)
plugins-knex 40.09% <ø> (ø)
plugins-langgraph 32.33% <ø> (-0.03%) ⬇️
plugins-ldapjs 39.05% <ø> (ø)
plugins-light-my-request 40.19% <ø> (ø)
plugins-limitd-client 27.96% <ø> (-0.03%) ⬇️
plugins-lodash 40.23% <ø> (ø)
plugins-mariadb 34.86% <ø> (-0.03%) ⬇️
plugins-memcached 33.64% <ø> (-0.03%) ⬇️
plugins-microgateway-core 34.71% <ø> (-0.03%) ⬇️
plugins-modelcontextprotocol-sdk 32.28% <ø> (-0.03%) ⬇️
plugins-moleculer ?
plugins-mongodb 35.83% <ø> (+0.06%) ⬆️
plugins-mongodb-core 35.36% <ø> (-0.03%) ⬇️
plugins-mongoose 34.52% <ø> (-0.03%) ⬇️
plugins-multer 40.54% <ø> (ø)
plugins-mysql 34.57% <ø> (-0.03%) ⬇️
plugins-mysql2 34.90% <ø> (-0.03%) ⬇️
plugins-nats 36.25% <ø> (-0.03%) ⬇️
plugins-node-serialize 40.46% <ø> (ø)
plugins-opensearch 33.69% <ø> (-0.03%) ⬇️
plugins-passport-http 40.36% <ø> (ø)
plugins-pino 29.86% <ø> (-0.03%) ⬇️
plugins-postgres 34.61% <ø> (-0.03%) ⬇️
plugins-process 42.71% <ø> (ø)
plugins-pug 40.74% <ø> (ø)
plugins-redis 34.27% <ø> (-0.03%) ⬇️
plugins-router 37.99% <ø> (-0.18%) ⬇️
plugins-sequelize 40.01% <ø> (ø)
plugins-test-and-upstream-amqp10 33.78% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-amqplib 39.07% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-apollo 34.79% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-avsc 33.67% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-bunyan 29.08% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-connect 36.26% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-graphql 36.04% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-koa 35.82% <ø> (?)
plugins-test-and-upstream-protobufjs 33.90% <ø> (-0.03%) ⬇️
plugins-test-and-upstream-rhea 39.01% <ø> (-0.03%) ⬇️
plugins-undici 34.96% <ø> (?)
plugins-url 42.71% <ø> (ø)
plugins-valkey 33.74% <ø> (+0.11%) ⬆️
plugins-vm 42.71% <ø> (ø)
plugins-winston 29.74% <ø> (-0.03%) ⬇️
plugins-ws 37.01% <ø> (-0.03%) ⬇️
profiling-macos 43.08% <100.00%> (+0.02%) ⬆️
profiling-ubuntu 43.46% <100.00%> (-0.03%) ⬇️
profiling-windows 41.10% <100.00%> (-0.03%) ⬇️
serverless-aws-sdk-latest-aws-sdk 33.12% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-bedrockruntime 31.98% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-client 36.39% <ø> (ø)
serverless-aws-sdk-latest-dynamodb 33.92% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-eventbridge 27.14% <ø> (-0.02%) ⬇️
serverless-aws-sdk-latest-kinesis 37.16% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-lambda 34.41% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-s3 32.38% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-serverless-peer-service 39.28% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-sns 38.07% <ø> (?)
serverless-aws-sdk-latest-sqs 37.85% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-stepfunctions 33.00% <ø> (-0.03%) ⬇️
serverless-aws-sdk-latest-util 46.83% <ø> (ø)
serverless-aws-sdk-oldest-aws-sdk 33.22% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-bedrockruntime 32.07% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-client ?
serverless-aws-sdk-oldest-dynamodb 34.01% <ø> (-0.08%) ⬇️
serverless-aws-sdk-oldest-kinesis 37.33% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-lambda 34.51% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-s3 32.51% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-serverless-peer-service 39.36% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-sns 38.17% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-sqs 37.92% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-stepfunctions 33.10% <ø> (-0.03%) ⬇️
serverless-aws-sdk-oldest-util 47.59% <ø> (ø)
serverless-azure-durable-functions 36.94% <100.00%> (+0.04%) ⬆️
serverless-azure-functions-eventhubs 38.36% <100.00%> (?)
serverless-azure-functions-servicebus 38.42% <100.00%> (+0.04%) ⬆️
serverless-lambda 34.33% <ø> (-0.03%) ⬇️
test-optimization-cucumber-latest-7.0.0 49.83% <ø> (+0.11%) ⬆️
test-optimization-cucumber-latest-latest 52.52% <ø> (+0.11%) ⬆️
test-optimization-cucumber-oldest-7.0.0 49.91% <ø> (+0.11%) ⬆️
test-optimization-cypress-latest-12.0.0-commonJS 49.17% <ø> (+0.08%) ⬆️
test-optimization-cypress-latest-12.0.0-esm 49.20% <ø> (+1.80%) ⬆️
test-optimization-cypress-latest-14.5.4-commonJS 49.02% <ø> (+1.49%) ⬆️
test-optimization-cypress-latest-14.5.4-esm 49.05% <ø> (+0.08%) ⬆️
test-optimization-cypress-latest-latest-commonJS 49.49% <ø> (+1.79%) ⬆️
test-optimization-cypress-latest-latest-esm 49.52% <ø> (+0.39%) ⬆️
test-optimization-cypress-oldest-12.0.0-commonJS 49.25% <ø> (+0.08%) ⬆️
test-optimization-cypress-oldest-12.0.0-esm 49.28% <ø> (+0.11%) ⬆️
test-optimization-cypress-oldest-14.5.4-commonJS 49.04% <ø> (+0.02%) ⬆️
test-optimization-cypress-oldest-14.5.4-esm 45.98% <ø> (-3.07%) ⬇️
test-optimization-jest-latest-latest 55.23% <100.00%> (+0.01%) ⬆️
test-optimization-jest-latest-oldest 54.17% <100.00%> (+0.17%) ⬆️
test-optimization-jest-oldest-latest 55.28% <100.00%> (+0.10%) ⬆️
test-optimization-jest-oldest-oldest 54.18% <100.00%> (+0.10%) ⬆️
test-optimization-mocha-latest-latest 53.47% <100.00%> (+0.07%) ⬆️
test-optimization-mocha-latest-oldest 51.10% <100.00%> (+0.11%) ⬆️
test-optimization-mocha-oldest-latest 53.58% <100.00%> (+0.07%) ⬆️
test-optimization-mocha-oldest-oldest 51.06% <100.00%> (+0.07%) ⬆️
test-optimization-playwright-latest-latest-playwright-active-test-span 44.18% <ø> (+0.26%) ⬆️
test-optimization-playwright-latest-latest-playwright-atr 43.00% <ø> (+0.10%) ⬆️
test-optimization-playwright-latest-latest-playwright-efd 43.41% <ø> (+0.08%) ⬆️
test-optimization-playwright-latest-latest-playwright-final-status 43.48% <ø> (+0.12%) ⬆️
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.95% <ø> (-0.01%) ⬇️
test-optimization-playwright-latest-latest-playwright-reporting 43.04% <ø> (+0.08%) ⬆️
test-optimization-playwright-latest-latest-playwright-test-management 44.48% <ø> (+0.09%) ⬆️
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.15% <ø> (+0.26%) ⬆️
test-optimization-playwright-latest-oldest-playwright-atr 43.06% <ø> (+0.10%) ⬆️
test-optimization-playwright-latest-oldest-playwright-efd 43.35% <ø> (+0.08%) ⬆️
test-optimization-playwright-latest-oldest-playwright-final-status 43.42% <ø> (+0.13%) ⬆️
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.88% <ø> (-0.01%) ⬇️
test-optimization-playwright-latest-oldest-playwright-reporting ?
test-optimization-playwright-latest-oldest-playwright-test-management 44.43% <ø> (+0.10%) ⬆️
test-optimization-playwright-oldest-latest-playwright-active-test-span 44.40% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-latest-playwright-atr 43.07% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-latest-playwright-efd 43.47% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-latest-playwright-final-status 43.55% <ø> (+0.11%) ⬆️
test-optimization-playwright-oldest-latest-playwright-impacted-tests 43.03% <ø> (-0.01%) ⬇️
test-optimization-playwright-oldest-latest-playwright-reporting 43.09% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-latest-playwright-test-management 44.56% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.23% <ø> (+0.26%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-atr 43.14% <ø> (+0.10%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-efd ?
test-optimization-playwright-oldest-oldest-playwright-final-status 43.47% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 42.96% <ø> (-0.01%) ⬇️
test-optimization-playwright-oldest-oldest-playwright-reporting 42.90% <ø> (+0.08%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-test-management 44.51% <ø> (+0.12%) ⬆️
test-optimization-selenium-latest 45.45% <ø> (+0.06%) ⬆️
test-optimization-selenium-oldest 45.05% <ø> (+0.06%) ⬆️
test-optimization-testopt-active 48.17% <100.00%> (+0.12%) ⬆️
test-optimization-testopt-latest 48.16% <100.00%> (+0.12%) ⬆️
test-optimization-testopt-maintenance 48.04% <ø> (+0.13%) ⬆️
test-optimization-testopt-oldest 49.33% <ø> (+0.09%) ⬆️
test-optimization-vitest-latest 50.83% <ø> (+0.09%) ⬆️
test-optimization-vitest-oldest 48.11% <ø> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rochdev

rochdev commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of a different resolution.

After deeper investigation, the root cause is not a Node 26 proxyquire bug. The guard() runtime-check behavior is already covered — more thoroughly — by an existing integration test: integration-tests/init.spec.jscontext('when node version is too recent'), which sets pkg.nodeMaxMajor = NODE_MAJOR and asserts the tracer does not initialize (plus telemetry, debug logs, and the DD_INJECT_FORCE override).

That integration test passed on Node 26 on the same v5.x run where the unit test failed (Platform / integration (node-latest)), proving the real code path is correct. The unit test packages/dd-trace/test/guardrails/index.spec.js was added only to satisfy a Codecov patch-coverage flag on lines #9033 added to the bailout block, and its failure is an artifact of proxyquire not intercepting an in-function require() — not a real bug.

Replacing this with a PR that removes the redundant unit test.

🤖 Comment generated by Claude Code

@rochdev rochdev closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant