Skip to content

fix(cypress): isolate retry status by spec#9340

Merged
BridgeAR merged 1 commit into
masterfrom
BridgeAR/2026-07-14-fix-cypress-retry-identity
Jul 14, 2026
Merged

fix(cypress): isolate retry status by spec#9340
BridgeAR merged 1 commit into
masterfrom
BridgeAR/2026-07-14-fix-cypress-retry-identity

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Summary

Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.

Test plan

  • Run the regression on Cypress 12, 14, and latest CommonJS/ESM
  • Check changed-line and branch coverage

Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
@dd-octo-sts

dd-octo-sts Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.74 MB
Deduped: 7.4 MB
No deduping: 7.4 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 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-prod-us1-6

datadog-prod-us1-6 Bot commented Jul 14, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 96.58% (+0.00%)

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

@BridgeAR
BridgeAR marked this pull request as ready for review July 14, 2026 16:43
@BridgeAR
BridgeAR requested a review from a team as a code owner July 14, 2026 16:43
@pr-commenter

pr-commenter Bot commented Jul 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-14 16:47:11

Comparing candidate commit 54287a3 in PR branch BridgeAR/2026-07-14-fix-cypress-retry-identity with baseline commit 0ad9953 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2313 metrics, 45 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-24

  • unstable execution_time [-209.884ms; +214.900ms] or [-7.913%; +8.102%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-232.648ms; +237.302ms] or [-9.119%; +9.301%]

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

  • unstable execution_time [-158333.614µs; +157255.414µs] or [-5.129%; +5.094%]

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

  • unstable execution_time [-183.426ms; +191.831ms] or [-6.321%; +6.610%]

scenario:appsec-control-20

  • unstable execution_time [-131.012ms; +127.757ms] or [-7.972%; +7.774%]

scenario:appsec-control-24

  • unstable execution_time [-116824.351µs; +118482.951µs] or [-9.433%; +9.567%]

scenario:appsec-control-26

  • unstable execution_time [-125370.185µs; +126518.652µs] or [-10.130%; +10.223%]

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

  • unstable execution_time [-10.030ms; +21.018ms] or [-3.859%; +8.087%]

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

  • unstable execution_time [-11.355ms; +16.800ms] or [-4.439%; +6.567%]

scenario:child_process-shell-string-24

  • unstable cpu_usage_percentage [-6.383%; +3.905%]
  • unstable execution_time [-13.832ms; +27.629ms] or [-4.311%; +8.610%]
  • unstable throughput [-263247.414op/s; +118837.887op/s] or [-7.200%; +3.250%]

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

  • unstable cpu_user_time [-2737.606ms; +2590.132ms] or [-30.674%; +29.021%]
  • unstable execution_time [-2725.893ms; +2612.718ms] or [-28.263%; +27.090%]
  • unstable instructions [-23468.3M instructions; +22171.5M instructions] or [-32.116%; +30.341%]
  • unstable max_rss_usage [-10749.620KB; +11431.220KB] or [-6.756%; +7.185%]
  • unstable throughput [-682.650op/s; +756.018op/s] or [-19.731%; +21.851%]

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

  • unstable cpu_user_time [-1711.451ms; +2710.563ms] or [-20.577%; +32.590%]
  • unstable execution_time [-1716.718ms; +2700.070ms] or [-18.973%; +29.842%]
  • unstable instructions [-14.3G instructions; +22.9G instructions] or [-20.997%; +33.669%]
  • unstable max_rss_usage [-6.044MB; +9.912MB] or [-3.853%; +6.319%]
  • unstable throughput [-758.161op/s; +487.415op/s] or [-20.956%; +13.472%]

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

  • unstable cpu_user_time [-2264.686ms; +726.750ms] or [-23.683%; +7.600%]
  • unstable execution_time [-2277.692ms; +724.454ms] or [-22.142%; +7.043%]
  • unstable instructions [-20.3G instructions; +6.5G instructions] or [-25.447%; +8.182%]
  • unstable throughput [-143.770op/s; +453.392op/s] or [-4.467%; +14.086%]

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

  • unstable cpu_user_time [-2260.616ms; +554.898ms] or [-25.191%; +6.183%]
  • unstable execution_time [-2312.458ms; +552.811ms] or [-23.848%; +5.701%]
  • unstable instructions [-19.5G instructions; +4.6G instructions] or [-26.462%; +6.252%]
  • unstable throughput [-199.778op/s; +628.902op/s] or [-5.820%; +18.321%]

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

  • unstable cpu_user_time [-3.559s; +0.510s] or [-34.588%; +4.952%]
  • unstable execution_time [-3.657s; +0.549s] or [-33.142%; +4.974%]
  • unstable instructions [-31.6G instructions; +4.2G instructions] or [-36.523%; +4.899%]
  • unstable throughput [-116.979op/s; +704.915op/s] or [-3.785%; +22.811%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-326.253ms; +318.012ms] or [-6.929%; +6.754%]
  • unstable execution_time [-322.934ms; +312.383ms] or [-6.743%; +6.523%]
  • unstable throughput [-113372.636op/s; +113973.837op/s] or [-6.471%; +6.505%]

