Skip to content

chore: update eslint unicorn plugin to v65 - #8838

Merged
pabloerhard merged 14 commits into
masterfrom
BridgeAR/2026-06-09-update-unicorn
Jul 22, 2026
Merged

chore: update eslint unicorn plugin to v65#8838
pabloerhard merged 14 commits into
masterfrom
BridgeAR/2026-06-09-update-unicorn

Conversation

@BridgeAR

@BridgeAR BridgeAR commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

Updates ESLint from v9 to v10 and eslint-plugin-unicorn from v64 to v68, replacing eslint-plugin-import with eslint-plugin-import-x.

Ports the custom rules and validation scripts to the updated APIs while keeping new recommended rules disabled until each one is audited against supported Node versions, hot paths, and existing code.

Replaces split-then-index autofixes with a single-segment scanner measured 20-56% faster on Node 24.15, and keeps Fastify's no-subscriber hook path allocation-free.

Adds coverage for the affected AI, WebSocket, OracleDB, and Cypress branches, and makes license validation include hoisted vendor dependencies when npm omits their resolved URL.

@BridgeAR
BridgeAR requested review from a team as code owners June 9, 2026 06:59
@BridgeAR
BridgeAR requested review from tlhunter and removed request for a team June 9, 2026 06:59
@dd-octo-sts

dd-octo-sts Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 7.49 MB
Deduped: 8.15 MB
No deduping: 8.15 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.2 | 124.41 kB | 440.65 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

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.02913% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.45%. Comparing base (fbd459a) to head (68a36e8).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ges/dd-trace/src/llmobs/plugins/langgraph/index.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #8838    +/-   ##
========================================
  Coverage   98.44%   98.45%            
========================================
  Files         943      943            
  Lines      127310   127336    +26     
  Branches    10824    11150   +326     
