fix(cypress): isolate retry status by spec#9340
Conversation
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
Overall package sizeSelf size: 6.74 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 |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 54287a3 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-14 16:47:11 Comparing candidate commit 54287a3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2313 metrics, 45 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
📊 Validated against 4 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 54287a3 · What is Autotest? · Any feedback? Reach out in #autotest
juan-fernandez
left a comment
There was a problem hiding this comment.
ah that's a good catch, thanks
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
Summary
Cypress full titles omit the spec path, so equal titles in separate files shared retry history and produced incorrect final status.
Test plan