scenario:fs-subscribed-24

  • unstable execution_time [-20.163ms; +28.808ms] or [-4.972%; +7.104%]

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

  • unstable cpu_user_time [-662.659ms; +744.366ms] or [-5.159%; +5.795%]
  • unstable execution_time [-670.028ms; +743.758ms] or [-5.102%; +5.663%]
  • unstable throughput [-3.408op/s; +3.048op/s] or [-5.562%; +4.975%]

scenario:plugin-pg-service-26

  • unstable cpu_usage_percentage [-8.206%; +4.530%]
  • unstable execution_time [-53.260ms; +101.688ms] or [-5.938%; +11.338%]
  • unstable throughput [-614109.541op/s; +331063.256op/s] or [-9.048%; +4.878%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-5308.525KB; +7047.858KB] or [-6.490%; +8.616%]

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.61%. Comparing base (0ad9953) to head (54287a3).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9340    +/-   ##
========================================
  Coverage   96.61%   96.61%            
========================================
  Files         920      920            
  Lines      122236   122236            
  Branches    21070    21216   +146     
========================================
+ Hits       118097   118099     +2     
+ Misses       4139     4137     -2     
Flag Coverage Δ
aiguard 53.55% <ø> (-0.05%) ⬇️
aiguard-integration 56.97% <ø> (ø)
apm-bucket-0 53.78% <ø> (-0.05%) ⬇️
apm-bucket-1 58.05% <ø> (-0.05%) ⬇️
apm-bucket-2 56.10% <ø> (-0.05%) ⬇️
apm-capabilities-tracing 60.38% <ø> (ø)
apm-integrations-aerospike 52.92% <ø> (-0.05%) ⬇️
apm-integrations-confluentinc-kafka-javascript 57.04% <ø> (-0.05%) ⬇️
apm-integrations-couchbase 53.26% <ø> (-0.05%) ⬇️
apm-integrations-http 57.94% <ø> (-0.05%) ⬇️
apm-integrations-kafkajs 57.71% <ø> (-0.03%) ⬇️
apm-integrations-next 54.23% <ø> (-0.05%) ⬇️
apm-integrations-prisma 54.16% <ø> (-0.05%) ⬇️
apm-integrations-tedious 53.03% <ø> (-0.05%) ⬇️
appsec 68.97% <ø> (+<0.01%) ⬆️
appsec-express_fastify_graphql 65.65% <ø> (-0.05%) ⬇️
appsec-integration 51.82% <ø> (-0.04%) ⬇️
appsec-kafka_ldapjs_lodash 59.07% <ø> (-0.04%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.22% <ø> (-0.04%) ⬇️
appsec-next 52.84% <ø> (-0.04%) ⬇️
appsec-node-serialize_passport_postgres 61.85% <ø> (-0.04%) ⬇️
appsec-sourcing_stripe_template 60.31% <ø> (-0.04%) ⬇️
debugger 65.72% <ø> (-0.05%) ⬇️
instrumentations-bucket-0 48.75% <ø> (-0.05%) ⬇️
instrumentations-bucket-1 54.95% <ø> (-0.05%) ⬇️
instrumentations-bucket-10 56.61% <ø> (-0.05%) ⬇️
instrumentations-bucket-11 48.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-12 48.85% <ø> (-0.05%) ⬇️
instrumentations-bucket-13 48.68% <ø> (-0.05%) ⬇️
instrumentations-bucket-2 49.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-3 53.82% <ø> (-0.05%) ⬇️
instrumentations-bucket-4 49.16% <ø> (-0.05%) ⬇️
instrumentations-bucket-5 53.00% <ø> (-0.05%) ⬇️
instrumentations-bucket-6 55.58% <ø> (-0.05%) ⬇️
instrumentations-bucket-7 53.59% <ø> (-0.05%) ⬇️
instrumentations-bucket-8 54.63% <ø> (-0.05%) ⬇️
instrumentations-bucket-9 56.08% <ø> (-0.04%) ⬇️
instrumentations-instrumentation-couchbase 48.13% <ø> (-0.05%) ⬇️
instrumentations-integration-esbuild 33.89% <ø> (ø)
llmobs-ai_anthropic_bedrock 57.73% <ø> (-0.04%) ⬇️
llmobs-bucket-1 57.00% <ø> (-0.04%) ⬇️
llmobs-openai 57.39% <ø> (-0.04%) ⬇️
llmobs-sdk 59.96% <ø> (-0.05%) ⬇️
llmobs-vertex-ai 54.22% <ø> (-0.05%) ⬇️
master-coverage 96.61% <100.00%> (?)
openfeature 54.60% <ø> (-0.01%) ⬇️
openfeature-unit 49.78% <ø> (-0.05%) ⬇️
platform-core_esbuild_instrumentations-misc 38.37% <ø> (-0.03%) ⬇️
platform-integration 62.33% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 37.20% <ø> (-0.03%) ⬇️
plugins-bucket-0 53.17% <ø> (-0.05%) ⬇️
plugins-bucket-1 55.02% <ø> (ø)
plugins-bucket-11 57.45% <ø> (-0.05%) ⬇️
plugins-bucket-18 57.06% <ø> (-0.05%) ⬇️
plugins-bucket-19 55.37% <ø> (-0.05%) ⬇️
plugins-bucket-20 57.42% <ø> (-0.05%) ⬇️
plugins-bucket-4 53.84% <ø> (-0.05%) ⬇️
plugins-bullmq_cassandra_cookie 57.34% <ø> (-0.05%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 52.31% <ø> (-0.05%) ⬇️
plugins-fetch_fs_generic-pool 54.53% <ø> (-0.05%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 59.84% <ø> (-0.05%) ⬇️
plugins-hapi_hono_ioredis 55.84% <ø> (-0.05%) ⬇️
plugins-jest_knex_langgraph 51.66% <ø> (-0.05%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 53.41% <ø> (-0.07%) ⬇️
plugins-lodash_mariadb_memcached 54.20% <ø> (-0.05%) ⬇️
plugins-moleculer_mongodb_mongodb-core 57.28% <ø> (-0.05%) ⬇️
plugins-mongoose_multer_mysql 54.69% <ø> (-0.05%) ⬇️
plugins-mysql2_nats_node-serialize 56.19% <ø> (-0.05%) ⬇️
plugins-opensearch_passport-http_pino 55.04% <ø> (-0.05%) ⬇️
plugins-postgres_process_pug 54.28% <ø> (-0.05%) ⬇️
plugins-redis_router_sequelize 56.99% <ø> (-0.05%) ⬇️
plugins-test-and-upstream-rhea_undici_url 57.01% <ø> (-0.03%) ⬇️
plugins-valkey_vm_winston 53.91% <ø> (-0.06%) ⬇️
plugins-ws 54.78% <ø> (-0.05%) ⬇️
profiling 58.20% <ø> (-0.04%) ⬇️
serverless-aws-sdk-aws-sdk 50.66% <ø> (-0.04%) ⬇️
serverless-aws-sdk-bedrockruntime 50.68% <ø> (-0.05%) ⬇️
serverless-aws-sdk-client 51.93% <ø> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 51.74% <ø> (-0.05%) ⬇️
serverless-aws-sdk-eventbridge 46.22% <ø> (-0.05%) ⬇️
serverless-aws-sdk-kinesis 54.70% <ø> (-0.05%) ⬇️
serverless-aws-sdk-lambda 52.78% <ø> (-0.05%) ⬇️
serverless-aws-sdk-s3 51.53% <ø> (-0.05%) ⬇️
serverless-aws-sdk-serverless-peer-service 54.71% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sns 55.47% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sqs 55.90% <ø> (-0.05%) ⬇️
serverless-aws-sdk-stepfunctions 51.25% <ø> (-0.05%) ⬇️
serverless-aws-sdk-util 48.43% <ø> (-0.05%) ⬇️
serverless-bucket-0 55.17% <ø> (-0.01%) ⬇️
serverless-bucket-1 56.00% <ø> (-0.05%) ⬇️
test-optimization-cucumber 72.92% <ø> (-0.02%) ⬇️
test-optimization-cypress 66.34% <100.00%> (+0.10%) ⬆️
test-optimization-jest 74.22% <ø> (-0.03%) ⬇️
test-optimization-mocha 74.66% <ø> (+0.05%) ⬆️
test-optimization-playwright-playwright-atr 61.53% <ø> (+0.09%) ⬆️
test-optimization-playwright-playwright-efd 61.72% <ø> (+0.03%) ⬆️
test-optimization-playwright-playwright-final-status 61.70% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-impacted-tests 61.41% <ø> (+0.19%) ⬆️
test-optimization-playwright-playwright-reporting 61.30% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-test-management 62.27% <ø> (-0.09%) ⬇️
test-optimization-playwright-playwright-test-span 61.50% <ø> (+0.04%) ⬆️
test-optimization-selenium 60.64% <ø> (-0.14%) ⬇️
test-optimization-testopt 59.13% <ø> (+0.08%) ⬆️
test-optimization-vitest 71.56% <ø> (+0.04%) ⬆️

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-prod-us1-6 datadog-prod-us1-6 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.

Datadog Autotest: PASS

More details

The key change — compositing testSuite + "\0" + testName as the map key in this.testStatuses — correctly fixes the root cause: without spec-path isolation, a "never-passing" test that ran after an "eventually-passing" test with the same title would see a mixed testStatuses array (length > flakyTestRetriesCount + 1), preventing TEST_HAS_FAILED_ALL_RETRIES from being set and causing getFinalStatus to return 'pass' for a test that actually failed all retries. Adversarial synthetic scenarios across four isolation cases all confirmed the fix behaves correctly.

Was this helpful? React 👍 or 👎

📊 Validated against 4 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 54287a3 · What is Autotest? · Any feedback? Reach out in #autotest

@juan-fernandez juan-fernandez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ah that's a good catch, thanks

@BridgeAR
BridgeAR merged commit 225522c into master Jul 14, 2026
715 of 716 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-07-14-fix-cypress-retry-identity branch July 14, 2026 17:41
This was referenced Jul 15, 2026
juan-fernandez pushed a commit that referenced this pull request Jul 16, 2026
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
juan-fernandez pushed a commit that referenced this pull request Jul 16, 2026
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
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.

2 participants