Public report of microsoft/playwright, published 26 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 26 October 2026, 12:06 UTC · Survey ID cd_8bfe42bf04724fc68f6e9c8117c17767

microsoft/playwright

Measured 26 October 2026, 11:44 UTC, at code version a2b65a0

Regression: 1 dimension fell since the last survey Code coverage: not measuredTest reliability: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureNoCollector, CouldNotMeasureNoRunner).

Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.

CAI score 58out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 152,919 lines of product code in 17 projects, tests not counted · Estimated rebuild effort: about 2.7 person-years · Weakest lens: Production Readiness, 52

Findings by how serious they are

107 critical 2224 serious 119 minor

7 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 11:44 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

78of 78 dimensions measured by tools.
2429of 2450 findings point to an exact file and line, so you can open each one in the code. The other 21 concern the repository as a whole, such as missing documentation.
78dimensions across 6 lenses, read from 152,919 lines of product code in 17 projects.
Chapters

Executive summary

microsoft/playwright falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 58 out of 100 and is rated Adequate, and 41 of its 107 critical findings are security problems.

Production Readiness, at 52, is the weakest lens and counts most in the score. The best first step is making the 39 tests that check nothing check their results, worth about 4 points. Adding automated security scanning would lift Production Readiness itself, also worth about 4. Raising Production Readiness to 70 would lift the score to about 63.

Ten known security holes in the packages the code depends on can be used by attackers. Nine places in the code run text as code, which an attacker could use, and fourteen sets of files in separate parts keep changing together, which points to hidden dependencies. Updating the vulnerable packages, replacing text run as code with direct calls and making the hidden dependencies explicit would close these risks. Limiting each secret to its own step would fix the five secrets exposed to more of the pipeline than needed, and the six unsafe settings in infrastructure or container files need changing to safe values. The 39 tests that check nothing need to check the result they produce.

The product code is 152,919 lines, about €400,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 52 · counts for 46%Performance 60 · counts for 25%Security and Compliance 61 · counts for 14%Architecture 68 · counts for 8%Code Health 71 · counts for 4%Maturity 75 · counts for 2%

If Production Readiness rose from 52 to 70, the lowest score rated Strong, the score would rise from 58 to about 63.

Code composition: what the lines of code are
Supporting code 0%Tests 100%
New since the last survey: 1249 findings

These 1249 critical or serious findings weren't in the previous survey, on 12 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · FilePickerOverride._createPicker (cyclomatic 28) browser_patches/firefox/juggler/TargetRegistry.js
  • Cyclomatic Complexity · codeFrame.tokenColor (cyclomatic 16) packages/isomorphic/codeFrame.ts
  • Cognitive Complexity · FilePickerOverride._createPicker (cognitive 36) browser_patches/firefox/juggler/TargetRegistry.js
  • Cognitive Complexity · api_parser.parseVariable (cognitive 16) utils/doclint/api_parser.js
  • God Classes · FileTooLong: REDACTED REDACTED
  • Cohesion (LCOM4) · Low cohesion: LineReporter (LCOM4 4) packages/playwright/src/reporters/line.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/expect.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/playwright.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/reporter.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/stdio.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/test-ignore.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/ui-mode-test-setup.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/ui-mode-test-setup.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/ui-mode-test-setup.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/ui-mode-test-setup.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/web-server.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/playwright-test/web-server.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/elementhandle-bounding-box.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/elementhandle-screenshot.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/elementhandle-screenshot.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/elementhandle-scroll-into-view.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/expect-boolean.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/expect-boolean.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/expect-matcher-result.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/expect-misc.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/expect-to-have-text.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/firefox-network-response.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-evaluate.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-evaluate.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-evaluate.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-hierarchy.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-hierarchy.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-hierarchy.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/frame-hierarchy.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/interception.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/jshandle-to-string.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-highlight.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-is-visible.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-misc-1.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-misc-1.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-misc-2.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-misc-2.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-misc-2.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-query.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/locator-query.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-add-locator-handler.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-add-script-tag.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-add-script-tag.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-add-style-tag.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-autowaiting-basic.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-basic.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-basic.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-basic.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-cache-storage.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-scroll.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-scroll.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-timeout-1.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-timeout-3.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-timeout-4.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click-timeout-4.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-click.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-dialog.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-dialog.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-dialog.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-dispatchevent.spec.ts
  • Test Quality · Skipped test: (unnamed test) tests/page/page-dispatchevent.spec.ts

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1092 findings

These 1092 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · BidiChromium._innerDefaultArgs (cyclomatic 16) packages/playwright-core/src/server/bidi/bidiChromium.ts
  • Cognitive Complexity · InjectedScript.fill (cognitive 19) REDACTED
  • Test Quality · No assertions: should not throw without recordVideo.dir tests/library/video.spec.ts
  • Test Quality · No assertions: context.unrouteAll removes all handlers tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): page.close should not wait for active route handlers on the owning context tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): context.close should not wait for active route handlers on the owned pages tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): route.continue should not throw if page has been closed tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): route.fallback should not throw if page has been closed tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): route.fulfill should not throw if page has been closed tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): should not continue requests in flight (page) tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions (empty test): should not continue requests in flight (context) tests/library/unroute-behavior.spec.ts
  • Test Quality · No assertions: should not crash when browser closes mid-trace tests/library/tracing.spec.ts
  • Test Quality · No assertions (empty test): should survive browser.close with auto-created traces dir tests/library/tracing.spec.ts
  • Test Quality · No assertions: should not stall on dialogs tests/library/tracing.spec.ts
  • Test Quality · No assertions: should not throw when stopping without start but not exporting tests/library/tracing.spec.ts
  • Test Quality · No assertions: should export trace concurrently to second navigation tests/library/tracing.spec.ts
  • Test Quality · No assertions (empty test): should not hang for clicks that open dialogs tests/library/tracing.spec.ts
  • Test Quality · No assertions: should properly synchronize local and remote time tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should have network request overrides 2 tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should pick locator in iframe tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should show only one pointer with multilevel iframes tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should preserve custom doctype tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should replace meta charset attr that specifies charset tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should replace meta content attr that specifies charset tests/library/trace-viewer.spec.ts
  • Test Quality · No assertions: should not wait for a navigation caused by a tap tests/library/tap.spec.ts
  • Test Quality · No assertions: should send all of the correct events tests/library/tap.spec.ts
  • Test Quality · No assertions: should not use icon fonts aria name tests/library/selector-generator.spec.ts
  • Test Quality · No assertions (empty test): start allows restart with different options after stop tests/library/screencast.spec.ts
  • Test Quality · No assertions: stop should not fail when no recording is in progress tests/library/screencast.spec.ts
  • Test Quality · No assertions: should pattern match tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should work with server tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should work without server tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should route WebSockets in already loaded documents tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should emit close upon frame navigation tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should emit close upon frame detach tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should route on context tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should not throw after page closure tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions (empty test): should not throw with empty handler tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should work with baseURL tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions: should work with baseURL regardless of scheme casing tests/library/route-web-socket.spec.ts
  • Test Quality · No assertions (empty test): wpt accname # tests/library/role-utils.spec.ts
  • Test Quality · No assertions: wpt accname non-manual tests/library/role-utils.spec.ts
  • Test Quality · No assertions: axe-core implicit-role tests/library/role-utils.spec.ts
  • Test Quality · No assertions: axe-core accessible-text tests/library/role-utils.spec.ts
  • Test Quality · No assertions: accessible name with slots tests/library/role-utils.spec.ts
  • Test Quality · No assertions: accessible name with closed details tests/library/role-utils.spec.ts
  • Test Quality · No assertions: accessible name nested treeitem tests/library/role-utils.spec.ts
  • Test Quality · No assertions: svg title tests/library/role-utils.spec.ts
  • Test Quality · No assertions: native controls tests/library/role-utils.spec.ts
  • Test Quality · No assertions: input type=search maps to searchbox unless list points at a datalist tests/library/role-utils.spec.ts
  • Test Quality · No assertions: meter and progress get their name from an associated label tests/library/role-utils.spec.ts
  • Test Quality · No assertions: native controls labelled-by tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should remove soft hyphens and zero-width spaces tests/library/role-utils.spec.ts
  • Test Quality · No assertions: label/labelled-by aria-hidden with descendants tests/library/role-utils.spec.ts
  • Test Quality · No assertions: own aria-label concatenated with aria-labelledby tests/library/role-utils.spec.ts
  • Test Quality · No assertions: control embedded in a label tests/library/role-utils.spec.ts
  • Test Quality · No assertions: control embedded in a target element tests/library/role-utils.spec.ts
  • Test Quality · No assertions: searchbox embedded control should contribute its value tests/library/role-utils.spec.ts
  • Test Quality · No assertions: svg role=presentation tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should work with form and tricky input names tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should ignore stylesheet from hidden aria-labelledby subtree tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should not include hidden pseudo into accessible name tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should ignore invalid aria-labelledby tests/library/role-utils.spec.ts
  • Test Quality · No assertions: should support search element tests/library/role-utils.spec.ts
  • Test Quality · No assertions: does launch without a port tests/library/proxy.spec.ts
  • Test Quality · No assertions: socks proxy patter matcher tests/library/proxy-pattern.spec.ts
  • Test Quality · No assertions: should not throttle rAF in the opener page tests/library/popup.spec.ts
  • Test Quality · No assertions: should not throw when click closes popup tests/library/popup.spec.ts
  • Test Quality · No assertions: can request screen-wake-lock tests/library/permissions.spec.ts
  • Test Quality · No assertions: should be able to close context when page crashes tests/library/page-event-crash.spec.ts
  • Test Quality · No assertions (empty test): should close page with active dialog tests/library/page-close.spec.ts
  • Test Quality · No assertions: should be callable twice tests/library/page-close.spec.ts
  • Test Quality · No assertions: page.close should work with window.close tests/library/page-close.spec.ts
  • Test Quality · No assertions (empty test): should not throw UnhandledPromiseRejection when page closes tests/library/page-close.spec.ts
  • Test Quality · No assertions: should not throw when continuing while page is closing tests/library/page-close.spec.ts
  • Test Quality · No assertions: does not fake methods tests/library/page-clock.spec.ts
  • Test Quality · No assertions: correctly increments Date.now()/performance.now() during blocking execution tests/library/page-clock.spec.ts
  • Test Quality · No assertions: should unpause clock tests/library/multiclient.spec.ts
  • Test Quality · No assertions: should parse getByText, getByLabel, getByPlaceholder, getByAltText and getByTitle tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByTestId tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByTestId with a custom test id attribute tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByRef tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByRole with every role tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByRole options tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByRole name and description tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse getByRole options in any order tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse locator with a selector tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse locator and filter options tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse first, last, nth and visible tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse and, or, locator and within with a locator argument tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse chained refinements tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse frame locators tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse FrameLocator.locator with a locator argument tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse owner tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse describe tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse deeply nested locators tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse generated locators tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse javascript string escapes tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse python string escapes tests/library/locator-parser.spec.ts
  • Test Quality · No assertions: should parse java string escapes tests/library/locator-parser.spec.ts
Rebuild cost: about €400,000 · Estimate
Cost to rebuild€130,000 to €660,000, for 2,203 to 6,988 hours of work, about 2.7 person-years for 1 to 6 engineers
Difficulty of the problemLow, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 152,919 lines of product code
Comment linesThe estimate prices 152,894 lines. Comment lines count towards the size of 152,919 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 39 No assertions (empty test) finding(s) in Test Quality — start with unroute-behavior.spec.ts (7), page-autowaiting-no-hang.spec.ts (4), page-history.spec.ts (3).
Raises the score by about 4 points · Medium effort · Test Quality
2
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Raises the score by about 4 points · Medium effort · Security & performance tooling
3
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Raises the score by about 2 points · Medium effort · Async & latency hygiene

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €400,000 to build again, about 2.7 person-years of work. Its weakest lens is Production Readiness, at 52 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 39 No assertions (empty test) finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort, because it clears the 39 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 95,083 lines over the last 90 days, which is about 385,614 lines a year. At that pace, the extra work comes to an estimated 48 to 288.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch :app :app @playwright/browser-chromium browser-chromium playwright-core playwright-core @playwright/browser-chromium->playwright-core @playwright/browser-firefox browser-firefox @playwright/browser-firefox->playwright-core @playwright/browser-webkit browser-webkit @playwright/browser-webkit->playwright-core @playwright/client client @playwright/client->playwright-core @playwright/dashboard dashboard @playwright/test test playwright (npm) playwright (npm) @playwright/test->playwright (npm) Playwright Android Driver Playwright Android Driver java-syntax-checker java-syntax-checker playwright (npm)->playwright-core playwright-chromium playwright-chromium playwright-chromium->playwright-core playwright-firefox playwright-firefox playwright-firefox->playwright-core playwright-webkit playwright-webkit playwright-webkit->playwright-core recorder recorder trace-viewer trace-viewer web web

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

410 modules, with 1030 dependencies between them. 7 loops run through 53 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 370 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 browser_patches.firefox.juggler.TargetRegistry2 browser_patches.firefox.juggler.content.FrameTree3 browser_patches.firefox.juggler.content.Runtime4 browser_patches.firefox.juggler.protocol.Dispatcher5 packages.dashboard.src.dashboardChannel6 packages.injected.src.injectedScript7 packages.isomorphic.types8 packages.playwright-core.src.client.eventEmitter9 packages.playwright-core.src.server.bidi.third_party.bidiProtocolCore10 packages.playwright-core.src.server.types11 packages.playwright-core.src.client.channelOwner12 packages.playwright-core.src.client.jsHandle13 packages.playwright-core.src.client.network14 packages.playwright-core.src.client.playwright15 packages.playwright-core.src.client.browserType16 packages.playwright-core.src.client.elementHandle17 packages.playwright-core.src.client.fetch18 packages.playwright-core.src.client.page19 packages.playwright-core.src.client.browser20 packages.playwright-core.src.client.browserContext21 packages.playwright-core.src.tools.backend.tab22 packages.playwright-core.src.client23 packages.playwright-core.src.server.instrumentation24 packages.playwright-core.src.server.progress25 packages.playwright-core.src.server.dispatchers.browserContextDispatcher26 packages.playwright-core.src.server.dispatchers.dispatcher27 packages.playwright-core.src.server.dom28 packages.playwright-core.src.server.recorder29 packages.playwright-core.src.server.transport30 packages.playwright-core.src.server31 packages.playwright-core.src.server.chromium.crConnection32 packages.playwright-core.src.server.frames33 packages.playwright-core.src.server.page34 packages.playwright-core.src.server.bidi.bidiPage35 packages.playwright-core.src.server.browserContext36 packages.playwright-core.src.server.chromium.crPage37 packages.playwright-core.src.server.firefox.ffPage38 packages.playwright-core.src.server.webkit.webview.wvPage39 packages.playwright-core.src.server.webkit.wkPage40 packages.playwright-core.src.server.chromium.crBrowser
1 browser_patches.firefox.juggler.TargetRegistry
2 browser_patches.firefox.juggler.content.FrameTree
3 browser_patches.firefox.juggler.content.Runtime
4 browser_patches.firefox.juggler.protocol.Dispatcher
5 packages.dashboard.src.dashboardChannel
6 packages.injected.src.injectedScript
7 packages.isomorphic.types
8 packages.playwright-core.src.client.eventEmitter
9 packages.playwright-core.src.server.bidi.third_party.bidiProtocolCore
10 packages.playwright-core.src.server.types
11 packages.playwright-core.src.client.channelOwner1
12 packages.playwright-core.src.client.jsHandle1
13 packages.playwright-core.src.client.network123511
14 packages.playwright-core.src.client.playwright111
15 packages.playwright-core.src.client.browserType11111
16 packages.playwright-core.src.client.elementHandle111
17 packages.playwright-core.src.client.fetch1111
18 packages.playwright-core.src.client.page12121411
19 packages.playwright-core.src.client.browser1111
20 packages.playwright-core.src.client.browserContext111413
21 packages.playwright-core.src.tools.backend.tab1121
22 packages.playwright-core.src.client1111111
23 packages.playwright-core.src.server.instrumentation21222
24 packages.playwright-core.src.server.progress1
25 packages.playwright-core.src.server.dispatchers.browserContextDispatcher1121
26 packages.playwright-core.src.server.dispatchers.dispatcher1112
27 packages.playwright-core.src.server.dom211111
28 packages.playwright-core.src.server.recorder231223
29 packages.playwright-core.src.server.transport11
30 packages.playwright-core.src.server2132113131
31 packages.playwright-core.src.server.chromium.crConnection311
32 packages.playwright-core.src.server.frames321212131
33 packages.playwright-core.src.server.page231112212331
34 packages.playwright-core.src.server.bidi.bidiPage1311112
35 packages.playwright-core.src.server.browserContext11211112
36 packages.playwright-core.src.server.chromium.crPage322212231
37 packages.playwright-core.src.server.firefox.ffPage1111112
38 packages.playwright-core.src.server.webkit.webview.wvPage114211112
39 packages.playwright-core.src.server.webkit.wkPage115211112
40 packages.playwright-core.src.server.chromium.crBrowser22111211
Uses a module listed above itPart of a loopThe module itself
1 browser_patches.firefox.juggler.TargetRegistry2 browser_patches.firefox.juggler.content.FrameTree3 browser_patches.firefox.juggler.content.Runtime4 browser_patches.firefox.juggler.protocol.Dispatcher5 packages.dashboard.src.dashboardChannel6 packages.injected.src.injectedScript7 packages.isomorphic.types8 packages.playwright-core.src.client.eventEmitter9 packages.playwright-core.src.server.bidi.third_party.bidiProtocolCore10 packages.playwright-core.src.server.types11 packages.playwright-core.src.client.channelOwner12 packages.playwright-core.src.client.jsHandle13 packages.playwright-core.src.client.network14 packages.playwright-core.src.client.playwright15 packages.playwright-core.src.client.browserType16 packages.playwright-core.src.client.elementHandle17 packages.playwright-core.src.client.fetch18 packages.playwright-core.src.client.page19 packages.playwright-core.src.client.browser20 packages.playwright-core.src.client.browserContext21 packages.playwright-core.src.tools.backend.tab22 packages.playwright-core.src.client23 packages.playwright-core.src.server.instrumentation24 packages.playwright-core.src.server.progress25 packages.playwright-core.src.server.dispatchers.browserContextDispatcher26 packages.playwright-core.src.server.dispatchers.dispatcher27 packages.playwright-core.src.server.dom28 packages.playwright-core.src.server.recorder29 packages.playwright-core.src.server.transport30 packages.playwright-core.src.server31 packages.playwright-core.src.server.chromium.crConnection32 packages.playwright-core.src.server.frames33 packages.playwright-core.src.server.page34 packages.playwright-core.src.server.bidi.bidiPage35 packages.playwright-core.src.server.browserContext36 packages.playwright-core.src.server.chromium.crPage37 packages.playwright-core.src.server.firefox.ffPage38 packages.playwright-core.src.server.webkit.webview.wvPage39 packages.playwright-core.src.server.webkit.wkPage40 packages.playwright-core.src.server.chromium.crBrowserbrowser_patches.firefox.juggler.TargetRegistry1browser_patches.firefox.juggler.content.FrameTree2browser_patches.firefox.juggler.content.Runtime3browser_patches.firefox.juggler.protocol.Dispatcher4packages.dashboard.src.dashboardChannel5packages.injected.src.injectedScript6packages.isomorphic.types7packages.playwright-core.src.client.eventEmitter8packages.playwright-core.src.server.bidi.third_party.bidiProtocolCore9packages.playwright-core.src.server.types10packages.playwright-core.src.client.channelOwner11packages.playwright-core.src.client.jsHandle12packages.playwright-core.src.client.network13packages.playwright-core.src.client.playwright14packages.playwright-core.src.client.browserType15packages.playwright-core.src.client.elementHandle16packages.playwright-core.src.client.fetch17packages.playwright-core.src.client.page18packages.playwright-core.src.client.browser19packages.playwright-core.src.client.browserContext20packages.playwright-core.src.tools.backend.tab21packages.playwright-core.src.client22packages.playwright-core.src.server.instrumentation23packages.playwright-core.src.server.progress24packages.playwright-core.src.server.dispatchers.browserContextDispatcher25packages.playwright-core.src.server.dispatchers.dispatcher26packages.playwright-core.src.server.dom27packages.playwright-core.src.server.recorder28packages.playwright-core.src.server.transport29packages.playwright-core.src.server30packages.playwright-core.src.server.chromium.crConnection31packages.playwright-core.src.server.frames32packages.playwright-core.src.server.page33packages.playwright-core.src.server.bidi.bidiPage34packages.playwright-core.src.server.browserContext35packages.playwright-core.src.server.chromium.crPage36packages.playwright-core.src.server.firefox.ffPage37packages.playwright-core.src.server.webkit.webview.wvPage38packages.playwright-core.src.server.webkit.wkPage39packages.playwright-core.src.server.chromium.crBrowser40111235111111111111111111212141111111114131121111111121222111211112211111231223112132113131311321212131231112212331131111211211112322212231111111211421111211521111222111211+370 more modules (most-connected shown)

At a glance — Code Health · 71% · Adequate · gated by D2 ·

At a glance — Architecture · 68% · Adequate · gated by R9 ·

At a glance — Maturity · 75% · Strong ·

At a glance — Readiness · 52% · Adequate · gated by P3 ·

At a glance — Security · 61% · Adequate · gated by D29, D30, D36 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection82High / Critical
A03:2025 — Software Supply Chain Failures25High / Critical
A02:2025 — Security Misconfiguration24High / Critical
A07:2025 — Authentication Failures4High / Critical

Roadmap

First, eliminate empty and skipped tests by addressing the largest groups in unroute-behavior.spec.ts and page-request-intercept.spec.ts to ensure test reliability. Next, integrate a SAST step into the CI pipeline using CodeQL or semgrep to automatically block security regressions. Then, replace synchronous APIs with their asynchronous counterparts across the codebase to improve latency and hygiene. Finally, resolve the remaining empty test assertions in locator-parser.spec.ts and page-aria-snapshot.spec.ts to complete the quality improvements.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 39 No assertions (empty test) finding(s) in Test Quality — start with unroute-behavior.spec.ts (7), page-autowaiting-no-hang.spec.ts (4), page-history.spec.ts (3).+4.0 ptsMediumTest Quality
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.+3.7 ptsMediumSecurity & performance tooling
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.2 ptsMediumAsync & latency hygiene
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+2.0 ptsMediumDependency Hygiene
Resolve the 638 Skipped test finding(s) in Test Quality — start with page-request-intercept.spec.ts (25), page-goto.spec.ts (17), page-request-fulfill.spec.ts (17).+3.2 ptsHighTest Quality
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.6 ptsMediumRelease Hygiene
Resolve the 523 No assertions finding(s) in Test Quality — start with locator-parser.spec.ts (37), page-aria-snapshot.spec.ts (33), locator-generator.spec.ts (24).+2.6 ptsHighTest Quality
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.6 ptsLowADR Quality

File quality

Per-file score 0–10 — a quality signature. Of 521 files carrying findings, judged against the Production bar: 2% slop · 71% mixed · 27% near-clean.