========================================
+ Hits       125335   125365    +30     
+ Misses       1975     1971     -4     
Flag Coverage Δ
aiguard 57.88% <58.97%> (-0.09%) ⬇️
aiguard-integration 56.21% <61.90%> (+0.01%) ⬆️
apm-bucket-0 57.75% <60.97%> (-0.02%) ⬇️
apm-bucket-1 64.04% <62.22%> (-0.02%) ⬇️
apm-bucket-2 62.81% <63.63%> (-0.01%) ⬇️
apm-bucket-3 60.17% <62.79%> (-0.02%) ⬇️
apm-capabilities-tracing 64.50% <63.23%> (+0.01%) ⬆️
apm-integrations-aerospike 56.75% <57.89%> (-0.02%) ⬇️
apm-integrations-confluentinc-kafka-javascript 61.65% <60.97%> (-0.05%) ⬇️
apm-integrations-couchbase 57.19% <60.97%> (-0.02%) ⬇️
apm-integrations-http 62.82% <57.89%> (-0.02%) ⬇️
apm-integrations-kafkajs 62.24% <60.97%> (-0.02%) ⬇️
apm-integrations-next 59.29% <59.52%> (-0.02%) ⬇️
apm-integrations-prisma 58.76% <63.82%> (-0.02%) ⬇️
appsec 72.97% <85.36%> (-0.02%) ⬇️
appsec-express_fastify_graphql 70.44% <67.30%> (-0.02%) ⬇️
appsec-integration 51.43% <59.74%> (+0.03%) ⬆️
appsec-kafka_ldapjs_lodash 64.02% <60.00%> (-0.02%) ⬇️
appsec-mongodb-core_mongoose_mysql 67.74% <66.66%> (-0.02%) ⬇️
appsec-next 57.59% <56.41%> (-0.02%) ⬇️
appsec-node-serialize_passport_postgres 67.41% <61.36%> (-0.02%) ⬇️
appsec-sourcing_stripe_template 65.76% <57.14%> (-0.02%) ⬇️
debugger 64.94% <49.01%> (-0.03%) ⬇️
instrumentations-bucket-0 51.70% <56.41%> (-0.01%) ⬇️
instrumentations-bucket-1 60.28% <60.00%> (-0.02%) ⬇️
instrumentations-bucket-10 61.85% <55.00%> (-0.02%) ⬇️
instrumentations-bucket-11 56.77% <60.00%> (-0.02%) ⬇️
instrumentations-bucket-12 52.07% <57.89%> (-0.01%) ⬇️
instrumentations-bucket-13 52.09% <57.89%> (-0.01%) ⬇️
instrumentations-bucket-2 53.40% <57.50%> (-0.01%) ⬇️
instrumentations-bucket-3 53.69% <57.50%> (-0.01%) ⬇️
instrumentations-bucket-4 59.28% <61.70%> (-0.02%) ⬇️
instrumentations-bucket-5 50.11% <56.09%> (+<0.01%) ⬆️
instrumentations-bucket-6 61.00% <57.89%> (-0.02%) ⬇️
instrumentations-bucket-7 58.44% <45.83%> (-0.01%) ⬇️
instrumentations-bucket-8 59.52% <62.50%> (-0.02%) ⬇️
instrumentations-bucket-9 52.09% <57.89%> (-0.01%) ⬇️
instrumentations-instrumentation-couchbase 51.15% <57.89%> (-0.01%) ⬇️
instrumentations-instrumentation-zlib 51.74% <57.89%> (-0.01%) ⬇️
instrumentations-integration-esbuild 34.14% <40.62%> (+0.02%) ⬆️
llmobs-ai_anthropic_bedrock 62.87% <82.97%> (+<0.01%) ⬆️
llmobs-bucket-1 61.62% <75.40%> (+0.01%) ⬆️
llmobs-openai 62.79% <80.39%> (+0.01%) ⬆️
llmobs-sdk 66.25% <60.52%> (-0.02%) ⬇️
llmobs-vertex-ai 59.29% <87.80%> (+<0.01%) ⬆️
master-coverage 98.45% <99.02%> (?)
openfeature 56.20% <57.50%> (+<0.01%) ⬆️
openfeature-unit 53.51% <57.89%> (-0.01%) ⬇️
platform-core_esbuild_instrumentations-misc 40.46% <43.24%> (+0.01%) ⬆️
platform-integration 61.52% <50.98%> (+0.02%) ⬆️
platform-shimmer_unit-guardrails_webpack 39.15% <42.02%> (+0.01%) ⬆️
plugins-bucket-0 57.15% <58.69%> (-0.01%) ⬇️
plugins-bucket-1 54.46% <60.46%> (+0.01%) ⬆️
plugins-bucket-11 62.38% <62.29%> (-0.02%) ⬇️
plugins-bucket-18 62.07% <58.13%> (-0.02%) ⬇️
plugins-bucket-19 60.17% <62.79%> (-0.02%) ⬇️
plugins-bucket-20 62.17% <62.22%> (-0.02%) ⬇️
plugins-bucket-4 58.69% <62.50%> (-0.02%) ⬇️
plugins-bullmq_cassandra_cookie 61.86% <60.97%> (-0.02%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 56.85% <57.89%> (-0.02%) ⬇️
plugins-fetch_fs_generic-pool 58.93% <60.97%> (+0.03%) ⬆️
plugins-google-cloud-pubsub_grpc_handlebars 64.80% <61.90%> (-0.02%) ⬇️
plugins-hapi_hono_ioredis 60.34% <59.09%> (-0.02%) ⬇️
plugins-jest_knex_langgraph 55.71% <55.81%> (-0.01%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 58.62% <60.97%> (-0.02%) ⬇️
plugins-lodash_mariadb_memcached 58.12% <61.90%> (-0.02%) ⬇️
plugins-moleculer_mongodb_mongodb-core 62.03% <63.63%> (-0.02%) ⬇️
plugins-mongoose_multer_mysql 59.13% <64.00%> (-0.02%) ⬇️
plugins-mysql2_nats_node-serialize 60.83% <60.97%> (-0.02%) ⬇️
plugins-opensearch_passport-http_pino 59.66% <60.97%> (-0.02%) ⬇️
plugins-postgres_process_pug 58.39% <60.46%> (-0.02%) ⬇️
plugins-redis_router_sequelize 62.16% <60.46%> (-0.02%) ⬇️
plugins-test-and-upstream-rhea_undici_url 61.74% <59.52%> (-0.02%) ⬇️
plugins-valkey_vm_winston 58.13% <60.97%> (-0.02%) ⬇️
plugins-ws 59.72% <87.50%> (+0.01%) ⬆️
profiling 62.25% <57.50%> (-0.02%) ⬇️
serverless-aws-sdk-aws-sdk 55.18% <53.65%> (-0.01%) ⬇️
serverless-aws-sdk-bedrockruntime 54.86% <53.65%> (-0.01%) ⬇️
serverless-aws-sdk-client 56.54% <58.13%> (-0.01%) ⬇️
serverless-aws-sdk-dynamodb 55.78% <53.65%> (-0.01%) ⬇️
serverless-aws-sdk-eventbridge 49.49% <55.00%> (+<0.01%) ⬆️
serverless-aws-sdk-kinesis 59.45% <53.65%> (-0.02%) ⬇️
serverless-aws-sdk-lambda 57.50% <53.65%> (-0.02%) ⬇️
serverless-aws-sdk-s3 55.71% <53.65%> (-0.01%) ⬇️
serverless-aws-sdk-serverless-peer-service 59.85% <58.53%> (-0.02%) ⬇️
serverless-aws-sdk-sns 60.24% <58.53%> (-0.02%) ⬇️
serverless-aws-sdk-sqs 60.68% <61.36%> (-0.02%) ⬇️
serverless-aws-sdk-stepfunctions 55.69% <53.65%> (-0.01%) ⬇️
serverless-aws-sdk-util 51.59% <60.00%> (-0.01%) ⬇️
serverless-bucket-0 54.35% <59.52%> (+0.01%) ⬆️
serverless-bucket-1 59.37% <59.52%> (-0.02%) ⬇️
test-optimization-cucumber 71.89% <87.80%> (-0.03%) ⬇️
test-optimization-cypress 65.82% <78.72%> (+0.09%) ⬆️
test-optimization-jest 73.27% <80.00%> (-0.04%) ⬇️
test-optimization-mocha 73.51% <87.50%> (+0.05%) ⬆️
test-optimization-playwright-playwright-atr 60.40% <73.80%> (+<0.01%) ⬆️
test-optimization-playwright-playwright-efd 60.59% <73.80%> (+<0.01%) ⬆️
test-optimization-playwright-playwright-final-status 60.56% <76.19%> (+<0.01%) ⬆️
test-optimization-playwright-playwright-impacted-tests 60.29% <73.80%> (+0.16%) ⬆️
test-optimization-playwright-playwright-reporting 61.57% <73.80%> (-0.11%) ⬇️
test-optimization-playwright-playwright-test-management 61.10% <76.19%> (-0.11%) ⬇️
test-optimization-playwright-playwright-test-span 60.50% <76.19%> (-0.07%) ⬇️
test-optimization-selenium 60.04% <70.58%> (-0.15%) ⬇️
test-optimization-testopt 58.49% <69.56%> (+0.09%) ⬆️
test-optimization-vitest 70.31% <75.00%> (+0.01%) ⬆️

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.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 9, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 98.96%
Overall Coverage: 98.45% (+0.00%)

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

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8343534888

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-instrumentations/src/fastify.js Outdated
@BridgeAR
BridgeAR marked this pull request as draft June 9, 2026 07:11
@pr-commenter

pr-commenter Bot commented Jun 9, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-22 19:39:16

Comparing candidate commit 68a36e8 in PR branch BridgeAR/2026-06-09-update-unicorn with baseline commit fbd459a in branch master.

📊 Benchmarking dashboard

Found 7 performance improvements and 0 performance regressions! Performance is the same for 2311 metrics, 40 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 ----------------------------------'

scenario:plugin-ws-receive-20

  • 🟩 instructions [-3.3G instructions; -1.5G instructions] or [-17.363%; -8.097%]

scenario:plugin-ws-receive-24

  • 🟩 cpu_user_time [-130.541ms; -55.694ms] or [-7.949%; -3.391%]
  • 🟩 execution_time [-134.227ms; -55.740ms] or [-8.142%; -3.381%]
  • 🟩 instructions [-885.5M instructions; -401.4M instructions] or [-5.188%; -2.352%]
  • 🟩 throughput [+123562.058op/s; +300510.341op/s] or [+3.366%; +8.187%]

scenario:plugin-ws-send-20

  • 🟩 instructions [-3.0G instructions; -1.3G instructions] or [-16.244%; -7.240%]

scenario:plugin-ws-send-24

  • 🟩 cpu_user_time [-93.231ms; -33.333ms] or [-5.685%; -2.032%]

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-24

  • unstable execution_time [-192.115ms; +128.165ms] or [-7.268%; +4.849%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-229.926ms; +156.096ms] or [-9.107%; +6.183%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-167.011ms; +164.877ms] or [-5.385%; +5.317%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-183.433ms; +188.753ms] or [-6.300%; +6.483%]

scenario:appsec-control-20

  • unstable execution_time [-132.274ms; +141.185ms] or [-8.056%; +8.598%]

scenario:appsec-control-24

  • unstable execution_time [-112012.362µs; +110133.562µs] or [-9.018%; +8.866%]

scenario:appsec-control-26

  • unstable execution_time [-121.029ms; +124.992ms] or [-9.784%; +10.105%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-17.348ms; +10.879ms] or [-6.824%; +4.279%]

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

  • unstable execution_time [-15765.845µs; +15614.445µs] or [-6.102%; +6.043%]

scenario:appsec-iast-with-vulnerability-control-20

  • unstable execution_time [-28777.667µs; +28045.667µs] or [-5.197%; +5.064%]

scenario:child_process-file-args-24

  • unstable execution_time [-20.910ms; +27.683ms] or [-4.492%; +5.947%]

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

  • unstable cpu_user_time [-2629.744ms; +4225.370ms] or [-27.504%; +44.193%]
  • unstable execution_time [-2619.335ms; +4213.472ms] or [-25.503%; +41.024%]
  • unstable instructions [-23.2G instructions; +37.3G instructions] or [-29.219%; +46.883%]
  • unstable max_rss_usage [-7.319MB; +13.781MB] or [-4.619%; +8.696%]
  • unstable throughput [-825.664op/s; +508.497op/s] or [-25.573%; +15.750%]

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

  • unstable cpu_user_time [-2015.595ms; +3211.710ms] or [-24.248%; +38.637%]
  • unstable execution_time [-2001.229ms; +3232.790ms] or [-22.199%; +35.860%]
  • unstable instructions [-17.0G instructions; +27.3G instructions] or [-25.144%; +40.246%]
  • unstable max_rss_usage [-8.140MB; +13.731MB] or [-5.175%; +8.729%]
  • unstable throughput [-858.741op/s; +526.929op/s] or [-23.495%; +14.417%]

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

  • unstable cpu_user_time [-2649.552ms; +4202.217ms] or [-27.832%; +44.142%]
  • unstable execution_time [-2782.164ms; +4339.077ms] or [-27.188%; +42.403%]
  • unstable instructions [-23.4G instructions; +37.2G instructions] or [-29.380%; +46.815%]
  • unstable max_rss_usage [-8.469MB; +13.270MB] or [-5.326%; +8.346%]
  • unstable throughput [-839.920op/s; +548.280op/s] or [-25.864%; +16.884%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-328.145ms; +367.368ms] or [-6.722%; +7.525%]
  • unstable execution_time [-332.421ms; +370.110ms] or [-6.702%; +7.462%]
  • unstable throughput [-132496.942op/s; +106647.954op/s] or [-7.856%; +6.323%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-26

  • unstable cpu_usage_percentage [-3.130%; +7.119%]

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

  • unstable max_rss_usage [-14.969MB; +33.414MB] or [-7.227%; +16.132%]

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

  • unstable cpu_user_time [-570.148ms; +586.831ms] or [-4.951%; +5.096%]
  • unstable execution_time [-580.642ms; +598.601ms] or [-4.941%; +5.093%]
  • unstable throughput [-3.527op/s; +3.406op/s] or [-5.152%; +4.976%]

scenario:plugin-ws-receive-20

  • unstable cpu_user_time [-358.241ms; -162.577ms] or [-18.812%; -8.537%]
  • unstable execution_time [-358.017ms; -162.318ms] or [-18.786%; -8.517%]
  • unstable throughput [+273559.107op/s; +611345.469op/s] or [+8.489%; +18.971%]

scenario:plugin-ws-send-20

  • unstable cpu_user_time [-361.979ms; -168.328ms] or [-19.370%; -9.007%]
  • unstable execution_time [-367.200ms; -170.452ms] or [-19.610%; -9.103%]
  • unstable throughput [+299889.780op/s; +646784.563op/s] or [+9.127%; +19.684%]

@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-06-09-update-unicorn branch from 48e9f2d to 0c84e24 Compare June 9, 2026 18:12
tlhunter
tlhunter previously approved these changes Jun 15, 2026
@BridgeAR
BridgeAR marked this pull request as ready for review June 19, 2026 13:53

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3c3c5153f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-instrumentations/src/fastify.js Outdated
@BridgeAR
BridgeAR requested a review from a team as a code owner June 22, 2026 18:05
@BridgeAR
BridgeAR requested review from khanayan123 and removed request for a team June 22, 2026 18:05
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-06-09-update-unicorn branch from 0ec88ef to c20c8ce Compare June 22, 2026 19:15
Comment thread packages/datadog-plugin-cypress/src/support.js Outdated
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-06-09-update-unicorn branch 3 times, most recently from ac8e681 to 3aaac6e Compare July 21, 2026 23:48
* @returns {string | undefined}
*/
function getSegment (string, separator, index, fallback) {
let start = 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Since the indexes are only ever 0 or 1 for now, can we add a fast path to this function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can not imagine faster code for that.
Do you have a suggestion?

IlyasShabi
IlyasShabi previously approved these changes Jul 22, 2026

@IlyasShabi IlyasShabi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM specially on at() split getSegment and jsdoc

@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-06-09-update-unicorn branch from 3aaac6e to edfcbae Compare July 22, 2026 15:49
BridgeAR and others added 14 commits July 22, 2026 21:13
Reading `str.split(sep)[i]` allocates the full segment array, and the
unicorn rule's `split(sep, i + 1)[i]` rewrite is worse for a string
separator: passing a limit drops V8 off its constant-limit fast path,
paying a per-call ToUint32 plus the array allocation. `getSegment`
scans with `indexOf` and slices out the one segment the caller wants.

Node 24.15 / V8 13.6, 5M ops x 7 trials, drop best+worst:

  " " [1]  helper 24.6ns  split 30.6ns (-20%)  split+limit 86.6ns
  "-" [0]  helper 25.4ns  split 35.9ns (-29%)  split+limit 74.3ns
  "." [0]  helper 16.0ns  split 36.4ns (-56%)  split+limit 67.2ns
The unicorn autofix touched branches no existing spec exercised:

1. ws: a connection carrying x-forwarded-proto now asserts the server
   span's http.url resolves to wss, reaching getRequestProtocol's proxy
   arm (and the getSegment call inside it).
2. oracledb: a callback-form pool.getConnection pins the callback path,
   which only the promise form covered before.

The ai-sdk `messages.findLast(...)` arm is left for the PR author: covering
it needs a VCR cassette recorded against a real OPENAI_API_KEY, since the
test agent matches cassettes by request body and runs CI in 404-on-miss mode.

Test-only, no production code changes.
…and setObjectGenerationTags

The two methods use promptInfo.messages.findLast() when the caller passes
a messages array without a top-level prompt string. Existing tests all use
the prompt: '' form, which short-circuits to promptInfo.prompt and leaves
lines 234 and 250 uncovered.

Both new tests use an inline mock fetch (same pattern as the prompt-cache
capture tests), bypassing the VCR proxy so no cassette recording is needed:

- generateText with messages: array and three turns verifies that the last
  user message is extracted as inputValue.
- generateObject with output: 'no-schema' and the same messages array
  verifies the same path in setObjectGenerationTags.

Both tests skip ai < 5.0.0 where the mock-fetch provider wiring differs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The wrapper declared `wrappedHook (...args)`, which materialises a fresh args
array on every fastify hook invocation, including the common case where none of
the wrap-fed channels has a subscriber. Forward the `arguments` object untouched
on the fast path and copy or index it only in the slow path, so the default
request path allocates nothing.
…lugin-import-x

The eslint 9->10 and unicorn 65->68 bumps turn on a large set of new recommended
rules. The newly-firing ones are deactivated in the config with per-rule counts,
grouped by intent (autofixable follow-up, needs-audit, never-activate), so this
bump stays free of production source churn; enabling them is left to follow-ups.

Some deactivated rules may surface real bugs (unicorn/no-duplicate-logical-operands,
no-duplicate-if-branches, no-loop-iterable-mutation, and the core no-unassigned-vars);
their config comments flag them for a focused audit.

Changes the bump requires directly:

1. Port the repo's custom eslint rules to the v10 context API; context.getSourceCode()
   was removed in favour of context.sourceCode.
2. eslint 10 drops Node.js 18, so .nvmrc moves to 22.
3. Rename getRunInChildContextSubtype and drop an unnecessary String.raw to satisfy
   the two rules kept on (consistent-compound-words, prefer-string-raw).
4. Remove stale unicorn/no-array-for-each disable directives; the rule was renamed to
   no-for-each, which is deactivated here.
The message extraction tests referenced a helper that does not exist, so lint failed before the versioned provider fixture could load.
The validation code landed after the branch's previous base, so Unicorn 68's new checks only surfaced once the branch was rebased.
npm list represents hoisted transitive packages without a resolved URL. Skipping those entries makes the local license gate report valid attributions as extraneous when the root dependency graph no longer supplies the same package.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-06-09-update-unicorn branch from edfcbae to 68a36e8 Compare July 22, 2026 19:26
@pabloerhard
pabloerhard merged commit 199f69c into master Jul 22, 2026
662 checks passed
@pabloerhard
pabloerhard deleted the BridgeAR/2026-06-09-update-unicorn branch July 22, 2026 20:06
dd-octo-sts Bot added a commit that referenced this pull request Jul 22, 2026
* chore: update eslint unicorn plugin to v65

* fixup!

* perf(core): replace split-then-index with an allocation-free getSegment

Reading `str.split(sep)[i]` allocates the full segment array, and the
unicorn rule's `split(sep, i + 1)[i]` rewrite is worse for a string
separator: passing a limit drops V8 off its constant-limit fast path,
paying a per-call ToUint32 plus the array allocation. `getSegment`
scans with `indexOf` and slices out the one segment the caller wants.

Node 24.15 / V8 13.6, 5M ops x 7 trials, drop best+worst:

  " " [1]  helper 24.6ns  split 30.6ns (-20%)  split+limit 86.6ns
  "-" [0]  helper 25.4ns  split 35.9ns (-29%)  split+limit 74.3ns
  "." [0]  helper 16.0ns  split 36.4ns (-56%)  split+limit 67.2ns

* test: cover uncovered diff lines from the unicorn v65 rewrite

The unicorn autofix touched branches no existing spec exercised:

1. ws: a connection carrying x-forwarded-proto now asserts the server
   span's http.url resolves to wss, reaching getRequestProtocol's proxy
   arm (and the getSegment call inside it).
2. oracledb: a callback-form pool.getConnection pins the callback path,
   which only the promise form covered before.

The ai-sdk `messages.findLast(...)` arm is left for the PR author: covering
it needs a VCR cassette recorded against a real OPENAI_API_KEY, since the
test agent matches cassettes by request body and runs CI in 404-on-miss mode.

Test-only, no production code changes.

* test(ai): cover the messages.findLast() arm in setTextGenerationTags and setObjectGenerationTags

The two methods use promptInfo.messages.findLast() when the caller passes
a messages array without a top-level prompt string. Existing tests all use
the prompt: '' form, which short-circuits to promptInfo.prompt and leaves
lines 234 and 250 uncovered.

Both new tests use an inline mock fetch (same pattern as the prompt-cache
capture tests), bypassing the VCR proxy so no cassette recording is needed:

- generateText with messages: array and three turns verifies that the last
  user message is extracted as inputValue.
- generateObject with output: 'no-schema' and the same messages array
  verifies the same path in setObjectGenerationTags.

Both tests skip ai < 5.0.0 where the mock-fetch provider wiring differs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(fastify): keep the addHook wrapper allocation-free on the fast path

The wrapper declared `wrappedHook (...args)`, which materialises a fresh args
array on every fastify hook invocation, including the common case where none of
the wrap-fed channels has a subscriber. Forward the `arguments` object untouched
on the fast path and copy or index it only in the slow path, so the default
request path allocates nothing.

* chore(deps): update eslint to v10, unicorn to v68, switch to eslint-plugin-import-x

The eslint 9->10 and unicorn 65->68 bumps turn on a large set of new recommended
rules. The newly-firing ones are deactivated in the config with per-rule counts,
grouped by intent (autofixable follow-up, needs-audit, never-activate), so this
bump stays free of production source churn; enabling them is left to follow-ups.

Some deactivated rules may surface real bugs (unicorn/no-duplicate-logical-operands,
no-duplicate-if-branches, no-loop-iterable-mutation, and the core no-unassigned-vars);
their config comments flag them for a focused audit.

Changes the bump requires directly:

1. Port the repo's custom eslint rules to the v10 context API; context.getSourceCode()
   was removed in favour of context.sourceCode.
2. eslint 10 drops Node.js 18, so .nvmrc moves to 22.
3. Rename getRunInChildContextSubtype and drop an unnecessary String.raw to satisfy
   the two rules kept on (consistent-compound-words, prefer-string-raw).
4. Remove stale unicorn/no-array-for-each disable directives; the rule was renamed to
   no-for-each, which is deactivated here.

* chore: deduplicate yarn.lock

* Apply suggestion from @BridgeAR

* test(llmobs): use installed OpenAI fixture version

The message extraction tests referenced a helper that does not exist, so lint failed before the versioned provider fixture could load.

* ci(lint): update validation code for unicorn v68

The validation code landed after the branch's previous base, so Unicorn 68's new checks only surfaced once the branch was rebased.

* chore(lint): use Array.at for latest Cypress screenshot handler

* test(cypress): cover latest manual screenshot handler

* ci(licenses): include deduplicated vendor dependencies

npm list represents hoisted transitive packages without a resolved URL. Skipping those entries makes the local license gate report valid attributions as extraneous when the root dependency graph no longer supplies the same package.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jul 22, 2026
dd-octo-sts Bot added a commit that referenced this pull request Jul 22, 2026
* chore: update eslint unicorn plugin to v65

* fixup!

* perf(core): replace split-then-index with an allocation-free getSegment

Reading `str.split(sep)[i]` allocates the full segment array, and the
unicorn rule's `split(sep, i + 1)[i]` rewrite is worse for a string
separator: passing a limit drops V8 off its constant-limit fast path,
paying a per-call ToUint32 plus the array allocation. `getSegment`
scans with `indexOf` and slices out the one segment the caller wants.

Node 24.15 / V8 13.6, 5M ops x 7 trials, drop best+worst:

  " " [1]  helper 24.6ns  split 30.6ns (-20%)  split+limit 86.6ns
  "-" [0]  helper 25.4ns  split 35.9ns (-29%)  split+limit 74.3ns
  "." [0]  helper 16.0ns  split 36.4ns (-56%)  split+limit 67.2ns

* test: cover uncovered diff lines from the unicorn v65 rewrite

The unicorn autofix touched branches no existing spec exercised:

1. ws: a connection carrying x-forwarded-proto now asserts the server
   span's http.url resolves to wss, reaching getRequestProtocol's proxy
   arm (and the getSegment call inside it).
2. oracledb: a callback-form pool.getConnection pins the callback path,
   which only the promise form covered before.

The ai-sdk `messages.findLast(...)` arm is left for the PR author: covering
it needs a VCR cassette recorded against a real OPENAI_API_KEY, since the
test agent matches cassettes by request body and runs CI in 404-on-miss mode.

Test-only, no production code changes.

* test(ai): cover the messages.findLast() arm in setTextGenerationTags and setObjectGenerationTags

The two methods use promptInfo.messages.findLast() when the caller passes
a messages array without a top-level prompt string. Existing tests all use
the prompt: '' form, which short-circuits to promptInfo.prompt and leaves
lines 234 and 250 uncovered.

Both new tests use an inline mock fetch (same pattern as the prompt-cache
capture tests), bypassing the VCR proxy so no cassette recording is needed:

- generateText with messages: array and three turns verifies that the last
  user message is extracted as inputValue.
- generateObject with output: 'no-schema' and the same messages array
  verifies the same path in setObjectGenerationTags.

Both tests skip ai < 5.0.0 where the mock-fetch provider wiring differs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(fastify): keep the addHook wrapper allocation-free on the fast path

The wrapper declared `wrappedHook (...args)`, which materialises a fresh args
array on every fastify hook invocation, including the common case where none of
the wrap-fed channels has a subscriber. Forward the `arguments` object untouched
on the fast path and copy or index it only in the slow path, so the default
request path allocates nothing.

* chore(deps): update eslint to v10, unicorn to v68, switch to eslint-plugin-import-x

The eslint 9->10 and unicorn 65->68 bumps turn on a large set of new recommended
rules. The newly-firing ones are deactivated in the config with per-rule counts,
grouped by intent (autofixable follow-up, needs-audit, never-activate), so this
bump stays free of production source churn; enabling them is left to follow-ups.

Some deactivated rules may surface real bugs (unicorn/no-duplicate-logical-operands,
no-duplicate-if-branches, no-loop-iterable-mutation, and the core no-unassigned-vars);
their config comments flag them for a focused audit.

Changes the bump requires directly:

1. Port the repo's custom eslint rules to the v10 context API; context.getSourceCode()
   was removed in favour of context.sourceCode.
2. eslint 10 drops Node.js 18, so .nvmrc moves to 22.
3. Rename getRunInChildContextSubtype and drop an unnecessary String.raw to satisfy
   the two rules kept on (consistent-compound-words, prefer-string-raw).
4. Remove stale unicorn/no-array-for-each disable directives; the rule was renamed to
   no-for-each, which is deactivated here.

* chore: deduplicate yarn.lock

* Apply suggestion from @BridgeAR

* test(llmobs): use installed OpenAI fixture version

The message extraction tests referenced a helper that does not exist, so lint failed before the versioned provider fixture could load.

* ci(lint): update validation code for unicorn v68

The validation code landed after the branch's previous base, so Unicorn 68's new checks only surfaced once the branch was rebased.

* chore(lint): use Array.at for latest Cypress screenshot handler

* test(cypress): cover latest manual screenshot handler

* ci(licenses): include deduplicated vendor dependencies

npm list represents hoisted transitive packages without a resolved URL. Skipping those entries makes the local license gate report valid attributions as extraneous when the root dependency graph no longer supplies the same package.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jul 22, 2026
leoromanovsky pushed a commit that referenced this pull request Jul 22, 2026
* chore: update eslint unicorn plugin to v65

* fixup!

* perf(core): replace split-then-index with an allocation-free getSegment

Reading `str.split(sep)[i]` allocates the full segment array, and the
unicorn rule's `split(sep, i + 1)[i]` rewrite is worse for a string
separator: passing a limit drops V8 off its constant-limit fast path,
paying a per-call ToUint32 plus the array allocation. `getSegment`
scans with `indexOf` and slices out the one segment the caller wants.

Node 24.15 / V8 13.6, 5M ops x 7 trials, drop best+worst:

  " " [1]  helper 24.6ns  split 30.6ns (-20%)  split+limit 86.6ns
  "-" [0]  helper 25.4ns  split 35.9ns (-29%)  split+limit 74.3ns
  "." [0]  helper 16.0ns  split 36.4ns (-56%)  split+limit 67.2ns

* test: cover uncovered diff lines from the unicorn v65 rewrite

The unicorn autofix touched branches no existing spec exercised:

1. ws: a connection carrying x-forwarded-proto now asserts the server
   span's http.url resolves to wss, reaching getRequestProtocol's proxy
   arm (and the getSegment call inside it).
2. oracledb: a callback-form pool.getConnection pins the callback path,
   which only the promise form covered before.

The ai-sdk `messages.findLast(...)` arm is left for the PR author: covering
it needs a VCR cassette recorded against a real OPENAI_API_KEY, since the
test agent matches cassettes by request body and runs CI in 404-on-miss mode.

Test-only, no production code changes.

* test(ai): cover the messages.findLast() arm in setTextGenerationTags and setObjectGenerationTags

The two methods use promptInfo.messages.findLast() when the caller passes
a messages array without a top-level prompt string. Existing tests all use
the prompt: '' form, which short-circuits to promptInfo.prompt and leaves
lines 234 and 250 uncovered.

Both new tests use an inline mock fetch (same pattern as the prompt-cache
capture tests), bypassing the VCR proxy so no cassette recording is needed:

- generateText with messages: array and three turns verifies that the last
  user message is extracted as inputValue.
- generateObject with output: 'no-schema' and the same messages array
  verifies the same path in setObjectGenerationTags.

Both tests skip ai < 5.0.0 where the mock-fetch provider wiring differs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(fastify): keep the addHook wrapper allocation-free on the fast path

The wrapper declared `wrappedHook (...args)`, which materialises a fresh args
array on every fastify hook invocation, including the common case where none of
the wrap-fed channels has a subscriber. Forward the `arguments` object untouched
on the fast path and copy or index it only in the slow path, so the default
request path allocates nothing.

* chore(deps): update eslint to v10, unicorn to v68, switch to eslint-plugin-import-x

The eslint 9->10 and unicorn 65->68 bumps turn on a large set of new recommended
rules. The newly-firing ones are deactivated in the config with per-rule counts,
grouped by intent (autofixable follow-up, needs-audit, never-activate), so this
bump stays free of production source churn; enabling them is left to follow-ups.

Some deactivated rules may surface real bugs (unicorn/no-duplicate-logical-operands,
no-duplicate-if-branches, no-loop-iterable-mutation, and the core no-unassigned-vars);
their config comments flag them for a focused audit.

Changes the bump requires directly:

1. Port the repo's custom eslint rules to the v10 context API; context.getSourceCode()
   was removed in favour of context.sourceCode.
2. eslint 10 drops Node.js 18, so .nvmrc moves to 22.
3. Rename getRunInChildContextSubtype and drop an unnecessary String.raw to satisfy
   the two rules kept on (consistent-compound-words, prefer-string-raw).
4. Remove stale unicorn/no-array-for-each disable directives; the rule was renamed to
   no-for-each, which is deactivated here.

* chore: deduplicate yarn.lock

* Apply suggestion from @BridgeAR

* test(llmobs): use installed OpenAI fixture version

The message extraction tests referenced a helper that does not exist, so lint failed before the versioned provider fixture could load.

* ci(lint): update validation code for unicorn v68

The validation code landed after the branch's previous base, so Unicorn 68's new checks only surfaced once the branch was rebased.

* chore(lint): use Array.at for latest Cypress screenshot handler

* test(cypress): cover latest manual screenshot handler

* ci(licenses): include deduplicated vendor dependencies

npm list represents hoisted transitive packages without a resolved URL. Skipping those entries makes the local license gate report valid attributions as extraneous when the root dependency graph no longer supplies the same package.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
leoromanovsky pushed a commit that referenced this pull request Jul 22, 2026
* chore: update eslint unicorn plugin to v65

* fixup!

* perf(core): replace split-then-index with an allocation-free getSegment

Reading `str.split(sep)[i]` allocates the full segment array, and the
unicorn rule's `split(sep, i + 1)[i]` rewrite is worse for a string
separator: passing a limit drops V8 off its constant-limit fast path,
paying a per-call ToUint32 plus the array allocation. `getSegment`
scans with `indexOf` and slices out the one segment the caller wants.

Node 24.15 / V8 13.6, 5M ops x 7 trials, drop best+worst:

  " " [1]  helper 24.6ns  split 30.6ns (-20%)  split+limit 86.6ns
  "-" [0]  helper 25.4ns  split 35.9ns (-29%)  split+limit 74.3ns
  "." [0]  helper 16.0ns  split 36.4ns (-56%)  split+limit 67.2ns

* test: cover uncovered diff lines from the unicorn v65 rewrite

The unicorn autofix touched branches no existing spec exercised:

1. ws: a connection carrying x-forwarded-proto now asserts the server
   span's http.url resolves to wss, reaching getRequestProtocol's proxy
   arm (and the getSegment call inside it).
2. oracledb: a callback-form pool.getConnection pins the callback path,
   which only the promise form covered before.

The ai-sdk `messages.findLast(...)` arm is left for the PR author: covering
it needs a VCR cassette recorded against a real OPENAI_API_KEY, since the
test agent matches cassettes by request body and runs CI in 404-on-miss mode.

Test-only, no production code changes.

* test(ai): cover the messages.findLast() arm in setTextGenerationTags and setObjectGenerationTags

The two methods use promptInfo.messages.findLast() when the caller passes
a messages array without a top-level prompt string. Existing tests all use
the prompt: '' form, which short-circuits to promptInfo.prompt and leaves
lines 234 and 250 uncovered.

Both new tests use an inline mock fetch (same pattern as the prompt-cache
capture tests), bypassing the VCR proxy so no cassette recording is needed:

- generateText with messages: array and three turns verifies that the last
  user message is extracted as inputValue.
- generateObject with output: 'no-schema' and the same messages array
  verifies the same path in setObjectGenerationTags.

Both tests skip ai < 5.0.0 where the mock-fetch provider wiring differs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf(fastify): keep the addHook wrapper allocation-free on the fast path

The wrapper declared `wrappedHook (...args)`, which materialises a fresh args
array on every fastify hook invocation, including the common case where none of
the wrap-fed channels has a subscriber. Forward the `arguments` object untouched
on the fast path and copy or index it only in the slow path, so the default
request path allocates nothing.

* chore(deps): update eslint to v10, unicorn to v68, switch to eslint-plugin-import-x

The eslint 9->10 and unicorn 65->68 bumps turn on a large set of new recommended
rules. The newly-firing ones are deactivated in the config with per-rule counts,
grouped by intent (autofixable follow-up, needs-audit, never-activate), so this
bump stays free of production source churn; enabling them is left to follow-ups.

Some deactivated rules may surface real bugs (unicorn/no-duplicate-logical-operands,
no-duplicate-if-branches, no-loop-iterable-mutation, and the core no-unassigned-vars);
their config comments flag them for a focused audit.

Changes the bump requires directly:

1. Port the repo's custom eslint rules to the v10 context API; context.getSourceCode()
   was removed in favour of context.sourceCode.
2. eslint 10 drops Node.js 18, so .nvmrc moves to 22.
3. Rename getRunInChildContextSubtype and drop an unnecessary String.raw to satisfy
   the two rules kept on (consistent-compound-words, prefer-string-raw).
4. Remove stale unicorn/no-array-for-each disable directives; the rule was renamed to
   no-for-each, which is deactivated here.

* chore: deduplicate yarn.lock

* Apply suggestion from @BridgeAR

* test(llmobs): use installed OpenAI fixture version

The message extraction tests referenced a helper that does not exist, so lint failed before the versioned provider fixture could load.

* ci(lint): update validation code for unicorn v68

The validation code landed after the branch's previous base, so Unicorn 68's new checks only surfaced once the branch was rebased.

* chore(lint): use Array.at for latest Cypress screenshot handler

* test(cypress): cover latest manual screenshot handler

* ci(licenses): include deduplicated vendor dependencies

npm list represents hoisted transitive packages without a resolved URL. Skipping those entries makes the local license gate report valid attributions as extraneous when the root dependency graph no longer supplies the same package.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
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.

5 participants