fix(playwright): do not mark unchanged tests as impacted#9314
Conversation
Overall package sizeSelf size: 6.71 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 |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
BenchmarksBenchmark execution time: 2026-07-13 22:37:26 Comparing candidate commit 3278927 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2317 metrics, 41 unstable metrics.
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 3278927 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
More details
The Playwright plugin was returning an object { isModified } instead of a boolean to its impacted-test callback. In JavaScript, any non-null object is truthy, so even { isModified: false } evaluated as true, marking all tests as impacted. With Early Flake Detection enabled, this caused unnecessary retries on unmodified tests. The fix passes the boolean directly, now correctly filtering out unmodified tests.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 3278927 · What is Autotest? · Any feedback? Reach out in #autotest
What does this PR do?
Returns the Playwright impacted-test result as a boolean instead of wrapping it in an object.
Adds an unchanged Playwright fixture and integration coverage proving that Impacted Tests does not mark or retry tests from files outside the git diff when Early Flake Detection is enabled.
Motivation
The Playwright instrumentation expects its
onDonecallback to receive a boolean. The plugin returned{ isModified }, so{ isModified: false }was truthy and every Playwright test was treated as modified. When Early Flake Detection was enabled, unchanged tests were repeated unnecessarily.