FileScoreBandWorst signal
REDACTED0.5SlopSecrets (history): High secret: REDACTED
REDACTED1.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
tests/library/unroute-behavior.spec.ts3.1SlopTest Quality: No assertions (empty test): RO-190 page.close should not wait for active route handlers on the owning context
tests/page/page-autowaiting-no-hang.spec.ts3.3SlopTest Quality: No assertions (empty test): AW-014 calling window.stop async
packages/isomorphic/trace/traceModernizer.ts3.6SlopChange Coupling: Boundary-crossing change coupling: traceModernizer.ts ↔ testTracing.ts
tests/page/page-history.spec.ts3.7SlopTest Quality: No assertions (empty test): NA-077 page.reload during renderer-initiated navigation
tests/library/heap.spec.ts3.9SlopTest Quality: No assertions (empty test): LE-005 test #${i} to request page and context
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 107

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 2224

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 119

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 7

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 78 of 78 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 78 dimensions across the health lenses
D1D2D3D5D6D9D10D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX5AX6AX8GD1M1M2M3M4P1P10P2P3P4P6PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2429 of 2450 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17806-62dc-7bde-a2bd-5a208008fcab.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository declares 5 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.ts, .js, .mjs, .tsx), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Cannot open project 'browser_patches/winldd/PrintDeps.vcxproj' because the file extension '.vcxproj' is not associated with a language.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 0 deducted marker(s) and the 0.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .ts (117,100 lines, 87% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 78 task marker(s) (TODO/FIXME/HACK/XXX) across 48 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D18 Solution Shape — evaluation did not complete — Dimension evaluation failed — excluded from the score.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/dashboard/src/sessionSidebar.tsx`, `packages/injected/src/utilityScript.ts`, `packages/isomorphic/trace/trace.ts`, `packages/playwright-core/src/browserServerImpl.ts`, `REDACTED`, … (+10 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P2 Observability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 35 further occurrence(s) are not listed individually; the score already reflects all 75.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 29 further occurrence(s) are not listed individually; the score already reflects all 69.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 314 further occurrence(s) are not listed individually; the score already reflects all 354.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 51 further occurrence(s) are not listed individually; the score already reflects all 91.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 184 further occurrence(s) are not listed individually; the score already reflects all 224.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 33 further occurrence(s) are not listed individually; the score already reflects all 73.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.1 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.1 / 10 · rule-coverage 100% · ceiling Prevented

241 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was snapshotterInjected.frameSnapshotStreamer at 146. A further 6 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being bidiDeserializer.deserializeBidiValue at 28 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: REDACTED (bidiDeserializer.deserializeBidiValue at 28), REDACTED (tab.consoleLevelForMessageType at 20), packages/playwright-core/src/server/dispatchers/webSocketRouteDispatcher.ts (WebSocketRouteDispatcher.install at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

cssTokenizer.tokenize::consumeAToken (cyclomatic 49) · ×3packages/isomorphic/cssTokenizer.ts:143
ariaSnapshot.generateAriaTree::visit (cyclomatic 32) · ×2REDACTED:95
ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey (cyclomatic 22) · ×2packages/isomorphic/ariaSnapshotRenderer.ts:38
snapshotterInjected.frameSnapshotStreamer (cyclomatic 146)packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:34
roleUtils.getTextAlternativeInternal (cyclomatic 136)packages/injected/src/roleUtils.ts:763

+ 200 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 9 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with snapshotterInjected.frameSnapshotStreamer (cyclomatic 146), roleUtils.getTextAlternativeInternal (cyclomatic 136), Streamer.captureSnapshot::visitNode (cyclomatic 92). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 9 together lifts Cyclomatic Complexity from 5.1 to about 6.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity3.5 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 3.5 / 10 · rule-coverage 100% · ceiling Prevented

303 method(s) exceeded the cognitive complexity threshold of 15; the worst was generate_channels.generateChannels at 239.

cssTokenizer.tokenize::consumeAToken (cognitive 75) · ×3packages/isomorphic/cssTokenizer.ts:143
check_deps.innerCheckDeps::visit (cognitive 54) · ×3utils/check_deps.js:137
ariaSnapshot.generateAriaTree::visit (cognitive 42) · ×2REDACTED:95
snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit (cognitive 41) · ×2REDACTED:357
ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit (cognitive 34) · ×2packages/isomorphic/ariaSnapshotRenderer.ts:83

+ 247 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with generate_channels.generateChannels (cognitive 239), generateChannels (cognitive 239), roleUtils.getTextAlternativeInternal (cognitive 230). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cognitive Complexity from 3.5 to about 4.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes7.4 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.4 / 10 · rule-coverage 100% · ceiling Prevented

118 god class(es) detected.

TooManyMethods: Page · ×37packages/playwright-core/src/client/page.ts:90
FileTooLong: REDACTED · ×30REDACTED
FunctionTooLong: snapshotterInjected.frameSnapshotStreamer · ×29packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:34
ClassTooLong: InjectedScript · ×15REDACTED:94
MethodTooLong: Registry.constructor · ×7packages/playwright-core/src/server/registry/index.ts:510

What to do

  1. Resolve the 37 TooManyMethods finding(s) in God Classes — start with page.ts (2), frames.ts (2), REDACTED (2). — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 30 FileTooLong finding(s) in God Classes — start with page.ts (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (30 warning-level).
  3. Resolve the 29 FunctionTooLong finding(s) in God Classes — start with program.ts (3), snapshotterInjected.ts, uiModeView.tsx. — One of this dimension's main actionable groups (29 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.5 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Prevented

17 production modules (Gradle+Maven+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 1 module(s) off the main sequence, with abstractness counted on 8 of the 17 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: playwright-core

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 18 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Verified

18 of 361 classes have LCOM4 above 3.

Low cohesion: BrowserContext (LCOM4 16) · ×18packages/playwright-core/src/client/browserContext.ts:64

What to do

  1. Resolve the 18 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, output.ts, page.ts. — One of this dimension's main actionable groups (18 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

8322 test methods: 8322 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 8322 `it`/`test` case(s) across 591 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality7.4 / 10Adequategated by 39 critical findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.4 / 10 · rule-coverage 100% · ceiling Prevented

640 skipped (2 with a documented reason), 562 zero-assertion, 13 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 8322 tests.

No assertions (empty test): LO-093 should wait for frame 2 · ×39tests/page/locator-frame.spec.ts:104
Skipped test: (unnamed test) · ×638tests/playwright-test/esm.spec.ts:571
No assertions: should throw in serial mode if test suites in worker are inconsistent with runner · ×523tests/playwright-test/runner.spec.ts:371
Fixed-sleep synchronisation: NA-063 should return from goto if new navigation is started · ×13tests/page/page-goto.spec.ts:853
Skipped (documented): (unnamed test) · ×2tests/extension/extension-fixtures.ts:118

What to do

  1. Resolve the 39 No assertions (empty test) finding(s) in Test Quality — start with unroute-behavior.spec.ts (7), page-autowaiting-no-hang.spec.ts (4), page-history.spec.ts (3). — One of this dimension's main actionable groups (39 issue-level).
  2. Resolve the 638 Skipped test finding(s) in Test Quality — start with page-request-intercept.spec.ts (25), page-goto.spec.ts (17), page-request-fulfill.spec.ts (17). — One of this dimension's main actionable groups (638 warning-level).
  3. Resolve the 523 No assertions finding(s) in Test Quality — start with locator-parser.spec.ts (37), page-aria-snapshot.spec.ts (33), locator-generator.spec.ts (24). — One of this dimension's main actionable groups (523 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 99 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 1 direct `PackageReference`(s), and 98 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 75 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: packages/injected/src/roleUtils.ts (8×136=1088); REDACTED (17×57=969); packages/playwright-core/src/server/fetch.ts (14×63=882) Repeated repair below the complexity floor: packages/playwright-core/src/server/chromium/chromiumSwitches.ts (7 of 11 changes were fixes); packages/playwright-core/src/tools/mcp/extensionContextFactory.ts (5 of 6 changes were fixes); packages/playwright-core/src/tools/mcp/browserFactory.ts (4 of 7 changes were fixes)

Hotspot: packages/injected/src/roleUtils.ts · ×52packages/injected/src/roleUtils.ts:763
Repeated repair: packages/playwright-core/src/server/chromium/chromiumSwitches.ts · ×23packages/playwright-core/src/server/chromium/chromiumSwitches.ts:52

What to do

  1. Resolve the 52 Hotspot finding(s) in Churn × Complexity Hotspots — start with program.ts (2), config.ts (2), roleUtils.ts. — One of this dimension's main actionable groups (52 warning-level).
  2. Resolve the 23 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), chromiumSwitches.ts, extensionContextFactory.ts. — One of this dimension's main actionable groups (23 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

22 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/playwright/src/common/fixtures.ts. Counted over 557 of the 787 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted debt markers + unmeasured dead symbols across 39 LoC in the .NET projects (0.0/KLoC) → score 10.0. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .ts (87% of production source) was not read, and carries at least 78 uncounted task marker(s) in 48 file(s).

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 201 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 of 1 projects flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

82 finding(s): 0 critical, 22 high, 58 medium, 2 low. semgrep hit a parse error in 21 file(s) — `packages/dashboard/src/sessionSidebar.tsx` (line 31), `packages/injected/src/utilityScript.ts` (line 62), `packages/isomorphic/trace/trace.ts` (line 17), `packages/playwright-core/src/browserServerImpl.ts` (line 51), `packages/playwright-core/src/server/android/driver/gradlew` (line 72, line 173), … (+16 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 9 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 12 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities3.0 / 10Weak✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

14 finding(s): 0 critical, 10 high, 4 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 10 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security6.2 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.2 / 10 · rule-coverage 100% · ceiling Documented

24 finding(s): 0 critical, 6 high, 18 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 18 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (6), REDACTED (6). — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 6 High IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (6 issue-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

13 of 557 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is utils/linux-browser-dependencies/inside_docker/list_dependencies.js. Counted over 557 of the 787 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×13utils/linux-browser-dependencies/inside_docker/list_dependencies.js:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling8.9 / 10Adequategated by 14 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: REDACTED↔selectors.ts 90%; crExecutionContext.ts↔wkExecutionContext.ts 90%; locator.ts↔selectors.ts 81%

Boundary-crossing change coupling: REDACTED ↔ selectors.ts · ×14REDACTED:1
Change coupling: locator.ts ↔ selectors.ts · ×27packages/playwright-core/src/client/locator.ts:1
Change-coupling hub: REDACTED → FrameTree.js, PageAgent.js, main.js, Protocol.js · ×4REDACTED
Change coupling clique: REDACTED, crExecutionContext.ts, wkExecutionContext.tsREDACTED

What to do

  1. Resolve the 14 Boundary-crossing change coupling finding(s) in Change Coupling — start with REDACTED, selectorParser.ts, locatorGenerators.ts. — One of this dimension's main actionable groups (14 issue-level).
  2. Resolve the 27 Change coupling finding(s) in Change Coupling — start with video.ts (2), locator.ts, androidServerImpl.ts. — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with REDACTED, TargetRegistry.js, BrowserHandler.js. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation9.8 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `DashboardChannel` declares 26 required operations: `selectTab`, `closeTab`, `newTab`, `closeSession`, `setVisible`, `navigate`, `back`, `forward`, `reload`, `mousemove`, `mousedown`, `mouseup`, `wheel`, `keydown`, `keyup`, `startRecording`, `stopRecording`, `readStream`, `screenshot`, `submitAnnotation`, `cancelAnnotation`, `debuggerResume`, `debuggerPause`, `debuggerStep`, `on`, `off`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/dashboard/src/dashboardChannel.ts:77
  • `PageDelegate` declares 31 required operations: `reload`, `goBack`, `goForward`, `requestGC`, `addInitScript`, `removeInitScripts`, `closePage`, `navigateFrame`, `updateExtraHTTPHeaders`, `updateEmulatedViewportSize`, `updateEmulateMedia`, `updateRequestInterception`, `updateFileChooserInterception`, `bringToFront`, `setBackgroundColor`, `takeScreenshot`, `adoptElementHandle`, `getContentFrame`, `getOwnerFrame`, `getContentQuads`, `setInputFilePaths`, `getBoundingBox`, `getFrameElement`, `scrollRectIntoViewIfNeeded`, `startScreencast`, `stopScreencast`, `rafCountForStablePosition`, `inputActionEpilogue`, `resetForReuse`, `shouldToggleStyleSheetToSyncAnimations`, `setDockTile`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/playwright-core/src/server/page.ts:59
  • `Output` declares 22 required operations: `version`, `help`, `errorUnknownCommand`, `errorUnknownOption`, `errorTooManyArguments`, `errorAttachConflict`, `errorDetachNotAttached`, `errorBrowserNotOpenForTool`, `errorAttachNoTarget`, `errorInstallGlobalRequiresSkills`, `list`, `closeAll`, `deleteData`, `killAll`, `open`, `attach`, `close`, `detach`, `installed`, `show`, `toolResult`, `installStdio`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/playwright-core/src/tools/cli-client/output.ts:47
  • `TestServerInterface` declares 16 required operations: `initialize`, `ping`, `watch`, `open`, `resizeTerminal`, `checkBrowsers`, `installBrowsers`, `runGlobalSetup`, `runGlobalTeardown`, `clearCache`, `listFiles`, `listTests`, `runTests`, `findRelatedTestFiles`, `stopTests`, `closeGracefully`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/playwright/src/isomorphic/testServerInterface.ts:25

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • tests/assets/modernizr/README.md links to `modernizr.com`, but `tests/assets/modernizr/modernizr.com` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tests/assets/modernizr/README.md:5

What to do

  • Reconcile the README with reality: tests/assets/modernizr/README.md links to `modernizr.com`, but `tests/assets/modernizr/modernizr.com` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

What to do

  • Keep implementation types off the public surface (Java: package-private (no modifier), or leave its package out of `module-info` exports) — even for a small library, every public type is a stability contract.
P2 · Observability6.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 3/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/playwright-chromium`, `packages/playwright-firefox`, `packages/playwright-test`, `packages/playwright-webkit`, `utils/doclint/linting-code-snippets/java` and 1 more.
  • `utils/check_audit.js` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/check_audit.js:40
  • `utils/check_audit.js` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/check_audit.js:47
  • `utils/check_audit.js` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/check_audit.js:52
  • `utils/generate_chromium_default_font_families.js` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/generate_chromium_default_font_families.js:116
  • `utils/video_stress.js` reports through `console.*` at line 5 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/video_stress.js:5
  • `utils/video_stress.js` reports through `console.*` at line 12 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/video_stress.js:12
  • `utils/video_stress.js` reports through `console.*` at line 14 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/video_stress.js:14
  • `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/protocol-types-generator/update-webview-protocol.js:56
  • `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/protocol-types-generator/update-webview-protocol.js:62
  • `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 68 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/protocol-types-generator/update-webview-protocol.js:68
  • `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/protocol-types-generator/update-webview-protocol.js:72
  • `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/protocol-types-generator/update-webview-protocol.js:74
  • `utils/doclint/api_parser.js` reports through `console.*` at line 461 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/doclint/api_parser.js:461
  • `utils/doclint/api_parser.js` reports through `console.*` at line 462 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/doclint/api_parser.js:462
  • `utils/doclint/generateApiJson.js` reports through `console.*` at line 36 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — utils/doclint/generateApiJson.js:36
  • `packages/isomorphic/cssTokenizer.ts` reports through `console.*` at line 117 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/isomorphic/cssTokenizer.ts:117
  • `packages/isomorphic/cssTokenizer.ts` reports through `console.*` at line 140 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/isomorphic/cssTokenizer.ts:140
  • `REDACTED` reports through `console.*` at line 616 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:616
  • `packages/isomorphic/codegen/javascript.ts` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/isomorphic/codegen/javascript.ts:74
  • `packages/injected/src/clock.ts` reports through `console.*` at line 252 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/injected/src/clock.ts:252
  • `REDACTED` reports through `console.*` at line 448 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:448
  • `packages/injected/src/recorder/pollingRecorder.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/injected/src/recorder/pollingRecorder.ts:48
  • `packages/injected/src/recorder/recorder.ts` reports through `console.*` at line 587 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/injected/src/recorder/recorder.ts:587
  • `packages/injected/src/recorder/recorder.ts` reports through `console.*` at line 1321 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/injected/src/recorder/recorder.ts:1321
  • `browser_patches/firefox/juggler/ChannelEventSink.sys.mjs` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — browser_patches/firefox/juggler/ChannelEventSink.sys.mjs:47
  • `browser_patches/firefox/juggler/NetworkObserver.js` reports through `console.*` at line 980 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — browser_patches/firefox/juggler/NetworkObserver.js:980
  • `browser_patches/firefox/juggler/NetworkObserver.js` reports through `console.*` at line 993 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — browser_patches/firefox/juggler/NetworkObserver.js:993
  • `browser_patches/firefox/juggler/NetworkObserver.js` reports through `console.*` at line 1002 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — browser_patches/firefox/juggler/NetworkObserver.js:1002
  • `REDACTED` reports through `console.*` at line 372 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:372
  • `packages/playwright/src/worker/fixtureRunner.ts` reports through `console.*` at line 164 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/worker/fixtureRunner.ts:164
  • `packages/playwright/src/runner/testRunner.ts` reports through `console.*` at line 419 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/runner/testRunner.ts:419
  • `packages/playwright/src/runner/testServer.ts` reports through `console.*` at line 165 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/runner/testServer.ts:165
  • `packages/playwright/src/runner/testServer.ts` reports through `console.*` at line 318 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/runner/testServer.ts:318
  • `packages/playwright/src/reporters/json.ts` reports through `console.*` at line 254 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/reporters/json.ts:254
  • `packages/playwright/src/reporters/junit.ts` reports through `console.*` at line 103 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/reporters/junit.ts:103
  • `packages/playwright/src/plugins/gitCommitInfoPlugin.ts` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/plugins/gitCommitInfoPlugin.ts:34
  • `packages/playwright/src/matchers/toMatchAriaSnapshot.ts` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/matchers/toMatchAriaSnapshot.ts:143
  • `packages/playwright/src/matchers/toMatchAriaSnapshot.ts` reports through `console.*` at line 148 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/matchers/toMatchAriaSnapshot.ts:148
  • `packages/playwright/src/matchers/toMatchSnapshot.ts` reports through `console.*` at line 201 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/playwright/src/matchers/toMatchSnapshot.ts:201

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) so requests are traceable across the system, not just health-probable.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 68420 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `nuget`, `pip`, `maven`, `gradle` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `fs.existsSync` in `openPage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:234
  • `fs.readFileSync` in `launchBrowserServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/cli/driver.ts:93
  • `fs.unlinkSync` in `listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/remote/playwrightPipeServer.ts:44
  • `fs.existsSync` in `_installDriver` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/android/android.ts:189
  • `fs.existsSync` in `createProfile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts:20
  • `crypto.generateKeyPairSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/credentials.ts:66
  • `crypto.generateKeyPairSync` in `_handleCreate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/credentials.ts:146
  • `fs.mkdirSync` in `callback to page.exposeBinding` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/launchApp.ts:109
  • `fs.writeFileSync` in `callback to page.exposeBinding` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/launchApp.ts:110
  • `fs.statSync` in `addFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/localUtils.ts:51
  • `fs.existsSync` in `executablesOrSharedLibraries` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/registry/dependencies.ts:312
  • `fs.existsSync` in `callback to browsers.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/registry/index.ts:1184
  • `fs.existsSync` in `serveTraceDataRoute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/server/trace/viewer/traceViewer.ts:105
  • `execSync` in `killAllDaemons` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/playwright-core/src/tools/cli-client/program.ts:370, packages/playwright-core/src/tools/cli-client/program.ts:383
  • `fs.openSync` in `startDaemon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/cli-client/session.ts:120
  • `fs.readFileSync` in `child.on("close")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/cli-client/session.ts:179
  • `fs.existsSync` in `patchGitIgnore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/cli-daemon/program.ts:116
  • `fs.existsSync` in `ensureConfiguredBrowserInstalled` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/cli-daemon/program.ts:134
  • `fs.mkdirSync` in `page.exposeBinding("_saveSerializedSettings")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:184
  • `fs.writeFileSync` in `page.exposeBinding("_saveSerializedSettings")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:185
  • `fs.unlinkSync` in `client.on("error")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:266
  • `fs.existsSync` in `resolveCLIConfigForCLI` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/playwright-core/src/tools/mcp/config.ts:165, packages/playwright-core/src/tools/mcp/config.ts:189
  • `fs.existsSync` in `closeTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/trace/traceUtils.ts:63
  • `fs.existsSync` in `openTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/trace/traceUtils.ts:69
  • `fs.existsSync` in `loadTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/trace/traceUtils.ts:84
  • `fs.existsSync` in `installSkills` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright-core/src/tools/utils/installSkills.ts:35
  • `fs.existsSync` in `init` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/agents/generateAgents.ts:244
  • `fs.readFileSync` in `init` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/agents/generateAgents.ts:245
  • `fs.readFileSync` in `appendToMCPJson` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/agents/generateAgents.ts:321
  • `fs.existsSync` in `deleteFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/agents/generateAgents.ts:388
  • `fs.existsSync` in `initRepo` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/agents/generateAgents.ts:408
  • `fs.statSync` in `onEnd` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/reporters/blob.ts:88
  • `fs.rmSync` in `cleanup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/reporters/html.ts:242
  • `fs.mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/playwright/src/reporters/html.ts:432
  • `fs.readdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/playwright/src/reporters/html.ts:433, packages/playwright/src/reporters/html.ts:438
  • `fs.appendFileSync` in `_writeReportData` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/playwright/src/reporters/html.ts:474, packages/playwright/src/reporters/html.ts:482

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.2 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.7 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • 76 duplicated blocks under packages/playwright-core/src/server/ have copies in at least two of the sibling directories android, bidi, chromium, dispatchers, electron, firefox (+3 more sibling(s) not listed) — 61 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 76 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 76 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 76 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/playwright-core/src/server/firefox/ffBrowser.ts:136
  • 31 duplicated blocks under packages/ have copies in at least two of the sibling directories dashboard, extension, html-reporter, injected, isomorphic, playwright-browser-chromium (+7 more sibling(s) not listed) — 22 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:253
  • 16 duplicated blocks under packages/playwright-core/src/ have copies in at least two of the sibling directories cli, client, remote, server, tools — 9 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 16 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/playwright-core/src/client/network.ts:248
  • 6 duplicated blocks under the repository root have copies in at least two of the sibling directories browser_patches, packages, utils — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — browser_patches/firefox/juggler/NetworkObserver.js:832
  • packages/isomorphic/trace/versions/traceV7.ts:30 · packages/isomorphic/trace/versions/traceV8.ts:171 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV7.ts:30
  • packages/isomorphic/trace/versions/traceV10.ts:21 · packages/isomorphic/trace/versions/traceV9.ts:163 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV10.ts:21
  • packages/isomorphic/trace/versions/traceV6.ts:17 · packages/isomorphic/trace/versions/traceV7.ts:17 — these 2 files are line-for-line copies of one another — 149 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/isomorphic/trace/versions/traceV6.ts:17
  • packages/isomorphic/trace/versions/traceV5.ts:18 · packages/isomorphic/trace/versions/traceV6.ts:17 — these 2 files are line-for-line copies of one another — 147 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/isomorphic/trace/versions/traceV5.ts:18
  • packages/isomorphic/trace/versions/traceV5.ts:18 · packages/isomorphic/trace/versions/traceV7.ts:17 — these 2 files are line-for-line copies of one another — 139 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/isomorphic/trace/versions/traceV5.ts:18
  • packages/playwright-core/src/server/firefox/ffBrowser.ts:136 · packages/playwright-core/src/server/webkit/wkBrowser.ts:128 — the two spans are one implementation copied and then locally edited — 994 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/playwright-core/src/server/firefox/ffBrowser.ts:136
  • packages/isomorphic/trace/versions/traceV4.ts:17 · packages/isomorphic/trace/versions/traceV5.ts:18 — these 2 files are line-for-line copies of one another — 130 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/isomorphic/trace/versions/traceV4.ts:17
  • packages/isomorphic/trace/versions/traceV4.ts:17 · packages/isomorphic/trace/versions/traceV6.ts:17 — these 2 files are line-for-line copies of one another — 129 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/isomorphic/trace/versions/traceV4.ts:17
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts:1065 · packages/playwright-core/src/server/webkit/wkPage.ts:1093 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1065
  • packages/isomorphic/trace/versions/traceV8.ts:35 · packages/isomorphic/trace/versions/traceV9.ts:38 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV8.ts:35
  • packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts:18 · packages/playwright-core/src/server/webkit/wkInterceptableRequest.ts:18 — these 2 files are line-for-line copies of one another — 105 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts:18
  • packages/playwright-core/src/server/webkit/webview/wvExecutionContext.ts:18 · packages/playwright-core/src/server/webkit/wkExecutionContext.ts:18 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/playwright-core/src/server/webkit/webview/wvExecutionContext.ts:18
  • packages/playwright-core/src/server/webkit/webview/wvConnection.ts:17 · packages/playwright-core/src/server/webkit/wkConnection.ts:18 — these 2 files are line-for-line copies of one another — 87 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/playwright-core/src/server/webkit/webview/wvConnection.ts:17
  • packages/playwright-core/src/tools/backend/webstorage.ts:26 · packages/playwright-core/src/tools/backend/webstorage.ts:130 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/tools/backend/webstorage.ts:26
  • packages/isomorphic/trace/versions/traceV6.ts:162 · packages/isomorphic/trace/versions/traceV7.ts:183 · packages/isomorphic/trace/versions/traceV8.ts:324 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV6.ts:162
  • packages/isomorphic/trace/versions/traceV4.ts:19 · packages/isomorphic/trace/versions/traceV5.ts:20 · packages/isomorphic/trace/versions/traceV6.ts:19 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV4.ts:19
  • packages/playwright-core/src/server/webkit/webview/wvWorkers.ts:17 · packages/playwright-core/src/server/webkit/wkWorkers.ts:17 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/playwright-core/src/server/webkit/webview/wvWorkers.ts:17
  • packages/isomorphic/locatorGenerators.ts:566 · packages/isomorphic/locatorGenerators.ts:672 — the two spans are one implementation copied and then locally edited — 466 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/isomorphic/locatorGenerators.ts:566
  • REDACTED:253 · REDACTED:118 — the two spans are one implementation copied and then locally edited — 466 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:253
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts:553 · packages/playwright-core/src/server/webkit/wkPage.ts:542 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/playwright-core/src/server/webkit/webview/wvPage.ts:553
  • packages/playwright-core/src/server/chromium/crBrowser.ts:372 · packages/playwright-core/src/server/webkit/wkBrowser.ts:240 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/playwright-core/src/server/chromium/crBrowser.ts:372
  • packages/playwright-core/src/server/bidi/bidiChromium.ts:105 · REDACTED:366 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/playwright-core/src/server/bidi/bidiChromium.ts:105
  • packages/isomorphic/trace/versions/traceV5.ts:165 · packages/isomorphic/trace/versions/traceV6.ts:171 · packages/isomorphic/trace/versions/traceV7.ts:192 · packages/isomorphic/trace/versions/traceV8.ts:333 — the 4 copies are spread across 4 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/isomorphic/trace/versions/traceV5.ts:165
  • packages/playwright-core/src/tools/cli-client/channelSessions.ts:88 · packages/utils/chromiumChannels.ts:25 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/playwright-core/src/tools/cli-client/channelSessions.ts:88
  • browser_patches/firefox/juggler/NetworkObserver.js:832 · packages/playwright-core/src/server/network.ts:81 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — browser_patches/firefox/juggler/NetworkObserver.js:832
  • browser_patches/firefox/juggler/protocol/Protocol.js:19 · browser_patches/firefox/juggler/protocol/Protocol.js:87 — the two spans are one implementation copied and then locally edited — 261 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — browser_patches/firefox/juggler/protocol/Protocol.js:19
  • packages/trace-viewer/src/ui/filmStrip.tsx:138 · packages/trace-viewer/src/ui/filmStrip.tsx:189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/trace-viewer/src/ui/filmStrip.tsx:138
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts:1217 · packages/playwright-core/src/server/webkit/wkPage.ts:1301 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1217
  • packages/playwright-core/src/client/browserContext.ts:411 · packages/playwright-core/src/client/page.ts:594 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/client/browserContext.ts:411
  • packages/playwright-core/src/server/bidi/bidiPdf.ts:31 · packages/playwright-core/src/server/chromium/crPdf.ts:32 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/server/bidi/bidiPdf.ts:31
  • packages/isomorphic/locatorGenerators.ts:352 · packages/isomorphic/locatorGenerators.ts:459 · packages/isomorphic/locatorGenerators.ts:677 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/isomorphic/locatorGenerators.ts:352
  • packages/playwright-core/src/server/firefox/ffPage.ts:504 · packages/playwright-core/src/server/webkit/wkPage.ts:911 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/server/firefox/ffPage.ts:504
  • packages/injected/src/recorder/recorder.ts:609 · packages/injected/src/recorder/recorder.ts:810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/injected/src/recorder/recorder.ts:609
  • packages/isomorphic/locatorGenerators.ts:319 · packages/isomorphic/locatorGenerators.ts:422 · packages/isomorphic/locatorGenerators.ts:538 · packages/isomorphic/locatorGenerators.ts:644 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/isomorphic/locatorGenerators.ts:319
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts:1023 · packages/playwright-core/src/server/webkit/wkPage.ts:1047 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1023
  • packages/playwright-core/src/server/bidi/bidiFirefox.ts:44 · packages/playwright-core/src/server/firefox/firefox.ts:57 — the two spans are one implementation copied and then locally edited — 264 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/playwright-core/src/server/bidi/bidiFirefox.ts:44

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries8.4 / 10Strong✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • packages/dashboard/src/annotationZip.ts:18 imports @zip.js/zip.js/lib/zip-no-worker-deflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/dashboard/src/annotationZip.ts:18
  • packages/dashboard/src/dashboardChannel.ts:17 reaches into another package with a relative path (../../playwright-core/src/tools/cli-client/registry) — import the package by name instead. — packages/dashboard/src/dashboardChannel.ts:17
  • packages/dashboard/src/dashboardChannel.ts:18 reaches into another package with a relative path (../../playwright-core/src/serverRegistry) — import the package by name instead. — packages/dashboard/src/dashboardChannel.ts:18
  • packages/dashboard/src/dashboardModel.ts:22 reaches into another package with a relative path (../../playwright-core/src/tools/cli-client/registry) — import the package by name instead. — packages/dashboard/src/dashboardModel.ts:22
  • packages/dashboard/src/dashboardModel.ts:23 reaches into another package with a relative path (../../playwright-core/src/serverRegistry) — import the package by name instead. — packages/dashboard/src/dashboardModel.ts:23
  • packages/html-reporter/src/index.tsx:20 imports @zip.js/zip.js/lib/zip-no-worker-inflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/html-reporter/src/index.tsx:20
  • packages/playwright-client/src/index.ts:17 reaches into another package with a relative path (../../playwright-core/src/client/connection) — import the package by name instead. — packages/playwright-client/src/index.ts:17
  • packages/playwright-client/src/index.ts:19 reaches into another package with a relative path (../../playwright-core/src/client/browser) — import the package by name instead. — packages/playwright-client/src/index.ts:19
  • packages/playwright-core/src/server/bidi/bidiOverCdp.ts:35 imports chromium-bidi/lib/cjs/bidiMapper/BidiMapper, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/playwright-core/src/server/bidi/bidiOverCdp.ts:35
  • packages/playwright-core/src/server/bidi/bidiOverCdp.ts:36 imports chromium-bidi/lib/cjs/cdp/CdpConnection, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/playwright-core/src/server/bidi/bidiOverCdp.ts:36
  • packages/trace-viewer/src/sw/traceLoaderBackends.ts:17 imports @zip.js/zip.js/lib/zip-no-worker-inflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/trace-viewer/src/sw/traceLoaderBackends.ts:17
  • REDACTED:24 reaches into another package with a relative path (../playwright-core/src/bootstrap) — import the package by name instead. — REDACTED:24
  • tests/extension/extension-fixtures.ts:148 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/extension/extension-fixtures.ts:148
  • tests/library/locator-parser.spec.ts:30 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/src/client/locator) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/library/locator-parser.spec.ts:30
  • tests/mcp/annotate.spec.ts:506 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/mcp/annotate.spec.ts:506
  • tests/mcp/cli-fixtures.ts:118 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/mcp/cli-fixtures.ts:118
  • tests/mcp/cli-fixtures.ts:137 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/mcp/cli-fixtures.ts:137
  • tests/mcp/fixtures.ts:302 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/entry/mcp.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — tests/mcp/fixtures.ts:302
  • utils/generate_cli_help.js:22 reaches into another package with a relative path (../packages/playwright-core/lib/coreBundle) — import the package by name instead. — utils/generate_cli_help.js:22
  • utils/roll_browser.js:20 reaches into another package with a relative path (../packages/playwright-core/lib/coreBundle) — import the package by name instead. — utils/roll_browser.js:20

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • getTextAlternativeInternal has cyclomatic complexity 135 and cognitive complexity 234; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/injected/src/roleUtils.ts:763
  • (anonymous) has cyclomatic complexity 92 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:384
  • generateChannels has cyclomatic complexity 81 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — utils/generate_channels.js:239
  • validateConfig has cyclomatic complexity 79 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright/src/common/configLoader.ts:127
  • program has cyclomatic complexity 65 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright-core/src/tools/cli-client/program.ts:76
  • expectSingleElement has cyclomatic complexity 58 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1537
  • ansi2html has cyclomatic complexity 56 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/web/src/ansi2html.ts:17
  • consumeAToken has cyclomatic complexity 49 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/isomorphic/cssTokenizer.ts:143
  • innerAsLocators has cyclomatic complexity 46 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/isomorphic/locatorGenerators.ts:86
  • validateProject has cyclomatic complexity 45 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright/src/common/configLoader.ts:257
  • visit has cyclomatic complexity 44 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:89
  • innerRenderMdNode has cyclomatic complexity 44 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — utils/markdown.js:306
  • innerSerialize has cyclomatic complexity 43 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:253
  • translateType has cyclomatic complexity 42 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — utils/doclint/generateDotnetApi.js:729
  • Dashboard has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:67
  • generateLocator has cyclomatic complexity 40 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/isomorphic/locatorGenerators.ts:526
  • _innerFetch has cyclomatic complexity 39 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright-core/src/client/fetch.ts:197
  • generateLocator has cyclomatic complexity 39 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/isomorphic/locatorGenerators.ts:416
  • _onRequest has cyclomatic complexity 37 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/playwright-core/src/server/chromium/crNetworkManager.ts:295
  • generateLocator has cyclomatic complexity 37 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/isomorphic/locatorGenerators.ts:313

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files5.2 / 10Adequate✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • REDACTED has 1761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/playwright-core/src/server/frames.ts has 1722 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/frames.ts:1
  • packages/injected/src/recorder/recorder.ts has 1609 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/injected/src/recorder/recorder.ts:1
  • REDACTED has 1502 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/injected/src/roleUtils.ts has 1327 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/injected/src/roleUtils.ts:1
  • packages/playwright-core/src/tools/cli-daemon/commands.ts has 1319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/tools/cli-daemon/commands.ts:1
  • packages/playwright-core/src/server/registry/index.ts has 1295 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/registry/index.ts:1
  • browser_patches/firefox/juggler/TargetRegistry.js has 1253 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — browser_patches/firefox/juggler/TargetRegistry.js:1
  • packages/playwright-core/src/server/webkit/wkPage.ts has 1238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/webkit/wkPage.ts:1
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1
  • REDACTED has 1178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/playwright-core/src/server/page.ts has 1047 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/page.ts:1
  • browser_patches/firefox/juggler/NetworkObserver.js has 986 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — browser_patches/firefox/juggler/NetworkObserver.js:1
  • packages/playwright-core/src/server/dom.ts has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/dom.ts:1
  • utils/doclint/documentation.js has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — utils/doclint/documentation.js:1
  • packages/isomorphic/cssTokenizer.ts has 875 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/isomorphic/cssTokenizer.ts:1
  • packages/playwright-core/src/server/chromium/crNetworkManager.ts has 870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/chromium/crNetworkManager.ts:1
  • packages/playwright-core/src/client/page.ts has 856 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/client/page.ts:1
  • packages/playwright/src/index.ts has 849 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/index.ts:1
  • packages/playwright-core/src/client/network.ts has 835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/client/network.ts:1
  • packages/playwright-core/src/server/trace/recorder/tracing.ts has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/trace/recorder/tracing.ts:1
  • packages/playwright-core/src/server/network.ts has 828 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/network.ts:1
  • packages/playwright-core/src/server/fetch.ts has 819 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/fetch.ts:1
  • utils/doclint/generateDotnetApi.js has 803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — utils/doclint/generateDotnetApi.js:1
  • packages/injected/src/clock.ts has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/injected/src/clock.ts:1
  • packages/playwright/src/isomorphic/teleReceiver.ts has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/isomorphic/teleReceiver.ts:1
  • packages/playwright/src/reporters/html.ts has 773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/reporters/html.ts:1
  • REDACTED has 756 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/isomorphic/locatorGenerators.ts has 735 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/isomorphic/locatorGenerators.ts:1
  • packages/playwright-core/src/server/har/harTracer.ts has 735 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/har/harTracer.ts:1
  • packages/isomorphic/locatorParser.ts has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/isomorphic/locatorParser.ts:1
  • packages/playwright-core/src/server/bidi/bidiPage.ts has 688 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/bidi/bidiPage.ts:1
  • packages/playwright-core/src/tools/dashboard/dashboardController.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/tools/dashboard/dashboardController.ts:1
  • REDACTED has 660 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/playwright/src/worker/testInfo.ts has 658 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/worker/testInfo.ts:1
  • packages/playwright/src/reporters/base.ts has 650 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/reporters/base.ts:1
  • packages/playwright/src/runner/dispatcher.ts has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/runner/dispatcher.ts:1
  • REDACTED has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/playwright/src/reporters/merge.ts has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright/src/reporters/merge.ts:1
  • packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts has 620 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage6.4 / 10Adequate✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — REDACTED:1, packages/injected/src/recorder/recorder.ts:1, packages/injected/src/roleUtils.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code7.7 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 329 file(s) (~170176 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/playwright-core/src/server/webkit/webview/wvPage.ts imports '../../../generated/webViewInputSource', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — packages/playwright-core
  • 1 file(s) (~49 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an REDACTED script) so reachability can see this package. — tests/playwright-test/current-test-runner
  • 2 file(s) (~34 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: tests/playwright-test/stable-test-runner/index.d.ts imports './node_modules/@playwright/test', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — tests/playwright-test/stable-test-runner
  • Unreachable from the 272 application, 81 tooling and 819 test entry point(s) detected in this repo. Gate removals on `npm run tsc` — an undetected custom entry would make these reachable.
  • no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×29) — browser_patches/firefox/juggler/TargetRegistry.js, browser_patches/firefox/juggler/NetworkObserver.js, utils/doclint/generateDotnetApi.js, …
  • no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/html-reporter/src/testCaseView.story.tsx, packages/html-reporter/src/testFileView.story.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/html-reporter/src/sampleReport.ts
  • no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (utils/doclint/generateDotnetApi.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — utils/doclint/dotnetXmlDocumentation.js
  • no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (utils/generate_types/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — utils/doclint/linkUtils.js, utils/generate_types/parseOverrides.js
  • Nothing imports this binding — it is safe to review for removal. (×3) — packages/dashboard/src/icons.tsx:78, packages/dashboard/src/icons.tsx:85, packages/dashboard/src/icons.tsx:123

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene4.5 / 10Weak✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — utils/doclint/cli.js:26
  • Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. — packages/playwright/src/runner/loadUtils.ts:30
  • Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
  • Declared in packages/web/REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • packages/html-reporter/src/labels.tsx → packages/html-reporter/src/links.tsx → packages/html-reporter/src/labels.tsx — packages/html-reporter/src/labels.tsx:20
  • packages/playwright-core/src/cli/program.ts → packages/playwright-core/src/tools/cli-client/program.ts → packages/playwright-core/src/coreBundle.ts → packages/playwright-core/src/cli/program.ts (one verified cycle inside a mutually-dependent group of 4 files) — packages/playwright-core/src/cli/program.ts:30
  • packages/playwright-core/src/client/android.ts → packages/playwright-core/src/client/connect.ts → packages/playwright-core/src/client/connection.ts → packages/playwright-core/src/client/android.ts (one verified cycle inside a mutually-dependent group of 5 files) — packages/playwright-core/src/client/android.ts:29
  • packages/playwright-core/src/client/browser.ts → packages/playwright-core/src/client/browserContext.ts → packages/playwright-core/src/client/browser.ts (one verified cycle inside a mutually-dependent group of 9 files) — packages/playwright-core/src/client/browser.ts:20
  • REDACTED → packages/playwright-core/src/server/debugger.ts → REDACTED (one verified cycle inside a mutually-dependent group of 68 files) — REDACTED:24
  • packages/playwright-core/src/server/registry/browserFetcher.ts → packages/playwright-core/src/server/registry/index.ts → packages/playwright-core/src/server/registry/browserFetcher.ts (one verified cycle inside a mutually-dependent group of 3 files) — packages/playwright-core/src/server/registry/browserFetcher.ts:31
  • REDACTED → packages/playwright-core/src/tools/utils/mcp/server.ts → REDACTED — REDACTED:29

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped5.3 / 10Adequate✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:319
  • `html` is text this program did not author, and it is written into the text of an element through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — packages/playwright-core/src/server/frames.ts:979
  • `messageInnerHTML` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:213
  • `html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:25

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

X5 · Nullable reference types10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health71%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture68%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity75%StrongStrongest area.
Readiness52%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security61%Adequate — gated by D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 5 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • D11 Test Reliability — 5 observation(s) recorded · This repository declares 5 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.ts, .js, .mjs, .tsx), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • P12 CI test-gate honesty — 7 observation(s) recorded · Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 16 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 47 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D18 Solution Shape — Dimension evaluation failed
  • D21 Naming Consistency — Naming consistency is measured on C# only; Java, JavaScript, Python, TypeScript, html not measured.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D24 Comment Value — D24 reads C# and Visual Basic comments only; comments in this repository's .java, .py, .ts, .tsx source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .c, .cpp, .java, .m, .py, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 15 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication. The rest — .cpp, .m, .c (4,123 lines, 3.1% of production source) — is compared by neither card, so duplication there is unmeasured; it is a corner of this repository, not its product.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — examples/github-api/ (@playwright/test), examples/mock-battery/ (@playwright/test), examples/mock-filesystem/ (@playwright/test) — a gap in the analyzer, not something this repository is missing. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (14 domain event(s); its domain events are published by services or handlers — no domain entity raises one)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • IC1 Incompleteness & stubs — reported, not scored — this repository's C# declares no analysable method bodies (a constants, record or DTO assembly), and this score is a density of unfinished work per method, which has no denominator here. The file-level signals below were still collected and are shown in full
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 107 finding(s)
D10 · Test Quality · No assertions (empty test) · ×39
  • No assertions (empty test): LO-093 should wait for frame 2 tests/page/locator-frame.spec.ts:104 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): IS-022 should not register the callback on the global object tests/page/page-add-init-script-callback.spec.ts:113 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-006 should work with noWaitAfter: true tests/page/page-autowaiting-basic.spec.ts:94 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-007 should work with dblclick without noWaitAfter when navigation is stalled tests/page/page-autowaiting-basic.spec.ts:100 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-014 calling window.stop async tests/page/page-autowaiting-no-hang.spec.ts:26 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-017 assigning location to about:blank after non-about:blank tests/page/page-autowaiting-no-hang.spec.ts:46 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-020 clicking in the middle of navigation that aborts tests/page/page-autowaiting-no-hang.spec.ts:69 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AW-023 goBack in the middle of navigation that commits tests/page/page-autowaiting-no-hang.spec.ts:152 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): CL-078 should click a button that is overlaid by a permission popup tests/page/page-click.spec.ts:1124 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): ER-009 should remove a listener of a non-existing event handler tests/page/page-event-pageerror.spec.ts:191 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): FC-010 should not throw when frame is detached immediately tests/page/page-filechooser.spec.ts:167 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): NA-077 page.reload during renderer-initiated navigation tests/page/page-history.spec.ts:122 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): NA-083 page.goBack during renderer-initiated navigation tests/page/page-history.spec.ts:204 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): NA-084 page.goForward during renderer-initiated navigation tests/page/page-history.spec.ts:225 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): http transport browser sigint tests/mcp/http.spec.ts:132 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should close session when heartbeat ping is not answered tests/mcp/http.spec.ts:650 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): CC-039 should handle rejected certificate in handshake with HTTP/2 tests/library/client-certificates.spec.ts:923 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): DO-036 should convert navigation to a resource with unsupported mime type into download tests/library/download.spec.ts:700 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): LE-005 test #${i} to request page and context tests/library/heap.spec.ts:163 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): LE-006 test to request page and context tests/library/heap.spec.ts:168 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): LE-013 should collect frames tests/library/heap.spec.ts:270 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): PA-039 should close page with active dialog tests/library/page-close.spec.ts:22 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): PA-050 should not throw UnhandledPromiseRejection when page closes tests/library/page-close.spec.ts:124 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): AR-143 wpt accname # tests/library/role-utils.spec.ts:38 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): WS-034 should not throw with empty handler tests/library/route-web-socket.spec.ts:598 — Test method has an empty body — it asserts nothing and exercises no code.
  • + 14 more in this group — see findings.md.
D35 · Change Coupling · Boundary-crossing change coupling · ×14
  • Boundary-crossing change coupling: REDACTED ↔ selectors.ts REDACTED:1 — `REDACTED` (context injected) and `packages/playwright-core/src/server/selectors.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 90% of the time (19 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `b6e168a9` chore(recorder): render highlights via the shared element highlight (…; `313de29f` feat(locator): introduce locator.describe() (#35969); `807d9066` chore: allow generating aria references (#35132) (at that commit the file was still `packages/playwright-core/src/server/injected/injectedScript.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: selectorParser.ts ↔ locator.ts packages/isomorphic/selectorParser.ts:1 — `packages/isomorphic/selectorParser.ts` (context isomorphic) and `packages/playwright-core/src/client/locator.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `d7775efb` feat(selectors): add pierceFrames context option (#42033); `d0c1b736` feat(selectors): support entering frames while piercing (#42031); `7ffedf3c` feat: add pierceFrames() locator API (#41963) — run `git show` on any of them.
  • Boundary-crossing change coupling: locatorGenerators.ts ↔ selectors.ts packages/isomorphic/locatorGenerators.ts:1 — `packages/isomorphic/locatorGenerators.ts` (context isomorphic) and `packages/playwright-core/src/server/selectors.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `313de29f` feat(locator): introduce locator.describe() (#35969) (at that commit the file was still `packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts`); `97d55e27` fix(locator): `locator(locator)` method uses `internal:chain` instead… (at that commit the file was still `packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts`); `160888df` feat(locators): reland `locator.and(locator)` (#22850) (at that commit the file was still `packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: consoleApi.ts ↔ selectors.ts packages/injected/src/consoleApi.ts:1 — `packages/injected/src/consoleApi.ts` (context injected) and `packages/playwright-core/src/server/selectors.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `807d9066` chore: allow generating aria references (#35132) (at that commit the file was still `packages/playwright-core/src/server/injected/consoleApi.ts`); `bd2fdd0f` chore: land experimental tools (#34503) (at that commit the file was still `packages/playwright-core/src/server/injected/consoleApi.ts`); `160888df` feat(locators): reland `locator.and(locator)` (#22850) (at that commit the file was still `packages/playwright-core/src/server/injected/consoleApi.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: expect.ts ↔ zones.ts packages/playwright/src/matchers/expect.ts:1 — `packages/playwright/src/matchers/expect.ts` (context playwright) and `packages/utils/zones.ts` (context utils) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `90ec8383` chore: move zones into platform (#34786) (at that commit the file was still `packages/playwright-core/src/server/utils/zones.ts`); `be6caed8` chore: remove expectZone (#34312) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`); `3bdbe428` fix(steps): make expect.toPass and expect.poll step containers (#30389) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ snapshotterInjected.ts REDACTED:1 — `REDACTED` (context isomorphic) and `packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `da681cf1` chore(trace): track snapshot targets via generation counter (#40766); `395696ea` fix(trace-viewer): block meta refresh and sandbox snapshot iframes (#… (at that commit the file was still `packages/playwright-core/src/utils/isomorphic/trace/snapshotRenderer.ts`); `d7f8595f` fix(tracing): resourceOverrides issues (#38750) (at that commit the file was still `packages/playwright-core/src/utils/isomorphic/trace/snapshotRenderer.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: traceViewer.ts ↔ traceLoaderBackends.ts packages/playwright-core/src/server/trace/viewer/traceViewer.ts:1 — `packages/playwright-core/src/server/trace/viewer/traceViewer.ts` (context playwright-core) and `packages/trace-viewer/src/sw/traceLoaderBackends.ts` (context trace-viewer) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `185bfb7d` fix(trace): operate trace uri, not path (#38566); `47fbd3a5` chore: remove HMR support from trace viewer (#37785) (at that commit the file was still `packages/trace-viewer/src/sw/traceModelBackends.ts`); `8c1002a9` fix(sw): fix UI mode on codespaces by not passing `server` (#33664) (at that commit the file was still `packages/trace-viewer/src/sw/traceModelBackends.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: traceModernizer.ts ↔ testTracing.ts packages/isomorphic/trace/traceModernizer.ts:1 — `packages/isomorphic/trace/traceModernizer.ts` (context isomorphic) and `packages/playwright/src/worker/testTracing.ts` (context playwright) sit in DIFFERENT parts of the tree yet change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `87ca8496` chore(trace): use a single id for calls and test runner steps (#42430); `9642f576` feat(trace): attribute requests to service workers and api request co…; `c8fc3bf8` feat(trace-viewer): add "Display Aria" mode (#42211) — run `git show` on any of them.
  • Boundary-crossing change coupling: entries.ts ↔ tracing.ts packages/isomorphic/trace/entries.ts:1 — `packages/isomorphic/trace/entries.ts` (context isomorphic) and `packages/playwright-core/src/server/trace/recorder/tracing.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `c8fc3bf8` feat(trace-viewer): add "Display Aria" mode (#42211); `55eddb8f` chore(trace): show playwright version in metadata (#38158) (at that commit the file was still `packages/trace-viewer/src/types/entries.ts`); `ec40890f` fix(tracing): use page swap timestamp to find closest screenshot (#32… (at that commit the file was still `packages/trace-viewer/src/entries.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: dashboardChannel.ts ↔ REDACTED packages/dashboard/src/dashboardChannel.ts:1 — `packages/dashboard/src/dashboardChannel.ts` (context dashboard) and `REDACTED` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a6786ebe` feat(cli): include aria snapshot in annotate output (#40432); `10095c0c` feat(dashboard): cancel CLI annotate on client disconnect (#40347); `e575acda` feat(dashboard): add 'show --annotate' to capture annotations as PNG … — run `git show` on any of them.
  • Boundary-crossing change coupling: utilityScript.ts ↔ page.ts packages/injected/src/utilityScript.ts:1 — `packages/injected/src/utilityScript.ts` (context injected) and `packages/playwright-core/src/server/page.ts` (context playwright-core) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `fd7d249e` chore: cleanup runtimeGuid and other builtins bits (#36035); `6af41232` chore: evaluate `UtilityScript` lazily (#36019); `d57f1946` chore: extract page bindings controller from `UtilityScript` (#35996) — run `git show` on any of them.
  • Boundary-crossing change coupling: testInfo.ts ↔ zones.ts packages/playwright/src/worker/testInfo.ts:1 — `packages/playwright/src/worker/testInfo.ts` (context playwright) and `packages/utils/zones.ts` (context utils) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `90ec8383` chore: move zones into platform (#34786) (at that commit the file was still `packages/playwright-core/src/server/utils/zones.ts`); `be6caed8` chore: remove expectZone (#34312) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`); `3bdbe428` fix(steps): make expect.toPass and expect.poll step containers (#30389) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: connection.ts ↔ zones.ts packages/playwright-core/src/client/connection.ts:1 — `packages/playwright-core/src/client/connection.ts` (context playwright-core) and `packages/utils/zones.ts` (context utils) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `90ec8383` chore: move zones into platform (#34786) (at that commit the file was still `packages/playwright-core/src/server/utils/zones.ts`); `f0a3a15e` chore: explicitly reset apiZone instead of everything (#34265) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`); `73fce8fb` chore: replace Zones with AsyncLocalStorage (#30381) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: channelOwner.ts ↔ zones.ts packages/playwright-core/src/client/channelOwner.ts:1 — `packages/playwright-core/src/client/channelOwner.ts` (context playwright-core) and `packages/utils/zones.ts` (context utils) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `90ec8383` chore: move zones into platform (#34786) (at that commit the file was still `packages/playwright-core/src/server/utils/zones.ts`); `3bdbe428` fix(steps): make expect.toPass and expect.poll step containers (#30389) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`); `73fce8fb` chore: replace Zones with AsyncLocalStorage (#30381) (at that commit the file was still `packages/playwright-core/src/utils/zones.ts`) — run `git show` on any of them.
D30 · Dependency Vulnerabilities · High CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D11 · Test Reliability · Test declared unreliable · ×5
  • Test declared unreliable: tests/library/capabilities.spec.ts tests/library/capabilities.spec.ts:95 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "audio output is unreliable on hosted macOS 15 runners". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: tests/mcp/files.spec.ts tests/mcp/files.spec.ts:178 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "This test is racy". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: tests/page/frame-hierarchy.spec.ts tests/page/frame-hierarchy.spec.ts:40 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "frame.name() is racy with BiDi". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: tests/page/frame-hierarchy.spec.ts tests/page/frame-hierarchy.spec.ts:159 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "frame.name() is racy with BiDi". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
  • Test declared unreliable: tests/page/page-basic.spec.ts tests/page/page-basic.spec.ts:110 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "page.frame({ name }) is racy with BiDi". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
R9 · Circular Imports · Import cycle (2 files) · ×5
  • Import cycle (2 files) packages/html-reporter/src/labels.tsx:20 — packages/html-reporter/src/labels.tsx → packages/html-reporter/src/links.tsx → packages/html-reporter/src/labels.tsx
  • Import cycle (2 files) packages/playwright-core/src/client/browser.ts:20 — packages/playwright-core/src/client/browser.ts → packages/playwright-core/src/client/browserContext.ts → packages/playwright-core/src/client/browser.ts (one verified cycle inside a mutually-dependent group of 9 files)
  • Import cycle (2 files) REDACTED:24 — REDACTED → packages/playwright-core/src/server/debugger.ts → REDACTED (one verified cycle inside a mutually-dependent group of 68 files)
  • Import cycle (2 files) packages/playwright-core/src/server/registry/browserFetcher.ts:31 — packages/playwright-core/src/server/registry/browserFetcher.ts → packages/playwright-core/src/server/registry/index.ts → packages/playwright-core/src/server/registry/browserFetcher.ts (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) REDACTED:29 — REDACTED → packages/playwright-core/src/tools/utils/mcp/server.ts → REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) packages/playwright-core/src/cli/program.ts:30 — packages/playwright-core/src/cli/program.ts → packages/playwright-core/src/tools/cli-client/program.ts → packages/playwright-core/src/coreBundle.ts → packages/playwright-core/src/cli/program.ts (one verified cycle inside a mutually-dependent group of 4 files)
  • Import cycle (3 files) packages/playwright-core/src/client/android.ts:29 — packages/playwright-core/src/client/android.ts → packages/playwright-core/src/client/connect.ts → packages/playwright-core/src/client/connection.ts → packages/playwright-core/src/client/android.ts (one verified cycle inside a mutually-dependent group of 5 files)
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'lodash' · ×1
  • Unlisted import 'lodash' utils/doclint/cli.js:26 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 2224 finding(s)
D10 · Test Quality · Skipped test · ×638
  • Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts:571 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts:592 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/esm.spec.ts:608 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/expect.spec.ts:619 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/playwright.spec.ts:455 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts:478 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts:1763 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts:1783 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts:1803 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-html.spec.ts:3419 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts:351 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts:378 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter-junit.spec.ts:511 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/reporter.spec.ts:193 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:119 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:204 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:401 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:439 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:489 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:633 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:668 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/runner.spec.ts:701 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/stdio.spec.ts:87 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/test-ignore.spec.ts:215 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) tests/playwright-test/ui-mode-test-setup.spec.ts:65 — Skipped — switched off by test.skip
  • + 613 more in this group — see findings.md.
D10 · Test Quality · No assertions · ×523
  • No assertions: should throw in serial mode if test suites in worker are inconsistent with runner tests/playwright-test/runner.spec.ts:371 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should respect custom shard weights tests/playwright-test/shard.spec.ts:355 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: test${i} tests/playwright-test/shuffle.spec.ts:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: test${i} tests/playwright-test/shuffle.spec.ts:71 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should filter by title tests/playwright-test/ui-mode-test-filters.spec.ts:38 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should filter by explicit tags tests/playwright-test/ui-mode-test-filters.spec.ts:49 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should not hide filtered while running tests/playwright-test/ui-mode-test-filters.spec.ts:223 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should filter skipped tests/playwright-test/ui-mode-test-filters.spec.ts:253 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should only show tests selected with --grep tests/playwright-test/ui-mode-test-filters.spec.ts:278 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should not show tests filtered with --grep-invert tests/playwright-test/ui-mode-test-filters.spec.ts:286 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should filter by only changed files tests/playwright-test/ui-mode-test-filters.spec.ts:294 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should not leak websocket connections tests/playwright-test/ui-mode-test-run.spec.ts:795 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should run test defined outside of .spec.ts file tests/playwright-test/ui-mode-test-run.spec.ts:818 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should run test defined outside of testdir tests/playwright-test/ui-mode-test-run.spec.ts:835 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should allow expanding entire subtrees tests/playwright-test/ui-mode-test-tree.spec.ts:483 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should pick new / deleted files tests/playwright-test/ui-mode-test-update.spec.ts:38 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should pick new / deleted tests tests/playwright-test/ui-mode-test-update.spec.ts:83 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should pick new / deleted nested tests tests/playwright-test/ui-mode-test-update.spec.ts:162 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should watch files tests/playwright-test/ui-mode-test-watch.spec.ts:21 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should watch e2e deps tests/playwright-test/ui-mode-test-watch.spec.ts:61 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should run added test in watched file tests/playwright-test/ui-mode-test-watch.spec.ts:224 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should watch test defined outside of .spec.ts file tests/playwright-test/ui-mode-test-watch.spec.ts:354 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should quit on Q tests/playwright-test/watch.spec.ts:188 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should print help on H tests/playwright-test/watch.spec.ts:195 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should run tests on Enter tests/playwright-test/watch.spec.ts:202 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 498 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×52
  • Hotspot: packages/injected/src/roleUtils.ts packages/injected/src/roleUtils.ts:763 — packages/injected/src/roleUtils.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 136 in roleUtils.getTextAlternativeInternal at line 763. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/injected/src/roleUtils.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1537 — REDACTED changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in InjectedScript.expectSingleElement at line 1537. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/server/fetch.ts packages/playwright-core/src/server/fetch.ts:328 — packages/playwright-core/src/server/fetch.ts changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in APIRequestContext._sendRequest at line 328. 7 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/fetch.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:472 — REDACTED changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in FrameSession._initialize at line 472. 16 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/server/frames.ts packages/playwright-core/src/server/frames.ts:1537 — packages/playwright-core/src/server/frames.ts changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Frame._expectInternal at line 1537. 4 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/frames.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/server/dom.ts packages/playwright-core/src/server/dom.ts:402 — packages/playwright-core/src/server/dom.ts changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ElementHandle._performPointerAction at line 402. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/dom.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:322 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in snapshotRenderer.snapshotScript at line 322. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/tools/mcp/program.ts packages/playwright-core/src/tools/mcp/program.ts:34 — packages/playwright-core/src/tools/mcp/program.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in program.decorateMCPCommand at line 34. 6 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/program.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/tools/backend/response.ts packages/playwright-core/src/tools/backend/response.ts:267 — packages/playwright-core/src/tools/backend/response.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Response._build at line 267. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/backend/response.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/tools/cli-client/program.ts packages/playwright-core/src/tools/cli-client/program.ts:76 — packages/playwright-core/src/tools/cli-client/program.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in program.program at line 76. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/cli-client/program.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/isomorphic/trace/traceModernizer.ts packages/isomorphic/trace/traceModernizer.ts:107 — packages/isomorphic/trace/traceModernizer.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in TraceModernizer._innerAppendEvent at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/isomorphic/trace/traceModernizer.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/isomorphic/locatorGenerators.ts packages/isomorphic/locatorGenerators.ts:86 — packages/isomorphic/locatorGenerators.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in locatorGenerators.innerAsLocators at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/isomorphic/locatorGenerators.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/tools/mcp/config.ts packages/playwright-core/src/tools/mcp/config.ts:303 — packages/playwright-core/src/tools/mcp/config.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in config.configFromCLIOptions at line 303. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/config.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:81 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in ariaSnapshot.generateAriaTree at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright/src/worker/testTracing.ts packages/playwright/src/worker/testTracing.ts:178 — packages/playwright/src/worker/testTracing.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in TestTracing.stopIfNeeded at line 178. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright/src/worker/testTracing.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/isomorphic/trace/traceModel.ts packages/isomorphic/trace/traceModel.ts:98 — packages/isomorphic/trace/traceModel.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in TraceModel.constructor at line 98. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/isomorphic/trace/traceModel.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright/src/common/config.ts packages/playwright/src/common/config.ts:58 — packages/playwright/src/common/config.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in FullConfigInternal.constructor at line 58. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright/src/common/config.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/isomorphic/locatorParser.ts packages/isomorphic/locatorParser.ts:69 — packages/isomorphic/locatorParser.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in locatorParser.tokenize at line 69. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/isomorphic/locatorParser.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/trace-viewer/src/ui/workbench.tsx packages/trace-viewer/src/ui/workbench.tsx:75 — packages/trace-viewer/src/ui/workbench.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in workbench.PartitionedWorkbench at line 75. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/trace-viewer/src/ui/workbench.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright/src/worker/testInfo.ts packages/playwright/src/worker/testInfo.ts:290 — packages/playwright/src/worker/testInfo.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in TestInfoImpl._addStep at line 290. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright/src/worker/testInfo.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/server/har/harTracer.ts packages/playwright-core/src/server/har/harTracer.ts:447 — packages/playwright-core/src/server/har/harTracer.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in HarTracer._onWebSocket at line 447. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/har/harTracer.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/server/frameSelectors.ts packages/playwright-core/src/server/frameSelectors.ts:233 — packages/playwright-core/src/server/frameSelectors.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in FrameSelectors._callOnSelectorInternal at line 233. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/frameSelectors.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/playwright-core/src/client/browserContext.ts packages/playwright-core/src/client/browserContext.ts:98 — packages/playwright-core/src/client/browserContext.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in BrowserContext.constructor at line 98. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/client/browserContext.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/trace-viewer/src/ui/uiModeView.tsx packages/trace-viewer/src/ui/uiModeView.tsx:97 — packages/trace-viewer/src/ui/uiModeView.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in uiModeView.UIModeView at line 97. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/trace-viewer/src/ui/uiModeView.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: utils/doclint/generateDotnetApi.js utils/doclint/generateDotnetApi.js:509 — utils/doclint/generateDotnetApi.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in generateDotnetApi.renderMethod at line 509. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- utils/doclint/generateDotnetApi.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 27 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking REDACTED:234 — `fs.existsSync` in `openPage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/cli/driver.ts:93 — `fs.readFileSync` in `launchBrowserServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/remote/playwrightPipeServer.ts:44 — `fs.unlinkSync` in `listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/android/android.ts:189 — `fs.existsSync` in `_installDriver` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/bidi/third_party/firefoxPrefs.ts:20 — `fs.existsSync` in `createProfile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/credentials.ts:66 — `crypto.generateKeyPairSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/credentials.ts:146 — `crypto.generateKeyPairSync` in `_handleCreate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/launchApp.ts:109 — `fs.mkdirSync` in `callback to page.exposeBinding` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/launchApp.ts:110 — `fs.writeFileSync` in `callback to page.exposeBinding` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/localUtils.ts:51 — `fs.statSync` in `addFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/registry/dependencies.ts:312 — `fs.existsSync` in `executablesOrSharedLibraries` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/registry/index.ts:1184 — `fs.existsSync` in `callback to browsers.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/server/trace/viewer/traceViewer.ts:105 — `fs.existsSync` in `serveTraceDataRoute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-client/program.ts:370 — `execSync` in `killAllDaemons` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-client/program.ts:383 — `execSync` in `killAllDaemons` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-client/session.ts:120 — `fs.openSync` in `startDaemon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-client/session.ts:179 — `fs.readFileSync` in `child.on("close")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-daemon/program.ts:116 — `fs.existsSync` in `patchGitIgnore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/cli-daemon/program.ts:134 — `fs.existsSync` in `ensureConfiguredBrowserInstalled` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:184 — `fs.mkdirSync` in `page.exposeBinding("_saveSerializedSettings")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:185 — `fs.writeFileSync` in `page.exposeBinding("_saveSerializedSettings")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:266 — `fs.unlinkSync` in `client.on("error")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/mcp/config.ts:165 — `fs.existsSync` in `resolveCLIConfigForCLI` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/mcp/config.ts:189 — `fs.existsSync` in `resolveCLIConfigForCLI` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/playwright-core/src/tools/trace/traceUtils.ts:63 — `fs.existsSync` in `closeTrace` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/injected/src/recorder/recorder.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/injected/src/roleUtils.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/TargetRegistry.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/NetworkObserver.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/doclint/documentation.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/protocol/Protocol.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/doclint/generateDotnetApi.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/content/FrameTree.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/generate_types/index.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/content/Runtime.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser_patches/firefox/juggler/content/PageAgent.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/trace-viewer/src/ui/networkResourceDetails.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/trace-viewer/src/ui/uiModeView.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/injected/src/selectorGenerator.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/doclint/api_parser.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/trace-viewer/src/ui/snapshotTab.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/markdown.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/dashboard/src/annotations.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file utils/generate_channels.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/dashboard/src/dashboardModel.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×37
  • TooManyMethods: Page packages/playwright-core/src/client/page.ts:90 — TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Frame packages/playwright-core/src/server/frames.ts:514 — TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WKPage packages/playwright-core/src/server/webkit/wkPage.ts:56 — TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WVPage packages/playwright-core/src/server/webkit/webview/wvPage.ts:54 — TooManyMethods — 90 methods. The bar is 30 methods; this is 60 over it, 3.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Locator packages/playwright-core/src/client/locator.ts:50 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: InjectedScript REDACTED:94 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Page packages/playwright-core/src/server/page.ts:166 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BrowserContext REDACTED:90 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Frame packages/playwright-core/src/client/frame.ts:56 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ElementHandle packages/playwright-core/src/server/dom.ts:134 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PageDispatcher packages/playwright-core/src/server/dispatchers/pageDispatcher.ts:56 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FFPage packages/playwright-core/src/server/firefox/ffPage.ts:43 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BidiPage packages/playwright-core/src/server/bidi/bidiPage.ts:45 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BrowserContext packages/playwright-core/src/client/browserContext.ts:64 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FrameDispatcher packages/playwright-core/src/server/dispatchers/frameDispatcher.ts:31 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PageTarget browser_patches/firefox/juggler/TargetRegistry.js:491 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FrameSession REDACTED:400 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Tracing packages/playwright-core/src/server/trace/recorder/tracing.ts:88 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PageHandler REDACTED:68 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CRPage REDACTED:68 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DashboardModel packages/dashboard/src/dashboardModel.ts:94 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Tab REDACTED:105 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BrowserHandler browser_patches/firefox/juggler/protocol/BrowserHandler.js:16 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Recorder packages/playwright-core/src/server/recorder.ts:74 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BrowserContextDispatcher packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts:52 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 12 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×31
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 6 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×30
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1360 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: InjectedScript (94-1764). The bar is 500 significant lines; this is 860 over it, 2.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: server/frames.ts packages/playwright-core/src/server/frames.ts — FileTooLong — 1347 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: Frame (514-1868). The bar is 500 significant lines; this is 847 over it, 2.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: recorder/recorder.ts packages/injected/src/recorder/recorder.ts — FileTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 774 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: registry/index.ts packages/playwright-core/src/server/registry/index.ts — FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 599 over it, 2.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cli-daemon/commands.ts packages/playwright-core/src/tools/cli-daemon/commands.ts — FileTooLong — 1065 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 565 over it, 2.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: juggler/TargetRegistry.js browser_patches/firefox/juggler/TargetRegistry.js — FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 468 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: webkit/wkPage.ts packages/playwright-core/src/server/webkit/wkPage.ts — FileTooLong — 933 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: WKPage (56-1268). The bar is 500 significant lines; this is 433 over it, 1.87× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: webview/wvPage.ts packages/playwright-core/src/server/webkit/webview/wvPage.ts — FileTooLong — 930 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: WVPage (54-1218). The bar is 500 significant lines; this is 430 over it, 1.86× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/roleUtils.ts packages/injected/src/roleUtils.ts — FileTooLong — 917 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 417 over it, 1.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 869 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: FrameSession (400-1239). The bar is 500 significant lines; this is 369 over it, 1.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: server/page.ts packages/playwright-core/src/server/page.ts — FileTooLong — 825 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: Page (166-978). The bar is 500 significant lines; this is 325 over it, 1.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: server/dom.ts packages/playwright-core/src/server/dom.ts — FileTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: ElementHandle (134-993). The bar is 500 significant lines; this is 248 over it, 1.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: juggler/NetworkObserver.js browser_patches/firefox/juggler/NetworkObserver.js — FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 224 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: isomorphic/cssTokenizer.ts packages/isomorphic/cssTokenizer.ts — FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 197 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: recorder/tracing.ts packages/playwright-core/src/server/trace/recorder/tracing.ts — FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: Tracing (88-808). The bar is 500 significant lines; this is 175 over it, 1.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: client/page.ts packages/playwright-core/src/client/page.ts — FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: Page (90-951). The bar is 500 significant lines; this is 174 over it, 1.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: server/fetch.ts packages/playwright-core/src/server/fetch.ts — FileTooLong — 648 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: APIRequestContext (104-672). The bar is 500 significant lines; this is 148 over it, 1.30× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: client/network.ts packages/playwright-core/src/client/network.ts — FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 133 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: chromium/crNetworkManager.ts packages/playwright-core/src/server/chromium/crNetworkManager.ts — FileTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 127 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: isomorphic/locatorGenerators.ts packages/isomorphic/locatorGenerators.ts — FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 110 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: BrowserContext (90-750). The bar is 500 significant lines; this is 103 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: har/harTracer.ts packages/playwright-core/src/server/har/harTracer.ts — FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: HarTracer (69-734). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/clock.ts packages/injected/src/clock.ts — FileTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 96 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: server/network.ts packages/playwright-core/src/server/network.ts — FileTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 85 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: doclint/documentation.js utils/doclint/documentation.js — FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 55 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 5 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×29
  • FunctionTooLong: snapshotterInjected.frameSnapshotStreamer packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:34 — FunctionTooLong — frameSnapshotStreamer runs 473 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 373 over it, 4.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uiModeView.UIModeView packages/trace-viewer/src/ui/uiModeView.tsx:97 — FunctionTooLong — UIModeView runs 392 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 292 over it, 3.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: cssTokenizer.tokenize packages/isomorphic/cssTokenizer.ts:77 — FunctionTooLong — tokenize runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dashboard.Dashboard REDACTED:67 — FunctionTooLong — Dashboard runs 305 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 205 over it, 3.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: annotations.Annotations packages/dashboard/src/annotations.tsx:137 — FunctionTooLong — Annotations runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: workbench.PartitionedWorkbench packages/trace-viewer/src/ui/workbench.tsx:75 — FunctionTooLong — PartitionedWorkbench runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: webSocketMock.inject packages/injected/src/webSocketMock.ts:38 — FunctionTooLong — inject runs 231 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: snapshotRenderer.snapshotScript REDACTED:322 — FunctionTooLong — snapshotScript runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: recorder.Recorder packages/recorder/src/recorder.tsx:37 — FunctionTooLong — Recorder runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: roleUtils.getTextAlternativeInternal packages/injected/src/roleUtils.ts:763 — FunctionTooLong — getTextAlternativeInternal runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: program.decorateProgram packages/playwright-core/src/cli/program.ts:36 — FunctionTooLong — decorateProgram runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: program.program packages/playwright-core/src/tools/cli-client/program.ts:76 — FunctionTooLong — program runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: cli.run utils/doclint/cli.js:50 — FunctionTooLong — run runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: check_deps.innerCheckDeps utils/check_deps.js:65 — FunctionTooLong — innerCheckDeps runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: playbackControl.usePlayback packages/trace-viewer/src/ui/playbackControl.tsx:48 — FunctionTooLong — usePlayback runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: cssParser.parseCSS packages/isomorphic/cssParser.ts:39 — FunctionTooLong — parseCSS runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: selectorParser.parseAttributeSelector packages/isomorphic/selectorParser.ts:276 — FunctionTooLong — parseAttributeSelector runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gantt.GanttChart packages/html-reporter/src/gantt.tsx:35 — FunctionTooLong — GanttChart runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: generateDotnetApi.renderMethod utils/doclint/generateDotnetApi.js:509 — FunctionTooLong — renderMethod runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: webAuthn.inject packages/injected/src/webAuthn.ts:59 — FunctionTooLong — inject runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: generate_channels.generateChannels utils/generate_channels.js:239 — FunctionTooLong — generateChannels runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: program.decorateMCPCommand packages/playwright-core/src/tools/mcp/program.ts:34 — FunctionTooLong — decorateMCPCommand runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: treeView.TreeView packages/web/src/components/treeView.tsx:53 — FunctionTooLong — TreeView runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: connect.ConnectApp packages/extension/src/ui/connect.tsx:39 — FunctionTooLong — ConnectApp runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: codeMirrorWrapper.CodeMirrorWrapper packages/web/src/components/codeMirrorWrapper.tsx:52 — FunctionTooLong — CodeMirrorWrapper runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 4 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×27
  • Change coupling: locator.ts ↔ selectors.ts packages/playwright-core/src/client/locator.ts:1 — `packages/playwright-core/src/client/locator.ts` and `packages/playwright-core/src/server/selectors.ts` change together 81% of the time (17 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `313de29f` feat(locator): introduce locator.describe() (#35969); `807d9066` chore: allow generating aria references (#35132); `bd2fdd0f` chore: land experimental tools (#34503) — run `git show` on any of them.
  • Change coupling: androidServerImpl.ts ↔ browserServerImpl.ts packages/playwright-core/src/androidServerImpl.ts:1 — `packages/playwright-core/src/androidServerImpl.ts` and `packages/playwright-core/src/browserServerImpl.ts` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c8a1674b` chore: move slowmo and logging to dispatcher from server core (#36966); `a7599ad5` feat(api): add host option in launchServer options (#30999); `14a1eaa4` chore: add Playwright to attribution (#23447) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ dashboardChannel.ts REDACTED:1 — `REDACTED` and `packages/dashboard/src/dashboardChannel.ts` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `c28b53e6` feat(dashboard): add a debugger actions panel (#41711); `83584954` chore(dashboard): remove browser_pick_locator remnants (#40351); `10095c0c` feat(dashboard): cancel CLI annotate on client disconnect (#40347) — run `git show` on any of them.
  • Change coupling: index.ts ↔ tasks.ts packages/playwright/src/plugins/index.ts:1 — `packages/playwright/src/plugins/index.ts` and `packages/playwright/src/runner/tasks.ts` change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `10c9602c` chore: cleanup more ct remnants (#42200); `ae106c05` Revert "feat(test): support per-project webServer configuration (#408…; `ed918508` feat(test): support per-project webServer configuration (#40869) — run `git show` on any of them.
  • Change coupling: program.ts ↔ lastRun.ts packages/playwright/src/program.ts:1 — `packages/playwright/src/program.ts` and `packages/playwright/src/runner/lastRun.ts` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `45b43ff3` Revert "feat(test-runner): read last failed tests from --last-failed=…; `3456aa7d` feat(test-runner): read last failed tests from --last-failed=<file> (…; `561bb37a` feat: Allow configuring last-run output file location (#40806) — run `git show` on any of them.
  • Change coupling: loaderMain.ts ↔ loaderHost.ts packages/playwright/src/loader/loaderMain.ts:1 — `packages/playwright/src/loader/loaderMain.ts` and `packages/playwright/src/runner/loaderHost.ts` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c758b150` fix(test): use synchronous module customization hooks (#40891); `0a51cf8e` feat(test runner): config.tag for a global tag (#37846); `342bae6c` chore: support esm loader on Node 20 (#23269) (at that commit the files were still `packages/playwright-test/src/loader/loaderMain.ts` and `packages/playwright-test/src/runner/loaderHost.ts`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ ffPage.ts REDACTED:1 — `REDACTED` and `packages/playwright-core/src/server/firefox/ffPage.ts` change together 66% of the time (44 of the 67 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 44 shared commits counted here, the most recent 3 are `974edd3f` feat(dialog): add dialogclosed event (#42014); `bc97a130` fix(screencast): acknowledge frames after callbacks (#41898); `6949e055` feat: Add `location()` to `WebError` (#39767) — run `git show` on any of them.
  • Change coupling: testServerConnection.ts ↔ testServer.ts packages/playwright/src/isomorphic/testServerConnection.ts:1 — `packages/playwright/src/isomorphic/testServerConnection.ts` and `packages/playwright/src/runner/testServer.ts` change together 64% of the time (14 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `783b664f` chore: cleanup test root folder (#40100); `a6fb4676` chore(testRunner): expose pauseAtEnd/pauseOnError (#37923); `d669fcde` chore: step error recovery framework (#36996) — run `git show` on any of them.
  • Change coupling: electron.ts ↔ loader.ts packages/playwright-core/src/server/electron/electron.ts:1 — `packages/playwright-core/src/server/electron/electron.ts` and `packages/playwright-core/src/server/electron/loader.ts` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `5df6a4e9` Revert "fix(electron): pass port via switches not args" (#39710); `c86a0724` fix(electron): pass port via switches not args (#39012); `ad6e4053` fix(electron): make sure user arguments go first (#29204) — run `git show` on any of them.
  • Change coupling: traceModel.ts ↔ traceModernizer.ts packages/isomorphic/trace/traceModel.ts:1 — `packages/isomorphic/trace/traceModel.ts` and `packages/isomorphic/trace/traceModernizer.ts` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `87ca8496` chore(trace): use a single id for calls and test runner steps (#42430); `9642f576` feat(trace): attribute requests to service workers and api request co…; `0d864018` feat(trace-viewer): webm-based film strip (#42319) — run `git show` on any of them.
  • Change coupling: filmStrip.tsx ↔ workbench.tsx packages/trace-viewer/src/ui/filmStrip.tsx:1 — `packages/trace-viewer/src/ui/filmStrip.tsx` and `packages/trace-viewer/src/ui/workbench.tsx` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0ee695b5` feat(trace-viewer): show screencast frames during playback (#42751); `51023b42` chore(trace-viewer): show only the screencast frame on timeline hover…; `0494a0ab` chore: tv playback teaser (#39634) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ browserTypeDispatcher.ts REDACTED:1 — `REDACTED` and `packages/playwright-core/src/server/dispatchers/browserTypeDispatcher.ts` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4afdd64a` chore(browserType): merge connectOverCDP and connectOverCDPTransport …; `8f503225` feat(browserType): allow passing a ConnectionTransport to connectOver…; `2085f53b` chore: remove unused _connectOverCDPTransport method (#40195) — run `git show` on any of them.
  • Change coupling: reporterV2.ts ↔ dispatcher.ts packages/playwright/src/reporters/reporterV2.ts:1 — `packages/playwright/src/reporters/reporterV2.ts` and `packages/playwright/src/runner/dispatcher.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b592dfc7` feat(test-runner): add Reporter.preprocessSuite() hook for test filte…; `33f4ee71` feat(reporter): expose worker info on fixture teardown errors (#40444); `aa35f26b` chore: simplify reporter `onTestPaused` (#38679) — run `git show` on any of them.
  • Change coupling: video.ts ↔ screencast.ts packages/playwright-core/src/client/video.ts:1 — `packages/playwright-core/src/client/video.ts` and `packages/playwright-core/src/server/screencast.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `d0d1240e` feat(api): add annotate option for video and screencast (#39783); `9335d41a` feat(video): add screencast mode to Video.start for JPEG frame events…; `2864540c` chore: follow up to video api changes (#39085) — run `git show` on any of them.
  • Change coupling: index.tsx ↔ uiModeView.tsx packages/trace-viewer/src/index.tsx:1 — `packages/trace-viewer/src/index.tsx` and `packages/trace-viewer/src/ui/uiModeView.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `9707e978` chore: revert #33228 - it needs a proper review (#33284); `3641e598` chore: HMR for Trace Viewer (#33228); `c8cc4f9c` chore(ui): update to react 18 (#32079) — run `git show` on any of them.
  • Change coupling: pdf.ts ↔ response.ts packages/playwright-core/src/tools/backend/pdf.ts:1 — `packages/playwright-core/src/tools/backend/pdf.ts` and `packages/playwright-core/src/tools/backend/response.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `648a67c7` fix(mcp): create parent directories for explicitly named files (#42540); `d620c45c` chore: revert file output to server-based (#39038) (at that commit the files were still `packages/playwright/src/mcp/browser/tools/pdf.ts` and `packages/playwright/src/mcp/browser/response.ts`); `2307bf37` feat(mcp): add storage state tools (#39007) (at that commit the files were still `packages/playwright/src/mcp/browser/tools/pdf.ts` and `packages/playwright/src/mcp/browser/response.ts`) — run `git show` on any of them.
  • Change coupling: networkFilters.tsx ↔ tabbedPane.tsx packages/trace-viewer/src/ui/networkFilters.tsx:1 — `packages/trace-viewer/src/ui/networkFilters.tsx` and `packages/web/src/components/tabbedPane.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c47f96a5` chore: revert bogus keyboard navigability attempts (#41432); `3d8f1e93` fix(trace-viewer): add keyboard navigation to `NetworkFilters` compon…; `e25d5719` Revert "fix(trace-viewer): add keyboard navigation to `NetworkFilters… — run `git show` on any of them.
  • Change coupling: crNetworkManager.ts ↔ wkInterceptableRequest.ts packages/playwright-core/src/server/chromium/crNetworkManager.ts:1 — `packages/playwright-core/src/server/chromium/crNetworkManager.ts` and `packages/playwright-core/src/server/webkit/wkInterceptableRequest.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `83df35ae` feat(har): use engine timestamps instead of server `Date` (#41082); `1ac9a570` feat(har): include `WebSocket` in `.har` (#41015); `73f6cf9a` chore: normalize resource types (#38480) — run `git show` on any of them.
  • Change coupling: NetworkObserver.js ↔ main.js browser_patches/firefox/juggler/NetworkObserver.js:1 — `browser_patches/firefox/juggler/NetworkObserver.js` and `browser_patches/firefox/juggler/content/main.js` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bba16283` chore: roll browser patches from upstream (#39944); `d0b1fc27` chore: roll browser patches (#38909); `01103405` chore: update browser patches to 09195c9 (#32877) — run `git show` on any of them.
  • Change coupling: workerHost.ts ↔ workerMain.ts packages/playwright/src/runner/workerHost.ts:1 — `packages/playwright/src/runner/workerHost.ts` and `packages/playwright/src/worker/workerMain.ts` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `86b465c0` chore: merge agent cache from workers (#38500); `3ad540dc` feat: `onTestPaused` (#38475); `34a09f37` chore: remove mdb, replace by `sendMessage` ipc into test worker (#38… — run `git show` on any of them.
  • Change coupling: testCaseView.tsx ↔ testFileView.tsx packages/html-reporter/src/testCaseView.tsx:1 — `packages/html-reporter/src/testCaseView.tsx` and `packages/html-reporter/src/testFileView.tsx` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `f00452c6` chore: deduplicate msToString and bytesToString into isomorphic/forma…; `5d5b28f7` feat(html): show the list of runs from the same worker (#39103); `d92591a9` fix(ui): dont mutate searchparams (#38275) — run `git show` on any of them.
  • Change coupling: clock.ts ↔ browserContextDispatcher.ts packages/playwright-core/src/server/clock.ts:1 — `packages/playwright-core/src/server/clock.ts` and `packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `ff6d41b3` chore: enforce dispatcher API convention for server types (4) (#40037); `c2763fe7` feat: clock.uninstall (#36856); `e4355f72` chore: migrate some dispatchers from CallMetadata to Progress (part 3… — run `git show` on any of them.
  • Change coupling: workbench.tsx ↔ theme.ts packages/trace-viewer/src/ui/workbench.tsx:1 — `packages/trace-viewer/src/ui/workbench.tsx` and `packages/web/src/theme.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `888da0f8` chore(html): add html settings dialog (#37565); `d7393f99` chore: simplify settings management in UI mode (#32440); `a41cebc1` feat(ui mode): introduce Testing Options and Settings (#31841) — run `git show` on any of them.
  • Change coupling: video.ts ↔ pageDispatcher.ts packages/playwright-core/src/client/video.ts:1 — `packages/playwright-core/src/client/video.ts` and `packages/playwright-core/src/server/dispatchers/pageDispatcher.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `d0d1240e` feat(api): add annotate option for video and screencast (#39783); `9335d41a` feat(video): add screencast mode to Video.start for JPEG frame events…; `d039c403` chore: update video api and implementation (#39054) — run `git show` on any of them.
  • Change coupling: tabbedPane.tsx ↔ uiUtils.ts packages/html-reporter/src/tabbedPane.tsx:1 — `packages/html-reporter/src/tabbedPane.tsx` and `packages/web/src/uiUtils.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `c47f96a5` chore: revert bogus keyboard navigability attempts (#41432); `3d8f1e93` fix(trace-viewer): add keyboard navigation to `NetworkFilters` compon…; `e25d5719` Revert "fix(trace-viewer): add keyboard navigation to `NetworkFilters… — run `git show` on any of them.
  • + 2 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×23
  • Repeated repair: packages/playwright-core/src/server/chromium/chromiumSwitches.ts packages/playwright-core/src/server/chromium/chromiumSwitches.ts:52 — packages/playwright-core/src/server/chromium/chromiumSwitches.ts changed 11 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is chromiumSwitches.enabledFeatures at line 52), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chromium): disable TCP port randomization on Windows (#43605)”; “fix(electron): enable SwiftShader fallback for WebGL (#43615)”; “fix(chromium): stop remaining startup requests to Google services (#43571)”; “fix(chromium): disable stack sampling profiler (#43364)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/chromium/chromiumSwitches.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/mcp/extensionContextFactory.ts packages/playwright-core/src/tools/mcp/extensionContextFactory.ts:29 — packages/playwright-core/src/tools/mcp/extensionContextFactory.ts changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is extensionContextFactory.createExtensionBrowser at line 29), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): honor --user-data-dir in extension mode (#42190)”; “fix(mcp): mention PLAYWRIGHT_MCP_EXECUTABLE_PATH in extension not found error (#42122)”; “fix(mcp): pass noDefaults for extension CDP connections (#42119)”; “fix(mcp): validate Host and Origin on CDP relay WebSocket upgrades (#42103)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/extensionContextFactory.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/mcp/browserFactory.ts packages/playwright-core/src/tools/mcp/browserFactory.ts:188 — packages/playwright-core/src/tools/mcp/browserFactory.ts changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is browserFactory.createPersistentBrowser at line 188), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): give each isolated client its own idle timer (#43527)”; “fix(mcp): connect each client to the shared browser separately (#42622)”; “fix(mcp): report the actual remote browser name in browserInfo (#42228)”; “fix(mcp): honor --user-data-dir in extension mode (#42190)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/browserFactory.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/injected/src/storageScript.ts packages/injected/src/storageScript.ts:276 — packages/injected/src/storageScript.ts changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is StorageScript.restore at line 276), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(storage): keep falsy IndexedDB values and keys in storageState (#43429)”; “chore: revert "feat(evaluate): opt in to Map and Set serialization" (#43029)”; “fix(storage): preserve IndexedDB Map and Set values (#42707)”; “fix(storageState): close IndexedDB connections opened by collect and restore (#42260)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/injected/src/storageScript.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/bidi/bidiBrowser.ts packages/playwright-core/src/server/bidi/bidiBrowser.ts:236 — packages/playwright-core/src/server/bidi/bidiBrowser.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is BidiBrowserContext.initialize at line 236), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: do not send proxy credentials to website auth challenges (#43482)”; “Revert "fix: do not send proxy credentials to website auth challenges (#43342)" (#43406)”; “fix: do not send proxy credentials to website auth challenges (#43342)”; “fix(bidi): authenticate against proxies in Chromium (#43232)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/bidi/bidiBrowser.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/browser.ts packages/playwright-core/src/server/browser.ts:107 — packages/playwright-core/src/server/browser.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is Browser.newContext at line 107), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(electron): do not drop windows that have not navigated while connecting (#43250)”; “fix(client-certificates): respect launch proxy and proxy.bypass (#42873)”; “fix(chromium): replay execution contexts when connecting to Android WebView (#42447)”; “fix(mcp): validate Host and Origin on CDP relay WebSocket upgrades (#42103)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/browser.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/network.ts packages/playwright-core/src/server/network.ts:431 — packages/playwright-core/src/server/network.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is Route.fulfill at line 431), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cookies): follow RFC 6265 domain and path matching in cookies(urls) (#43148)”; “fix(network): treat loopback addresses as secure for cookies (#43136)”; “fix(cookies): clearCookies({ name: '' }) should only remove nameless cookies (#43129)”; “fix(network): do not cache response body on the server (#42847)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/network.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts:425 — packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is socksClientCertificatesInterceptor.parseALPNFromClientHello at line 425), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(client-certificates): finish browser TLS handshake before closing on server close (#43133)”; “Revert "fix(client-certificates): reestablish a way to explicitly send no client certificate for an origin" (#43074)”; “fix(client-certificates): respect launch proxy and proxy.bypass (#42873)”; “fix(client-certificates): reestablish a way to explicitly send no client certificate for an origin (#42547)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:148 — REDACTED changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is network.createProxyAgent at line 148), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): pass credentials from --proxy-server as proxy username/password (#43071)”; “fix(net): honor ipv4first dns result order in dual-stack lookup (#42906)”; “fix(net): apply socketTimeout from socket creation in httpRequest (#42660)”; “fix(net): pass a generous autoSelectFamilyAttemptTimeout (#42255)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/backend/route.ts packages/playwright-core/src/tools/backend/route.ts:110 — packages/playwright-core/src/tools/backend/route.ts changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is handle at line 110), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): preserve origin filters when modifying request headers (#43637)”; “fix(mcp): pass custom headers to route.fulfill when mocking response (#43244)”; “fix(mcp): match browser_route header names case-insensitively (#43227)”; “fix(mcp): keep upload modal, skip short secrets and bad headers (#42713)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/backend/route.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/mcp/cdpRelay.ts packages/playwright-core/src/tools/mcp/cdpRelay.ts:148 — packages/playwright-core/src/tools/mcp/cdpRelay.ts changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is CDPRelayServer._openConnectPageInBrowser at line 148), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): time out extension connection when a token is passed (#42525)”; “fix(mcp): honor --user-data-dir in extension mode (#42190)”; “fix(mcp): validate Host and Origin on CDP relay WebSocket upgrades (#42103)”; “fix(mcp): reconnect to the browser after disconnect (#41966)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/cdpRelay.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/bidi/bidiPage.ts packages/playwright-core/src/server/bidi/bidiPage.ts:291 — packages/playwright-core/src/server/bidi/bidiPage.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is BidiPage._onLogEntryAdded at line 291), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: do not send proxy credentials to website auth challenges (#43482)”; “Revert "fix: do not send proxy credentials to website auth challenges (#43342)" (#43406)”; “fix: do not send proxy credentials to website auth challenges (#43342)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/bidi/bidiPage.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/backend/cookies.ts packages/playwright-core/src/tools/backend/cookies.ts:178 — packages/playwright-core/src/tools/backend/cookies.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is cookies.pathMatches at line 178), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): do not match sibling paths in cookie-list path filter (#43368)”; “fix(mcp): match cookie list domain filter on domain boundaries (#43316)”; “fix(mcp): ask for a cookie domain when the page has no host (#43318)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/backend/cookies.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/recorder/recorderApp.ts packages/playwright-core/src/server/recorder/recorderApp.ts:197 — packages/playwright-core/src/server/recorder/recorderApp.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is RecorderApp._show at line 197), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(recorder): do not deliver buffered action to a recording started after it (#43289)”; “fix(recorder): split showRecorder and startRecording, deliver events per client (#42627)”; “fix(recorder): support re-enabling recorder on the same context (#42383)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/recorder/recorderApp.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/client/jsHandle.ts packages/playwright-core/src/client/jsHandle.ts:141 — packages/playwright-core/src/client/jsHandle.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is jsHandle.assertEvaluateOptions at line 141), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "feat(evaluate): add "world" option to evaluate methods" (#43040)”; “chore: revert "feat(evaluate): opt in to Map and Set serialization" (#43029)”; “fix(evaluate): reject exposeFunctions in the utility world (#42860)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/client/jsHandle.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:135 — REDACTED changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is processLauncher.launchProcess at line 135), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(video): hide ffmpeg console windows on Windows (#43575)”; “fix(git): do not hang when git fetch stalls on a credential prompt (#42639)”; “fix(cli): hide Windows daemon consoles (#42155)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/tools/mcp/index.ts packages/playwright-core/src/tools/mcp/index.ts:29 — packages/playwright-core/src/tools/mcp/index.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is index.createConnection at line 29), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): connect each client to the shared browser separately (#42622)”; “Revert "fix(mcp): drop the backend after browser_close with a shared browser" (#42492)”; “fix(mcp): drop the backend after browser_close with a shared browser (#42365)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/tools/mcp/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/injected/src/utilityScript.ts packages/injected/src/utilityScript.ts:68 — packages/injected/src/utilityScript.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is UtilityScript.evaluate at line 68), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(evaluate): await page-overridden Promise in evaluateHandle and waitForFunction (#43436)”; “chore: revert "feat(evaluate): opt in to Map and Set serialization" (#43029)”; “fix(clock): make Temporal.Now follow page.clock (#42838)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/injected/src/utilityScript.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/android/android.ts packages/playwright-core/src/server/android/android.ts:419 — packages/playwright-core/src/server/android/android.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is AndroidDevice._refreshWebViews at line 419), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(android): pass the call timeout to the driver (#43228)”; “fix(chromium): replay execution contexts when connecting to Android WebView (#42447)”; “fix(android): match webview process by exact pid (#42410)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/android/android.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/chromium/crServiceWorker.ts packages/playwright-core/src/server/chromium/crServiceWorker.ts:34 — packages/playwright-core/src/server/chromium/crServiceWorker.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is CRServiceWorker.constructor at line 34), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: do not send proxy credentials to website auth challenges (#43482)”; “Revert "fix: do not send proxy credentials to website auth challenges (#43342)" (#43406)”; “fix: do not send proxy credentials to website auth challenges (#43342)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/chromium/crServiceWorker.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/injected/src/domUtils.ts packages/injected/src/domUtils.ts:130 — packages/injected/src/domUtils.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is domUtils.computeBox at line 130), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(a11y): treat inert elements and content outside of modal dialogs as hidden (#43211)”; “fix(injected): reuse a single range in isVisibleTextNode (#43076)”; “fix(webkit): use native checkVisibility for element visibility (#42971)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/injected/src/domUtils.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/playwright-core/src/server/chromium/crConnection.ts packages/playwright-core/src/server/chromium/crConnection.ts:162 — packages/playwright-core/src/server/chromium/crConnection.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is CRSession._onMessage at line 162), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chromium): reject pending commands on all sessions when connection closes (#43221)”; “fix(chromium): dispose child session upon Target.detachedFromTarget (#43017)”; “fix(chromium): do not hang on pages without a renderer when connecting over CDP (#42936)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- packages/playwright-core/src/server/chromium/crConnection.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:57 — REDACTED changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is http.installHttpTransport at line 57), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(mcp): allow loopback hosts by default for all bind addresses (#42993)”; “fix(mcp): do not run heartbeat for clients without the event stream (#42189)”; “fix(mcp): only enable /killkillkill under test (#42133)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 21:28:07 +00:00' --until='2026-10-25 21:28:07 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
R11 · Import Boundaries · Boundary violation [package · ×20
  • Boundary violation [package:third-party-deep-import] packages/dashboard/src/annotationZip.ts:18 — packages/dashboard/src/annotationZip.ts:18 imports @zip.js/zip.js/lib/zip-no-worker-deflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] packages/dashboard/src/dashboardChannel.ts:17 — packages/dashboard/src/dashboardChannel.ts:17 reaches into another package with a relative path (../../playwright-core/src/tools/cli-client/registry) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/dashboard/src/dashboardChannel.ts:18 — packages/dashboard/src/dashboardChannel.ts:18 reaches into another package with a relative path (../../playwright-core/src/serverRegistry) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/dashboard/src/dashboardModel.ts:22 — packages/dashboard/src/dashboardModel.ts:22 reaches into another package with a relative path (../../playwright-core/src/tools/cli-client/registry) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/dashboard/src/dashboardModel.ts:23 — packages/dashboard/src/dashboardModel.ts:23 reaches into another package with a relative path (../../playwright-core/src/serverRegistry) — import the package by name instead.
  • Boundary violation [package:third-party-deep-import] packages/html-reporter/src/index.tsx:20 — packages/html-reporter/src/index.tsx:20 imports @zip.js/zip.js/lib/zip-no-worker-inflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] packages/playwright-client/src/index.ts:17 — packages/playwright-client/src/index.ts:17 reaches into another package with a relative path (../../playwright-core/src/client/connection) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/playwright-client/src/index.ts:19 — packages/playwright-client/src/index.ts:19 reaches into another package with a relative path (../../playwright-core/src/client/browser) — import the package by name instead.
  • Boundary violation [package:third-party-deep-import] packages/playwright-core/src/server/bidi/bidiOverCdp.ts:35 — packages/playwright-core/src/server/bidi/bidiOverCdp.ts:35 imports chromium-bidi/lib/cjs/bidiMapper/BidiMapper, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] packages/playwright-core/src/server/bidi/bidiOverCdp.ts:36 — packages/playwright-core/src/server/bidi/bidiOverCdp.ts:36 imports chromium-bidi/lib/cjs/cdp/CdpConnection, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] packages/trace-viewer/src/sw/traceLoaderBackends.ts:17 — packages/trace-viewer/src/sw/traceLoaderBackends.ts:17 imports @zip.js/zip.js/lib/zip-no-worker-inflate.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] REDACTED:24 — REDACTED:24 reaches into another package with a relative path (../playwright-core/src/bootstrap) — import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/extension/extension-fixtures.ts:148 — tests/extension/extension-fixtures.ts:148 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/library/locator-parser.spec.ts:30 — tests/library/locator-parser.spec.ts:30 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/src/client/locator) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/mcp/annotate.spec.ts:506 — tests/mcp/annotate.spec.ts:506 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/mcp/cli-fixtures.ts:118 — tests/mcp/cli-fixtures.ts:118 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/mcp/cli-fixtures.ts:137 — tests/mcp/cli-fixtures.ts:137 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/tools/cli-client/cli.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] tests/mcp/fixtures.ts:302 — tests/mcp/fixtures.ts:302 reaches past another workspace package's public entry into its internals with a relative path (../../packages/playwright-core/lib/entry/mcp.js) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:relative-cross-package] utils/generate_cli_help.js:22 — utils/generate_cli_help.js:22 reaches into another package with a relative path (../packages/playwright-core/lib/coreBundle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] utils/roll_browser.js:20 — utils/roll_browser.js:20 reaches into another package with a relative path (../packages/playwright-core/lib/coreBundle) — import the package by name instead.
D31 · IaC & Container Security · Medium IaC · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×18
  • Low cohesion: BrowserContext (LCOM4 16) packages/playwright-core/src/client/browserContext.ts:64 — BrowserContext's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TextOutput (LCOM4 16) packages/playwright-core/src/tools/cli-client/output.ts:77 — TextOutput's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Page (LCOM4 10) packages/playwright-core/src/client/page.ts:90 — Page's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: InjectedScript (LCOM4 9) REDACTED:94 — InjectedScript's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TraceModernizer (LCOM4 8) packages/isomorphic/trace/traceModernizer.ts:43 — TraceModernizer's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Registry (LCOM4 8) packages/playwright-core/src/server/registry/index.ts:507 — Registry's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Chromium (LCOM4 8) REDACTED:60 — Chromium's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ElectronApplication (LCOM4 5) packages/playwright-core/src/client/electron.ts:77 — ElectronApplication's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Browser (LCOM4 5) packages/playwright-core/src/client/browser.ts:34 — Browser's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Streamer (LCOM4 5) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:88 — Streamer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BidiPage (LCOM4 5) packages/playwright-core/src/server/bidi/bidiPage.ts:45 — BidiPage's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AndroidDevice (LCOM4 5) packages/playwright-core/src/client/android.ts:102 — AndroidDevice's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TestTypeImpl (LCOM4 5) packages/playwright/src/common/testType.ts:34 — TestTypeImpl's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Highlight (LCOM4 4) REDACTED:49 — Highlight's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CRBrowser (LCOM4 4) packages/playwright-core/src/server/chromium/crBrowser.ts:44 — CRBrowser's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BrowserContextDispatcher (LCOM4 4) packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts:52 — BrowserContextDispatcher's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Suite (LCOM4 4) packages/playwright/src/common/test.ts:44 — Suite's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LineReporter (LCOM4 4) packages/playwright/src/reporters/line.ts:25 — LineReporter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×15
  • ClassTooLong: InjectedScript REDACTED:94 — ClassTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 768 over it, 2.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Frame packages/playwright-core/src/server/frames.ts:514 — ClassTooLong — 966 significant lines (blank, comment-only and punctuation-only lines excluded), 102 methods. The bar is 400 significant lines; this is 566 over it, 2.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WKPage packages/playwright-core/src/server/webkit/wkPage.ts:56 — ClassTooLong — 849 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 449 over it, 2.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WVPage packages/playwright-core/src/server/webkit/webview/wvPage.ts:54 — ClassTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded), 90 methods. The bar is 400 significant lines; this is 420 over it, 2.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Registry packages/playwright-core/src/server/registry/index.ts:507 — ClassTooLong — 629 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 229 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ElementHandle packages/playwright-core/src/server/dom.ts:134 — ClassTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 214 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Page packages/playwright-core/src/client/page.ts:90 — ClassTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 400 significant lines; this is 173 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FrameSession REDACTED:400 — ClassTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 172 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Page packages/playwright-core/src/server/page.ts:166 — ClassTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 161 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Tracing packages/playwright-core/src/server/trace/recorder/tracing.ts:88 — ClassTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 124 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BidiPage packages/playwright-core/src/server/bidi/bidiPage.ts:45 — ClassTooLong — 492 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 92 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HarTracer packages/playwright-core/src/server/har/harTracer.ts:69 — ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 85 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BrowserContext REDACTED:90 — ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PageAgent browser_patches/firefox/juggler/content/PageAgent.js:54 — ClassTooLong — 407 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 7 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: APIRequestContext packages/playwright-core/src/server/fetch.ts:104 — ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D10 · Test Quality · Fixed-sleep synchronisation · ×13
  • Fixed-sleep synchronisation: NA-063 should return from goto if new navigation is started tests/page/page-goto.spec.ts:853 — This test starts work it did not wait for (`navigation`, still running when the sleep starts) and then orders itself against it with `new Promise(r => setTimeout(r, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-012 should pause intercepted XHR until continue tests/page/page-route.spec.ts:225 — This test starts work it did not wait for (`statusPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(r => setTimeout(r, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-013 should pause intercepted fetch request until continue tests/page/page-route.spec.ts:253 — This test starts work it did not wait for (`statusPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(r => setTimeout(r, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: SO-030 should wait for select to be enabled tests/page/page-select-option.spec.ts:330 — This test starts work it did not wait for (`selectPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 1000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: SO-031 should wait for option to be enabled tests/page/page-select-option.spec.ts:356 — This test starts work it did not wait for (`selectPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 1000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: SO-032 should wait for optgroup to be enabled tests/page/page-select-option.spec.ts:386 — This test starts work it did not wait for (`selectPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 1000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: SO-033 should wait for select to be swapped tests/page/page-select-option.spec.ts:418 — This test starts work it did not wait for (`selectPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 1000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: should not reap session of a client without the event stream tests/mcp/http.spec.ts:669 — This test starts work it did not wait for (`post`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 1000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: test_run should stop when aborted tests/mcp/test-run.spec.ts:126 — This test starts work it did not wait for (`runPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 2000))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-188 context.unrouteAll should wait for pending handlers to complete tests/library/unroute-behavior.spec.ts:60 — This test starts work it did not wait for (`navigationPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-189 context.unrouteAll should not wait for pending handlers to complete if behavior is ignoreErrors tests/library/unroute-behavior.spec.ts:90 — This test starts work it did not wait for (`navigationPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-194 page.unrouteAll should wait for pending handlers to complete tests/library/unroute-behavior.spec.ts:188 — This test starts work it did not wait for (`navigationPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: RO-195 page.unrouteAll should not wait for pending handlers to complete if behavior is ignoreErrors tests/library/unroute-behavior.spec.ts:218 — This test starts work it did not wait for (`navigationPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(f => setTimeout(f, 500))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: Registry.constructor packages/playwright-core/src/server/registry/index.ts:510 — MethodTooLong — constructor runs 259 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: APIRequestContext._sendRequest packages/playwright-core/src/server/fetch.ts:328 — MethodTooLong — _sendRequest runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Streamer.captureSnapshot packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:367 — MethodTooLong — captureSnapshot runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InjectedScript.expectSingleElement REDACTED:1537 — MethodTooLong — expectSingleElement runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InjectedScript.constructor REDACTED:141 — MethodTooLong — constructor runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Electron.launch packages/playwright-core/src/server/electron/electron.ts:180 — MethodTooLong — launch runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TraceModernizer._innerAppendEvent packages/isomorphic/trace/traceModernizer.ts:107 — MethodTooLong — _innerAppendEvent runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
P12 · CI test-gate honesty · Pull-request path filter skips the test gate for source changes · ×5
  • Pull-request path filter skips the test gate for source changes .github/workflows/tests_mcp.yml:10 — `paths-ignore: browser_patches/**` matches compiled source (`browser_patches/firefox/juggler/ChannelEventSink.sys.mjs`, `browser_patches/firefox/juggler/Helper.js`, `browser_patches/firefox/juggler/NetworkObserver.js`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
  • Pull-request path filter skips the test gate for source changes .github/workflows/tests_mcp.yml:12 — `paths-ignore: packages/extension/**` matches compiled source (`packages/extension/vite.config.mts`, `packages/extension/src/background.ts`, `packages/extension/src/connectedTabGroup.ts`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
  • Pull-request path filter skips the test gate for source changes .github/workflows/tests_mcp.yml:13 — `paths-ignore: packages/playwright-core/src/server/bidi/**` matches compiled source (`packages/playwright-core/src/server/bidi/bidiBrowser.ts`, `packages/playwright-core/src/server/bidi/bidiChromium.ts`, `packages/playwright-core/src/server/bidi/bidiConnection.ts`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
  • Pull-request path filter skips the test gate for source changes .github/workflows/tests_mcp.yml:14 — `paths-ignore: tests/bidi/**` matches compiled source (`tests/bidi/csvReporter.ts`, `tests/bidi/playwright.config.ts`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
  • Pull-request path filter skips the test gate for source changes .github/workflows/tests_mcp.yml:15 — `paths-ignore: tests/extension/**` matches compiled source (`tests/extension/cli.spec.ts`, `tests/extension/extension-fixtures.ts`, `tests/extension/extension.spec.ts`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
R7 · Dead Code · Dead file (~21 LoC) · ×5
  • Dead file (~21 LoC) packages/html-reporter/src/testFileView.story.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~21 LoC) packages/playwright-client/src/nodeStubs/colors.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~21 LoC) packages/playwright-client/src/nodeStubs/events.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~21 LoC) packages/playwright-client/src/nodeStubs/inspector.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~21 LoC) packages/playwright-client/src/nodeStubs/util.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: REDACTED → FrameTree.js, PageAgent.js, main.js, Protocol.js REDACTED — `REDACTED` changes together with 4 other files — `browser_patches/firefox/juggler/content/FrameTree.js`, `browser_patches/firefox/juggler/content/PageAgent.js`, `browser_patches/firefox/juggler/content/main.js`, `browser_patches/firefox/juggler/protocol/Protocol.js` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: TargetRegistry.js → FrameTree.js, PageAgent.js, Runtime.js, main.js, Protocol.js browser_patches/firefox/juggler/TargetRegistry.js — `browser_patches/firefox/juggler/TargetRegistry.js` changes together with 5 other files — `browser_patches/firefox/juggler/content/FrameTree.js`, `browser_patches/firefox/juggler/content/PageAgent.js`, `browser_patches/firefox/juggler/content/Runtime.js`, `browser_patches/firefox/juggler/content/main.js`, `browser_patches/firefox/juggler/protocol/Protocol.js` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: BrowserHandler.js → NetworkObserver.js, PageAgent.js, main.js, Protocol.js browser_patches/firefox/juggler/protocol/BrowserHandler.js — `browser_patches/firefox/juggler/protocol/BrowserHandler.js` changes together with 4 other files — `browser_patches/firefox/juggler/NetworkObserver.js`, `browser_patches/firefox/juggler/content/PageAgent.js`, `browser_patches/firefox/juggler/content/main.js`, `browser_patches/firefox/juggler/protocol/Protocol.js` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: REDACTED → console.ts, navigate.ts, snapshot.ts REDACTED — `REDACTED` changes together with 3 other files — `packages/playwright-core/src/tools/backend/console.ts`, `packages/playwright-core/src/tools/backend/navigate.ts`, `packages/playwright-core/src/tools/backend/snapshot.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×4
  • Untrusted text written into markup unescaped REDACTED:319 — `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped packages/playwright-core/src/server/frames.ts:979 — `html` is text this program did not author, and it is written into the text of an element through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:213 — `messageInnerHTML` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:25 — `html||''` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
D1 · Cyclomatic Complexity · cssTokenizer.tokenize · ×3
  • cssTokenizer.tokenize::consumeAToken (cyclomatic 49) packages/isomorphic/cssTokenizer.ts:143 — cssTokenizer.tokenize::consumeAToken has cyclomatic complexity 49 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAURLToken, cssTokenizer.tokenize::consumeANumber) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • cssTokenizer.tokenize::consumeANumber (cyclomatic 17) packages/isomorphic/cssTokenizer.ts:470 — cssTokenizer.tokenize::consumeANumber has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAToken, cssTokenizer.tokenize::consumeAURLToken) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • cssTokenizer.tokenize::consumeAURLToken (cyclomatic 16) packages/isomorphic/cssTokenizer.ts:342 — cssTokenizer.tokenize::consumeAURLToken has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAToken, cssTokenizer.tokenize::consumeANumber) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · cssTokenizer.tokenize · ×3
  • cssTokenizer.tokenize::consumeAToken (cognitive 75) packages/isomorphic/cssTokenizer.ts:143 — cssTokenizer.tokenize::consumeAToken has cognitive complexity 75 (threshold 15). Drivers by points: if/else 56 (70 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAURLToken, cssTokenizer.tokenize::consumeANumber) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • cssTokenizer.tokenize::consumeAURLToken (cognitive 23) packages/isomorphic/cssTokenizer.ts:342 — cssTokenizer.tokenize::consumeAURLToken has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAToken, cssTokenizer.tokenize::consumeANumber) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • cssTokenizer.tokenize::consumeANumber (cognitive 18) packages/isomorphic/cssTokenizer.ts:470 — cssTokenizer.tokenize::consumeANumber has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, loops 4 (7 pts), if/else 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (cssTokenizer.tokenize::consumeAToken, cssTokenizer.tokenize::consumeAURLToken) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · check_deps.innerCheckDeps · ×3
  • check_deps.innerCheckDeps::visit (cognitive 54) utils/check_deps.js:137 — check_deps.innerCheckDeps::visit has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (46 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (check_deps.innerCheckDeps, check_deps.innerCheckDeps::calculateDeps, check_deps.innerCheckDeps::allowImport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • check_deps.innerCheckDeps::calculateDeps (cognitive 18) utils/check_deps.js:210 — check_deps.innerCheckDeps::calculateDeps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (check_deps.innerCheckDeps, check_deps.innerCheckDeps::visit, check_deps.innerCheckDeps::allowImport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • check_deps.innerCheckDeps::allowImport (cognitive 17) utils/check_deps.js:247 — check_deps.innerCheckDeps::allowImport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (check_deps.innerCheckDeps, check_deps.innerCheckDeps::visit, check_deps.innerCheckDeps::calculateDeps) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
R7 · Dead Code · Dead file (~24 LoC) · ×3
  • Dead file (~24 LoC) packages/playwright-client/src/nodeStubs/crypto.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~24 LoC) packages/playwright-client/src/nodeStubs/stream.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~24 LoC) utils/video_stress.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
D1 · Cyclomatic Complexity · ariaSnapshot.generateAriaTree · ×2
  • ariaSnapshot.generateAriaTree::visit (cyclomatic 32) REDACTED:95 — ariaSnapshot.generateAriaTree::visit has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ariaSnapshot.generateAriaTree::processElement) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ariaSnapshot.generateAriaTree::processElement (cyclomatic 23) REDACTED:169 — ariaSnapshot.generateAriaTree::processElement has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ariaSnapshot.generateAriaTree::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ariaSnapshotRenderer.renderAriaSnapshotAsYaml · ×2
  • ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey (cyclomatic 22) packages/isomorphic/ariaSnapshotRenderer.ts:38 — ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit (cyclomatic 18) packages/isomorphic/ariaSnapshotRenderer.ts:83 — ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ariaSnapshot.generateAriaTree · ×2
  • ariaSnapshot.generateAriaTree::visit (cognitive 42) REDACTED:95 — ariaSnapshot.generateAriaTree::visit has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 10, loops 2 (4 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ariaSnapshot.generateAriaTree::processElement) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ariaSnapshot.generateAriaTree::processElement (cognitive 29) REDACTED:169 — ariaSnapshot.generateAriaTree::processElement has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (8 pts), boolean chains 7, ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (ariaSnapshot.generateAriaTree::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · snapshotRenderer.snapshotScript · ×2
  • snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit (cognitive 41) REDACTED:357 — snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit has cognitive complexity 41 (threshold 15). Drivers by points: loops 16 (19 pts), if/else 9 (14 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (snapshotRenderer.snapshotScript::applyPlaywrightAttributes::onLoad) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • snapshotRenderer.snapshotScript::applyPlaywrightAttributes::onLoad (cognitive 17) REDACTED:473 — snapshotRenderer.snapshotScript::applyPlaywrightAttributes::onLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ariaSnapshotRenderer.renderAriaSnapshotAsYaml · ×2
  • ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit (cognitive 34) packages/isomorphic/ariaSnapshotRenderer.ts:83 — ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 2 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey (cognitive 22) packages/isomorphic/ariaSnapshotRenderer.ts:38 — ariaSnapshotRenderer.renderAriaSnapshotAsYaml::createKey has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (ariaSnapshotRenderer.renderAriaSnapshotAsYaml::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · selectorParser.parseAttributeSelector · ×2
  • selectorParser.parseAttributeSelector::readAttribute (cognitive 31) packages/isomorphic/selectorParser.ts:390 — selectorParser.parseAttributeSelector::readAttribute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (selectorParser.parseAttributeSelector::readRegularExpression) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • selectorParser.parseAttributeSelector::readRegularExpression (cognitive 17) packages/isomorphic/selectorParser.ts:333 — selectorParser.parseAttributeSelector::readRegularExpression has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (selectorParser.parseAttributeSelector::readAttribute) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
P12 · CI test-gate honesty · Changed-file filter skips the test gate for code the tests depend on · ×2
  • Changed-file filter skips the test gate for code the tests depend on REDACTED:19 — `paths` runs `npm run test-extension` (the tests of `examples/github-api`) only when a change touches `packages/playwright-core/src/tools/**`, `!packages/playwright-core/src/tools/dashboard/**`, `!packages/playwright-core/src/tools/trace/**`, `packages/extension/**`, `tests/extension/**`, `REDACTED`, but those tests also depend on `examples/github-api`, `packages/playwright`, `packages/playwright-core`, `packages/playwright-test` (e.g. `examples/github-api/playwright.config.ts`, `packages/playwright/cli.js`) — a change there merges with them not run, and no unfiltered gate runs them. List the package's tests and its workspace dependencies in the filter, or drop it.
  • Changed-file filter skips the test gate for code the tests depend on REDACTED:6 — `paths` runs `npx playwright test --config tests/webview/playwright.config.ts --shard=${{ matrix.shard }}/4` (the tests of `examples/github-api`) only when a change touches `tests/webview/**`, `packages/playwright-core/src/server/webkit/webview/**`, `REDACTED`, but those tests also depend on `examples/github-api`, `packages/playwright`, `packages/playwright-core`, `packages/playwright-test` (e.g. `examples/github-api/playwright.config.ts`, `packages/playwright/cli.js`) — a change there merges with them not run, and no unfiltered gate runs them. List the package's tests and its workspace dependencies in the filter, or drop it.
R10 · Code Duplication · Duplicated block (40 lines × 2 locations) · ×2
  • Duplicated block (40 lines × 2 locations) browser_patches/firefox/juggler/NetworkObserver.js:832 — browser_patches/firefox/juggler/NetworkObserver.js:832 · packages/playwright-core/src/server/network.ts:81 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (40 lines × 2 locations) packages/trace-viewer/src/ui/filmStrip.tsx:138 — packages/trace-viewer/src/ui/filmStrip.tsx:138 · packages/trace-viewer/src/ui/filmStrip.tsx:189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×2
  • Duplicated block (37 lines × 2 locations) packages/playwright-core/src/client/browserContext.ts:411 — packages/playwright-core/src/client/browserContext.ts:411 · packages/playwright-core/src/client/page.ts:594 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (37 lines × 2 locations) packages/playwright-core/src/server/bidi/bidiPdf.ts:31 — packages/playwright-core/src/server/bidi/bidiPdf.ts:31 · packages/playwright-core/src/server/chromium/crPdf.ts:32 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×2
  • Duplicated block (31 lines × 2 locations) packages/injected/src/recorder/recorder.ts:609 — packages/injected/src/recorder/recorder.ts:609 · packages/injected/src/recorder/recorder.ts:810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (31 lines × 2 locations) packages/playwright-core/src/server/webkit/webview/wvPage.ts:1023 — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1023 · packages/playwright-core/src/server/webkit/wkPage.ts:1047 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · snapshotterInjected.frameSnapshotStreamer (cyclomatic 146) · ×1
  • snapshotterInjected.frameSnapshotStreamer (cyclomatic 146) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:34 — snapshotterInjected.frameSnapshotStreamer has cyclomatic complexity 146 (threshold 15). Of this number, 37 points are the body's own statements and 109 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · roleUtils.getTextAlternativeInternal (cyclomatic 136) · ×1
  • roleUtils.getTextAlternativeInternal (cyclomatic 136) packages/injected/src/roleUtils.ts:763 — roleUtils.getTextAlternativeInternal has cyclomatic complexity 136 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Streamer.captureSnapshot · ×1
  • Streamer.captureSnapshot::visitNode (cyclomatic 92) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:384 — Streamer.captureSnapshot::visitNode has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uiModeView.UIModeView (cyclomatic 88) · ×1
  • uiModeView.UIModeView (cyclomatic 88) packages/trace-viewer/src/ui/uiModeView.tsx:97 — uiModeView.UIModeView has cyclomatic complexity 88 (threshold 15). Of this number, 23 points are the body's own statements and 65 belong to 19 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · generate_channels.generateChannels (cyclomatic 81) · ×1
  • generate_channels.generateChannels (cyclomatic 81) utils/generate_channels.js:239 — generate_channels.generateChannels has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dashboard.Dashboard (cyclomatic 68) · ×1
  • dashboard.Dashboard (cyclomatic 68) REDACTED:67 — dashboard.Dashboard has cyclomatic complexity 68 (threshold 15). Of this number, 37 points are the body's own statements and 31 belong to 22 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · APIRequestContext._sendRequest (cyclomatic 63) · ×1
  • APIRequestContext._sendRequest (cyclomatic 63) packages/playwright-core/src/server/fetch.ts:328 — APIRequestContext._sendRequest has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 4 of the 63 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 389, 393, 350, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · webSocketMock.inject (cyclomatic 61) · ×1
  • webSocketMock.inject (cyclomatic 61) packages/injected/src/webSocketMock.ts:38 — webSocketMock.inject has cyclomatic complexity 61 (threshold 15). Of this number, 44 points are the body's own statements and 17 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InjectedScript.expectSingleElement (cyclomatic 57) · ×1
  • InjectedScript.expectSingleElement (cyclomatic 57) REDACTED:1537 — InjectedScript.expectSingleElement has cyclomatic complexity 57 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · program.program (cyclomatic 57) · ×1
  • program.program (cyclomatic 57) packages/playwright-core/src/tools/cli-client/program.ts:76 — program.program has cyclomatic complexity 57 (threshold 15). Of this number, 55 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ansi2html.ansi2html (cyclomatic 56) · ×1
  • ansi2html.ansi2html (cyclomatic 56) packages/web/src/ansi2html.ts:17 — ansi2html.ansi2html has cyclomatic complexity 56 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · cli.run (cyclomatic 47) · ×1
  • cli.run (cyclomatic 47) utils/doclint/cli.js:50 — cli.run has cyclomatic complexity 47 (threshold 15). Of this number, 34 points are the body's own statements and 13 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · innerRenderMdNode (cyclomatic 47) · ×1
  • innerRenderMdNode (cyclomatic 47) utils/markdown.js:306 — innerRenderMdNode has cyclomatic complexity 47 (threshold 15). Of this number, 44 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · locatorGenerators.innerAsLocators (cyclomatic 46) · ×1
  • locatorGenerators.innerAsLocators (cyclomatic 46) packages/isomorphic/locatorGenerators.ts:86 — locatorGenerators.innerAsLocators has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · recorder.Recorder (cyclomatic 46) · ×1
  • recorder.Recorder (cyclomatic 46) packages/recorder/src/recorder.tsx:37 — recorder.Recorder has cyclomatic complexity 46 (threshold 15). Of this number, 19 points are the body's own statements and 27 belong to 13 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SnapshotRenderer.render · ×1
  • SnapshotRenderer.render::visit (cyclomatic 45) REDACTED:89 — SnapshotRenderer.render::visit has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workbench.PartitionedWorkbench (cyclomatic 45) · ×1
  • workbench.PartitionedWorkbench (cyclomatic 45) packages/trace-viewer/src/ui/workbench.tsx:75 — workbench.PartitionedWorkbench has cyclomatic complexity 45 (threshold 15). Of this number, 25 points are the body's own statements and 20 belong to 10 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · utilityScriptSerializers.innerSerialize (cyclomatic 43) · ×1
  • utilityScriptSerializers.innerSerialize (cyclomatic 43) REDACTED:253 — utilityScriptSerializers.innerSerialize has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generateDotnetApi.translateType (cyclomatic 42) · ×1
  • generateDotnetApi.translateType (cyclomatic 42) utils/doclint/generateDotnetApi.js:729 — generateDotnetApi.translateType has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JavaLocatorFactory.generateLocator (cyclomatic 40) · ×1
  • JavaLocatorFactory.generateLocator (cyclomatic 40) packages/isomorphic/locatorGenerators.ts:526 — JavaLocatorFactory.generateLocator has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PythonLocatorFactory.generateLocator (cyclomatic 39) · ×1
  • PythonLocatorFactory.generateLocator (cyclomatic 39) packages/isomorphic/locatorGenerators.ts:416 — PythonLocatorFactory.generateLocator has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · APIRequestContext._innerFetch (cyclomatic 39) · ×1
  • APIRequestContext._innerFetch (cyclomatic 39) packages/playwright-core/src/client/fetch.ts:197 — APIRequestContext._innerFetch has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FrameSession._initialize (cyclomatic 39) · ×1
  • FrameSession._initialize (cyclomatic 39) REDACTED:472 — FrameSession._initialize has cyclomatic complexity 39 (threshold 15). Of this number, 33 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codeMirrorWrapper.CodeMirrorWrapper (cyclomatic 39) · ×1
  • codeMirrorWrapper.CodeMirrorWrapper (cyclomatic 39) packages/web/src/components/codeMirrorWrapper.tsx:52 — codeMirrorWrapper.CodeMirrorWrapper has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 131, 79, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · minimist.minimist (cyclomatic 38) · ×1
  • minimist.minimist (cyclomatic 38) packages/playwright-core/src/tools/cli-client/minimist.ts:36 — minimist.minimist has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JavaScriptLocatorFactory.generateLocator (cyclomatic 37) · ×1
  • JavaScriptLocatorFactory.generateLocator (cyclomatic 37) packages/isomorphic/locatorGenerators.ts:313 — JavaScriptLocatorFactory.generateLocator has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (CSharpLocatorFactory.generateLocator) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CSharpLocatorFactory.generateLocator (cyclomatic 37) · ×1
  • CSharpLocatorFactory.generateLocator (cyclomatic 37) packages/isomorphic/locatorGenerators.ts:638 — CSharpLocatorFactory.generateLocator has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (JavaScriptLocatorFactory.generateLocator) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CRNetworkManager._onRequest (cyclomatic 37) · ×1
  • CRNetworkManager._onRequest (cyclomatic 37) packages/playwright-core/src/server/chromium/crNetworkManager.ts:295 — CRNetworkManager._onRequest has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bidiExecutionContext.renderPreview (cyclomatic 37) · ×1
  • bidiExecutionContext.renderPreview (cyclomatic 37) REDACTED:203 — bidiExecutionContext.renderPreview has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · workbenchLoader.WorkbenchLoader (cyclomatic 37) · ×1
  • workbenchLoader.WorkbenchLoader (cyclomatic 37) REDACTED:27 — workbenchLoader.WorkbenchLoader has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 103, 148, 56, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · treeView.TreeView (cyclomatic 37) · ×1
  • treeView.TreeView (cyclomatic 37) packages/web/src/components/treeView.tsx:53 — treeView.TreeView has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 143, 107, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ariaSnapshot.matchesNode (cyclomatic 36) · ×1
  • ariaSnapshot.matchesNode (cyclomatic 36) REDACTED:382 — ariaSnapshot.matchesNode has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ElementHandle._performPointerAction (cyclomatic 36) · ×1
  • ElementHandle._performPointerAction (cyclomatic 36) packages/playwright-core/src/server/dom.ts:402 — ElementHandle._performPointerAction has cyclomatic complexity 36 (threshold 15). Of this number, 23 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · consoleTab.useConsoleTabModel (cyclomatic 35) · ×1
  • consoleTab.useConsoleTabModel (cyclomatic 35) REDACTED:64 — consoleTab.useConsoleTabModel has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 65, 70, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · locatorParser.tokenize (cyclomatic 34) · ×1
  • locatorParser.tokenize (cyclomatic 34) packages/isomorphic/locatorParser.ts:69 — locatorParser.tokenize has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 3 function items inside it that branch (readString, readVerbatimString, match). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TraceModernizer._innerAppendEvent (cyclomatic 34) · ×1
  • TraceModernizer._innerAppendEvent (cyclomatic 34) packages/isomorphic/trace/traceModernizer.ts:107 — TraceModernizer._innerAppendEvent has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · splitView.SplitView (cyclomatic 34) · ×1
  • splitView.SplitView (cyclomatic 34) packages/web/src/components/splitView.tsx:35 — splitView.SplitView has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · selectorGenerator.buildTextCandidates (cyclomatic 33) · ×1
  • selectorGenerator.buildTextCandidates (cyclomatic 33) packages/injected/src/selectorGenerator.ts:280 — selectorGenerator.buildTextCandidates has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hostPlatform.calculatePlatform (cyclomatic 33) · ×1
  • hostPlatform.calculatePlatform (cyclomatic 33) packages/utils/hostPlatform.ts:41 — hostPlatform.calculatePlatform has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ariaSnapshot.renderAriaTreeAsJSON · ×1
  • ariaSnapshot.renderAriaTreeAsJSON::visit (cyclomatic 32) REDACTED:473 — ariaSnapshot.renderAriaTreeAsJSON::visit has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · webAuthn.inject (cyclomatic 32) · ×1
  • webAuthn.inject (cyclomatic 32) packages/injected/src/webAuthn.ts:59 — webAuthn.inject has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 201, toBase64Url, fromBase64Url, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Page.expectScreenshot (cyclomatic 32) · ×1
  • Page.expectScreenshot (cyclomatic 32) packages/playwright-core/src/server/page.ts:718 — Page.expectScreenshot has cyclomatic complexity 32 (threshold 15). Of this number, 24 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · timeline.Timeline (cyclomatic 32) · ×1
  • timeline.Timeline (cyclomatic 32) packages/trace-viewer/src/ui/timeline.tsx:37 — timeline.Timeline has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 66, 90, 43, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · imageDiffView.ImageDiffView (cyclomatic 32) · ×1
  • imageDiffView.ImageDiffView (cyclomatic 32) packages/web/src/shared/imageDiffView.tsx:66 — imageDiffView.ImageDiffView has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · reportView.ReportView (cyclomatic 31) · ×1
  • reportView.ReportView (cyclomatic 31) packages/html-reporter/src/reportView.tsx:49 — reportView.ReportView has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 89, 62, 72, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · selectorGenerator.generateSelectorFor (cyclomatic 31) · ×1
  • selectorGenerator.generateSelectorFor (cyclomatic 31) packages/injected/src/selectorGenerator.ts:121 — selectorGenerator.generateSelectorFor has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Response._build (cyclomatic 31) · ×1
  • Response._build (cyclomatic 31) packages/playwright-core/src/tools/backend/response.ts:267 — Response._build has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · roleSelectorEngine.queryRole · ×1
  • roleSelectorEngine.queryRole::match (cyclomatic 30) packages/injected/src/roleSelectorEngine.ts:145 — roleSelectorEngine.queryRole::match has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InjectedScript.elementState (cyclomatic 30) · ×1
  • InjectedScript.elementState (cyclomatic 30) REDACTED:789 — InjectedScript.elementState has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utilityScriptSerializers.parseEvaluationResultValue (cyclomatic 30) · ×1
  • utilityScriptSerializers.parseEvaluationResultValue (cyclomatic 30) REDACTED:151 — utilityScriptSerializers.parseEvaluationResultValue has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Frame._expectInternal (cyclomatic 30) · ×1
  • Frame._expectInternal (cyclomatic 30) packages/playwright-core/src/server/frames.ts:1537 — Frame._expectInternal has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · traceConsole.traceConsole (cyclomatic 30) · ×1
  • traceConsole.traceConsole (cyclomatic 30) REDACTED:21 — traceConsole.traceConsole has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExecutionContext._createRemoteObject (cyclomatic 29) · ×1
  • ExecutionContext._createRemoteObject (cyclomatic 29) browser_patches/firefox/juggler/content/Runtime.js:459 — ExecutionContext._createRemoteObject has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · selectorGenerator.buildNoTextCandidates (cyclomatic 29) · ×1
  • selectorGenerator.buildNoTextCandidates (cyclomatic 29) packages/injected/src/selectorGenerator.ts:204 — selectorGenerator.buildNoTextCandidates has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ariaSnapshot.parseAriaSnapshot · ×1
  • ariaSnapshot.parseAriaSnapshot::convertMap (cyclomatic 29) packages/isomorphic/ariaSnapshot.ts:175 — ariaSnapshot.parseAriaSnapshot::convertMap has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapshotRenderer.snapshotScript · ×1
  • snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit (cyclomatic 29) REDACTED:357 — snapshotRenderer.snapshotScript::applyPlaywrightAttributes::visit has cyclomatic complexity 29 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · browserActions.launchContext (cyclomatic 29) · ×1
  • browserActions.launchContext (cyclomatic 29) REDACTED:66 — browserActions.launchContext has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · generateNameDefault (cyclomatic 29) · ×1
  • generateNameDefault (cyclomatic 29) utils/doclint/generateDotnetApi.js:411 — generateNameDefault has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FilePickerOverride._createPicker (cyclomatic 28) · ×1
  • FilePickerOverride._createPicker (cyclomatic 28) browser_patches/firefox/juggler/TargetRegistry.js:139 — FilePickerOverride._createPicker has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · selectorParser.parseSelectorString (cyclomatic 28) · ×1
  • selectorParser.parseSelectorString (cyclomatic 28) packages/isomorphic/selectorParser.ts:184 — selectorParser.parseSelectorString has cyclomatic complexity 28 (threshold 15). Of this number, 14 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JavaScriptLanguageGenerator._generateActionCall (cyclomatic 28) · ×1
  • JavaScriptLanguageGenerator._generateActionCall (cyclomatic 28) packages/isomorphic/codegen/javascript.ts:97 — JavaScriptLanguageGenerator._generateActionCall has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · jsonSchema.validate (cyclomatic 28) · ×1
  • jsonSchema.validate (cyclomatic 28) REDACTED:29 — jsonSchema.validate has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · traceRequests.traceRequest (cyclomatic 28) · ×1
  • traceRequests.traceRequest (cyclomatic 28) REDACTED:75 — traceRequests.traceRequest has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main.doFetch (cyclomatic 28) · ×1
  • main.doFetch (cyclomatic 28) packages/trace-viewer/src/sw/main.ts:138 — main.doFetch has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · listView.ListView (cyclomatic 28) · ×1
  • listView.ListView (cyclomatic 28) packages/web/src/components/listView.tsx:43 — listView.ListView has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 89, 124, 80, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · roleSelectorEngine.validateAttributes (cyclomatic 27) · ×1
  • roleSelectorEngine.validateAttributes (cyclomatic 27) packages/injected/src/roleSelectorEngine.ts:61 — roleSelectorEngine.validateAttributes has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WVPage._onConsoleMessage (cyclomatic 27) · ×1
  • WVPage._onConsoleMessage (cyclomatic 27) packages/playwright-core/src/server/webkit/webview/wvPage.ts:532 — WVPage._onConsoleMessage has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · check_deps.innerCheckDeps · ×1
  • check_deps.innerCheckDeps::visit (cyclomatic 27) utils/check_deps.js:137 — check_deps.innerCheckDeps::visit has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (check_deps.innerCheckDeps) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TargetRegistry.constructor (cyclomatic 26) · ×1
  • TargetRegistry.constructor (cyclomatic 26) browser_patches/firefox/juggler/TargetRegistry.js:198 — TargetRegistry.constructor has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (onOpenWindow, onTabOpenListener, onCloseWindow, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ariaSnapshot.toAriaNode (cyclomatic 26) · ×1
  • ariaSnapshot.toAriaNode (cyclomatic 26) REDACTED:240 — ariaSnapshot.toAriaNode has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyParser._applyAttribute (cyclomatic 26) · ×1
  • KeyParser._applyAttribute (cyclomatic 26) packages/isomorphic/ariaSnapshot.ts:486 — KeyParser._applyAttribute has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TraceModel.constructor (cyclomatic 26) · ×1
  • TraceModel.constructor (cyclomatic 26) packages/isomorphic/trace/traceModel.ts:98 — TraceModel.constructor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · screenshotter.inPagePrepareForScreenshots (cyclomatic 26) · ×1
  • screenshotter.inPagePrepareForScreenshots (cyclomatic 26) packages/playwright-core/src/server/screenshotter.ts:49 — screenshotter.inPagePrepareForScreenshots has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (handleAnimations, collectRoots, a function literal at line 146, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Frame.waitForSelector (cyclomatic 26) · ×1
  • Frame.waitForSelector (cyclomatic 26) packages/playwright-core/src/server/frames.ts:839 — Frame.waitForSelector has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 850, 857). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PlaywrightServer.constructor (cyclomatic 26) · ×1
  • PlaywrightServer.constructor (cyclomatic 26) packages/playwright-core/src/remote/playwrightServer.ts:55 — PlaywrightServer.constructor has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 94, 70, 81, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · roleUtils.innerAccumulatedElementText (cyclomatic 25) · ×1
  • roleUtils.innerAccumulatedElementText (cyclomatic 25) packages/injected/src/roleUtils.ts:1098 — roleUtils.innerAccumulatedElementText has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · InjectedScript.dispatchEvent (cyclomatic 25) · ×1
  • InjectedScript.dispatchEvent (cyclomatic 25) REDACTED:1224 — InjectedScript.dispatchEvent has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cookieStore.parseRawCookie (cyclomatic 25) · ×1
  • cookieStore.parseRawCookie (cyclomatic 25) packages/playwright-core/src/server/cookieStore.ts:135 — cookieStore.parseRawCookie has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · serializers.innerParseSerializedValue (cyclomatic 25) · ×1
  • serializers.innerParseSerializedValue (cyclomatic 25) REDACTED:35 — serializers.innerParseSerializedValue has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · markdown.buildTree (cyclomatic 25) · ×1
  • markdown.buildTree (cyclomatic 25) utils/markdown.js:116 — markdown.buildTree has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.jsonToTS (cyclomatic 25) · ×1
  • index.jsonToTS (cyclomatic 25) utils/protocol-types-generator/index.js:40 — index.jsonToTS has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 43, 47, 69, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Filter.matches (cyclomatic 24) · ×1
  • Filter.matches (cyclomatic 24) packages/html-reporter/src/filter.ts:119 — Filter.matches has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · injectedScript.createTextMatcher (cyclomatic 24) · ×1
  • injectedScript.createTextMatcher (cyclomatic 24) REDACTED:1799 — injectedScript.createTextMatcher has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JavaLanguageGenerator._generateActionCall (cyclomatic 24) · ×1
  • JavaLanguageGenerator._generateActionCall (cyclomatic 24) packages/isomorphic/codegen/java.ts:114 — JavaLanguageGenerator._generateActionCall has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BrowserContextDispatcher.constructor (cyclomatic 24) · ×1
  • BrowserContextDispatcher.constructor (cyclomatic 24) packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts:71 — BrowserContextDispatcher.constructor has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 155, 124, 179, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · serializers.innerSerializeValue (cyclomatic 24) · ×1
  • serializers.innerSerializeValue (cyclomatic 24) REDACTED:118 — serializers.innerSerializeValue has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · debuggerPanel.DebuggerPanel (cyclomatic 23) · ×1
  • debuggerPanel.DebuggerPanel (cyclomatic 23) packages/dashboard/src/debuggerPanel.tsx:33 — debuggerPanel.DebuggerPanel has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 89, 50, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SelectorEvaluatorImpl._matchesParents (cyclomatic 23) · ×1
  • SelectorEvaluatorImpl._matchesParents (cyclomatic 23) REDACTED:265 — SelectorEvaluatorImpl._matchesParents has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 268). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · InjectedScript.expectHitTarget (cyclomatic 23) · ×1
  • InjectedScript.expectHitTarget (cyclomatic 23) REDACTED:1038 — InjectedScript.expectHitTarget has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · injectedScript.deepEquals (cyclomatic 23) · ×1
  • injectedScript.deepEquals (cyclomatic 23) REDACTED:1896 — injectedScript.deepEquals has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selectorParser.parseSelector (cyclomatic 23) · ×1
  • selectorParser.parseSelector (cyclomatic 23) packages/isomorphic/selectorParser.ts:44 — selectorParser.parseSelector has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CSharpLanguageGenerator._generateActionCall (cyclomatic 23) · ×1
  • CSharpLanguageGenerator._generateActionCall (cyclomatic 23) packages/isomorphic/codegen/csharp.ts:129 — CSharpLanguageGenerator._generateActionCall has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PythonLanguageGenerator._generateActionCall (cyclomatic 23) · ×1
  • PythonLanguageGenerator._generateActionCall (cyclomatic 23) packages/isomorphic/codegen/python.ts:107 — PythonLanguageGenerator._generateActionCall has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TraceModernizer._modernize_8_to_9 (cyclomatic 23) · ×1
  • TraceModernizer._modernize_8_to_9 (cyclomatic 23) packages/isomorphic/trace/traceModernizer.ts:487 — TraceModernizer._modernize_8_to_9 has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TraceLoader.load (cyclomatic 23) · ×1
  • TraceLoader.load (cyclomatic 23) packages/isomorphic/trace/traceLoader.ts:39 — TraceLoader.load has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FrameSelectors._callOnSelectorInternal (cyclomatic 23) · ×1
  • FrameSelectors._callOnSelectorInternal (cyclomatic 23) packages/playwright-core/src/server/frameSelectors.ts:233 — FrameSelectors._callOnSelectorInternal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 250, getResult, a function literal at line 274). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · HarTracer._onRequestFinished (cyclomatic 23) · ×1
  • HarTracer._onRequestFinished (cyclomatic 23) packages/playwright-core/src/server/har/harTracer.ts:330 — HarTracer._onRequestFinished has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HarTracer._onWebSocket (cyclomatic 23) · ×1
  • HarTracer._onWebSocket (cyclomatic 23) packages/playwright-core/src/server/har/harTracer.ts:447 — HarTracer._onWebSocket has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (recordMessage, updateTime, a function literal at line 514, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · HarBackend._harFindResponse (cyclomatic 23) · ×1
  • HarBackend._harFindResponse (cyclomatic 23) packages/playwright-core/src/server/harBackend.ts:96 — HarBackend._harFindResponse has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Response.serialize (cyclomatic 23) · ×1
  • Response.serialize (cyclomatic 23) packages/playwright-core/src/tools/backend/response.ts:172 — Response.serialize has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generateDotnetApi.renderMethod (cyclomatic 23) · ×1
  • generateDotnetApi.renderMethod (cyclomatic 23) utils/doclint/generateDotnetApi.js:509 — generateDotnetApi.renderMethod has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (generateDotnetApi.renderMethod::processArg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · selectorParser.parseAttributeSelector · ×1
  • selectorParser.parseAttributeSelector::readAttribute (cyclomatic 22) packages/isomorphic/selectorParser.ts:390 — selectorParser.parseAttributeSelector::readAttribute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Registry.constructor (cyclomatic 22) · ×1
  • Registry.constructor (cyclomatic 22) packages/playwright-core/src/server/registry/index.ts:510 — Registry.constructor has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (executablePathOrDie, a function literal at line 747, findExecutablePath, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Chromium.launchWithSeleniumHub (cyclomatic 22) · ×1
  • Chromium.launchWithSeleniumHub (cyclomatic 22) REDACTED:251 — Chromium.launchWithSeleniumHub has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · APIRequestContext.fetch (cyclomatic 22) · ×1
  • APIRequestContext.fetch (cyclomatic 22) packages/playwright-core/src/server/fetch.ts:196 — APIRequestContext.fetch has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · consoleTab.format (cyclomatic 22) · ×1
  • consoleTab.format (cyclomatic 22) REDACTED:221 — consoleTab.format has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stackTrace.parseStackFrame (cyclomatic 22) · ×1
  • stackTrace.parseStackFrame (cyclomatic 22) packages/utils/stackTrace.ts:45 — stackTrace.parseStackFrame has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 22) · ×1
  • (anonymous) (cyclomatic 22) utils/roll_browser.js:47 — (anonymous) has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · parseMember (cyclomatic 22) · ×1
  • parseMember (cyclomatic 22) utils/doclint/api_parser.js:91 — parseMember has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · selectorGenerator.cssEscapeCharacter (cyclomatic 21) · ×1
  • selectorGenerator.cssEscapeCharacter (cyclomatic 21) packages/injected/src/selectorGenerator.ts:550 — selectorGenerator.cssEscapeCharacter has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cssParser.parseCSS · ×1
  • cssParser.parseCSS::consumeSimpleSelector (cyclomatic 21) packages/isomorphic/cssParser.ts:172 — cssParser.parseCSS::consumeSimpleSelector has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebKit.defaultArgs (cyclomatic 21) · ×1
  • WebKit.defaultArgs (cyclomatic 21) packages/playwright-core/src/server/webkit/webkit.ts:101 — WebKit.defaultArgs has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextOutput.list (cyclomatic 21) · ×1
  • TextOutput.list (cyclomatic 21) packages/playwright-core/src/tools/cli-client/output.ts:143 — TextOutput.list has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · config.resolveCLIConfigForCLI (cyclomatic 21) · ×1
  • config.resolveCLIConfigForCLI (cyclomatic 21) packages/playwright-core/src/tools/mcp/config.ts:161 — config.resolveCLIConfigForCLI has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · config.configFromCLIOptions (cyclomatic 21) · ×1
  • config.configFromCLIOptions (cyclomatic 21) packages/playwright-core/src/tools/mcp/config.ts:303 — config.configFromCLIOptions has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · callTab.propertyToString (cyclomatic 21) · ×1
  • callTab.propertyToString (cyclomatic 21) REDACTED:102 — callTab.propertyToString has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · resizeView.ResizeView (cyclomatic 21) · ×1
  • resizeView.ResizeView (cyclomatic 21) packages/web/src/shared/resizeView.tsx:36 — resizeView.ResizeView has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · markdown.flattenWrappedLines (cyclomatic 21) · ×1
  • markdown.flattenWrappedLines (cyclomatic 21) utils/markdown.js:77 — markdown.flattenWrappedLines has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · parseOverrides.parseOverrides (cyclomatic 21) · ×1
  • parseOverrides.parseOverrides (cyclomatic 21) utils/generate_types/parseOverrides.js:26 — parseOverrides.parseOverrides has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (visit, serializeClass, visitProperties, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TypesGenerator.stringifySimpleType (cyclomatic 21) · ×1
  • TypesGenerator.stringifySimpleType (cyclomatic 21) utils/generate_types/index.js:420 — TypesGenerator.stringifySimpleType has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · patchLinksInText (cyclomatic 21) · ×1
  • patchLinksInText (cyclomatic 21) utils/doclint/documentation.js:755 — patchLinksInText has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 756, 807, 787, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 21) · ×1
  • (anonymous) (cyclomatic 21) utils/linux-browser-dependencies/inside_docker/list_dependencies.js:27 — (anonymous) has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sessionSidebar.SessionSidebar (cyclomatic 20) · ×1
  • sessionSidebar.SessionSidebar (cyclomatic 20) packages/dashboard/src/sessionSidebar.tsx:79 — sessionSidebar.SessionSidebar has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 150, 83, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · connect.ConnectApp (cyclomatic 20) · ×1
  • connect.ConnectApp (cyclomatic 20) packages/extension/src/ui/connect.tsx:39 — connect.ConnectApp has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 50, 137, 129). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RecordActionTool._shouldGenerateKeyPressFor (cyclomatic 20) · ×1
  • RecordActionTool._shouldGenerateKeyPressFor (cyclomatic 20) packages/injected/src/recorder/recorder.ts:609 — RecordActionTool._shouldGenerateKeyPressFor has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (JsonRecordActionTool._shouldGenerateKeyPressFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · JsonRecordActionTool._shouldGenerateKeyPressFor (cyclomatic 20) · ×1
  • JsonRecordActionTool._shouldGenerateKeyPressFor (cyclomatic 20) packages/injected/src/recorder/recorder.ts:810 — JsonRecordActionTool._shouldGenerateKeyPressFor has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (RecordActionTool._shouldGenerateKeyPressFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · istanbulCoverage.mergeIstanbulCoverage (cyclomatic 20) · ×1
  • istanbulCoverage.mergeIstanbulCoverage (cyclomatic 20) packages/isomorphic/istanbulCoverage.ts:72 — istanbulCoverage.mergeIstanbulCoverage has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Frame.expect (cyclomatic 20) · ×1
  • Frame.expect (cyclomatic 20) packages/playwright-core/src/server/frames.ts:1475 — Frame.expect has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElementHandle._setInputFiles (cyclomatic 20) · ×1
  • ElementHandle._setInputFiles (cyclomatic 20) packages/playwright-core/src/server/dom.ts:748 — ElementHandle._setInputFiles has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · config.validateBrowserConfig (cyclomatic 20) · ×1
  • config.validateBrowserConfig (cyclomatic 20) packages/playwright-core/src/tools/mcp/config.ts:227 — config.validateBrowserConfig has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · program.decorateMCPCommand (cyclomatic 20) · ×1
  • program.decorateMCPCommand (cyclomatic 20) packages/playwright-core/src/tools/mcp/program.ts:34 — program.decorateMCPCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 116, 171, 90, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · actionList.renderAction (cyclomatic 20) · ×1
  • actionList.renderAction (cyclomatic 20) packages/trace-viewer/src/ui/actionList.tsx:135 — actionList.renderAction has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ariaModeView.AriaModeView (cyclomatic 20) · ×1
  • ariaModeView.AriaModeView (cyclomatic 20) packages/trace-viewer/src/ui/ariaModeView.tsx:148 — ariaModeView.AriaModeView has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sourceTab.useSources (cyclomatic 20) · ×1
  • sourceTab.useSources (cyclomatic 20) packages/trace-viewer/src/ui/sourceTab.tsx:37 — sourceTab.useSources has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · build_deps_true.collectImports (cyclomatic 20) · ×1
  • build_deps_true.collectImports (cyclomatic 20) utils/build_deps_true.js:114 — build_deps_true.collectImports has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TypesGenerator.classBody (cyclomatic 20) · ×1
  • TypesGenerator.classBody (cyclomatic 20) utils/generate_types/index.js:261 — TypesGenerator.classBody has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 281). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Helper.getNetworkErrorStatusText (cyclomatic 19) · ×1
  • Helper.getNetworkErrorStatusText (cyclomatic 19) browser_patches/firefox/juggler/Helper.js:109 — Helper.getNetworkErrorStatusText has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · InjectedScript.selectOptions (cyclomatic 19) · ×1
  • InjectedScript.selectOptions (cyclomatic 19) REDACTED:857 — InjectedScript.selectOptions has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (filter, filter::matchesLabel). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · urlMatch.resolveGlobBase (cyclomatic 19) · ×1
  • urlMatch.resolveGlobBase (cyclomatic 19) REDACTED:214 — urlMatch.resolveGlobBase has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 232, mapToken). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · BidiConnection._dispatchMessage (cyclomatic 19) · ×1
  • BidiConnection._dispatchMessage (cyclomatic 19) packages/playwright-core/src/server/bidi/bidiConnection.ts:70 — BidiConnection._dispatchMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BidiNetworkManager._onBeforeRequestSent (cyclomatic 19) · ×1
  • BidiNetworkManager._onBeforeRequestSent (cyclomatic 19) packages/playwright-core/src/server/bidi/bidiNetworkManager.ts:62 — BidiNetworkManager._onBeforeRequestSent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: bidiNetworkManager.resourceTypeFromBidi (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ElementHandle._retryAction (cyclomatic 19) · ×1
  • ElementHandle._retryAction (cyclomatic 19) packages/playwright-core/src/server/dom.ts:330 — ElementHandle._retryAction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · attachmentsTab.AttachmentsTab (cyclomatic 19) · ×1
  • attachmentsTab.AttachmentsTab (cyclomatic 19) packages/trace-viewer/src/ui/attachmentsTab.tsx:95 — attachmentsTab.AttachmentsTab has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 97, 125, 145). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · _innerRenderNodes (cyclomatic 19) · ×1
  • _innerRenderNodes (cyclomatic 19) utils/doclint/dotnetXmlDocumentation.js:36 — _innerRenderNodes has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 48, handleListItem). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · selectorGenerator.cssFallback (cyclomatic 18) · ×1
  • selectorGenerator.cssFallback (cyclomatic 18) packages/injected/src/selectorGenerator.ts:359 — selectorGenerator.cssFallback has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InjectedScript.setupHitTargetInterceptor (cyclomatic 18) · ×1
  • InjectedScript.setupHitTargetInterceptor (cyclomatic 18) REDACTED:1154 — InjectedScript.setupHitTargetInterceptor has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (listener, stop). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Overlay.setUIState (cyclomatic 18) · ×1
  • Overlay.setUIState (cyclomatic 18) packages/injected/src/recorder/recorder.ts:1184 — Overlay.setUIState has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · selectorParser.splitSelectorByFrame (cyclomatic 18) · ×1
  • selectorParser.splitSelectorByFrame (cyclomatic 18) packages/isomorphic/selectorParser.ts:108 — selectorParser.splitSelectorByFrame has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · java.formatContextOptions (cyclomatic 18) · ×1
  • java.formatContextOptions (cyclomatic 18) packages/isomorphic/codegen/java.ts:254 — java.formatContextOptions has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · imageUtils.scaleImageToSize (cyclomatic 18) · ×1
  • imageUtils.scaleImageToSize (cyclomatic 18) packages/isomorphic/imageUtils.ts:43 — imageUtils.scaleImageToSize has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · urlMatch.globToRegexPattern (cyclomatic 18) · ×1
  • urlMatch.globToRegexPattern (cyclomatic 18) REDACTED:30 — urlMatch.globToRegexPattern has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Route._innerFulfill (cyclomatic 18) · ×1
  • Route._innerFulfill (cyclomatic 18) packages/playwright-core/src/client/network.ts:386 — Route._innerFulfill has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dependencies.validateDependenciesWindows (cyclomatic 18) · ×1
  • dependencies.validateDependenciesWindows (cyclomatic 18) packages/playwright-core/src/server/registry/dependencies.ts:150 — dependencies.validateDependenciesWindows has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FFBrowserContext.initialize (cyclomatic 18) · ×1
  • FFBrowserContext.initialize (cyclomatic 18) packages/playwright-core/src/server/firefox/ffBrowser.ts:172 — FFBrowserContext.initialize has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WKPage._onConsoleMessage (cyclomatic 18) · ×1
  • WKPage._onConsoleMessage (cyclomatic 18) packages/playwright-core/src/server/webkit/wkPage.ts:538 — WKPage._onConsoleMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · callTab.parseSerializedValue (cyclomatic 18) · ×1
  • callTab.parseSerializedValue (cyclomatic 18) REDACTED:129 — callTab.parseSerializedValue has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · consoleTab.ConsoleTab (cyclomatic 18) · ×1
  • consoleTab.ConsoleTab (cyclomatic 18) REDACTED:165 — consoleTab.ConsoleTab has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 177, 173). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ariaModeView.collectAriaModeTargets (cyclomatic 18) · ×1
  • ariaModeView.collectAriaModeTargets (cyclomatic 18) packages/trace-viewer/src/ui/ariaModeView.tsx:48 — ariaModeView.collectAriaModeTargets has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapshotTab.InspectModeController (cyclomatic 18) · ×1
  • snapshotTab.InspectModeController (cyclomatic 18) packages/trace-viewer/src/ui/snapshotTab.tsx:291 — snapshotTab.InspectModeController has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 292). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · socksProxy.parsePattern (cyclomatic 18) · ×1
  • socksProxy.parsePattern (cyclomatic 18) REDACTED:334 — socksProxy.parsePattern has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 338, 347, 366, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · generateDotnetApi.renderMember (cyclomatic 18) · ×1
  • generateDotnetApi.renderMember (cyclomatic 18) utils/doclint/generateDotnetApi.js:335 — generateDotnetApi.renderMember has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selectorUtils.matchesAttributePart (cyclomatic 17) · ×1
  • selectorUtils.matchesAttributePart (cyclomatic 17) packages/injected/src/selectorUtils.ts:31 — selectorUtils.matchesAttributePart has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · selectorUtils.elementText (cyclomatic 17) · ×1
  • selectorUtils.elementText (cyclomatic 17) packages/injected/src/selectorUtils.ts:67 — selectorUtils.elementText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InjectedScript.querySelectorAll (cyclomatic 17) · ×1
  • InjectedScript.querySelectorAll (cyclomatic 17) REDACTED:382 — InjectedScript.querySelectorAll has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · traceModel.adjustMonotonicTime (cyclomatic 17) · ×1
  • traceModel.adjustMonotonicTime (cyclomatic 17) packages/isomorphic/trace/traceModel.ts:342 — traceModel.adjustMonotonicTime has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Frame.gotoImpl (cyclomatic 17) · ×1
  • Frame.gotoImpl (cyclomatic 17) packages/playwright-core/src/server/frames.ts:697 — Frame.gotoImpl has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebSocketTransport._connect (cyclomatic 17) · ×1
  • WebSocketTransport._connect (cyclomatic 17) packages/playwright-core/src/server/transport.ts:81 — WebSocketTransport._connect has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 96, 109, 121). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · WKPage._initializeSessionMayThrow (cyclomatic 17) · ×1
  • WKPage._initializeSessionMayThrow (cyclomatic 17) packages/playwright-core/src/server/webkit/wkPage.ts:164 — WKPage._initializeSessionMayThrow has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · localUtils.zip (cyclomatic 17) · ×1
  • localUtils.zip (cyclomatic 17) packages/playwright-core/src/server/localUtils.ts:44 — localUtils.zip has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Connection.dispatch (cyclomatic 17) · ×1
  • Connection.dispatch (cyclomatic 17) packages/playwright-core/src/client/connection.ts:236 — Connection.dispatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · treeView.TreeItemHeader (cyclomatic 17) · ×1
  • treeView.TreeItemHeader (cyclomatic 17) packages/web/src/components/treeView.tsx:239 — treeView.TreeItemHeader has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · check_deps.innerCheckDeps (cyclomatic 17) · ×1
  • check_deps.innerCheckDeps (cyclomatic 17) utils/check_deps.js:65 — check_deps.innerCheckDeps has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (check_deps.innerCheckDeps::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Type.fromParsedType (cyclomatic 17) · ×1
  • Type.fromParsedType (cyclomatic 17) utils/doclint/documentation.js:523 — Type.fromParsedType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: documentation.patchLinksInText (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ApiParser.parseArgument (cyclomatic 17) · ×1
  • ApiParser.parseArgument (cyclomatic 17) utils/doclint/api_parser.js:146 — ApiParser.parseArgument has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · api_parser.applyTemplates · ×1
  • api_parser.applyTemplates::visit (cyclomatic 17) utils/doclint/api_parser.js:334 — api_parser.applyTemplates::visit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generateDotnetApi.renderMethod · ×1
  • generateDotnetApi.renderMethod::processArg (cyclomatic 17) utils/doclint/generateDotnetApi.js:590 — generateDotnetApi.renderMethod::processArg has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (generateDotnetApi.renderMethod) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · generate_dotnet_channels.processCustomType (cyclomatic 17) · ×1
  • generate_dotnet_channels.processCustomType (cyclomatic 17) utils/generate_dotnet_channels.js:235 — generate_dotnet_channels.processCustomType has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · create.AwaitExpression (cyclomatic 17) · ×1
  • create.AwaitExpression (cyclomatic 17) utils/eslint-plugin-progress/index.js:157 — create.AwaitExpression has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ExecutionContext.evaluateFunction (cyclomatic 16) · ×1
  • ExecutionContext.evaluateFunction (cyclomatic 16) browser_patches/firefox/juggler/content/Runtime.js:396 — ExecutionContext.evaluateFunction has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PageHandler.['Page.dispatchMouseEvent'] (cyclomatic 16) · ×1
  • PageHandler.['Page.dispatchMouseEvent'] (cyclomatic 16) REDACTED:483 — PageHandler.['Page.dispatchMouseEvent'] has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 523, sendEvents). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · annotations.Annotations · ×1
  • annotations.Annotations::onLayerKeyDown (cyclomatic 16) packages/dashboard/src/annotations.tsx:297 — annotations.Annotations::onLayerKeyDown has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · roleUtils.parseCSSContentPropertyAsString (cyclomatic 16) · ×1
  • roleUtils.parseCSSContentPropertyAsString (cyclomatic 16) packages/injected/src/roleUtils.ts:520 — roleUtils.parseCSSContentPropertyAsString has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · codeFrame.tokenColor (cyclomatic 16) · ×1
  • codeFrame.tokenColor (cyclomatic 16) packages/isomorphic/codeFrame.ts:164 — codeFrame.tokenColor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · cssTokenizer.escapeIdent (cyclomatic 16) · ×1
  • cssTokenizer.escapeIdent (cyclomatic 16) packages/isomorphic/cssTokenizer.ts:892 — cssTokenizer.escapeIdent has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · JavaScriptLanguageGenerator.generateAction (cyclomatic 16) · ×1
  • JavaScriptLanguageGenerator.generateAction (cyclomatic 16) packages/isomorphic/codegen/javascript.ts:53 — JavaScriptLanguageGenerator.generateAction has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · traceModel.mergeActionsAndUpdateTimingSameTrace (cyclomatic 16) · ×1
  • traceModel.mergeActionsAndUpdateTimingSameTrace (cyclomatic 16) packages/isomorphic/trace/traceModel.ts:291 — traceModel.mergeActionsAndUpdateTimingSameTrace has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EventEmitter.removeListener (cyclomatic 16) · ×1
  • EventEmitter.removeListener (cyclomatic 16) packages/playwright-core/src/client/eventEmitter.ts:185 — EventEmitter.removeListener has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FrameSelectors._queryFrames (cyclomatic 16) · ×1
  • FrameSelectors._queryFrames (cyclomatic 16) packages/playwright-core/src/server/frameSelectors.ts:171 — FrameSelectors._queryFrames has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 177, query, a function literal at line 204). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · input.buildLayoutClosure (cyclomatic 16) · ×1
  • input.buildLayoutClosure (cyclomatic 16) packages/playwright-core/src/server/input.ts:307 — input.buildLayoutClosure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HarTracer._onResponse (cyclomatic 16) · ×1
  • HarTracer._onResponse (cyclomatic 16) packages/playwright-core/src/server/har/harTracer.ts:570 — HarTracer._onResponse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dependencies.validateDependenciesLinux (cyclomatic 16) · ×1
  • dependencies.validateDependenciesLinux (cyclomatic 16) packages/playwright-core/src/server/registry/dependencies.ts:213 — dependencies.validateDependenciesLinux has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CRBrowser._onAttachedToTarget (cyclomatic 16) · ×1
  • CRBrowser._onAttachedToTarget (cyclomatic 16) packages/playwright-core/src/server/chromium/crBrowser.ts:171 — CRBrowser._onAttachedToTarget has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Connection.sendMessageToServer (cyclomatic 16) · ×1
  • Connection.sendMessageToServer (cyclomatic 16) packages/playwright-core/src/client/connection.ts:180 — Connection.sendMessageToServer has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · installActions.installBrowsers (cyclomatic 16) · ×1
  • installActions.installBrowsers (cyclomatic 16) packages/playwright-core/src/cli/installActions.ts:90 — installActions.installBrowsers has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Session.startDaemon (cyclomatic 16) · ×1
  • Session.startDaemon (cyclomatic 16) packages/playwright-core/src/tools/cli-client/session.ts:114 — Session.startDaemon has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · snapshotTab.collectSnapshots (cyclomatic 16) · ×1
  • snapshotTab.collectSnapshots (cyclomatic 16) packages/trace-viewer/src/ui/snapshotTab.tsx:403 — snapshotTab.collectSnapshots has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · compare.compare (cyclomatic 16) · ×1
  • compare.compare (cyclomatic 16) packages/utils/image_tools/compare.ts:36 — compare.compare has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Member.filterForLanguage (cyclomatic 16) · ×1
  • Member.filterForLanguage (cyclomatic 16) utils/doclint/documentation.js:395 — Member.filterForLanguage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: documentation.patchLinksInText (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · generate_channels.inlineType (cyclomatic 16) · ×1
  • generate_channels.inlineType (cyclomatic 16) utils/generate_channels.js:34 — generate_channels.inlineType has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TypesGenerator.generateTypes (cyclomatic 16) · ×1
  • TypesGenerator.generateTypes (cyclomatic 16) utils/generate_types/index.js:80 — TypesGenerator.generateTypes has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 95, 114, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · validate_deps.isEntryUsed (cyclomatic 16) · ×1
  • validate_deps.isEntryUsed (cyclomatic 16) utils/validate_deps.js:177 — validate_deps.isEntryUsed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (computed) (cyclomatic 16) · ×1
  • (computed) (cyclomatic 16) REDACTED:483 — (computed) has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 523, sendEvents, a function literal at line 496). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · generate_channels.generateChannels (cognitive 239) · ×1
  • generate_channels.generateChannels (cognitive 239) utils/generate_channels.js:239 — generate_channels.generateChannels has cognitive complexity 239 (threshold 15). Drivers by points: if/else 24 (95 pts), ternaries 16 (73 pts), loops 15 (46 pts), boolean chains 25 (nesting depth added 159). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roleUtils.getTextAlternativeInternal (cognitive 230) · ×1
  • roleUtils.getTextAlternativeInternal (cognitive 230) packages/injected/src/roleUtils.ts:763 — roleUtils.getTextAlternativeInternal has cognitive complexity 230 (threshold 15). Drivers by points: if/else 59 (152 pts), boolean chains 58, loops 4 (12 pts), ternaries 3 (8 pts) (nesting depth added 106). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · snapshotterInjected.frameSnapshotStreamer (cognitive 179) · ×1
  • snapshotterInjected.frameSnapshotStreamer (cognitive 179) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:34 — snapshotterInjected.frameSnapshotStreamer has cognitive complexity 179 (threshold 15). Drivers by points: if/else 80 (108 pts), boolean chains 38, ternaries 9 (17 pts), loops 8 (10 pts), error handling 4 (6 pts) (nesting depth added 40). Of this number, 41 points are the body's own statements and 138 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Streamer.captureSnapshot · ×1
  • Streamer.captureSnapshot::visitNode (cognitive 118) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:384 — Streamer.captureSnapshot::visitNode has cognitive complexity 118 (threshold 15). Drivers by points: if/else 45 (69 pts), boolean chains 30, ternaries 6 (14 pts), loops 3 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · locatorGenerators.innerAsLocators (cognitive 113) · ×1
  • locatorGenerators.innerAsLocators (cognitive 113) packages/isomorphic/locatorGenerators.ts:86 — locatorGenerators.innerAsLocators has cognitive complexity 113 (threshold 15). Drivers by points: if/else 37 (93 pts), ternaries 3 (10 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 65). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · run (cognitive 97) · ×1
  • run (cognitive 97) utils/doclint/cli.js:50 — run has cognitive complexity 97 (threshold 15). Drivers by points: if/else 20 (55 pts), loops 11 (28 pts), boolean chains 6, ternaries 1 (4 pts), error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 57). Of this number, 60 points are the body's own statements and 37 belong to 12 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uiModeView.UIModeView (cognitive 85) · ×1
  • uiModeView.UIModeView (cognitive 85) packages/trace-viewer/src/ui/uiModeView.tsx:97 — uiModeView.UIModeView has cognitive complexity 85 (threshold 15). Drivers by points: if/else 30 (38 pts), boolean chains 30, loops 7 (10 pts), ternaries 7 (nesting depth added 11). Of this number, 18 points are the body's own statements and 67 belong to 19 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · APIRequestContext._sendRequest (cognitive 74) · ×1
  • APIRequestContext._sendRequest (cognitive 74) packages/playwright-core/src/server/fetch.ts:328 — APIRequestContext._sendRequest has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 20, ternaries 13, error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 3 of the 74 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 389, 393, 350, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · minimist.minimist (cognitive 74) · ×1
  • minimist.minimist (cognitive 74) packages/playwright-core/src/tools/cli-client/minimist.ts:36 — minimist.minimist has cognitive complexity 74 (threshold 15). Drivers by points: if/else 23 (45 pts), ternaries 3 (14 pts), boolean chains 8, loops 5 (7 pts) (nesting depth added 35). Of this number, 70 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SnapshotRenderer.render · ×1
  • SnapshotRenderer.render::visit (cognitive 73) REDACTED:89 — SnapshotRenderer.render::visit has cognitive complexity 73 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 20, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · program.program (cognitive 71) · ×1
  • program.program (cognitive 71) packages/playwright-core/src/tools/cli-client/program.ts:76 — program.program has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (46 pts), ternaries 8 (15 pts), boolean chains 7, loops 1 (2 pts), match/switch 1 (nesting depth added 29). Of this number, 67 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateDotnetApi.translateType (cognitive 68) · ×1
  • generateDotnetApi.translateType (cognitive 68) utils/doclint/generateDotnetApi.js:729 — generateDotnetApi.translateType has cognitive complexity 68 (threshold 15). Drivers by points: if/else 29 (50 pts), ternaries 5 (10 pts), boolean chains 8 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utilityScriptSerializers.parseEvaluationResultValue (cognitive 67) · ×1
  • utilityScriptSerializers.parseEvaluationResultValue (cognitive 67) REDACTED:151 — utilityScriptSerializers.parseEvaluationResultValue has cognitive complexity 67 (threshold 15). Drivers by points: if/else 24 (54 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utilityScriptSerializers.innerSerialize (cognitive 67) · ×1
  • utilityScriptSerializers.innerSerialize (cognitive 67) REDACTED:253 — utilityScriptSerializers.innerSerialize has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34 (48 pts), loops 5 (11 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InjectedScript.expectSingleElement (cognitive 63) · ×1
  • InjectedScript.expectSingleElement (cognitive 63) REDACTED:1537 — InjectedScript.expectSingleElement has cognitive complexity 63 (threshold 15). Drivers by points: if/else 42 (54 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · selectorGenerator.buildTextCandidates (cognitive 61) · ×1
  • selectorGenerator.buildTextCandidates (cognitive 61) packages/injected/src/selectorGenerator.ts:280 — selectorGenerator.buildTextCandidates has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 7 (21 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard.Dashboard (cognitive 60) · ×1
  • dashboard.Dashboard (cognitive 60) REDACTED:67 — dashboard.Dashboard has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 20, ternaries 12 (13 pts) (nesting depth added 2). Of this number, 31 points are the body's own statements and 29 belong to 22 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · hostPlatform.calculatePlatform (cognitive 59) · ×1
  • hostPlatform.calculatePlatform (cognitive 59) packages/utils/hostPlatform.ts:41 — hostPlatform.calculatePlatform has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (53 pts), boolean chains 6 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · webSocketMock.inject (cognitive 57) · ×1
  • webSocketMock.inject (cognitive 57) packages/injected/src/webSocketMock.ts:38 — webSocketMock.inject has cognitive complexity 57 (threshold 15). Drivers by points: if/else 42 (43 pts), boolean chains 8, ternaries 3 (4 pts), loops 2 (nesting depth added 2). Of this number, 50 points are the body's own statements and 7 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · markdown.buildTree (cognitive 57) · ×1
  • markdown.buildTree (cognitive 57) utils/markdown.js:116 — markdown.buildTree has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (40 pts), loops 6 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 31). Of this number, 52 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · APIRequestContext._innerFetch (cognitive 53) · ×1
  • APIRequestContext._innerFetch (cognitive 53) packages/playwright-core/src/client/fetch.ts:197 — APIRequestContext._innerFetch has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 10, loops 3 (9 pts), ternaries 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameSession._initialize (cognitive 53) · ×1
  • FrameSession._initialize (cognitive 53) REDACTED:472 — FrameSession._initialize has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 10, loops 4 (6 pts), error handling 1 (2 pts) (nesting depth added 17). Of this number, 46 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementHandle._performPointerAction (cognitive 53) · ×1
  • ElementHandle._performPointerAction (cognitive 53) packages/playwright-core/src/server/dom.ts:402 — ElementHandle._performPointerAction has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (36 pts), ternaries 8 (14 pts), boolean chains 3 (nesting depth added 17). Of this number, 36 points are the body's own statements and 17 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectorEvaluatorImpl._matchesParents (cognitive 51) · ×1
  • SelectorEvaluatorImpl._matchesParents (cognitive 51) REDACTED:265 — SelectorEvaluatorImpl._matchesParents has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (43 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 29). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to one function literal inside it that branches (line 268). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Response.serialize (cognitive 50) · ×1
  • Response.serialize (cognitive 50) packages/playwright-core/src/tools/backend/response.ts:172 — Response.serialize has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (33 pts), ternaries 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · consoleTab.useConsoleTabModel (cognitive 50) · ×1
  • consoleTab.useConsoleTabModel (cognitive 50) REDACTED:64 — consoleTab.useConsoleTabModel has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 7 (18 pts), boolean chains 10, loops 1 (nesting depth added 22). None of this is in the body itself: all 50 points belong to 4 function literals inside it that branch (lines 65, 70, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · generateNameDefault (cognitive 50) · ×1
  • generateNameDefault (cognitive 50) utils/doclint/generateDotnetApi.js:411 — generateNameDefault has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 11, loops 2 (6 pts), other 2 (nesting depth added 23). Of this number, 37 points are the body's own statements and 13 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HarBackend._harFindResponse (cognitive 49) · ×1
  • HarBackend._harFindResponse (cognitive 49) packages/playwright-core/src/server/harBackend.ts:96 — HarBackend._harFindResponse has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (36 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · traceConsole.traceConsole (cognitive 49) · ×1
  • traceConsole.traceConsole (cognitive 49) REDACTED:21 — traceConsole.traceConsole has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 4 (9 pts), boolean chains 7, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Response._build (cognitive 48) · ×1
  • Response._build (cognitive 48) packages/playwright-core/src/tools/backend/response.ts:267 — Response._build has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (29 pts), ternaries 6 (11 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selectorGenerator.generateSelectorFor (cognitive 47) · ×1
  • selectorGenerator.generateSelectorFor (cognitive 47) packages/injected/src/selectorGenerator.ts:121 — selectorGenerator.generateSelectorFor has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 10, ternaries 2 (6 pts), loops 4 (5 pts) (nesting depth added 18). Of this number, 44 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jsonSchema.validate (cognitive 47) · ×1
  • jsonSchema.validate (cognitive 47) REDACTED:29 — jsonSchema.validate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 4 (9 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workbench.PartitionedWorkbench (cognitive 47) · ×1
  • workbench.PartitionedWorkbench (cognitive 47) packages/trace-viewer/src/ui/workbench.tsx:75 — workbench.PartitionedWorkbench has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 16, ternaries 8, loops 1 (2 pts) (nesting depth added 4). Of this number, 22 points are the body's own statements and 25 belong to 10 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · selectorUtils.elementText (cognitive 46) · ×1
  • selectorUtils.elementText (cognitive 46) packages/injected/src/selectorUtils.ts:67 — selectorUtils.elementText has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (38 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · selectorParser.parseSelector (cognitive 46) · ×1
  • selectorParser.parseSelector (cognitive 46) packages/isomorphic/selectorParser.ts:44 — selectorParser.parseSelector has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (30 pts), boolean chains 6, ternaries 2 (6 pts), error handling 1 (3 pts), loops 1 (nesting depth added 26). Of this number, 45 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TraceModernizer._modernize_8_to_9 (cognitive 46) · ×1
  • TraceModernizer._modernize_8_to_9 (cognitive 46) packages/isomorphic/trace/traceModernizer.ts:487 — TraceModernizer._modernize_8_to_9 has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · screenshotter.inPagePrepareForScreenshots (cognitive 46) · ×1
  • screenshotter.inPagePrepareForScreenshots (cognitive 46) packages/playwright-core/src/server/screenshotter.ts:49 — screenshotter.inPagePrepareForScreenshots has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 7 (13 pts), error handling 3 (11 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 22). Of this number, 16 points are the body's own statements and 30 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InjectedScript.elementState (cognitive 45) · ×1
  • InjectedScript.elementState (cognitive 45) REDACTED:789 — InjectedScript.elementState has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 11 (15 pts), boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraceLoader.load (cognitive 45) · ×1
  • TraceLoader.load (cognitive 45) packages/isomorphic/trace/traceLoader.ts:39 — TraceLoader.load has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 5 (12 pts), boolean chains 8 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · innerRenderMdNode (cognitive 45) · ×1
  • innerRenderMdNode (cognitive 45) utils/markdown.js:306 — innerRenderMdNode has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 11, loops 5 (10 pts), ternaries 2 (4 pts), match/switch 1 (2 pts), other 1 (nesting depth added 13). Of this number, 42 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codeMirrorWrapper.CodeMirrorWrapper (cognitive 44) · ×1
  • codeMirrorWrapper.CodeMirrorWrapper (cognitive 44) packages/web/src/components/codeMirrorWrapper.tsx:52 — codeMirrorWrapper.CodeMirrorWrapper has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 13, loops 5 (10 pts) (nesting depth added 12). None of this is in the body itself: all 44 points belong to 4 function literals inside it that branch (lines 131, 79, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · cssParser.parseCSS · ×1
  • cssParser.parseCSS::consumeSimpleSelector (cognitive 43) packages/isomorphic/cssParser.ts:172 — cssParser.parseCSS::consumeSimpleSelector has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roleUtils.innerAccumulatedElementText (cognitive 42) · ×1
  • roleUtils.innerAccumulatedElementText (cognitive 42) packages/injected/src/roleUtils.ts:1098 — roleUtils.innerAccumulatedElementText has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (15 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 16). Of this number, 27 points are the body's own statements and 15 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · urlMatch.globToRegexPattern (cognitive 42) · ×1
  • urlMatch.globToRegexPattern (cognitive 42) REDACTED:30 — urlMatch.globToRegexPattern has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (29 pts), ternaries 2 (6 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · selectorGenerator.buildNoTextCandidates (cognitive 41) · ×1
  • selectorGenerator.buildNoTextCandidates (cognitive 41) packages/injected/src/selectorGenerator.ts:204 — selectorGenerator.buildNoTextCandidates has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 7 (12 pts), boolean chains 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ariaSnapshot.parseAriaSnapshot · ×1
  • ariaSnapshot.parseAriaSnapshot::convertMap (cognitive 41) packages/isomorphic/ariaSnapshot.ts:175 — ariaSnapshot.parseAriaSnapshot::convertMap has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 14, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.doFetch (cognitive 41) · ×1
  • main.doFetch (cognitive 41) packages/trace-viewer/src/sw/main.ts:138 — main.doFetch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 3, ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Filter.matches (cognitive 40) · ×1
  • Filter.matches (cognitive 40) packages/html-reporter/src/filter.ts:119 — Filter.matches has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 7 (16 pts), boolean chains 2 (nesting depth added 17). Of this number, 18 points are the body's own statements and 22 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Page.expectScreenshot (cognitive 40) · ×1
  • Page.expectScreenshot (cognitive 40) packages/playwright-core/src/server/page.ts:718 — Page.expectScreenshot has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 9, ternaries 4 (6 pts), error handling 1, loops 1 (nesting depth added 9). Of this number, 33 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Frame._expectInternal (cognitive 40) · ×1
  • Frame._expectInternal (cognitive 40) packages/playwright-core/src/server/frames.ts:1537 — Frame._expectInternal has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 9, ternaries 3 (6 pts) (nesting depth added 11). Of this number, 33 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementHandle._retryAction (cognitive 40) · ×1
  • ElementHandle._retryAction (cognitive 40) packages/playwright-core/src/server/dom.ts:330 — ElementHandle._retryAction has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · treeView.TreeView (cognitive 40) · ×1
  • treeView.TreeView (cognitive 40) packages/web/src/components/treeView.tsx:53 — treeView.TreeView has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 40 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 143, 107, 94, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · injectedScript.deepEquals (cognitive 39) · ×1
  • injectedScript.deepEquals (cognitive 39) REDACTED:1896 — injectedScript.deepEquals has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CRNetworkManager._onRequest (cognitive 39) · ×1
  • CRNetworkManager._onRequest (cognitive 39) packages/playwright-core/src/server/chromium/crNetworkManager.ts:295 — CRNetworkManager._onRequest has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 17, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · traceRequests.traceRequest (cognitive 39) · ×1
  • traceRequests.traceRequest (cognitive 39) REDACTED:75 — traceRequests.traceRequest has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recorder.Recorder (cognitive 39) · ×1
  • recorder.Recorder (cognitive 39) packages/recorder/src/recorder.tsx:37 — recorder.Recorder has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (11 pts), ternaries 9 (10 pts), loops 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 12 of the 39 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 83, 112, 139, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · build_deps_true.collectImports (cognitive 39) · ×1
  • build_deps_true.collectImports (cognitive 39) utils/build_deps_true.js:114 — build_deps_true.collectImports has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FilePickerOverride._createPicker (cognitive 36) · ×1
  • FilePickerOverride._createPicker (cognitive 36) browser_patches/firefox/juggler/TargetRegistry.js:139 — FilePickerOverride._createPicker has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19, ternaries 16, boolean chains 1. Of this number, 31 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FrameSelectors._callOnSelectorInternal (cognitive 36) · ×1
  • FrameSelectors._callOnSelectorInternal (cognitive 36) packages/playwright-core/src/server/frameSelectors.ts:233 — FrameSelectors._callOnSelectorInternal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 4 (8 pts), boolean chains 6, loops 1 (nesting depth added 14). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 250, getResult, a function literal at line 274). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · generateDotnetApi.renderMember (cognitive 36) · ×1
  • generateDotnetApi.renderMember (cognitive 36) utils/doclint/generateDotnetApi.js:335 — generateDotnetApi.renderMember has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 2 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selectorGenerator.cssFallback (cognitive 35) · ×1
  • selectorGenerator.cssFallback (cognitive 35) packages/injected/src/selectorGenerator.ts:359 — selectorGenerator.cssFallback has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). Of this number, 32 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextOutput.list (cognitive 35) · ×1
  • TextOutput.list (cognitive 35) packages/playwright-core/src/tools/cli-client/output.ts:143 — TextOutput.list has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 7 (13 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ariaSnapshot.matchesNode (cognitive 34) · ×1
  • ariaSnapshot.matchesNode (cognitive 34) REDACTED:382 — ariaSnapshot.matchesNode has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 19, if/else 15. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · roleSelectorEngine.queryRole · ×1
  • roleSelectorEngine.queryRole::match (cognitive 34) packages/injected/src/roleSelectorEngine.ts:145 — roleSelectorEngine.queryRole::match has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 10 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browserActions.launchContext (cognitive 34) · ×1
  • browserActions.launchContext (cognitive 34) REDACTED:66 — browserActions.launchContext has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (26 pts), error handling 2 (4 pts), boolean chains 2, ternaries 2 (nesting depth added 6). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · timeline.Timeline (cognitive 34) · ×1
  • timeline.Timeline (cognitive 34) packages/trace-viewer/src/ui/timeline.tsx:37 — timeline.Timeline has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 8, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 90, 66, 135, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · workbenchLoader.WorkbenchLoader (cognitive 34) · ×1
  • workbenchLoader.WorkbenchLoader (cognitive 34) REDACTED:27 — workbenchLoader.WorkbenchLoader has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 11, ternaries 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 103, 148, 56, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentation.processCodeGroups (cognitive 34) · ×1
  • documentation.processCodeGroups (cognitive 34) utils/doclint/documentation.js:913 — documentation.processCodeGroups has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · patchLinksInText (cognitive 34) · ×1
  • patchLinksInText (cognitive 34) utils/doclint/documentation.js:755 — patchLinksInText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 13). None of this is in the body itself: all 34 points belong to 5 function literals inside it that branch (lines 756, 807, 787, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · cookieStore.parseRawCookie (cognitive 33) · ×1
  • cookieStore.parseRawCookie (cognitive 33) packages/playwright-core/src/server/cookieStore.ts:135 — cookieStore.parseRawCookie has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BidiConnection._dispatchMessage (cognitive 33) · ×1
  • BidiConnection._dispatchMessage (cognitive 33) packages/playwright-core/src/server/bidi/bidiConnection.ts:70 — BidiConnection._dispatchMessage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WVPage._onConsoleMessage (cognitive 33) · ×1
  • WVPage._onConsoleMessage (cognitive 33) packages/playwright-core/src/server/webkit/webview/wvPage.ts:532 — WVPage._onConsoleMessage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 13, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serializers.innerParseSerializedValue (cognitive 33) · ×1
  • serializers.innerParseSerializedValue (cognitive 33) REDACTED:35 — serializers.innerParseSerializedValue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (29 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · check_deps.innerCheckDeps (cognitive 33) · ×1
  • check_deps.innerCheckDeps (cognitive 33) utils/check_deps.js:65 — check_deps.innerCheckDeps has cognitive complexity 33 (threshold 15). Drivers by points: if/else 43 (81 pts), loops 11 (23 pts), boolean chains 16, ternaries 4 (7 pts), error handling 2 (4 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (check_deps.innerCheckDeps::visit, check_deps.innerCheckDeps::calculateDeps, check_deps.innerCheckDeps::allowImport) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ariaSnapshot.renderAriaTreeAsJSON · ×1
  • ariaSnapshot.renderAriaTreeAsJSON::visit (cognitive 32) REDACTED:473 — ariaSnapshot.renderAriaTreeAsJSON::visit has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 10, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · BidiNetworkManager._onBeforeRequestSent (cognitive 32) · ×1
  • BidiNetworkManager._onBeforeRequestSent (cognitive 32) packages/playwright-core/src/server/bidi/bidiNetworkManager.ts:62 — BidiNetworkManager._onBeforeRequestSent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate_deps.validateDirectory (cognitive 32) · ×1
  • validate_deps.validateDirectory (cognitive 32) utils/validate_deps.js:126 — validate_deps.validateDirectory has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 7 (15 pts), boolean chains 1 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · InjectedScript.expectHitTarget (cognitive 31) · ×1
  • InjectedScript.expectHitTarget (cognitive 31) REDACTED:1038 — InjectedScript.expectHitTarget has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraceModel.constructor (cognitive 31) · ×1
  • TraceModel.constructor (cognitive 31) packages/isomorphic/trace/traceModel.ts:98 — TraceModel.constructor has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 13, loops 8 (12 pts), if/else 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Chromium.launchWithSeleniumHub (cognitive 31) · ×1
  • Chromium.launchWithSeleniumHub (cognitive 31) REDACTED:251 — Chromium.launchWithSeleniumHub has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 5 (8 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · istanbulCoverage.mergeIstanbulCoverage (cognitive 30) · ×1
  • istanbulCoverage.mergeIstanbulCoverage (cognitive 30) packages/isomorphic/istanbulCoverage.ts:72 — istanbulCoverage.mergeIstanbulCoverage has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (16 pts), boolean chains 10, if/else 2 (4 pts) (nesting depth added 11). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · traceModel.mergeActionsAndUpdateTimingSameTrace (cognitive 30) · ×1
  • traceModel.mergeActionsAndUpdateTimingSameTrace (cognitive 30) packages/isomorphic/trace/traceModel.ts:291 — traceModel.mergeActionsAndUpdateTimingSameTrace has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.validateBrowserConfig (cognitive 30) · ×1
  • config.validateBrowserConfig (cognitive 30) packages/playwright-core/src/tools/mcp/config.ts:227 — config.validateBrowserConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateDotnetApi.renderMethod (cognitive 30) · ×1
  • generateDotnetApi.renderMethod (cognitive 30) utils/doclint/generateDotnetApi.js:509 — generateDotnetApi.renderMethod has cognitive complexity 30 (threshold 15). Drivers by points: if/else 39 (67 pts), boolean chains 11, ternaries 4 (5 pts), loops 2 (4 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (generateDotnetApi.renderMethod::processArg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · WebKit.defaultArgs (cognitive 29) · ×1
  • WebKit.defaultArgs (cognitive 29) packages/playwright-core/src/server/webkit/webkit.ts:101 — WebKit.defaultArgs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · program.killAllDaemons (cognitive 29) · ×1
  • program.killAllDaemons (cognitive 29) packages/playwright-core/src/tools/cli-client/program.ts:358 — program.killAllDaemons has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · stackTrace.parseStackFrame (cognitive 29) · ×1
  • stackTrace.parseStackFrame (cognitive 29) packages/utils/stackTrace.ts:45 — stackTrace.parseStackFrame has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · listView.ListView (cognitive 29) · ×1
  • listView.ListView (cognitive 29) packages/web/src/components/listView.tsx:43 — listView.ListView has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (12 pts), ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 89, 124, 80, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · parseOverrides.parseOverrides (cognitive 29) · ×1
  • parseOverrides.parseOverrides (cognitive 29) utils/generate_types/parseOverrides.js:26 — parseOverrides.parseOverrides has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (7 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 4 function items inside it that branch (visit, serializeClass, visitProperties, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 29) · ×1
  • (anonymous) (cognitive 29) utils/linux-browser-dependencies/inside_docker/list_dependencies.js:27 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 10 (12 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.jsonToTS (cognitive 28) · ×1
  • index.jsonToTS (cognitive 28) utils/protocol-types-generator/index.js:40 — index.jsonToTS has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 14 (18 pts), boolean chains 10 (nesting depth added 4). None of this is in the body itself: all 28 points belong to 12 function literals inside it that branch (lines 43, 47, 69, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · InjectedScript.selectOptions (cognitive 27) · ×1
  • InjectedScript.selectOptions (cognitive 27) REDACTED:857 — InjectedScript.selectOptions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 6, loops 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 2 function items inside it that branch (filter, filter::matchesLabel). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PythonLocatorFactory.generateLocator (cognitive 27) · ×1
  • PythonLocatorFactory.generateLocator (cognitive 27) packages/isomorphic/locatorGenerators.ts:416 — PythonLocatorFactory.generateLocator has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EventEmitter.removeListener (cognitive 27) · ×1
  • EventEmitter.removeListener (cognitive 27) packages/playwright-core/src/client/eventEmitter.ts:185 — EventEmitter.removeListener has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypesGenerator.classBody (cognitive 27) · ×1
  • TypesGenerator.classBody (cognitive 27) utils/generate_types/index.js:261 — TypesGenerator.classBody has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (6 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 281). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · validate_deps.isEntryUsed (cognitive 27) · ×1
  • validate_deps.isEntryUsed (cognitive 27) utils/validate_deps.js:177 — validate_deps.isEntryUsed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TargetRegistry.constructor (cognitive 26) · ×1
  • TargetRegistry.constructor (cognitive 26) browser_patches/firefox/juggler/TargetRegistry.js:198 — TargetRegistry.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 6, loops 4 (nesting depth added 1). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (onOpenWindow, onTabOpenListener, onCloseWindow, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · reportView.ReportView (cognitive 26) · ×1
  • reportView.ReportView (cognitive 26) packages/html-reporter/src/reportView.tsx:49 — reportView.ReportView has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 4, loops 2 (3 pts), match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 89, 62, 72, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · selectorParser.parseSelectorString (cognitive 26) · ×1
  • selectorParser.parseSelectorString (cognitive 26) packages/isomorphic/selectorParser.ts:184 — selectorParser.parseSelectorString has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 9, loops 1 (nesting depth added 2). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 2 function items inside it that branch (append, shouldIgnoreTextSelectorQuote). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Frame.waitForSelector (cognitive 26) · ×1
  • Frame.waitForSelector (cognitive 26) packages/playwright-core/src/server/frames.ts:839 — Frame.waitForSelector has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (16 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 850, 857). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · APIRequestContext.fetch (cognitive 26) · ×1
  • APIRequestContext.fetch (cognitive 26) packages/playwright-core/src/server/fetch.ts:196 — APIRequestContext.fetch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · serializers.innerSerializeValue (cognitive 26) · ×1
  • serializers.innerSerializeValue (cognitive 26) REDACTED:118 — serializers.innerSerializeValue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 2 (4 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · bisect-chromium.findExecutable (cognitive 26) · ×1
  • bisect-chromium.findExecutable (cognitive 26) REDACTED:97 — bisect-chromium.findExecutable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiParser.parseArgument (cognitive 26) · ×1
  • ApiParser.parseArgument (cognitive 26) utils/doclint/api_parser.js:146 — ApiParser.parseArgument has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 8). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 26) · ×1
  • (anonymous) (cognitive 26) utils/roll_browser.js:47 — (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, loops 2 (4 pts), other 1 (nesting depth added 5). Of this number, 25 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · parseMember (cognitive 26) · ×1
  • parseMember (cognitive 26) utils/doclint/api_parser.js:91 — parseMember has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, loops 2 (3 pts), other 1 (nesting depth added 4). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · InjectedScript.dispatchEvent (cognitive 25) · ×1
  • InjectedScript.dispatchEvent (cognitive 25) REDACTED:1224 — InjectedScript.dispatchEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, error handling 2 (4 pts), match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (createTouch, createTouchList, a function literal at line 1257, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · webAuthn.inject (cognitive 25) · ×1
  • webAuthn.inject (cognitive 25) packages/injected/src/webAuthn.ts:59 — webAuthn.inject has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 6, loops 4, ternaries 1. Of this number, 14 points are the body's own statements and 11 belong to 11 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · selectorParser.splitSelectorByFrame (cognitive 25) · ×1
  • selectorParser.splitSelectorByFrame (cognitive 25) packages/isomorphic/selectorParser.ts:108 — selectorParser.splitSelectorByFrame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaLocatorFactory.generateLocator (cognitive 25) · ×1
  • JavaLocatorFactory.generateLocator (cognitive 25) packages/isomorphic/locatorGenerators.ts:526 — JavaLocatorFactory.generateLocator has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (2 pts), match/switch 2 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · protocolFormatter._formatProtocolParam (cognitive 25) · ×1
  • protocolFormatter._formatProtocolParam (cognitive 25) packages/isomorphic/protocolFormatter.ts:35 — protocolFormatter._formatProtocolParam has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · urlMatch.resolveGlobBase (cognitive 25) · ×1
  • urlMatch.resolveGlobBase (cognitive 25) REDACTED:214 — urlMatch.resolveGlobBase has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 232, mapToken). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · HarTracer._onRequestFinished (cognitive 25) · ×1
  • HarTracer._onRequestFinished (cognitive 25) packages/playwright-core/src/server/har/harTracer.ts:330 — HarTracer._onRequestFinished has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8, ternaries 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · HarTracer._onWebSocket (cognitive 25) · ×1
  • HarTracer._onWebSocket (cognitive 25) packages/playwright-core/src/server/har/harTracer.ts:447 — HarTracer._onWebSocket has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (20 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (recordMessage, a function literal at line 514, updateTime, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Connection.dispatch (cognitive 25) · ×1
  • Connection.dispatch (cognitive 25) packages/playwright-core/src/client/connection.ts:236 — Connection.dispatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · callTab.parseSerializedValue (cognitive 25) · ×1
  • callTab.parseSerializedValue (cognitive 25) REDACTED:129 — callTab.parseSerializedValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshotTab.collectSnapshots (cognitive 25) · ×1
  • snapshotTab.collectSnapshots (cognitive 25) packages/trace-viewer/src/ui/snapshotTab.tsx:403 — snapshotTab.collectSnapshots has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare.compare (cognitive 25) · ×1
  • compare.compare (cognitive 25) packages/utils/image_tools/compare.ts:36 — compare.compare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, loops 2 (3 pts), ternaries 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roleSelectorEngine.validateAttributes (cognitive 24) · ×1
  • roleSelectorEngine.validateAttributes (cognitive 24) packages/injected/src/roleSelectorEngine.ts:61 — roleSelectorEngine.validateAttributes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaScriptLocatorFactory.generateLocator (cognitive 24) · ×1
  • JavaScriptLocatorFactory.generateLocator (cognitive 24) packages/isomorphic/locatorGenerators.ts:313 — JavaScriptLocatorFactory.generateLocator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (CSharpLocatorFactory.generateLocator) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CSharpLocatorFactory.generateLocator (cognitive 24) · ×1
  • CSharpLocatorFactory.generateLocator (cognitive 24) packages/isomorphic/locatorGenerators.ts:638 — CSharpLocatorFactory.generateLocator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (JavaScriptLocatorFactory.generateLocator) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · input.buildLayoutClosure (cognitive 24) · ×1
  • input.buildLayoutClosure (cognitive 24) packages/playwright-core/src/server/input.ts:307 — input.buildLayoutClosure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Frame.gotoImpl (cognitive 24) · ×1
  • Frame.gotoImpl (cognitive 24) packages/playwright-core/src/server/frames.ts:697 — Frame.gotoImpl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, ternaries 4 (nesting depth added 5). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Frame.expect (cognitive 24) · ×1
  • Frame.expect (cognitive 24) packages/playwright-core/src/server/frames.ts:1475 — Frame.expect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · program.decorateMCPCommand (cognitive 24) · ×1
  • program.decorateMCPCommand (cognitive 24) packages/playwright-core/src/tools/mcp/program.ts:34 — program.decorateMCPCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, ternaries 2 (3 pts), error handling 2 (nesting depth added 4). None of this is in the body itself: all 24 points belong to 5 function literals inside it that branch (lines 116, 171, 90, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · consoleTab.format (cognitive 24) · ×1
  • consoleTab.format (cognitive 24) REDACTED:221 — consoleTab.format has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ariaModeView.collectAriaModeTargets (cognitive 24) · ×1
  • ariaModeView.collectAriaModeTargets (cognitive 24) packages/trace-viewer/src/ui/ariaModeView.tsx:48 — ariaModeView.collectAriaModeTargets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (4 pts), ternaries 3 (nesting depth added 8). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshotTab.InspectModeController (cognitive 24) · ×1
  • snapshotTab.InspectModeController (cognitive 24) packages/trace-viewer/src/ui/snapshotTab.tsx:291 — snapshotTab.InspectModeController has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 3 (6 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 292). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · documentation.patchCSharpOptionOverloads (cognitive 24) · ×1
  • documentation.patchCSharpOptionOverloads (cognitive 24) utils/doclint/documentation.js:835 — documentation.patchCSharpOptionOverloads has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate_channels.inlineType (cognitive 24) · ×1
  • generate_channels.inlineType (cognitive 24) utils/generate_channels.js:34 — generate_channels.inlineType has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debuggerPanel.DebuggerPanel (cognitive 23) · ×1
  • debuggerPanel.DebuggerPanel (cognitive 23) packages/dashboard/src/debuggerPanel.tsx:33 — debuggerPanel.DebuggerPanel has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 89, 50, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · InjectedScript.querySelectorAll (cognitive 23) · ×1
  • InjectedScript.querySelectorAll (cognitive 23) REDACTED:382 — InjectedScript.querySelectorAll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JavaScriptLanguageGenerator._generateActionCall (cognitive 23) · ×1
  • JavaScriptLanguageGenerator._generateActionCall (cognitive 23) packages/isomorphic/codegen/javascript.ts:97 — JavaScriptLanguageGenerator._generateActionCall has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PythonLanguageGenerator.generateHeader (cognitive 23) · ×1
  • PythonLanguageGenerator.generateHeader (cognitive 23) packages/isomorphic/codegen/python.ts:160 — PythonLanguageGenerator.generateHeader has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnapshotRenderer.resourceByUrl (cognitive 23) · ×1
  • SnapshotRenderer.resourceByUrl (cognitive 23) REDACTED:215 — SnapshotRenderer.resourceByUrl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · locatorParser.tokenize · ×1
  • locatorParser.tokenize::readString (cognitive 23) packages/isomorphic/locatorParser.ts:82 — locatorParser.tokenize::readString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarTracer._onResponse (cognitive 23) · ×1
  • HarTracer._onResponse (cognitive 23) packages/playwright-core/src/server/har/harTracer.ts:570 — HarTracer._onResponse has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (9 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installActions.installBrowsers (cognitive 23) · ×1
  • installActions.installBrowsers (cognitive 23) packages/playwright-core/src/cli/installActions.ts:90 — installActions.installBrowsers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 2 (6 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sourceTab.useSources (cognitive 23) · ×1
  • sourceTab.useSources (cognitive 23) packages/trace-viewer/src/ui/sourceTab.tsx:37 — sourceTab.useSources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · connect.ConnectApp (cognitive 22) · ×1
  • connect.ConnectApp (cognitive 22) packages/extension/src/ui/connect.tsx:39 — connect.ConnectApp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, boolean chains 6, error handling 2, ternaries 1. Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 50, 137, 129). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · RecordActionTool._shouldGenerateKeyPressFor (cognitive 22) · ×1
  • RecordActionTool._shouldGenerateKeyPressFor (cognitive 22) packages/injected/src/recorder/recorder.ts:609 — RecordActionTool._shouldGenerateKeyPressFor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (JsonRecordActionTool._shouldGenerateKeyPressFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · JsonRecordActionTool._shouldGenerateKeyPressFor (cognitive 22) · ×1
  • JsonRecordActionTool._shouldGenerateKeyPressFor (cognitive 22) packages/injected/src/recorder/recorder.ts:810 — JsonRecordActionTool._shouldGenerateKeyPressFor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (RecordActionTool._shouldGenerateKeyPressFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TraceModernizer._innerAppendEvent (cognitive 22) · ×1
  • TraceModernizer._innerAppendEvent (cognitive 22) packages/isomorphic/trace/traceModernizer.ts:107 — TraceModernizer._innerAppendEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elementHandle.convertInputFiles (cognitive 22) · ×1
  • elementHandle.convertInputFiles (cognitive 22) packages/playwright-core/src/client/elementHandle.ts:282 — elementHandle.convertInputFiles has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 4 (6 pts), loops 1 (3 pts) (nesting depth added 12). Of this number, 16 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry.constructor (cognitive 22) · ×1
  • Registry.constructor (cognitive 22) packages/playwright-core/src/server/registry/index.ts:510 — Registry.constructor has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (11 pts), if/else 8 (9 pts), boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (executablePathOrDie, a function literal at line 747, findExecutablePath, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · WKPage._onConsoleMessage (cognitive 22) · ×1
  • WKPage._onConsoleMessage (cognitive 22) packages/playwright-core/src/server/webkit/wkPage.ts:538 — WKPage._onConsoleMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · localUtils.zip (cognitive 22) · ×1
  • localUtils.zip (cognitive 22) packages/playwright-core/src/server/localUtils.ts:44 — localUtils.zip has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 4 (8 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ElementHandle._setInputFiles (cognitive 22) · ×1
  • ElementHandle._setInputFiles (cognitive 22) packages/playwright-core/src/server/dom.ts:748 — ElementHandle._setInputFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · config.configFromCLIOptions (cognitive 22) · ×1
  • config.configFromCLIOptions (cognitive 22) packages/playwright-core/src/tools/mcp/config.ts:303 — config.configFromCLIOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · api_parser.applyTemplates · ×1
  • api_parser.applyTemplates::visit (cognitive 22) utils/doclint/api_parser.js:334 — api_parser.applyTemplates::visit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate_dotnet_channels.inlineType (cognitive 22) · ×1
  • generate_dotnet_channels.inlineType (cognitive 22) utils/generate_dotnet_channels.js:81 — generate_dotnet_channels.inlineType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (22 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypesGenerator.stringifySimpleType (cognitive 22) · ×1
  • TypesGenerator.stringifySimpleType (cognitive 22) utils/generate_types/index.js:420 — TypesGenerator.stringifySimpleType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · setCookies (cognitive 22) · ×1
  • setCookies (cognitive 22) browser_patches/firefox/juggler/TargetRegistry.js:1255 — setCookies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (7 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessionSidebar.SessionSidebar (cognitive 21) · ×1
  • sessionSidebar.SessionSidebar (cognitive 21) packages/dashboard/src/sessionSidebar.tsx:79 — sessionSidebar.SessionSidebar has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (6 pts), ternaries 4 (5 pts), loops 3 (nesting depth added 4). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 83, 138, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bidiInsertText.bidiInsertText (cognitive 21) · ×1
  • bidiInsertText.bidiInsertText (cognitive 21) packages/injected/src/bidiInsertText.ts:19 — bidiInsertText.bidiInsertText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Route._innerFulfill (cognitive 21) · ×1
  • Route._innerFulfill (cognitive 21) packages/playwright-core/src/client/network.ts:386 — Route._innerFulfill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · traceActions.traceAction (cognitive 21) · ×1
  • traceActions.traceAction (cognitive 21) REDACTED:65 — traceActions.traceAction has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 7, ternaries 3 (6 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · traceRequests.traceRequests (cognitive 21) · ×1
  • traceRequests.traceRequests (cognitive 21) REDACTED:23 — traceRequests.traceRequests has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · consoleTab.ConsoleTab (cognitive 21) · ×1
  • consoleTab.ConsoleTab (cognitive 21) REDACTED:165 — consoleTab.ConsoleTab has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 5 (7 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 177, 173). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ansi2html.ansi2html (cognitive 21) · ×1
  • ansi2html.ansi2html (cognitive 21) packages/web/src/ansi2html.ts:17 — ansi2html.ansi2html has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 pts), match/switch 1 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · splitView.SplitView (cognitive 21) · ×1
  • splitView.SplitView (cognitive 21) packages/web/src/components/splitView.tsx:35 — splitView.SplitView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateDotnetApi.renderMethod · ×1
  • generateDotnetApi.renderMethod::processArg (cognitive 21) utils/doclint/generateDotnetApi.js:590 — generateDotnetApi.renderMethod::processArg has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (generateDotnetApi.renderMethod) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · fromParsedType (cognitive 21) · ×1
  • fromParsedType (cognitive 21) utils/doclint/documentation.js:523 — fromParsedType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageHandler.['Page.dispatchMouseEvent'] (cognitive 20) · ×1
  • PageHandler.['Page.dispatchMouseEvent'] (cognitive 20) REDACTED:483 — PageHandler.['Page.dispatchMouseEvent'] has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to 2 function items inside it that branch (a function literal at line 523, sendEvents). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · annotations.Annotations · ×1
  • annotations.Annotations::onLayerKeyDown (cognitive 20) packages/dashboard/src/annotations.tsx:297 — annotations.Annotations::onLayerKeyDown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Filter.tokenize (cognitive 20) · ×1
  • Filter.tokenize (cognitive 20) packages/html-reporter/src/filter.ts:78 — Filter.tokenize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ariaSnapshot.toAriaNode (cognitive 20) · ×1
  • ariaSnapshot.toAriaNode (cognitive 20) REDACTED:240 — ariaSnapshot.toAriaNode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · traceModel.adjustMonotonicTime (cognitive 20) · ×1
  • traceModel.adjustMonotonicTime (cognitive 20) packages/isomorphic/trace/traceModel.ts:342 — traceModel.adjustMonotonicTime has cognitive complexity 20 (threshold 15). Drivers by points: loops 9 (10 pts), if/else 4 (7 pts), boolean chains 3 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · bidiExecutionContext.renderPreview (cognitive 20) · ×1
  • bidiExecutionContext.renderPreview (cognitive 20) REDACTED:203 — bidiExecutionContext.renderPreview has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (7 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Chromium._innerDefaultArgs (cognitive 20) · ×1
  • Chromium._innerDefaultArgs (cognitive 20) REDACTED:366 — Chromium._innerDefaultArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BidiChromium._innerDefaultArgs (cognitive 20) · ×1
  • BidiChromium._innerDefaultArgs (cognitive 20) packages/playwright-core/src/server/bidi/bidiChromium.ts:105 — BidiChromium._innerDefaultArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserContextDispatcher.constructor (cognitive 20) · ×1
  • BrowserContextDispatcher.constructor (cognitive 20) packages/playwright-core/src/server/dispatchers/browserContextDispatcher.ts:71 — BrowserContextDispatcher.constructor has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 6, loops 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 124, 155, 179, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · (computed) (cognitive 20) · ×1
  • (computed) (cognitive 20) REDACTED:483 — (computed) has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to 3 function items inside it that branch (a function literal at line 523, sendEvents, a function literal at line 496). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PageAgent._dispatchKeyEvent (cognitive 19) · ×1
  • PageAgent._dispatchKeyEvent (cognitive 19) browser_patches/firefox/juggler/content/PageAgent.js:469 — PageAgent._dispatchKeyEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InjectedScript.previewNode (cognitive 19) · ×1
  • InjectedScript.previewNode (cognitive 19) REDACTED:1291 — InjectedScript.previewNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ariaSnapshot.findNewNode (cognitive 19) · ×1
  • ariaSnapshot.findNewNode (cognitive 19) packages/isomorphic/ariaSnapshot.ts:545 — ariaSnapshot.findNewNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (fillMap). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · EventEmitter._removeAllListeners (cognitive 19) · ×1
  • EventEmitter._removeAllListeners (cognitive 19) packages/playwright-core/src/client/eventEmitter.ts:261 — EventEmitter._removeAllListeners has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserContext.constructor (cognitive 19) · ×1
  • BrowserContext.constructor (cognitive 19) packages/playwright-core/src/client/browserContext.ts:98 — BrowserContext.constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 19 points belong to 5 function literals inside it that branch (lines 120, 142, 170, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · crCoverage.convertToDisjointRanges (cognitive 19) · ×1
  • crCoverage.convertToDisjointRanges (cognitive 19) packages/playwright-core/src/server/chromium/crCoverage.ts:240 — crCoverage.convertToDisjointRanges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameSession._updateViewport (cognitive 19) · ×1
  • FrameSession._updateViewport (cognitive 19) REDACTED:1007 — FrameSession._updateViewport has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WKPage._onTargetCreated (cognitive 19) · ×1
  • WKPage._onTargetCreated (cognitive 19) packages/playwright-core/src/server/webkit/wkPage.ts:309 — WKPage._onTargetCreated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserContext.setStorageState (cognitive 19) · ×1
  • BrowserContext.setStorageState (cognitive 19) REDACTED:666 — BrowserContext.setStorageState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Session.deleteData (cognitive 19) · ×1
  • Session.deleteData (cognitive 19) packages/playwright-core/src/tools/cli-client/session.ts:62 — Session.deleteData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimpleChannel._onMessageInternal (cognitive 18) · ×1
  • SimpleChannel._onMessageInternal (cognitive 18) browser_patches/firefox/juggler/SimpleChannel.js:197 — SimpleChannel._onMessageInternal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roleUtils.getCSSContent (cognitive 18) · ×1
  • roleUtils.getCSSContent (cognitive 18) packages/injected/src/roleUtils.ts:487 — roleUtils.getCSSContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Highlight.updateHighlight (cognitive 18) · ×1
  • Highlight.updateHighlight (cognitive 18) REDACTED:389 — Highlight.updateHighlight has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectorEvaluatorImpl._querySimple (cognitive 18) · ×1
  • SelectorEvaluatorImpl._querySimple (cognitive 18) REDACTED:227 — SelectorEvaluatorImpl._querySimple has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 231). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · selectorEvaluator.sortInDOMOrder (cognitive 18) · ×1
  • selectorEvaluator.sortInDOMOrder (cognitive 18) REDACTED:555 — selectorEvaluator.sortInDOMOrder has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function items inside it that branch (visit, append). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · selectorGenerator.generateSelector (cognitive 18) · ×1
  • selectorGenerator.generateSelector (cognitive 18) packages/injected/src/selectorGenerator.ts:78 — selectorGenerator.generateSelector has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selectorGenerator.isGuidLike (cognitive 18) · ×1
  • selectorGenerator.isGuidLike (cognitive 18) packages/injected/src/selectorGenerator.ts:462 — selectorGenerator.isGuidLike has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InjectedScript.retarget (cognitive 18) · ×1
  • InjectedScript.retarget (cognitive 18) REDACTED:675 — InjectedScript.retarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InjectedScript.setupHitTargetInterceptor (cognitive 18) · ×1
  • InjectedScript.setupHitTargetInterceptor (cognitive 18) REDACTED:1154 — InjectedScript.setupHitTargetInterceptor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (listener, stop). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · RecordActionTool.onInput (cognitive 18) · ×1
  • RecordActionTool.onInput (cognitive 18) packages/injected/src/recorder/recorder.ts:369 — RecordActionTool.onInput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameSelectors._queryFrames (cognitive 18) · ×1
  • FrameSelectors._queryFrames (cognitive 18) packages/playwright-core/src/server/frameSelectors.ts:171 — FrameSelectors._queryFrames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 3 (4 pts), loops 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 177, query, a function literal at line 204). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · HarTracer.stop (cognitive 18) · ×1
  • HarTracer.stop (cognitive 18) packages/playwright-core/src/server/har/harTracer.ts:660 — HarTracer.stop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 1 (2 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InterceptableRequest.createResponseBodyCallback (cognitive 18) · ×1
  • InterceptableRequest.createResponseBodyCallback (cognitive 18) packages/playwright-core/src/server/chromium/crNetworkManager.ts:610 — InterceptableRequest.createResponseBodyCallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 4). None of this is in the body itself: all 18 points belong to 2 function literals inside it that branch (lines 611, 635). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · dependencies.validateDependenciesLinux (cognitive 18) · ×1
  • dependencies.validateDependenciesLinux (cognitive 18) packages/playwright-core/src/server/registry/dependencies.ts:213 — dependencies.validateDependenciesLinux has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 5 (6 pts), boolean chains 4, ternaries 2 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry.resolveBrowsers (cognitive 18) · ×1
  • Registry.resolveBrowsers (cognitive 18) packages/playwright-core/src/server/registry/index.ts:1280 — Registry.resolveBrowsers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Electron.launch (cognitive 18) · ×1
  • Electron.launch (cognitive 18) packages/playwright-core/src/server/electron/electron.ts:180 — Electron.launch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 2 (3 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FFBrowserContext.initialize (cognitive 18) · ×1
  • FFBrowserContext.initialize (cognitive 18) packages/playwright-core/src/server/firefox/ffBrowser.ts:172 — FFBrowserContext.initialize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · callTab.propertyToString (cognitive 18) · ×1
  • callTab.propertyToString (cognitive 18) REDACTED:102 — callTab.propertyToString has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ariaModeView.AriaModeView (cognitive 18) · ×1
  • ariaModeView.AriaModeView (cognitive 18) packages/trace-viewer/src/ui/ariaModeView.tsx:148 — ariaModeView.AriaModeView has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 6, if/else 4. Of this number, 14 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · imageDiffView.ImageDiffView (cognitive 18) · ×1
  • imageDiffView.ImageDiffView (cognitive 18) packages/web/src/shared/imageDiffView.tsx:66 — imageDiffView.ImageDiffView has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, ternaries 4. Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Member.filterForLanguage (cognitive 18) · ×1
  • Member.filterForLanguage (cognitive 18) utils/doclint/documentation.js:395 — Member.filterForLanguage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseTypeExpression (cognitive 18) · ×1
  • parseTypeExpression (cognitive 18) utils/doclint/documentation.js:670 — parseTypeExpression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _innerRenderNodes (cognitive 18) · ×1
  • _innerRenderNodes (cognitive 18) utils/doclint/dotnetXmlDocumentation.js:36 — _innerRenderNodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, other 1 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 2 function items inside it that branch (a function literal at line 48, handleListItem). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NetworkObserver.responseHead (cognitive 17) · ×1
  • NetworkObserver.responseHead (cognitive 17) browser_patches/firefox/juggler/NetworkObserver.js:971 — NetworkObserver.responseHead has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roleUtils.isElementHiddenForAria (cognitive 17) · ×1
  • roleUtils.isElementHiddenForAria (cognitive 17) packages/injected/src/roleUtils.ts:314 — roleUtils.isElementHiddenForAria has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selectorUtils.matchesAttributePart (cognitive 17) · ×1
  • selectorUtils.matchesAttributePart (cognitive 17) packages/injected/src/selectorUtils.ts:31 — selectorUtils.matchesAttributePart has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · injectedScript.createTextMatcher (cognitive 17) · ×1
  • injectedScript.createTextMatcher (cognitive 17) REDACTED:1799 — injectedScript.createTextMatcher has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ClockController._replayLogOnce (cognitive 17) · ×1
  • ClockController._replayLogOnce (cognitive 17) packages/injected/src/clock.ts:444 — ClockController._replayLogOnce has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · java.formatContextOptions (cognitive 17) · ×1
  • java.formatContextOptions (cognitive 17) packages/isomorphic/codegen/java.ts:254 — java.formatContextOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · imageUtils.scaleImageToSize (cognitive 17) · ×1
  • imageUtils.scaleImageToSize (cognitive 17) packages/isomorphic/imageUtils.ts:43 — imageUtils.scaleImageToSize has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (8 pts), boolean chains 3, if/else 3, ternaries 2 (3 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ChannelOwner._wrapApiCall (cognitive 17) · ×1
  • ChannelOwner._wrapApiCall (cognitive 17) packages/playwright-core/src/client/channelOwner.ts:189 — ChannelOwner._wrapApiCall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameSelectors.resolveFramesForSelector (cognitive 17) · ×1
  • FrameSelectors.resolveFramesForSelector (cognitive 17) packages/playwright-core/src/server/frameSelectors.ts:123 — FrameSelectors.resolveFramesForSelector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 5). Of this number, 11 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DispatcherConnection.dispatch (cognitive 17) · ×1
  • DispatcherConnection.dispatch (cognitive 17) packages/playwright-core/src/server/dispatchers/dispatcher.ts:297 — DispatcherConnection.dispatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Credentials._handleGet (cognitive 17) · ×1
  • Credentials._handleGet (cognitive 17) packages/playwright-core/src/server/credentials.ts:186 — Credentials._handleGet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browserContext.verifyClientCertificates (cognitive 17) · ×1
  • browserContext.verifyClientCertificates (cognitive 17) REDACTED:791 — browserContext.verifyClientCertificates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · traceViewer.startTraceViewerServer (cognitive 17) · ×1
  • traceViewer.startTraceViewerServer (cognitive 17) packages/playwright-core/src/server/trace/viewer/traceViewer.ts:90 — traceViewer.startTraceViewerServer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (serveTraceDataRoute, a function literal at line 134, a function literal at line 145). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ContextDebugger._updateSource (cognitive 17) · ×1
  • ContextDebugger._updateSource (cognitive 17) packages/playwright-core/src/tools/dashboard/dashboardController.ts:517 — ContextDebugger._updateSource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Type.parse (cognitive 17) · ×1
  • Type.parse (cognitive 17) utils/doclint/documentation.js:489 — Type.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · observe (cognitive 17) · ×1
  • observe (cognitive 17) browser_patches/firefox/juggler/components/Juggler.js:70 — observe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (loadStyleSheet, receiveMessage, disconnected, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · constructor (cognitive 17) · ×1
  • constructor (cognitive 17) browser_patches/firefox/juggler/content/PageAgent.js:55 — constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), loops 3, boolean chains 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong to 10 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Highlight._ensureElementHighlightRaf (cognitive 16) · ×1
  • Highlight._ensureElementHighlightRaf (cognitive 16) REDACTED:142 — Highlight._ensureElementHighlightRaf has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (10 pts), loops 2 (3 pts), error handling 1 (2 pts), if/else 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function item inside it that branches (tick). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · clock.install (cognitive 16) · ×1
  • clock.install (cognitive 16) packages/injected/src/clock.ts:844 — clock.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyParser._readAttributes (cognitive 16) · ×1
  • KeyParser._readAttributes (cognitive 16) packages/isomorphic/ariaSnapshot.ts:442 — KeyParser._readAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraceModernizer._modernize_9_to_10 (cognitive 16) · ×1
  • TraceModernizer._modernize_9_to_10 (cognitive 16) packages/isomorphic/trace/traceModernizer.ts:548 — TraceModernizer._modernize_9_to_10 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventEmitter._addListener (cognitive 16) · ×1
  • EventEmitter._addListener (cognitive 16) packages/playwright-core/src/client/eventEmitter.ts:110 — EventEmitter._addListener has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Registry.install (cognitive 16) · ×1
  • Registry.install (cognitive 16) packages/playwright-core/src/server/registry/index.ts:934 — Registry.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instrumentation.createInstrumentation (cognitive 16) · ×1
  • instrumentation.createInstrumentation (cognitive 16) packages/playwright-core/src/server/instrumentation.ts:136 — instrumentation.createInstrumentation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 159, 140, 144). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · program.collectList (cognitive 16) · ×1
  • program.collectList (cognitive 16) packages/playwright-core/src/tools/cli-client/program.ts:409 — program.collectList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · attachmentsTab.AttachmentsTab (cognitive 16) · ×1
  • attachmentsTab.AttachmentsTab (cognitive 16) packages/trace-viewer/src/ui/attachmentsTab.tsx:95 — attachmentsTab.AttachmentsTab has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 97, 125, 145). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · networkResourceDetails.dumpHex (cognitive 16) · ×1
  • networkResourceDetails.dumpHex (cognitive 16) packages/trace-viewer/src/ui/networkResourceDetails.tsx:568 — networkResourceDetails.dumpHex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · networkTab.renderCell (cognitive 16) · ×1
  • networkTab.renderCell (cognitive 16) packages/trace-viewer/src/ui/networkTab.tsx:185 — networkTab.renderCell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshotTab.SnapshotView (cognitive 16) · ×1
  • snapshotTab.SnapshotView (cognitive 16) packages/trace-viewer/src/ui/snapshotTab.tsx:139 — snapshotTab.SnapshotView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 146, 193). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ImageChannel.intoRGB (cognitive 16) · ×1
  • ImageChannel.intoRGB (cognitive 16) packages/utils/image_tools/imageChannel.ts:30 — ImageChannel.intoRGB has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · comparators.compareImages (cognitive 16) · ×1
  • comparators.compareImages (cognitive 16) packages/utils/comparators.ts:58 — comparators.compareImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 2. Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · socksProxy.parsePattern (cognitive 16) · ×1
  • socksProxy.parsePattern (cognitive 16) REDACTED:334 — socksProxy.parsePattern has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 338, 366, 347, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · treeView.TreeItemHeader (cognitive 16) · ×1
  • treeView.TreeItemHeader (cognitive 16) packages/web/src/components/treeView.tsx:239 — treeView.TreeItemHeader has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3. Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · markdown.flattenWrappedLines (cognitive 16) · ×1
  • markdown.flattenWrappedLines (cognitive 16) utils/markdown.js:77 — markdown.flattenWrappedLines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api_parser.parseVariable (cognitive 16) · ×1
  • api_parser.parseVariable (cognitive 16) utils/doclint/api_parser.js:286 — api_parser.parseVariable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · linkUtils.renderJSSignature (cognitive 16) · ×1
  • linkUtils.renderJSSignature (cognitive 16) utils/doclint/linkUtils.js:119 — linkUtils.renderJSSignature has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypesGenerator.generateTypes (cognitive 16) · ×1
  • TypesGenerator.generateTypes (cognitive 16) utils/generate_types/index.js:80 — TypesGenerator.generateTypes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 95, 114, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Workspace.ensureConsistent (cognitive 16) · ×1
  • Workspace.ensureConsistent (cognitive 16) utils/workspace.js:80 — Workspace.ensureConsistent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 16) · ×1
  • constructor (cognitive 16) browser_patches/firefox/juggler/content/FrameTree.js:397 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 7 function items inside it that branch (webSocketClosed, frameReceived, frameSent, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (computed) (cognitive 16) · ×1
  • (computed) (cognitive 16) REDACTED:315 — (computed) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: REDACTED, crExecutionContext.ts, wkExecutionContext.ts REDACTED — 3 files — `REDACTED`, `packages/playwright-core/src/server/chromium/crExecutionContext.ts`, `packages/playwright-core/src/server/webkit/wkExecutionContext.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: playwright-core — playwright-core: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — examples/github-api/ (@playwright/test), examples/mock-battery/ (@playwright/test), examples/mock-filesystem/ (@playwright/test) — a gap in the analyzer, not something this repository is missing. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (76 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (76 clone groups) packages/playwright-core/src/server/firefox/ffBrowser.ts:136 — 76 duplicated blocks under packages/playwright-core/src/server/ have copies in at least two of the sibling directories android, bidi, chromium, dispatchers, electron, firefox (+3 more sibling(s) not listed) — 61 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 76 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 76 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 76 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 13 sibling directories (31 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (31 clone groups) REDACTED:253 — 31 duplicated blocks under packages/ have copies in at least two of the sibling directories dashboard, extension, html-reporter, injected, isomorphic, playwright-browser-chromium (+7 more sibling(s) not listed) — 22 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (16 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (16 clone groups) packages/playwright-core/src/client/network.ts:248 — 16 duplicated blocks under packages/playwright-core/src/ have copies in at least two of the sibling directories cli, client, remote, server, tools — 9 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 16 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (6 clone groups) browser_patches/firefox/juggler/NetworkObserver.js:832 — 6 duplicated blocks under the repository root have copies in at least two of the sibling directories browser_patches, packages, utils — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block (204 lines × 2 locations) · ×1
  • Duplicated block (204 lines × 2 locations) packages/isomorphic/trace/versions/traceV7.ts:30 — packages/isomorphic/trace/versions/traceV7.ts:30 · packages/isomorphic/trace/versions/traceV8.ts:171 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (172 lines × 2 locations) · ×1
  • Duplicated block (172 lines × 2 locations) packages/isomorphic/trace/versions/traceV10.ts:21 — packages/isomorphic/trace/versions/traceV10.ts:21 · packages/isomorphic/trace/versions/traceV9.ts:163 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Wholesale file copy (149 identical lines × 2 files) · ×1
  • Wholesale file copy (149 identical lines × 2 files) packages/isomorphic/trace/versions/traceV6.ts:17 — packages/isomorphic/trace/versions/traceV6.ts:17 · packages/isomorphic/trace/versions/traceV7.ts:17 — these 2 files are line-for-line copies of one another — 149 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (147 identical lines × 2 files) · ×1
  • Wholesale file copy (147 identical lines × 2 files) packages/isomorphic/trace/versions/traceV5.ts:18 — packages/isomorphic/trace/versions/traceV5.ts:18 · packages/isomorphic/trace/versions/traceV6.ts:17 — these 2 files are line-for-line copies of one another — 147 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (139 identical lines × 2 files) · ×1
  • Wholesale file copy (139 identical lines × 2 files) packages/isomorphic/trace/versions/traceV5.ts:18 — packages/isomorphic/trace/versions/traceV5.ts:18 · packages/isomorphic/trace/versions/traceV7.ts:17 — these 2 files are line-for-line copies of one another — 139 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (134 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (134 matched lines × 2 locations) packages/playwright-core/src/server/firefox/ffBrowser.ts:136 — packages/playwright-core/src/server/firefox/ffBrowser.ts:136 · packages/playwright-core/src/server/webkit/wkBrowser.ts:128 — the two spans are one implementation copied and then locally edited — 994 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (130 identical lines × 2 files) · ×1
  • Wholesale file copy (130 identical lines × 2 files) packages/isomorphic/trace/versions/traceV4.ts:17 — packages/isomorphic/trace/versions/traceV4.ts:17 · packages/isomorphic/trace/versions/traceV5.ts:18 — these 2 files are line-for-line copies of one another — 130 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (129 identical lines × 2 files) · ×1
  • Wholesale file copy (129 identical lines × 2 files) packages/isomorphic/trace/versions/traceV4.ts:17 — packages/isomorphic/trace/versions/traceV4.ts:17 · packages/isomorphic/trace/versions/traceV6.ts:17 — these 2 files are line-for-line copies of one another — 129 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (115 lines × 2 locations) · ×1
  • Duplicated block (115 lines × 2 locations) packages/playwright-core/src/server/webkit/webview/wvPage.ts:1065 — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1065 · packages/playwright-core/src/server/webkit/wkPage.ts:1093 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (112 lines × 2 locations) · ×1
  • Duplicated block (112 lines × 2 locations) packages/isomorphic/trace/versions/traceV8.ts:35 — packages/isomorphic/trace/versions/traceV8.ts:35 · packages/isomorphic/trace/versions/traceV9.ts:38 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Wholesale file copy (105 identical lines × 2 files) · ×1
  • Wholesale file copy (105 identical lines × 2 files) packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts:18 — packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts:18 · packages/playwright-core/src/server/webkit/wkInterceptableRequest.ts:18 — these 2 files are line-for-line copies of one another — 105 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (88 identical lines × 2 files) · ×1
  • Wholesale file copy (88 identical lines × 2 files) packages/playwright-core/src/server/webkit/webview/wvExecutionContext.ts:18 — packages/playwright-core/src/server/webkit/webview/wvExecutionContext.ts:18 · packages/playwright-core/src/server/webkit/wkExecutionContext.ts:18 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (87 identical lines × 2 files) · ×1
  • Wholesale file copy (87 identical lines × 2 files) packages/playwright-core/src/server/webkit/webview/wvConnection.ts:17 — packages/playwright-core/src/server/webkit/webview/wvConnection.ts:17 · packages/playwright-core/src/server/webkit/wkConnection.ts:18 — these 2 files are line-for-line copies of one another — 87 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (81 lines × 2 locations) · ×1
  • Duplicated block (81 lines × 2 locations) packages/playwright-core/src/tools/backend/webstorage.ts:26 — packages/playwright-core/src/tools/backend/webstorage.ts:26 · packages/playwright-core/src/tools/backend/webstorage.ts:130 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (69 lines × 3 locations) · ×1
  • Duplicated block (69 lines × 3 locations) packages/isomorphic/trace/versions/traceV6.ts:162 — packages/isomorphic/trace/versions/traceV6.ts:162 · packages/isomorphic/trace/versions/traceV7.ts:183 · packages/isomorphic/trace/versions/traceV8.ts:324 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (64 lines × 3 locations) · ×1
  • Duplicated block (64 lines × 3 locations) packages/isomorphic/trace/versions/traceV4.ts:19 — packages/isomorphic/trace/versions/traceV4.ts:19 · packages/isomorphic/trace/versions/traceV5.ts:20 · packages/isomorphic/trace/versions/traceV6.ts:19 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Wholesale file copy (61 identical lines × 2 files) · ×1
  • Wholesale file copy (61 identical lines × 2 files) packages/playwright-core/src/server/webkit/webview/wvWorkers.ts:17 — packages/playwright-core/src/server/webkit/webview/wvWorkers.ts:17 · packages/playwright-core/src/server/webkit/wkWorkers.ts:17 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (58 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (58 matched lines × 2 locations) packages/isomorphic/locatorGenerators.ts:566 — packages/isomorphic/locatorGenerators.ts:566 · packages/isomorphic/locatorGenerators.ts:672 — the two spans are one implementation copied and then locally edited — 466 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) REDACTED:253 — REDACTED:253 · REDACTED:118 — the two spans are one implementation copied and then locally edited — 466 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (53 lines × 2 locations) · ×1
  • Duplicated block (53 lines × 2 locations) packages/playwright-core/src/server/webkit/webview/wvPage.ts:553 — packages/playwright-core/src/server/webkit/webview/wvPage.ts:553 · packages/playwright-core/src/server/webkit/wkPage.ts:542 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (51 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (51 matched lines × 2 locations) packages/playwright-core/src/server/chromium/crBrowser.ts:372 — packages/playwright-core/src/server/chromium/crBrowser.ts:372 · packages/playwright-core/src/server/webkit/wkBrowser.ts:240 — the two spans are one implementation copied and then locally edited — 427 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) packages/playwright-core/src/server/bidi/bidiChromium.ts:105 — packages/playwright-core/src/server/bidi/bidiChromium.ts:105 · REDACTED:366 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (43 lines × 4 locations) · ×1
  • Duplicated block (43 lines × 4 locations) packages/isomorphic/trace/versions/traceV5.ts:165 — packages/isomorphic/trace/versions/traceV5.ts:165 · packages/isomorphic/trace/versions/traceV6.ts:171 · packages/isomorphic/trace/versions/traceV7.ts:192 · packages/isomorphic/trace/versions/traceV8.ts:333 — the 4 copies are spread across 4 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (42 lines × 2 locations) · ×1
  • Duplicated block (42 lines × 2 locations) packages/playwright-core/src/tools/cli-client/channelSessions.ts:88 — packages/playwright-core/src/tools/cli-client/channelSessions.ts:88 · packages/utils/chromiumChannels.ts:25 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (40 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (40 matched lines × 2 locations) browser_patches/firefox/juggler/protocol/Protocol.js:19 — browser_patches/firefox/juggler/protocol/Protocol.js:19 · browser_patches/firefox/juggler/protocol/Protocol.js:87 — the two spans are one implementation copied and then locally edited — 261 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×1
  • Duplicated block (39 lines × 2 locations) packages/playwright-core/src/server/webkit/webview/wvPage.ts:1217 — packages/playwright-core/src/server/webkit/webview/wvPage.ts:1217 · packages/playwright-core/src/server/webkit/wkPage.ts:1301 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (34 lines × 3 locations) · ×1
  • Duplicated block (34 lines × 3 locations) packages/isomorphic/locatorGenerators.ts:352 — packages/isomorphic/locatorGenerators.ts:352 · packages/isomorphic/locatorGenerators.ts:459 · packages/isomorphic/locatorGenerators.ts:677 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) packages/playwright-core/src/server/firefox/ffPage.ts:504 — packages/playwright-core/src/server/firefox/ffPage.ts:504 · packages/playwright-core/src/server/webkit/wkPage.ts:911 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (31 lines × 4 locations) · ×1
  • Duplicated block (31 lines × 4 locations) packages/isomorphic/locatorGenerators.ts:319 — packages/isomorphic/locatorGenerators.ts:319 · packages/isomorphic/locatorGenerators.ts:422 · packages/isomorphic/locatorGenerators.ts:538 · packages/isomorphic/locatorGenerators.ts:644 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (30 matched lines × 2 locations) packages/playwright-core/src/server/bidi/bidiFirefox.ts:44 — packages/playwright-core/src/server/bidi/bidiFirefox.ts:44 · packages/playwright-core/src/server/firefox/firefox.ts:57 — the two spans are one implementation copied and then locally edited — 264 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function getTextAlternativeInternal (cyclomatic 135, cognitive 234) · ×1
  • Complex function getTextAlternativeInternal (cyclomatic 135, cognitive 234) packages/injected/src/roleUtils.ts:763 — getTextAlternativeInternal has cyclomatic complexity 135 and cognitive complexity 234; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 92, cognitive 118) · ×1
  • Complex function (anonymous) (cyclomatic 92, cognitive 118) packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:384 — (anonymous) has cyclomatic complexity 92 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function generateChannels (cyclomatic 81, cognitive 239) · ×1
  • Complex function generateChannels (cyclomatic 81, cognitive 239) utils/generate_channels.js:239 — generateChannels has cyclomatic complexity 81 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateConfig (cyclomatic 79, cognitive 96) · ×1
  • Complex function validateConfig (cyclomatic 79, cognitive 96) packages/playwright/src/common/configLoader.ts:127 — validateConfig has cyclomatic complexity 79 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function program (cyclomatic 65, cognitive 79) · ×1
  • Complex function program (cyclomatic 65, cognitive 79) packages/playwright-core/src/tools/cli-client/program.ts:76 — program has cyclomatic complexity 65 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function expectSingleElement (cyclomatic 58, cognitive 81) · ×1
  • Complex function expectSingleElement (cyclomatic 58, cognitive 81) REDACTED:1537 — expectSingleElement has cyclomatic complexity 58 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ansi2html (cyclomatic 56, cognitive 21) · ×1
  • Complex function ansi2html (cyclomatic 56, cognitive 21) packages/web/src/ansi2html.ts:17 — ansi2html has cyclomatic complexity 56 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function consumeAToken (cyclomatic 49, cognitive 75) · ×1
  • Complex function consumeAToken (cyclomatic 49, cognitive 75) packages/isomorphic/cssTokenizer.ts:143 — consumeAToken has cyclomatic complexity 49 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function innerAsLocators (cyclomatic 46, cognitive 113) · ×1
  • Complex function innerAsLocators (cyclomatic 46, cognitive 113) packages/isomorphic/locatorGenerators.ts:86 — innerAsLocators has cyclomatic complexity 46 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateProject (cyclomatic 45, cognitive 57) · ×1
  • Complex function validateProject (cyclomatic 45, cognitive 57) packages/playwright/src/common/configLoader.ts:257 — validateProject has cyclomatic complexity 45 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function visit (cyclomatic 44, cognitive 72) · ×1
  • Complex function visit (cyclomatic 44, cognitive 72) REDACTED:89 — visit has cyclomatic complexity 44 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function innerRenderMdNode (cyclomatic 44, cognitive 42) · ×1
  • Complex function innerRenderMdNode (cyclomatic 44, cognitive 42) utils/markdown.js:306 — innerRenderMdNode has cyclomatic complexity 44 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function innerSerialize (cyclomatic 43, cognitive 67) · ×1
  • Complex function innerSerialize (cyclomatic 43, cognitive 67) REDACTED:253 — innerSerialize has cyclomatic complexity 43 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function translateType (cyclomatic 42, cognitive 68) · ×1
  • Complex function translateType (cyclomatic 42, cognitive 68) utils/doclint/generateDotnetApi.js:729 — translateType has cyclomatic complexity 42 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Dashboard (cyclomatic 40, cognitive 37) · ×1
  • Complex function Dashboard (cyclomatic 40, cognitive 37) REDACTED:67 — Dashboard has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function generateLocator (cyclomatic 40, cognitive 25) · ×1
  • Complex function generateLocator (cyclomatic 40, cognitive 25) packages/isomorphic/locatorGenerators.ts:526 — generateLocator has cyclomatic complexity 40 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _innerFetch (cyclomatic 39, cognitive 61) · ×1
  • Complex function _innerFetch (cyclomatic 39, cognitive 61) packages/playwright-core/src/client/fetch.ts:197 — _innerFetch has cyclomatic complexity 39 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function generateLocator (cyclomatic 39, cognitive 31) · ×1
  • Complex function generateLocator (cyclomatic 39, cognitive 31) packages/isomorphic/locatorGenerators.ts:416 — generateLocator has cyclomatic complexity 39 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _onRequest (cyclomatic 37, cognitive 41) · ×1
  • Complex function _onRequest (cyclomatic 37, cognitive 41) packages/playwright-core/src/server/chromium/crNetworkManager.ts:295 — _onRequest has cyclomatic complexity 37 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function generateLocator (cyclomatic 37, cognitive 24) · ×1
  • Complex function generateLocator (cyclomatic 37, cognitive 24) packages/isomorphic/locatorGenerators.ts:313 — generateLocator has cyclomatic complexity 37 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1761 lines of code REDACTED:1 — REDACTED has 1761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/frames.ts · ×1
  • packages/playwright-core/src/server/frames.ts: 1722 lines of code packages/playwright-core/src/server/frames.ts:1 — packages/playwright-core/src/server/frames.ts has 1722 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/injected/src/recorder/recorder.ts · ×1
  • packages/injected/src/recorder/recorder.ts: 1609 lines of code packages/injected/src/recorder/recorder.ts:1 — packages/injected/src/recorder/recorder.ts has 1609 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1502 lines of code REDACTED:1 — REDACTED has 1502 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/injected/src/roleUtils.ts · ×1
  • packages/injected/src/roleUtils.ts: 1327 lines of code packages/injected/src/roleUtils.ts:1 — packages/injected/src/roleUtils.ts has 1327 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/tools/cli-daemon/commands.ts · ×1
  • packages/playwright-core/src/tools/cli-daemon/commands.ts: 1319 lines of code packages/playwright-core/src/tools/cli-daemon/commands.ts:1 — packages/playwright-core/src/tools/cli-daemon/commands.ts has 1319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/registry/index.ts · ×1
  • packages/playwright-core/src/server/registry/index.ts: 1295 lines of code packages/playwright-core/src/server/registry/index.ts:1 — packages/playwright-core/src/server/registry/index.ts has 1295 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · browser_patches/firefox/juggler/TargetRegistry.js · ×1
  • browser_patches/firefox/juggler/TargetRegistry.js: 1253 lines of code browser_patches/firefox/juggler/TargetRegistry.js:1 — browser_patches/firefox/juggler/TargetRegistry.js has 1253 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/webkit/wkPage.ts · ×1
  • packages/playwright-core/src/server/webkit/wkPage.ts: 1238 lines of code packages/playwright-core/src/server/webkit/wkPage.ts:1 — packages/playwright-core/src/server/webkit/wkPage.ts has 1238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/webkit/webview/wvPage.ts · ×1
  • packages/playwright-core/src/server/webkit/webview/wvPage.ts: 1194 lines of code packages/playwright-core/src/server/webkit/webview/wvPage.ts:1 — packages/playwright-core/src/server/webkit/webview/wvPage.ts has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1178 lines of code REDACTED:1 — REDACTED has 1178 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/page.ts · ×1
  • packages/playwright-core/src/server/page.ts: 1047 lines of code packages/playwright-core/src/server/page.ts:1 — packages/playwright-core/src/server/page.ts has 1047 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · browser_patches/firefox/juggler/NetworkObserver.js · ×1
  • browser_patches/firefox/juggler/NetworkObserver.js: 986 lines of code browser_patches/firefox/juggler/NetworkObserver.js:1 — browser_patches/firefox/juggler/NetworkObserver.js has 986 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/dom.ts · ×1
  • packages/playwright-core/src/server/dom.ts: 962 lines of code packages/playwright-core/src/server/dom.ts:1 — packages/playwright-core/src/server/dom.ts has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · utils/doclint/documentation.js · ×1
  • utils/doclint/documentation.js: 915 lines of code utils/doclint/documentation.js:1 — utils/doclint/documentation.js has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/isomorphic/cssTokenizer.ts · ×1
  • packages/isomorphic/cssTokenizer.ts: 875 lines of code packages/isomorphic/cssTokenizer.ts:1 — packages/isomorphic/cssTokenizer.ts has 875 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/chromium/crNetworkManager.ts · ×1
  • packages/playwright-core/src/server/chromium/crNetworkManager.ts: 870 lines of code packages/playwright-core/src/server/chromium/crNetworkManager.ts:1 — packages/playwright-core/src/server/chromium/crNetworkManager.ts has 870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/client/page.ts · ×1
  • packages/playwright-core/src/client/page.ts: 856 lines of code packages/playwright-core/src/client/page.ts:1 — packages/playwright-core/src/client/page.ts has 856 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/index.ts · ×1
  • packages/playwright/src/index.ts: 849 lines of code packages/playwright/src/index.ts:1 — packages/playwright/src/index.ts has 849 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/client/network.ts · ×1
  • packages/playwright-core/src/client/network.ts: 835 lines of code packages/playwright-core/src/client/network.ts:1 — packages/playwright-core/src/client/network.ts has 835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/trace/recorder/tracing.ts · ×1
  • packages/playwright-core/src/server/trace/recorder/tracing.ts: 833 lines of code packages/playwright-core/src/server/trace/recorder/tracing.ts:1 — packages/playwright-core/src/server/trace/recorder/tracing.ts has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/network.ts · ×1
  • packages/playwright-core/src/server/network.ts: 828 lines of code packages/playwright-core/src/server/network.ts:1 — packages/playwright-core/src/server/network.ts has 828 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/fetch.ts · ×1
  • packages/playwright-core/src/server/fetch.ts: 819 lines of code packages/playwright-core/src/server/fetch.ts:1 — packages/playwright-core/src/server/fetch.ts has 819 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · utils/doclint/generateDotnetApi.js · ×1
  • utils/doclint/generateDotnetApi.js: 803 lines of code utils/doclint/generateDotnetApi.js:1 — utils/doclint/generateDotnetApi.js has 803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/injected/src/clock.ts · ×1
  • packages/injected/src/clock.ts: 797 lines of code packages/injected/src/clock.ts:1 — packages/injected/src/clock.ts has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/isomorphic/teleReceiver.ts · ×1
  • packages/playwright/src/isomorphic/teleReceiver.ts: 788 lines of code packages/playwright/src/isomorphic/teleReceiver.ts:1 — packages/playwright/src/isomorphic/teleReceiver.ts has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/reporters/html.ts · ×1
  • packages/playwright/src/reporters/html.ts: 773 lines of code packages/playwright/src/reporters/html.ts:1 — packages/playwright/src/reporters/html.ts has 773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 756 lines of code REDACTED:1 — REDACTED has 756 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/isomorphic/locatorGenerators.ts · ×1
  • packages/isomorphic/locatorGenerators.ts: 735 lines of code packages/isomorphic/locatorGenerators.ts:1 — packages/isomorphic/locatorGenerators.ts has 735 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/har/harTracer.ts · ×1
  • packages/playwright-core/src/server/har/harTracer.ts: 735 lines of code packages/playwright-core/src/server/har/harTracer.ts:1 — packages/playwright-core/src/server/har/harTracer.ts has 735 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/isomorphic/locatorParser.ts · ×1
  • packages/isomorphic/locatorParser.ts: 694 lines of code packages/isomorphic/locatorParser.ts:1 — packages/isomorphic/locatorParser.ts has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/bidi/bidiPage.ts · ×1
  • packages/playwright-core/src/server/bidi/bidiPage.ts: 688 lines of code packages/playwright-core/src/server/bidi/bidiPage.ts:1 — packages/playwright-core/src/server/bidi/bidiPage.ts has 688 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/tools/dashboard/dashboardController.ts · ×1
  • packages/playwright-core/src/tools/dashboard/dashboardController.ts: 673 lines of code packages/playwright-core/src/tools/dashboard/dashboardController.ts:1 — packages/playwright-core/src/tools/dashboard/dashboardController.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 660 lines of code REDACTED:1 — REDACTED has 660 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/worker/testInfo.ts · ×1
  • packages/playwright/src/worker/testInfo.ts: 658 lines of code packages/playwright/src/worker/testInfo.ts:1 — packages/playwright/src/worker/testInfo.ts has 658 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/reporters/base.ts · ×1
  • packages/playwright/src/reporters/base.ts: 650 lines of code packages/playwright/src/reporters/base.ts:1 — packages/playwright/src/reporters/base.ts has 650 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/runner/dispatcher.ts · ×1
  • packages/playwright/src/runner/dispatcher.ts: 632 lines of code packages/playwright/src/runner/dispatcher.ts:1 — packages/playwright/src/runner/dispatcher.ts has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 622 lines of code REDACTED:1 — REDACTED has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright/src/reporters/merge.ts · ×1
  • packages/playwright/src/reporters/merge.ts: 622 lines of code packages/playwright/src/reporters/merge.ts:1 — packages/playwright/src/reporters/merge.ts has 622 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts · ×1
  • packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts: 620 lines of code packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts:1 — packages/playwright-core/src/server/trace/recorder/snapshotterInjected.ts has 620 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~1429 LoC) · ×1
  • Dead file (~1429 LoC) browser_patches/firefox/juggler/TargetRegistry.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1103 LoC) · ×1
  • Dead file (~1103 LoC) browser_patches/firefox/juggler/NetworkObserver.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~910 LoC) · ×1
  • Dead file (~910 LoC) utils/doclint/generateDotnetApi.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~656 LoC) · ×1
  • Dead file (~656 LoC) utils/generate_types/index.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~253 LoC) · ×1
  • Dead file (~253 LoC) browser_patches/firefox/juggler/SimpleChannel.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~234 LoC) · ×1
  • Dead file (~234 LoC) browser_patches/firefox/juggler/Helper.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~170 LoC) · ×1
  • Dead file (~170 LoC) packages/html-reporter/src/sampleReport.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (packages/html-reporter/src/testCaseView.story.tsx, packages/html-reporter/src/testFileView.story.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~169 LoC) · ×1
  • Dead file (~169 LoC) utils/doclint/dotnetXmlDocumentation.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (utils/doclint/generateDotnetApi.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~161 LoC) · ×1
  • Dead file (~161 LoC) browser_patches/firefox/juggler/components/Juggler.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~158 LoC) · ×1
  • Dead file (~158 LoC) utils/doclint/linkUtils.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (utils/generate_types/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~139 LoC) · ×1
  • Dead file (~139 LoC) utils/generate_types/parseOverrides.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (utils/generate_types/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~135 LoC) · ×1
  • Dead file (~135 LoC) utils/doclint/generateApiJson.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~116 LoC) · ×1
  • Dead file (~116 LoC) utils/generate_chromium_default_font_families.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~115 LoC) · ×1
  • Dead file (~115 LoC) browser_patches/firefox/juggler/content/main.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~99 LoC) · ×1
  • Dead file (~99 LoC) browser_patches/firefox/juggler/ChannelEventSink.sys.mjs — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~48 LoC) · ×1
  • Dead file (~48 LoC) packages/trace-viewer/src/ui/clickPointer.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~38 LoC) · ×1
  • Dead file (~38 LoC) packages/html-reporter/src/chip.story.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~37 LoC) · ×1
  • Dead file (~37 LoC) packages/dashboard/src/screencast.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~35 LoC) · ×1
  • Dead file (~35 LoC) packages/html-reporter/src/headerView.story.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~33 LoC) · ×1
  • Dead file (~33 LoC) packages/html-reporter/src/testCaseView.story.tsx — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~29 LoC) · ×1
  • Dead file (~29 LoC) packages/playwright-client/src/nodeStubs/path.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~27 LoC) · ×1
  • Dead file (~27 LoC) packages/playwright-client/src/nodeStubs/async_hooks.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~25 LoC) · ×1
  • Dead file (~25 LoC) packages/playwright-client/src/nodeStubs/fs.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~22 LoC) · ×1
  • Dead file (~22 LoC) packages/playwright-client/src/nodeStubs/processShim.ts — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~3 LoC) · ×1
  • Dead file (~3 LoC) browser_patches/firefox/preferences/00-playwright-prefs.js — no import path from any entry point (272 application, 81 tooling, 819 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import 'source-map' · ×1
  • Unlisted import 'source-map' packages/playwright/src/runner/loadUtils.ts:30 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unused dependency '@actions/github' · ×1
  • Unused dependency '@actions/github' — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'istanbul-lib-instrument' · ×1
  • Unused dependency 'istanbul-lib-instrument' — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'yaml' · ×1
  • Unused dependency 'yaml' — Declared in packages/web/REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 117 finding(s)
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel utils/check_audit.js:40 — `utils/check_audit.js` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/check_audit.js:47 — `utils/check_audit.js` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/check_audit.js:52 — `utils/check_audit.js` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/generate_chromium_default_font_families.js:116 — `utils/generate_chromium_default_font_families.js` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/video_stress.js:5 — `utils/video_stress.js` reports through `console.*` at line 5 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/video_stress.js:12 — `utils/video_stress.js` reports through `console.*` at line 12 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/video_stress.js:14 — `utils/video_stress.js` reports through `console.*` at line 14 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/protocol-types-generator/update-webview-protocol.js:56 — `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/protocol-types-generator/update-webview-protocol.js:62 — `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/protocol-types-generator/update-webview-protocol.js:68 — `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 68 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/protocol-types-generator/update-webview-protocol.js:72 — `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/protocol-types-generator/update-webview-protocol.js:74 — `utils/protocol-types-generator/update-webview-protocol.js` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/doclint/api_parser.js:461 — `utils/doclint/api_parser.js` reports through `console.*` at line 461 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/doclint/api_parser.js:462 — `utils/doclint/api_parser.js` reports through `console.*` at line 462 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel utils/doclint/generateApiJson.js:36 — `utils/doclint/generateApiJson.js` reports through `console.*` at line 36 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/isomorphic/cssTokenizer.ts:117 — `packages/isomorphic/cssTokenizer.ts` reports through `console.*` at line 117 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/isomorphic/cssTokenizer.ts:140 — `packages/isomorphic/cssTokenizer.ts` reports through `console.*` at line 140 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:616 — `REDACTED` reports through `console.*` at line 616 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/isomorphic/codegen/javascript.ts:74 — `packages/isomorphic/codegen/javascript.ts` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/injected/src/clock.ts:252 — `packages/injected/src/clock.ts` reports through `console.*` at line 252 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:448 — `REDACTED` reports through `console.*` at line 448 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/injected/src/recorder/pollingRecorder.ts:48 — `packages/injected/src/recorder/pollingRecorder.ts` reports through `console.*` at line 48 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/injected/src/recorder/recorder.ts:587 — `packages/injected/src/recorder/recorder.ts` reports through `console.*` at line 587 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/injected/src/recorder/recorder.ts:1321 — `packages/injected/src/recorder/recorder.ts` reports through `console.*` at line 1321 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel browser_patches/firefox/juggler/ChannelEventSink.sys.mjs:47 — `browser_patches/firefox/juggler/ChannelEventSink.sys.mjs` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate packages/playwright-core/src/browserServerImpl.ts:55 — `!!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs)` appears character-identically in 2 files — packages/playwright-core/src/browserServerImpl.ts, packages/playwright-core/src/client/browserType.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate browser_patches/firefox/juggler/NetworkObserver.js:311 — `!c.origin || c.origin.toLowerCase() === origin` appears character-identically in 2 files — browser_patches/firefox/juggler/NetworkObserver.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/chromium/crExecutionContext.ts:112 — `!js.isJavaScriptErrorInEvaluate(error) && !isSessionClosedError(error)` appears character-identically in 4 files — packages/playwright-core/src/server/chromium/crExecutionContext.ts, packages/playwright-core/src/server/firefox/ffExecutionContext.ts, packages/playwright-core/src/server/webkit/webview/wvExecutionContext.ts, packages/playwright-core/src/server/webkit/wkExecutionContext.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiChromium.ts:61 — `!logs.includes('crbug.com/357670') && !logs.includes('No usable sandbox!') && !logs.includes('crbug.com/638180')` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiChromium.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/webkit/webview/wvPage.ts:773 — `!omitDeviceScaleFactor && this._page.browserContext._options.deviceScaleFactor` appears character-identically in 2 files — packages/playwright-core/src/server/webkit/webview/wvPage.ts, packages/playwright-core/src/server/webkit/wkPage.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/dom.ts:346 — `!options.skipActionPreChecks && !options.force` appears character-identically in 2 files — packages/playwright-core/src/server/dom.ts, packages/playwright-core/src/server/frames.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1235 — `!result || result.object.subtype === 'null'` appears character-identically in 2 files — REDACTED, packages/playwright-core/src/server/webkit/wkPage.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/client/frame.ts:243 — `(options as any).waitFor && (options as any).waitFor !== 'visible'` appears character-identically in 2 files — packages/playwright-core/src/client/frame.ts, packages/playwright-core/src/server/frames.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts:129 — `300 <= response.status && response.status < 400` appears character-identically in 2 files — packages/playwright-core/src/server/webkit/webview/wvInterceptableRequest.ts, packages/playwright-core/src/server/webkit/wkInterceptableRequest.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate browser_patches/firefox/juggler/TargetRegistry.js:272 — `Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow` appears character-identically in 2 files — browser_patches/firefox/juggler/TargetRegistry.js, browser_patches/firefox/juggler/protocol/BrowserHandler.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/trace/viewer/traceViewer.ts:131 — `__PW_HMR__ && process.env.PW_HMR_STATIC !== '1'` appears character-identically in 2 files — packages/playwright-core/src/server/trace/viewer/traceViewer.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/isomorphic/codegen/csharp.ts:88 — `action.url && action.url !== 'about:blank' && action.url !== 'chrome://newtab/'` appears character-identically in 4 files — packages/isomorphic/codegen/csharp.ts, packages/isomorphic/codegen/java.ts, packages/isomorphic/codegen/javascript.ts, packages/isomorphic/codegen/python.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/client/connection.ts:304 — `arg && typeof arg === 'object' && typeof arg.guid === 'string'` appears character-identically in 2 files — packages/playwright-core/src/client/connection.ts, packages/playwright-core/src/server/dispatchers/dispatcher.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiFirefox.ts:109 — `arg.startsWith('-profile') || arg.startsWith('--profile')` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiFirefox.ts, packages/playwright-core/src/server/firefox/firefox.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/client/errors.ts:36 — `cause || 'Target page, context or browser has been closed'` appears character-identically in 2 files — packages/playwright-core/src/client/errors.ts, packages/playwright-core/src/server/errors.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/injected/src/domUtils.ts:141 — `child.nodeType === 3 && isVisibleTextNode(child as Text)` appears character-identically in 2 files — packages/injected/src/domUtils.ts, packages/injected/src/roleUtils.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate utils/doclint/api_parser.js:430 — `child.type !== 'li' || child.liType !== 'bullet' || !child.text.startsWith('langs:')` appears character-identically in 2 files — utils/doclint/api_parser.js, utils/markdown.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:95 — `convertPrintParameterToInches(margin.bottom) || 0` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:96 — `convertPrintParameterToInches(margin.left) || 0` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:97 — `convertPrintParameterToInches(margin.right) || 0` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:98 — `convertPrintParameterToInches(margin.top) || 0` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:88 — `convertPrintParameterToInches(options.height) || paperHeight` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPdf.ts:87 — `convertPrintParameterToInches(options.width) || paperWidth` appears character-identically in 2 files — packages/playwright-core/src/server/bidi/bidiPdf.ts, packages/playwright-core/src/server/chromium/crPdf.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/isomorphic/codegen/csharp.ts:303 — `deviceName && deviceDescriptors[deviceName]` appears character-identically in 3 files — packages/isomorphic/codegen/csharp.ts, packages/isomorphic/codegen/javascript.ts, packages/isomorphic/codegen/python.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/playwright-core/src/server/bidi/bidiPage.ts:592 — `e instanceof Error && e.message.includes('Node does not have a layout object')` appears character-identically in 4 files — packages/playwright-core/src/server/bidi/bidiPage.ts, REDACTED, packages/playwright-core/src/server/firefox/ffPage.ts, packages/playwright-core/src/server/webkit/wkPage.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×16
  • Silent fallback default in catch browser_patches/firefox/juggler/content/Runtime.js:203 — `onMessage` (in `_registerConsoleAPIListener`) swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/dashboard/src/sessionSidebar.tsx:38 — `tabFavicon` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/injected/src/roleUtils.ts:461 — `getIdRefs` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/isomorphic/locatorParser.ts:773 — `locatorOrSelectorAsSelector` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/playwright-core/src/server/recorder.ts:474 — `_readSource` swallows every exception into `return '// No source available'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/playwright-core/src/tools/utils/extension.ts:42 — `listProfileDirectories` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/playwright-core/src/tools/mcp/config.ts:31 — `fileExistsAsync` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:358 — `fileExistsAsync` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/playwright/src/reporters/coverage.ts:67 — `onEnd` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:293 — `parseCSSStyle` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/trace-viewer/src/ui/networkResourceDetails.tsx:335 — `WebSocketMessagesTab` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:348 — `serveFolder` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch tests/assets/reading-list/vue_2.6.14.js:320 — `looseEqual` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch tests/library/inspector/inspectorTest.ts:301 — `text` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch tests/webview/webviewTest.ts:85 — `listTabs` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch utils/test-results-db/db.ts:156 — `fileSize` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D34 · Knowledge Freshness · Orphaned file · ×13
  • Orphaned file utils/linux-browser-dependencies/inside_docker/list_dependencies.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file browser_patches/firefox/juggler/SimpleChannel.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file browser_patches/firefox/juggler/Helper.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/utils/image_tools/stats.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file utils/doclint/dotnetXmlDocumentation.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/utils/image_tools/compare.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file browser_patches/firefox/juggler/protocol/Dispatcher.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file browser_patches/firefox/juggler/protocol/PrimitiveTypes.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file utils/doclint/linting-code-snippets/java/src/main/java/JavaSyntaxChecker.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file utils/generate_clip_paths.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file browser_patches/firefox/juggler/ChannelEventSink.sys.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/playwright-core/src/androidServerImpl.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/utils/image_tools/imageChannel.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
AX6 · Interface segregation · Fat interface · ×4
  • Fat interface: DashboardChannel (26 required operations) packages/dashboard/src/dashboardChannel.ts:77 — `DashboardChannel` declares 26 required operations: `selectTab`, `closeTab`, `newTab`, `closeSession`, `setVisible`, `navigate`, `back`, `forward`, `reload`, `mousemove`, `mousedown`, `mouseup`, `wheel`, `keydown`, `keyup`, `startRecording`, `stopRecording`, `readStream`, `screenshot`, `submitAnnotation`, `cancelAnnotation`, `debuggerResume`, `debuggerPause`, `debuggerStep`, `on`, `off`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: PageDelegate (31 required operations) packages/playwright-core/src/server/page.ts:59 — `PageDelegate` declares 31 required operations: `reload`, `goBack`, `goForward`, `requestGC`, `addInitScript`, `removeInitScripts`, `closePage`, `navigateFrame`, `updateExtraHTTPHeaders`, `updateEmulatedViewportSize`, `updateEmulateMedia`, `updateRequestInterception`, `updateFileChooserInterception`, `bringToFront`, `setBackgroundColor`, `takeScreenshot`, `adoptElementHandle`, `getContentFrame`, `getOwnerFrame`, `getContentQuads`, `setInputFilePaths`, `getBoundingBox`, `getFrameElement`, `scrollRectIntoViewIfNeeded`, `startScreencast`, `stopScreencast`, `rafCountForStablePosition`, `inputActionEpilogue`, `resetForReuse`, `shouldToggleStyleSheetToSyncAnimations`, `setDockTile`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Output (22 required operations) packages/playwright-core/src/tools/cli-client/output.ts:47 — `Output` declares 22 required operations: `version`, `help`, `errorUnknownCommand`, `errorUnknownOption`, `errorTooManyArguments`, `errorAttachConflict`, `errorDetachNotAttached`, `errorBrowserNotOpenForTool`, `errorAttachNoTarget`, `errorInstallGlobalRequiresSkills`, `list`, `closeAll`, `deleteData`, `killAll`, `open`, `attach`, `close`, `detach`, `installed`, `show`, `toolResult`, `installStdio`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: TestServerInterface (16 required operations) packages/playwright/src/isomorphic/testServerInterface.ts:25 — `TestServerInterface` declares 16 required operations: `initialize`, `ping`, `watch`, `open`, `resizeTerminal`, `checkBrowsers`, `installBrowsers`, `runGlobalSetup`, `runGlobalTeardown`, `clearCache`, `listFiles`, `listTests`, `runTests`, `findRelatedTestFiles`, `stopTests`, `closeGracefully`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: packages/extension/src/relayConnection.ts, packages/playwright-core/src/tools/mcp/browserModel.ts, packages/extension/src/background.ts, packages/utils/webp/webp.ts, packages/playwright-core/src/tools/mcp/cdpRelayV2.ts, packages/isomorphic/istanbulCoverage.ts, packages/playwright-core/src/server/bidi/bidiOverCdp.ts, packages/playwright-core/src/tools/mcp/protocol.ts (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 8 significant file(s) lose their only recent owner: packages/trace-viewer/src/ui/ariaModeView.tsx, packages/trace-viewer/src/ui/filmStrip.tsx, packages/injected/src/webAuthn.ts, packages/utils/crypto.ts, packages/trace-viewer/src/ui/videoThumbnails.ts, packages/playwright-core/src/server/webkit/webview/syncServer.ts, packages/dashboard/src/transport.ts, packages/trace-viewer/src/ui/videoFrame.tsx. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (22 single-owned of 557 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 557 of the 787 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/playwright/src/common/fixtures.ts, REDACTED, packages/playwright-core/src/server/ebml.ts.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 13 of 557 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 557 of the 787 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: utils/linux-browser-dependencies/inside_docker/list_dependencies.js, browser_patches/firefox/juggler/SimpleChannel.js, browser_patches/firefox/juggler/Helper.js, packages/utils/image_tools/stats.ts, utils/doclint/dotnetXmlDocumentation.js, packages/utils/image_tools/compare.ts, browser_patches/firefox/juggler/protocol/Dispatcher.js, browser_patches/firefox/juggler/protocol/PrimitiveTypes.js (and 5 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift tests/assets/modernizr/README.md:5 — tests/assets/modernizr/README.md links to `modernizr.com`, but `tests/assets/modernizr/modernizr.com` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/playwright-chromium`, `packages/playwright-firefox`, `packages/playwright-test`, `packages/playwright-webkit`, `utils/doclint/linting-code-snippets/java` and 1 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 68420 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'CloseIcon' · ×1
  • Unused export 'CloseIcon' packages/dashboard/src/icons.tsx:78 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PlusIcon' · ×1
  • Unused export 'PlusIcon' packages/dashboard/src/icons.tsx:85 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'InspectorPanelIcon' · ×1
  • Unused export 'InspectorPanelIcon' packages/dashboard/src/icons.tsx:123 — Nothing imports this binding — it is safe to review for removal.
Minor — 2 finding(s)
D10 · Test Quality · Skipped (documented) · ×2
  • Skipped (documented): (unnamed test) tests/extension/extension-fixtures.ts:118 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/assets/reading-list/react-dom_15.7.0.js:12046 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-17d2287d9b204838ad019d1496ab4014/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-17d2287d9b204838ad019d1496ab4014/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude tests/assets/react .82artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update14artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .24artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 15 file(s) — `packages/dashboard/src/sessionSidebar.tsx`, `packages/injected/src/utilityScript.ts`, `packages/isomorphic/trace/trace.ts`, `packages/playwright-core/src/browserServerImpl.ts`, `REDACTED`, … (+10 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17806-62dc-7bde-a2bd-5a208008fcab · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md