Repository navigation
Measured results
- Second out-of-sample fix-mined holdout (holdout9: 341 rows, 124 false greens and 217 correct rows from 70 established projects, 26 of them Cypress assertion-level; protocol frozen before any tool ran on it; one run; scanner at this candidate, 2077834e). This and holdout8 below are the primary evidence; pooled over both, the pipeline keeps 148/179 false greens CONFIRMED-only (82.7%, Wilson 95% CI 76.5-87.5), 101/128 counting only those that pass silently at runtime. On holdout9: detection by scanner plus front-door ESLint 111/124 (scanner alone 85 on 3.8.0 -> 91/124, ESLint config C 86/124); after Opus 98/124 (79.0%, CI 71.0-85.3) and 66/88 silent-only; with the Sonnet-first cascade 100/124 (80.6%) and 68/88. Cypress assertion-level: detection 21/26, kept 17/26 (65.4%, CI 46.2-80.6), scanner alone 10 -> 15/26. All 10
.onlyleftovers detected. Correct rows passed 37/217 (17.1%), not adjudicated. Pre-registered gates: G1 (at least 80% kept with Opus) missed at 79.0%, one row short; G2 (Cypress assertion-level at least 60%) passed; G3 (cascade non-inferiority) passed. The judge dropped 13 of 111 detected false greens (2 of 52 on holdout8); this is being investigated on development data only. - Out-of-sample fix-mined holdout (holdout8: 152 rows from fix commits in public repositories, 55 false greens and 97 correct rows, false greens from 28 projects; protocol frozen before any tool ran on it). The scanner caught 40/55 false greens on 3.8.0 and 44/55 on the candidate scanner (9239f3ef), within two lines of the labeled line, and fired on 21/97 correct rows on both (13/97 on both on the exact line). The front-door ESLint config caught 42/55 and fired on 11/97. Running both detectors and having Claude Opus judge each candidate with
e2e-reviewer's inline verification, counting only CONFIRMED verdicts, kept 50/55 false greens (90.9%, Wilson 95% CI 80.4-96.1) and let 20/97 correct rows through (20.6%). 15 of the 55 are unawaited web-first assertions (#15), which live Playwright probes show usually turn the run red rather than passing silently; counting only the 40 that pass silently at runtime, detection was 37/40 and 35/40 were kept (87.5%, CI 73.9-94.5), identical in all three judge runs, with 23/25 on established projects. That 20/97 is an upper bound on false alarms about false greens: a post-hoc breakdown found most of them were real P1 findings next to a correct line. On the subset of established projects (at least 50 stars and 5 contributors) the figures are 36/38 kept and 14/67 passed. Caveats: one detection run, with the judge repeated three times (identical CONFIRMED rows); the sample holds only one Cypress assertion-level false green, and no arm caught it; under deviation D1 the scanner arms were rerun on a byte-identical re-staged copy after the first staging path contained anoutdirectory (the bug in the Fixed section below), with no tool, prompt or metric changed. - In-sample fix-mined holdout (holdout7: 134 rows from fix commits in public repositories; labels v2, 45 false greens and 89 correct rows): on the labeled line, the scanner caught 29/45 false greens on 3.8.0 and 40/45 on this candidate's scanner (7200731e), and fired on 8/89 correct rows on both (15/89 on both when a finding within two lines counts). Cypress assertion-level false greens went from 1/5 to 5/5. Both label amendments (an
it.onlyin a single-test spec, and a discardedisVisible()followed byfill()on the same locator, each relabeled correct) were decided after measurement and are recorded with the holdout. Five of the new shapes (below) were added after seeing these rows, so the gain is in-sample for them; holdout8 above is the out-of-sample check. - Recall benchmark v2, synthetic defects placed in real host suites (page objects, fixtures, helpers): 487/799 (61%) reported on 3.8.0, 729/799 (91%) at the 383 recall commits, and 768/799 (96%) on this candidate's scanner (7200731e), with guard false positives down from 29/425 on 3.8.0 to 0/425 and no case worse between the last two. The 729 -> 768 step is in
#3(108 -> 135/138) and#4f(84 -> 96/117); the#4fextension targets shapes this benchmark missed, so that part of the step is in-sample. Defects placed inside existing helpers (62/73) and fixtures (95/106) remain weaker than in-spec defects (456/458). Confirmed-only recall, which--fail-on p0gates, stayed low (30% on 3.8.0, 34% at the 383 commits; not re-measured since):#3,#3b,#5a,#8aand#8bare only ever P0 candidates. - These are development measurements on sets the maintainers built, not field precision or recall.
Scanner
#15: a discardedexpect.poll()/expect(fn).toPass()is now P0 (a scanner P0 candidate). From Playwright 1.33 the retry loop stops when its test ends and resolves as passed, so its failure is never reported. An unawaited web-first Locator/Page assertion stays P1: Playwright still fails the run, though often on the wrong test.- Raise P0 recall for spellings of shapes the scanner already detects. A seeded-defect benchmark (544 defects, 372 correct paraphrases, operators written before this change and used while tuning it) moved from 322/544 to 540/544 reported (confirmed or candidate) with 0/372 guard false positives, down from 29; a smaller check with operators written after the change is reported separately. These are development numbers on a benchmark the change was tuned against, not a field precision or recall claim.
#8a/#8b/#8c:void x;, Locator refinement chains, unawaited andPromise.allstate reads, same-file or imported helpers and page-object methods proven to return a Locator or one state read, andreturn expect(x).toBeVisible;from a test body are review candidates. A discarded query or state read on an untyped parameter is now an unresolved diagnostic instead of a clean result.#4f:.not.toBe(null),.not.toEqual(undefined),.not.toBeFalsy(),!!locator,expect.soft,test.expect, returned or arrow-body assertions andfor (const row of await locator.all())rows;expect(await locator.all()).toBeTruthy()is a candidate. Cypress: plain Chai truthiness or nullness of a jQuery collection andcy.wrap(<jQuery>).should('be.ok').#4a: comparisons in the subject (expect(n >= 0).toBe(true)),.not.toBeLessThan(0),constbounds and> -1on a length; Cypress invariant length chainers, Chaiat.least(0)/greaterThan(-1)on a length or a helper returning one, and|| trueunderto.be.true.#3: an empty, logging-only or bare-return catch around a provenexpectmatcher in a test context, or around a helper's own callback when a same-file or importing caller passes it an asserting callback;.then(onFulfilled, onRejected)on an assertion; a same-file named.catchhandler;Promise.allSettledover any proven hard matcher; and, in helper modules imported by tests, only swallowed assertions, callbacks and promise parameters.#3b:once, optional and literal computedon,constevent names, test-scopedcy.on('fail')and fail handlers in Cypress helpers ordescribeblocks. An inlineuncaught:exceptionhandler that rethrows on every path, or allowlists one named error and rethrows the rest, is no longer a candidate.#5a: a UI state read must have a proven Page/Locator receiver or a Cypress-yielded DOM value; data gates (Array.find,filter(...).length,Object.is) and narrowing guards after a hard presence assertion are not gates. Bare early returns on a UI state read before assertions in a test or cy callback,||short-circuits, helpers and Cypress custom commands that run an asserting callback only under a UI state read, and asserting imported helpers, page-object methods and custom commands inside a branch gated on a UI state read. Anif/elsewhoseelsealways throws is no longer a candidate.#7: calls of an importedtest.onlyalias, never-writtenletaliases,test.only.call/applyand(0, test.only)(...); a call through a dynamic key such astest[key]on a proven test root is an open question instead of a clean result.- Shared scope resolves
test.expectand the default export of@playwright/testas Playwright'stest. - Close scans that ended COMPLETE with exit 0 while a P0 went unreported: a catch that calls
test.skip()before rethrowing; asserting functions reached by reference (forEach(check),.then(check), aJSON.parsereviver), throughnewor a tagged template, or as an object-literal method; Cypress.and(...), chained custom commands and.then(fnRef)in a gated branch; object-literal member reads with spreads, accessors, computed or duplicate keys, aliases or escapes; destructuring assignments,JSON.parserevivers andglobalThisoverrides treated as plain data;test.use()in a module imported for its side effects; an out-of-scope runner import in a file that also imports a local test module; and a directory import whosepackage.jsonnames a different entry thanindex.*. Each now reports the P0 or leaves the scan INCOMPLETE. - Close the remaining silent P0 paths from the scanner audit: each now reports its P0 or leaves the scan INCOMPLETE with a diagnostic from the P0 detector. Reported:
#7throughconst api = { run: test.only }, a namespace-imported focus alias,(0, test.only)aliases,test.only.bind(null), a test object passed to a same-file helper parameter,pw.test.onlyon the default import of@playwright/testand a pinnedexport default { test, expect }, and a const alias written only in dead code (candidates except the scope-resolved forms);#3bthroughconst C = Cypress,window.Cypressanddeclare const Cypress;#3for a catch that only logs throughwin.consoleofcy.window(), and a helper importingexpectthrough a local re-export;#4ffor a ternary or??of proven Locators androws.forEach(row => ...)overawait locator.all();#8bforPromise.race([locator.isVisible(), page.waitForTimeout(n)]);#8cfortest.step('x', () => expect(x).toBeVisible);#5aforshown && await pageObject.expectX()under a UI state read and for an exported helper whose every visible caller passes a falsy constant to its bare-parameter gate (if (check),if (options.check)or a destructured{ check }without a default) when no later check in the helper or after any caller's call covers that state;#3for a page object or helper imported by a test that swallows a provenexpect(atry { expect; return x } catch { return y }probe is excluded). Diagnosed instead of clean:it/describeimports andrequiredestructuring from an unresolved package, a default or namespace import used asx.test(...), an unresolved non-expectimport used with a P0 matcher,expect(...args),x.prop ?? -1under>= 0, an untyped parameter under a truthiness matcher or> -1count, discarded queries on a destructured unproven callback parameter or adeclare const page, a computed[key]catch,it.onlyon an unbound global in a spec that imports a Cypress helper, an asserting helper under an unresolved state read, an exported parameter gate with no visible caller, and an imported asserting helper in a type-only file.build/,out/andcoverage/stay excluded, but each TypeScript spec there (*.spec|test|cy|e2e.ts, not.d.ts) is listed as anexcluded-specinventory diagnostic with its path, so the scan is INCOMPLETE instead of clean. - Report
#7for a never-written const alias of a Cypress test global (const t = it; t.only(...), likewisedescribe,contextandspecify), which was silently missed. A reassigned alias or an object with its ownonlymethod is not a test. - Report five local, syntactic always-pass shapes even where receiver analysis is unresolved:
#4fforexpect(x.isVisible()).toBeTruthy()(or.not.toBeNull()and the other truthiness matchers) on an unawaited boolean state read, which is a Promise (confirmed on a proven Page/Locator, a candidate otherwise);#8bfor a droppedx.isVisible()/await x.isVisible()statement on an unresolved or untyped receiver in a Playwright file (a candidate; a resolvable synchronous user method and foreign-runner files are excluded);#4afor Cypress.should('contain', '')and theinclude/contain.text/contain.valueforms with an empty string;#8cfor a bare ambient Chaiexpect(<cy chain>);with no matcher in a Cypress file (a cy chain or a const bound to one; a yielded$elis left alone).expect(await <Locator>).toBeTruthy()was already reported on proven Locators. A matcher on a Cypress chainable (expect(cy.get(...)).to.exist) stays unreported, per the #4 Cypress boundary. - Robustness and precision fixes from a code review: recursive parameter forwarding into
t.onlyand a self-importing default-export object no longer throw (cycle guards); resolved parameter provenance is memoized, so doubling helper chains stay linear; each detector runs in its own try, so one that throws is an unresolved diagnostic for itself and never drops the other detectors' findings.#5aexported falsy-gate helpers ignore calls that can never run (if (false) ...), treat a branch that acts and then confirms (a setup step) as no gate, and stay silent only when a later assertion checks the same subject.#3: a helper swallowed in a trailingfinallyorafterEach/afterAllis reported when its body asserts and it is the callback's only check.#4f:expect(this.page.locator(...)).toBeTruthy()(andgetBy*, nullness forms) on an unresolved receiver in a page object, helper or fixture is a candidate. #8b: a droppedisEnabled()/isVisible()is no longer reported when a later unconditional action (click, dblclick, tap, fill, check, uncheck, press, pressSequentially, selectOption) or web-firsttoBeEnabled()/toBeVisible()on the same locator expression runs in the same function, since that call enforces the state;isDisabled()/isHidden()stay reported.#8c: a bare Chaiexpect(<comparison or negation>);with no matcher in a Cypress file.#7: a.onlyin a Cypress spec that registers exactly one test stays P0 and now carries a reviewer note (no test is skipped today; any test added to the file later will be). The #7 reference now states thattest.only.bind(null)(orundefined, or a literal receiver) still registers a focused test, because Playwright'stest.onlyignores its receiver, so the scanner's P0 candidate for it matches the contract; a bind to another object stays rejected.- Fix a silent false clean: exclusion directories (
out/,build/,dist/,coverage/,node_modules/, ...) were matched against every segment of the absolute path, so a scan root under one of them (for example a repository in~/build/) analysed nothing and reported COMPLETE. Inventory, scope and the import snapshot now match only segments below the scan root (or the project root for files outside it). As a general guard, a directory scan that analyses no file while spec-like files (*.spec|test|cy|e2e.*) exist under the root is INCOMPLETE with ano-files-analyseddiagnostic.
Fixed
- When the scan root sat under a directory named
out,build,dist,coverageor another excluded name (for example/x/out/project/tests), the scanner analysed no file and reported a clean COMPLETE scan. Exclusions now match only the path below the scan root, so the root itself is analysed, and a directory scan that analyses zero files while spec files exist under it lists ano-files-analyseddiagnostic and is INCOMPLETE.
Reviewer verification (#3, #5a)
- #3: only a
// JUSTIFIED:marker directly above thecatchline exempts a swallowed assertion. A prose comment calling the check soft, a bonus, optional or best-effort does not. A web-firstexpect(...)matcher used as a wait is still a real assertion. Dependence is judged by outcome. A catch-to-boolean flag that gates later assertions or sends the test to an earlyreturnis in scope, and so is a fallback route (page.goBack(),page.goto,page.evaluate, an API call) that produces the asserted state. A tautological consumer such asexpect(x || true)is reported as #4, not #3. - #3 tiering: independent verification must fail if the swallowed operation failed; text, URL-prefix and count checks that also hold without the outcome do not count. An unseen consumer is NEEDS-CONTEXT, never CONFIRMED. A non-timeout catch path confirms P0 only when the staged code shows it is reachable.
- #5a: an unconditional assertion clears a gate only if it fails on the same missing or wrong fact the gate checks. Assertions on an accepted alternate outcome do not count; that includes a 429, rate-limit or quota branch. Neither do a route check or a pre-existing
count > 0. A gate that reads only run configuration, includingCypress.env,cy.env,Cypress.browserandCypress.platform, is never P0. An.eachindex gate is judged against callers that pass an index other than 0 (every caller for a Playwrightlocator.all()loop, which can be empty), and with no visible caller it is NEEDS-CONTEXT. A value gate whose absence is an accepted outcome is not a bypass. - Inline verification in
e2e-reviewer/SKILL.mdadds four rules. Prose comments are not JUSTIFIED markers. A dismissal must cite a line that fails without the outcome. An unseen consumer is NEEDS-CONTEXT. A refuted pattern that has a different-pattern P0 on the same lines is FALSE-POSITIVE, and the verdict names the other pattern. Verifying P0 candidates (#3, #3b, #5a) is model-sensitive, so reviews that must catch them should run on the strongest model the host offers. Pattern IDs and severities are unchanged. - Batch verification (
e2e-reviewer/SKILL.md): when many candidates are verified in separate passes, a cheaper model may take the first pass; only its CONFIRMED verdicts are kept and every other verdict is re-verified on the strongest model, so a first-pass dismissal is never final. Single findings still go to the strongest model. On holdout8 (174 detector candidates), Sonnet first then Opus matched Opus alone when NEEDS-CONTEXT counts as kept, 52/55 false greens kept and 23/97 correct rows passed; CONFIRMED-only it kept one more false green (51/55 and 20/97, against 50/55 and 20/97), with 18% of candidates reaching Opus and Claude cost $14.10 against $25.20. Codex first then Opus matched Opus alone on every row, with 32% reaching Opus and $8.93 of Claude cost plus Codex tokens. Caveats: one repetition, n=55 false greens; the result is non-inferiority within a pre-registered margin, not equivalence; this was a second pre-registration, made after the first rule failed on the development set and on holdout7; on a candidate stream with few confirmations (the curated development set) about 90% of candidates still reached Opus, so the saving depends on the CONFIRMED rate. Reviewer eval 139 covers re-verifying first-pass dismissals. - Reviewer evals 131-134 add a true positive and a false-positive guard for each change.
ESLint front door
- New ESLint as the front door guide: run ESLint (
eslint-plugin-playwrightplusno-floating-promises) on every commit,scan.shfor the shapes lint misses (Cypress.onlyleftovers, swallowed Cypress fail handlers, value-returning.catchfallbacks, assertions in page objects),e2e-reviewerto judge each candidate. On the same fix-mined holdout, an ESLint config caught 25/34 non-.onlyfalse greens (labels v2) against 18/34 for the 3.8.0 scanner (29/34 for this candidate), while the scanner reached all 11 Cypress.onlyleftovers that skip other tests and config C reached 2. The rows were mined from fix commits, so they may favor lint-visible shapes. README (all four languages) links the guide. e2e-reviewerrecords the project's lint front-door status inStatic evidenceand recommends enabling it when missing. It never installs or runs ESLint, and the line is evidence, not a finding. Reviewer evals 135-136 cover the missing and present cases, and eval 138 covers a Cypress project whosemocha/no-exclusive-testsrule is recognized as the focus check.
Documentation
- README hero and "Why this exists" (all four languages) now lead with the measured results, each sourced in False-green evidence: 1 in 20 popular, human-maintained projects (1k+ stars, 15 of 274 in a GitHub search sample of active Playwright and Cypress repositories) ships at least one critical false green, 7 of them confirmed by breaking the feature (16 of all 83 hit repositories); about 8 in 10 held-out real false greens caught (148 of 179 over two holdouts; 101 of 128 silent-only); when false greens arrive (82% in the past year, 84% with the test file; a description, not a trend); no evidence that AI-marked commits introduce more of them (30% of introductions against 29% of test commits); ESLint plugins alone flag about half of the false greens that pass silently over both holdouts (70 of 128), scanner plus ESLint 113 of 128, 101 of 128 after verification; the 20 flagged clean lines, all with a real issue under a two-model review (no human adjudication); and the cascade cost result as one benchmark. Projects are not named because the cases have not been reported upstream. The earlier audit of 27 tests in 10 projects stays linked as a separate, earlier study.
- New Replay one real past bug guide for checking a suite at runtime.
Experimental: assertion flip for Playwright and Cypress (repository tooling, not shipped in the skills)
scripts/rotten-green/adds an opt-in runtime check for scanner P0 candidates on Playwright: a reporter and V8-coverage matcher that show whether a flagged assertion ever executed in a passing run, andflip.mjs, which inverts the flagged assertions, reruns the tests that reach them (falling back to the enclosing test, the whole spec, or the specs that import the file when no reach evidence exists), and restores the file byte-for-byte. For a#5agate it forces the condition to the branch that skips the gated assertions and reports gate-skippable when the test stays green, gate-required when it fails; gates that assert on both branches, or whose condition has side effects, are refused as gate-unsupported. Helper, page-object and fixture candidates are flipped only in the tests where V8 coverage shows the helper ran, reach is proven per Playwright project, and timeouts adapt to the measured original run and never count as a verdict. The flip is crash-safe and refuses to clobber edits: it writes an on-disk journal and backup before changing a spec (flip.mjs --recover --cwd <project>restores it after a crash), holds a lock at the git top level plus a per-file lock on the spec, refuses a spec that changed after the flip was planned, and restores a file only if it still holds the flipped bytes, otherwise keeping the edit and saving the original asconflict-*.orig. A selected test that did not run is reported as not-reached, never as flipped-still-passes, and the flipped run's own failure at an inverted site decides the verdict. Its flip verdicts matched liveness ground truth on 27/27 bundled fixture cases, with all gate, helper and edge probes passing, and a pilot on an open-source Playwright suite confirmed 3 gate-skippable false greens and 1 live gate. Tests are selected by the location and title path Playwright reports, so wrappers or transforms that shift line numbers still select the right test (before this, such a run loaded no test; the fix was validated by rerunning the flip on the real open-source suite that exposed it); a proof run that also ran setup-dependency tests is re-run with--no-depsto attribute reach. A test whose title is not a plain string is never remapped to a nearby listed test, and a match that is shared by several tests or rests on a remap counts as reach only with a recorded step inside the test's callback; an ambiguous match ends not-reached instead of a false flipped-still-passes. Known limits: a dynamic-title test shifted by a wrapper can still be credited when another test is reported exactly at its source line, and a title-suffix match on a shared wrapper line can credit a sibling test, so treat a flipped-still-passes on such suites as needing confirmation; side-effect checks trust read-only method names without checking the receiver; the per-file lock lives in the OS temp directory, so runs with differentTMPDIRvalues do not see each other's lock; a helper called fromglobalSetupcan be credited to the selected test;--recoverleaves per-file locks behind; and aglobalTeardownthat callsprocess.exit()kills the runner before reporters finish, so the flip records no tests; remove or skipglobalTeardownfor the flip run. It has not been run on Linux. Cypress support: experimental.cypress-flip.mjsapplies the same flip to Cypress scanner candidates (gated#5a, swallowed#3, vacuous#4a/#4f,#3bhandlers and#7focus), sharing the Playwright flip's lock, journal, restore and gate logic. It was re-verified on the final build against feature-break ground truth on three real Cypress suites (a.onlyleftover and twouncaught:exceptionhandlers): 7/7 verdicts agree, including one handler that really masks an applicationTypeError. Before release it also gained a receiver check for read-only calls in gate conditions (a call on a Cypress chain is no longer trusted by name alone), cleanup of the Cypress process group when the flipper is killed, and a refusal to recover through a symlinked state directory. Its known limits: Cypress 10+ e2e only; the app must already be running; a missing assertion cannot be flipped and needs a feature break instead; spec paths containing a comma are refused with an error row; an inert-handler verdict is only meaningful if the app under test is actually serving the current code, so confirm a live dev server has reloaded before trusting it; and a jQuery setter whose argument is a variable (for example$el.css(styles)) can pass the gate side-effect check. Nothing underskills/uses either flip and default scanner output is unchanged.
Linux recovery follow-up
The experimental Cypress flip at the v3.9.0 tag has a Linux process-recovery bug. For that repository-only tool, use commit c850424b or later. The npm scanner and installed skills are unaffected.