Skip to content

test(bun): run plugin integration tests on the Bun runtime and document experimental support - #11272

Open
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1794856216-bun-test-harness
Open

devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1794856216-bun-test-harness

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a test harness that runs the existing plugin integration tests on the Bun runtime, so experimental Bun support has a regression guard. It also adds a short "Bun (experimental)" section to the root README, listing what does and doesn't work. There are no runtime (packages/*/src) changes.

  • Runtime switch: DD_TEST_RUNTIME=bun makes spawnProcImpl fork the test application with the pinned Bun binary (integration-tests/bun/plugin-runtime.js). --loader/--import/-r are translated to --preload, and loader-hook.mjs/register.js become initialize.mjs. The Mocha host and the sandbox install stay on Node. When the switch is unset, fork options are returned unchanged.
  • Known failures: integration-tests/bun/known-failures.json is a baseline keyed by spec file and full test title. Each entry also records an error signature (name, code and message, with ANSI colors and repository paths normalized). A Mocha root hook (known-failures.js) behaves as follows:
    • A listed test that fails with the recorded signature is reported as pending.
    • A listed test that fails with a different error fails the run.
    • A listed test that unexpectedly passes fails the run.
    • Unlisted failures fail as usual.
    • Suite and setup failures are never inverted.
  • Scripts:
    • test:integration:plugins:bun runs the plugin suites on Bun.
    • generate:bun-plugin-failures regenerates the baseline.
    • test:integration:bun:harness runs the harness unit tests.
  • CI: a bun-plugin-integration job in instrumentation.yml, with 5 shards covering service-free plugins: express, http, fetch, pino, winston, crypto, dns and openai.

Motivation

Bun support is tracked in #3749. The experimental Bun fixes (#11267, #11268, #11269) need a regression guard that fails when Bun behavior changes, and Node behavior must stay unchanged.

Additional Notes

  • Bun baseline: 70 passing and 124 known failures, with 0 unexpected failures. All 124 known failures are ESM-loaded cases: 54 pino, 65 OpenAI and 5 http client. ESM instrumentation is out of scope for experimental support.
  • Node controls: with the switch unset, the same suites pass on Node (194 passing).
  • npm run test:integration:bun:harness: 23 passing. ESLint on the changed files and npm run lint:editorconfig pass.
  • Mocha integration: the hook wraps Runnable#run. Wrapping the test body would miss Mocha-generated timeouts, and afterEach runs after Mocha has counted the failure. A --grep exclusion would stop running the known failures, so unexpected passes would go undetected.
  • Service-backed plugins are deferred; see integration-tests/bun/README.md.

Link to Devin session: https://datadog-poc.devinenterprise.com/sessions/3506f93df4974581afb7bdc2f02bec6f
Open in Devin Desktop: https://datadog-poc.devinenterprise.com/desktop/session/3506f93df4974581afb7bdc2f02bec6f?variant=devin
Requested by: @eam1813

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@dd-octo-sts

dd-octo-sts Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 9.56 MB
Deduped: 10.32 MB
No deduping: 10.32 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.5.3 | 131.25 kB | 531.9 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-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 98.54% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 92cea77 | Docs | View more details | Give us feedback!

@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.15%. Comparing base (ed36dfd) to head (92cea77).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #11272     +/-   ##
=========================================
  Coverage   99.15%   99.15%             
=========================================
  Files        1126     1136     +10     
  Lines      187020   188374   +1354     
  Branches       82       86      +4     
=========================================
+ Hits       185431   186790   +1359     
+ Misses       1588     1584      -4     
+ Partials        1        0      -1     
Flag Coverage Δ
ai-guard 63.33% <ø> (+0.08%) ⬆️
apm-capabilities 55.17% <ø> (+<0.01%) ⬆️
apm-integrations 81.96% <ø> (+0.22%) ⬆️
appsec 59.24% <ø> (+0.15%) ⬆️
debugger 70.89% <ø> (+0.04%) ⬆️
instrumentation 60.17% <ø> (+0.15%) ⬆️
llmobs 82.51% <ø> (-0.01%) ⬇️
master-coverage 99.15% <ø> (?)
openfeature 68.07% <ø> (+0.07%) ⬆️
platform 68.15% <ø> (+0.09%) ⬆️
profiling 66.51% <ø> (+0.07%) ⬆️
serverless 66.67% <ø> (+1.22%) ⬆️
test-optimization 82.02% <ø> (+0.05%) ⬆️

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.

@pr-commenter

pr-commenter Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-23 23:16:37

Comparing candidate commit 92cea77 in PR branch devin/1794856216-bun-test-harness with baseline commit ed36dfd in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2446 metrics, 11 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 max_rss_usage [-43.351MB; +77.561MB] or [-19.454%; +34.806%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-26

  • unstable max_rss_usage [-14.337MB; +16.727MB] or [-5.328%; +6.217%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-41.787MB; +6.835MB] or [-11.952%; +1.955%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-26

  • unstable max_rss_usage [-29.118MB; +37.502MB] or [-9.499%; +12.235%]

scenario:encoders-0.4-immediate-flush-20

  • unstable max_rss_usage [-12.472MB; +7.593MB] or [-14.634%; +8.909%]

scenario:encoders-0.4-immediate-flush-24

  • unstable max_rss_usage [-8.477MB; +13.187MB] or [-10.092%; +15.699%]

scenario:openfeature-initialization-configuration-20

  • unstable max_rss_usage [-3.630MB; +8.166MB] or [-4.731%; +10.643%]

scenario:openfeature-initialization-error-20

  • unstable max_rss_usage [-4218.354KB; +4911.808KB] or [-5.606%; +6.528%]

scenario:openfeature-scale-full-26

  • unstable max_rss_usage [-28.545MB; +24.021MB] or [-11.858%; +9.978%]

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

  • unstable max_rss_usage [-21.136MB; +33.200MB] or [-11.227%; +17.635%]

scenario:plugin-graphql-long-with-depth-on-max-26

  • unstable max_rss_usage [-51.744MB; +23.062MB] or [-24.703%; +11.010%]

@devin-ai-integration devin-ai-integration Bot changed the title test(bun): run plugin integration tests on the Bun runtime test(bun): run plugin integration tests on the Bun runtime and document experimental support Nov 18, 2026
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 19, 2026 19:51
@devin-ai-integration
devin-ai-integration Bot requested review from a team as code owners November 19, 2026 19:51
@devin-ai-integration
devin-ai-integration Bot requested review from crysmags and pabloerhard and removed request for a team November 19, 2026 19:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T17:56:20.163406Z fd129ad New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…nt experimental support

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matbrwn
matbrwn force-pushed the devin/1794856216-bun-test-harness branch from 16cd8bc to fd129ad Compare November 23, 2026 17:54

This branch has not been deployed

No deployments
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