Public report of bazodev/open-vids, published 17 November 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). 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, 17 November 2026, 09:06 UTC · Survey ID cd_722dde8f011746fd8d68c1b87833e2e3
bazodev/open-vids
Measured 17 November 2026, 09:03 UTC, at code version 119cbe1
Knowledge freshness is not measured: History too condensed to judge knowledge freshness.
CAI scoreAt risk
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 very large codebase: 597,324 lines of product code in 16 projects, tests not counted · Estimated rebuild effort: about 6.4 person-years · Weakest lens: Production Readiness, 38.6
Findings by how serious they are
116 critical2821 serious530 minor
10 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 09:03 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 the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work 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 ▸
83of 83 dimensions measured by tools.
3448of 3467 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
83dimensions across 8 lenses, read from 597,324 lines of product code in 16 projects.
bazodev/open-vids is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no automated security scanning of the code, its secrets or its dependencies, and it has uses of packages that aren't listed. It scores 48.9 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.
Production Readiness, at 38.6, is the weakest lens and counts most in the score. The best first steps are adding automated security scanning and tidying the declared packages, each worth about 5.9 points. Raising Production Readiness to 62 would lift the score to about 56.8.
Twenty-one known security holes in the packages the code depends on can be used by attackers. Seven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and twenty form fields can't be read by a screen reader. Updating the vulnerable packages, pinning each tool to an exact version and labelling the form fields would close these risks. The 16 pages or frames without a title need a descriptive title.
The product code is 597,324 lines, about €930,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 forThe 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.
If Production Readiness rose from 38.6 to 62, the lowest score rated Strong, the score would rise from 48.9 to about 56.8.
Code composition: what the lines of code are
Product code 59%Tests 41%
Rebuild cost: about €930,000 · Estimate
Cost to rebuild
€310,000 to €1,600,000, for 5,144 to 16,318 hours of work, about 6.4 person-years for 3 to 13 engineers
Difficulty of the problem
Standard, 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.7 at a score of 49. 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.
Size
Very large: 597,324 lines of product code
What it is not
Not 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: We price 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. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
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.
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 5.9 points · Medium effort · Dependency Hygiene
3
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
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 €930,000 to build again, about 6.4 person-years of work. Its weakest lens is Production Readiness, at 38.6 (Weak). 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
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. Of all the actions in this report, it raises the score most for the work it takes: about 5.9 points for medium effort. 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 we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 1,319,169 lines over the last 90 days, which is about 5,349,963 lines a year. At that pace, the extra work comes to an estimated 662.1 to 3972.3 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 our 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 · Code Duplication · 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.
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.
1977 modules, with 2630 dependencies between them. 3 loops run through 8 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1937 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.
agent-protocol.src.research uses agent-protocol.src.story, so a change to agent-protocol.src.story can break agent-protocol.src.research, while a change to agent-protocol.src.research can't break agent-protocol.src.story.
Position
Below the diagonal: agent-protocol.src.research uses a module listed above it, which is the healthy direction.
agent-protocol.src.types uses agent-protocol.src.qa, so a change to agent-protocol.src.qa can break agent-protocol.src.types, while a change to agent-protocol.src.types can't break agent-protocol.src.qa.
Position
Below the diagonal: agent-protocol.src.types uses a module listed above it, which is the healthy direction.
cli.src.capture uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break cli.src.capture, while a change to cli.src.capture can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: cli.src.capture uses a module listed above it, which is the healthy direction.
core.src uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break core.src, while a change to core.src can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: core.src uses a module listed above it, which is the healthy direction.
core.src.runtime uses parsers.src.types, so a change to parsers.src.types can break core.src.runtime, while a change to core.src.runtime can't break parsers.src.types.
Position
Below the diagonal: core.src.runtime uses a module listed above it, which is the healthy direction.
core.src.runtime uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break core.src.runtime, while a change to core.src.runtime can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: core.src.runtime uses a module listed above it, which is the healthy direction.
engine.src.services uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break engine.src.services, while a change to engine.src.services can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: engine.src.services uses a module listed above it, which is the healthy direction.
parsers.src uses parsers.src.types, so a change to parsers.src.types can break parsers.src, while a change to parsers.src can't break parsers.src.types.
Position
Below the diagonal: parsers.src uses a module listed above it, which is the healthy direction.
producer.src.services.render.stages uses producer.src.logger, so a change to producer.src.logger can break producer.src.services.render.stages, while a change to producer.src.services.render.stages can't break producer.src.logger.
Position
Below the diagonal: producer.src.services.render.stages uses a module listed above it, which is the healthy direction.
producer.src.services.render.stages uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break producer.src.services.render.stages, while a change to producer.src.services.render.stages can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: producer.src.services.render.stages uses a module listed above it, which is the healthy direction.
producer.src.services.renderOrchestrator uses producer.src.logger, so a change to producer.src.logger can break producer.src.services.renderOrchestrator, while a change to producer.src.services.renderOrchestrator can't break producer.src.logger.
Position
Below the diagonal: producer.src.services.renderOrchestrator uses a module listed above it, which is the healthy direction.
studio-server.src.types uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio-server.src.types, while a change to studio-server.src.types can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio-server.src.types uses a module listed above it, which is the healthy direction.
studio.src.components.editor uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.components.editor, while a change to studio.src.components.editor can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.components.editor uses a module listed above it, which is the healthy direction.
studio.src.components.editor uses studio.src.components.editor.domEditingTypes, so a change to studio.src.components.editor.domEditingTypes can break studio.src.components.editor, while a change to studio.src.components.editor can't break studio.src.components.editor.domEditingTypes.
Position
Below the diagonal: studio.src.components.editor uses a module listed above it, which is the healthy direction.
studio.src.hooks uses parsers.src.types, so a change to parsers.src.types can break studio.src.hooks, while a change to studio.src.hooks can't break parsers.src.types.
Position
Below the diagonal: studio.src.hooks uses a module listed above it, which is the healthy direction.
studio.src.hooks uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.hooks, while a change to studio.src.hooks can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.hooks uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in studio.src.hooks uses a type in studio.src.components.editor.domEditingTypes. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio.src.hooks uses studio.src.components.editor.domEditingTypes, so a change to studio.src.components.editor.domEditingTypes can break studio.src.hooks, while a change to studio.src.hooks can't break studio.src.components.editor.domEditingTypes.
Position
Below the diagonal: studio.src.hooks uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in studio.src.player.components uses a type in parsers.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio.src.player.components uses parsers.src.types, so a change to parsers.src.types can break studio.src.player.components, while a change to studio.src.player.components can't break parsers.src.types.
Position
Below the diagonal: studio.src.player.components uses a module listed above it, which is the healthy direction.
studio.src.player.components uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.player.components, while a change to studio.src.player.components can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.player.components uses a module listed above it, which is the healthy direction.
studio.src.player.lib uses parsers.src.types, so a change to parsers.src.types can break studio.src.player.lib, while a change to studio.src.player.lib can't break parsers.src.types.
Position
Below the diagonal: studio.src.player.lib uses a module listed above it, which is the healthy direction.
studio.src.player.lib uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.player.lib, while a change to studio.src.player.lib can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.player.lib uses a module listed above it, which is the healthy direction.
agent-protocol.src.voice uses agent-protocol.src.types, so a change to agent-protocol.src.types can break agent-protocol.src.voice, while a change to agent-protocol.src.voice can't break agent-protocol.src.types.
Position
Below the diagonal: agent-protocol.src.voice uses a module listed above it, which is the healthy direction.
cli.src.commands uses producer.src.logger, so a change to producer.src.logger can break cli.src.commands, while a change to cli.src.commands can't break producer.src.logger.
Position
Below the diagonal: cli.src.commands uses a module listed above it, which is the healthy direction.
cli.src.commands uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break cli.src.commands, while a change to cli.src.commands can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: cli.src.commands uses a module listed above it, which is the healthy direction.
cli.src.commands uses producer.src.services.renderOrchestrator, so a change to producer.src.services.renderOrchestrator can break cli.src.commands, while a change to cli.src.commands can't break producer.src.services.renderOrchestrator.
Position
Below the diagonal: cli.src.commands uses a module listed above it, which is the healthy direction.
cli.src.commands uses studio-server.src.types, so a change to studio-server.src.types can break cli.src.commands, while a change to cli.src.commands can't break studio-server.src.types.
Position
Below the diagonal: cli.src.commands uses a module listed above it, which is the healthy direction.
cli.src.utils uses studio-server.src.types, so a change to studio-server.src.types can break cli.src.utils, while a change to cli.src.utils can't break studio-server.src.types.
Position
Below the diagonal: cli.src.utils uses a module listed above it, which is the healthy direction.
producer.src.services uses producer.src.logger, so a change to producer.src.logger can break producer.src.services, while a change to producer.src.services can't break producer.src.logger.
Position
Below the diagonal: producer.src.services uses a module listed above it, which is the healthy direction.
producer.src.services uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break producer.src.services, while a change to producer.src.services can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: producer.src.services uses a module listed above it, which is the healthy direction.
producer.src.services uses producer.src.services.renderOrchestrator, so a change to producer.src.services.renderOrchestrator can break producer.src.services, while a change to producer.src.services can't break producer.src.services.renderOrchestrator.
Position
Below the diagonal: producer.src.services uses a module listed above it, which is the healthy direction.
producer.src.services.render uses producer.src.logger, so a change to producer.src.logger can break producer.src.services.render, while a change to producer.src.services.render can't break producer.src.logger.
Position
Below the diagonal: producer.src.services.render uses a module listed above it, which is the healthy direction.
producer.src.services.render uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break producer.src.services.render, while a change to producer.src.services.render can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: producer.src.services.render uses a module listed above it, which is the healthy direction.
producer.src.services.render uses producer.src.services.renderOrchestrator, so a change to producer.src.services.renderOrchestrator can break producer.src.services.render, while a change to producer.src.services.render can't break producer.src.services.renderOrchestrator.
Position
Below the diagonal: producer.src.services.render uses a module listed above it, which is the healthy direction.
studio-server.src.helpers uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break studio-server.src.helpers, while a change to studio-server.src.helpers can't break agent-protocol.src.editing.
Position
Below the diagonal: studio-server.src.helpers uses a module listed above it, which is the healthy direction.
studio-server.src.helpers uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio-server.src.helpers, while a change to studio-server.src.helpers can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio-server.src.helpers uses a module listed above it, which is the healthy direction.
studio-server.src.helpers uses studio-server.src.types, so a change to studio-server.src.types can break studio-server.src.helpers, while a change to studio-server.src.helpers can't break studio-server.src.types.
Position
Below the diagonal: studio-server.src.helpers uses a module listed above it, which is the healthy direction.
studio.src.components.chat uses agent-protocol.src.qa, so a change to agent-protocol.src.qa can break studio.src.components.chat, while a change to studio.src.components.chat can't break agent-protocol.src.qa.
Position
Below the diagonal: studio.src.components.chat uses a module listed above it, which is the healthy direction.
studio.src.components.chat uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.components.chat, while a change to studio.src.components.chat can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.components.chat uses a module listed above it, which is the healthy direction.
studio.src.components.chat uses agent-protocol.src.types, so a change to agent-protocol.src.types can break studio.src.components.chat, while a change to studio.src.components.chat can't break agent-protocol.src.types.
Position
Below the diagonal: studio.src.components.chat uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in studio.src.story uses a type in agent-protocol.src.story. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio.src.story uses agent-protocol.src.story, so a change to agent-protocol.src.story can break studio.src.story, while a change to studio.src.story can't break agent-protocol.src.story.
Position
Below the diagonal: studio.src.story uses a module listed above it, which is the healthy direction.
studio.src.story uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.story, while a change to studio.src.story can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.story uses a module listed above it, which is the healthy direction.
studio.src.story uses agent-protocol.src.types, so a change to agent-protocol.src.types can break studio.src.story, while a change to studio.src.story can't break agent-protocol.src.types.
Position
Below the diagonal: studio.src.story uses a module listed above it, which is the healthy direction.
studio.src.utils uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break studio.src.utils, while a change to studio.src.utils can't break agent-protocol.src.editing.
Position
Below the diagonal: studio.src.utils uses a module listed above it, which is the healthy direction.
studio.src.utils uses parsers.src.types, so a change to parsers.src.types can break studio.src.utils, while a change to studio.src.utils can't break parsers.src.types.
Position
Below the diagonal: studio.src.utils uses a module listed above it, which is the healthy direction.
studio.src.utils uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.utils, while a change to studio.src.utils can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.utils uses a module listed above it, which is the healthy direction.
studio.src.utils uses studio.src.components.editor.domEditingTypes, so a change to studio.src.components.editor.domEditingTypes can break studio.src.utils, while a change to studio.src.utils can't break studio.src.components.editor.domEditingTypes.
Position
Below the diagonal: studio.src.utils uses a module listed above it, which is the healthy direction.
studio.src.utils uses studio-server.src.types, so a change to studio-server.src.types can break studio.src.utils, while a change to studio.src.utils can't break studio-server.src.types.
Position
Below the diagonal: studio.src.utils uses a module listed above it, which is the healthy direction.
agent-protocol.src.api uses agent-protocol.src.qa, so a change to agent-protocol.src.qa can break agent-protocol.src.api, while a change to agent-protocol.src.api can't break agent-protocol.src.qa.
Position
Below the diagonal: agent-protocol.src.api uses a module listed above it, which is the healthy direction.
agent-protocol.src.api uses agent-protocol.src.types, so a change to agent-protocol.src.types can break agent-protocol.src.api, while a change to agent-protocol.src.api can't break agent-protocol.src.types.
Position
Below the diagonal: agent-protocol.src.api uses a module listed above it, which is the healthy direction.
agent-protocol.src.api uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break agent-protocol.src.api, while a change to agent-protocol.src.api can't break agent-protocol.src.voice.
Position
Below the diagonal: agent-protocol.src.api uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in studio-server.src.editing uses a type in agent-protocol.src.editing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio-server.src.editing uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break studio-server.src.editing, while a change to studio-server.src.editing can't break agent-protocol.src.editing.
Position
Below the diagonal: studio-server.src.editing uses a module listed above it, which is the healthy direction.
studio-server.src.editing uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio-server.src.editing, while a change to studio-server.src.editing can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio-server.src.editing uses a module listed above it, which is the healthy direction.
studio-server.src.editing uses studio-server.src.types, so a change to studio-server.src.types can break studio-server.src.editing, while a change to studio-server.src.editing can't break studio-server.src.types.
Position
Below the diagonal: studio-server.src.editing uses a module listed above it, which is the healthy direction.
studio-server.src.editing uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break studio-server.src.editing, while a change to studio-server.src.editing can't break agent-protocol.src.voice.
Position
Below the diagonal: studio-server.src.editing uses a module listed above it, which is the healthy direction.
studio-server.src.routes uses agent-protocol.src.analysis, so a change to agent-protocol.src.analysis can break studio-server.src.routes, while a change to studio-server.src.routes can't break agent-protocol.src.analysis.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
studio-server.src.routes uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break studio-server.src.routes, while a change to studio-server.src.routes can't break agent-protocol.src.editing.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
studio-server.src.routes uses agent-protocol.src.story, so a change to agent-protocol.src.story can break studio-server.src.routes, while a change to studio-server.src.routes can't break agent-protocol.src.story.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
studio-server.src.routes uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio-server.src.routes, while a change to studio-server.src.routes can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in studio-server.src.routes uses a type in studio-server.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio-server.src.routes uses studio-server.src.types, so a change to studio-server.src.types can break studio-server.src.routes, while a change to studio-server.src.routes can't break studio-server.src.types.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
studio-server.src.routes uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break studio-server.src.routes, while a change to studio-server.src.routes can't break agent-protocol.src.voice.
Position
Below the diagonal: studio-server.src.routes uses a module listed above it, which is the healthy direction.
studio-server.src.story uses agent-protocol.src.analysis, so a change to agent-protocol.src.analysis can break studio-server.src.story, while a change to studio-server.src.story can't break agent-protocol.src.analysis.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
studio-server.src.story uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break studio-server.src.story, while a change to studio-server.src.story can't break agent-protocol.src.editing.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
studio-server.src.story uses agent-protocol.src.story, so a change to agent-protocol.src.story can break studio-server.src.story, while a change to studio-server.src.story can't break agent-protocol.src.story.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
studio-server.src.story uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio-server.src.story, while a change to studio-server.src.story can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
studio-server.src.story uses studio-server.src.types, so a change to studio-server.src.types can break studio-server.src.story, while a change to studio-server.src.story can't break studio-server.src.types.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
studio-server.src.story uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break studio-server.src.story, while a change to studio-server.src.story can't break agent-protocol.src.voice.
Position
Below the diagonal: studio-server.src.story uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.analysis, so a change to agent-protocol.src.analysis can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.analysis.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.editing, so a change to agent-protocol.src.editing can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.editing.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.qa, so a change to agent-protocol.src.qa can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.qa.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in agent-protocol.src uses a type in agent-protocol.src.story. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
agent-protocol.src uses agent-protocol.src.story, so a change to agent-protocol.src.story can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.story.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break agent-protocol.src, while a change to agent-protocol.src can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.research, so a change to agent-protocol.src.research can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.research.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.types, so a change to agent-protocol.src.types can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.types.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.voice.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-protocol.src uses agent-protocol.src.api, so a change to agent-protocol.src.api can break agent-protocol.src, while a change to agent-protocol.src can't break agent-protocol.src.api.
Position
Below the diagonal: agent-protocol.src uses a module listed above it, which is the healthy direction.
agent-runtime.src.backend uses agent-protocol.src.types, so a change to agent-protocol.src.types can break agent-runtime.src.backend, while a change to agent-runtime.src.backend can't break agent-protocol.src.types.
Position
Below the diagonal: agent-runtime.src.backend uses a module listed above it, which is the healthy direction.
agent-runtime.src.backend uses agent-protocol.src.api, so a change to agent-protocol.src.api can break agent-runtime.src.backend, while a change to agent-runtime.src.backend can't break agent-protocol.src.api.
Position
Below the diagonal: agent-runtime.src.backend uses a module listed above it, which is the healthy direction.
studio.src.agent uses agent-protocol.src.qa, so a change to agent-protocol.src.qa can break studio.src.agent, while a change to studio.src.agent can't break agent-protocol.src.qa.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
studio.src.agent uses parsers.src.types, so a change to parsers.src.types can break studio.src.agent, while a change to studio.src.agent can't break parsers.src.types.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
studio.src.agent uses studio-server.src.research.sources.connectors.nasaSvs, so a change to studio-server.src.research.sources.connectors.nasaSvs can break studio.src.agent, while a change to studio.src.agent can't break studio-server.src.research.sources.connectors.nasaSvs.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in studio.src.agent uses a type in agent-protocol.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
studio.src.agent uses agent-protocol.src.types, so a change to agent-protocol.src.types can break studio.src.agent, while a change to studio.src.agent can't break agent-protocol.src.types.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
studio.src.agent uses agent-protocol.src.voice, so a change to agent-protocol.src.voice can break studio.src.agent, while a change to studio.src.agent can't break agent-protocol.src.voice.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
studio.src.agent uses agent-protocol.src.api, so a change to agent-protocol.src.api can break studio.src.agent, while a change to studio.src.agent can't break agent-protocol.src.api.
Position
Below the diagonal: studio.src.agent uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 60.4 · Adequate · gated by D1, D2 ·
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 category
Findings
Severity
A05:2025 — Injection
211
High / Critical
A03:2025 — Software Supply Chain Failures
42
High / Critical
Roadmap
Top priorities: 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; Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies; Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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.
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 — 116
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 — 2821
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 — 530
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 10
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
This survey 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. All 83 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two 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. 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.
What we checked — 83 dimensions across the health lenses
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
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, 3448 of 3467 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D8 Code Coverage — not measured this run — We 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. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for apps/desktop/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D11 Test Reliability — not measured this run — We 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. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the node:test suite in apps/desktop/ was NOT MEASURED: the dependency install for apps/desktop/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/agent-protocol/ was NOT MEASURED: the dependency install for packages/agent-protocol/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/agent-runtime/ was NOT MEASURED: the dependency install for packages/agent-runtime/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/cli/ was NOT MEASURED: the dependency install for packages/cli/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/core/ was NOT MEASURED: the dependency install for packages/core/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/engine/ was NOT MEASURED: the dependency install for packages/engine/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/lint/ was NOT MEASURED: the dependency install for packages/lint/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/parsers/ was NOT MEASURED: the dependency install for packages/parsers/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/player/ was NOT MEASURED: the dependency install for packages/player/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/producer/ was NOT MEASURED: the dependency install for packages/producer/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in packages/sdk/ was NOT MEASURED: the dependency install for packages/sdk/ failed in the analyzer sandbox (npm error code EUNSUPPORTEDPROTOCOL), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 crate 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.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (6 contributor(s) across 183 commit(s) sampled, automation and bot accounts excluded). One of them holds 89% of the history; the other 5 hold 2.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We 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. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D23 Boundary Type-Coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 kind measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 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 — We 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 — We 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/agent-protocol/src/analysis.ts`, `packages/agent-protocol/src/editing.ts`, `packages/agent-protocol/src/editingParseMore.ts`, `packages/agent-protocol/src/qa.ts`, `packages/agent-protocol/src/story.ts`, … (+110 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.
D34 Knowledge Freshness — git history too condensed for a reliable signal — The history looks squashed or freshly imported, so per-file ownership reflects those commits rather than real maintenance. This dimension is reported as a low-confidence advisory and is not scored.
D44 Platform End-of-Life — not measured this run — We 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AC3 Page structure — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 347 further occurrence(s) are not listed individually; the score already reflects all 387.
AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
AX1 Captive dependencies — not measured this run — We 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 reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in packages/studio-server/src/research/candidates.ts, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB2 Runtime readiness — not measured this run — We 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. The dev server exited, and its output does not match a cause we recognise. (rule: unrecognised-exit). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > bun run studio / $ bun run --filter @hyperframes/studio dev / @hyperframes/studio dev: error: Module not found "./node_modules/.bin/vite" / @hyperframes/studio dev: Exited with code 1 / error: script "studio" exited with code 1" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We 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 (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > bun run studio / $ bun run --filter @hyperframes/studio dev / @hyperframes/studio dev: error: Module not found "./node_modules/.bin/vite" / @hyperframes/studio dev: Exited with code 1 / error: script "studio" exited with code 1" No runtime evidence was gathered.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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), and artefact counts an order of magnitude off. 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.
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 — We measured this, but not all of it. What we 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. 418 further occurrence(s) are not listed individually; the score already reflects all 458.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 filesystem refused the listing or the read of: packages/agent-protocol/agent-protocol. Every other path was read.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 1142 further occurrence(s) are not listed individually; the score already reflects all 1182.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 1501 further occurrence(s) are not listed individually; the score already reflects all 1541.
R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 283 further occurrence(s) are not listed individually; the score already reflects all 323.
R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
X10 Duplicated predicate — not measured this run — We 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. 388 further occurrence(s) are not listed individually; the score already reflects all 428.
X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 11 further occurrence(s) are not listed individually; the score already reflects all 51.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we 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.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 691 further occurrence(s) are not listed individually; the score already reflects all 731.
X4 Structured logging — not measured this run — We 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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X7 Silent fallback defaults — not measured this run — We 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. 53 further occurrence(s) are not listed individually; the score already reflects all 93.
Repo exclusion declarations: 31 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do 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.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
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.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret 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.
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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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 requirements.txt, 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.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
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.
666 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was make-cinematic.main at 456. A further 16 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 provenance.recordOf at 38 — they are counted neither in the figure above nor in this dimension's score. 10 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: packages/studio-server/src/research/provenance.ts (provenance.recordOf at 38), packages/studio-server/src/story/ledger.ts (ledger.isState at 25), packages/cli/src/media-use/lib/heygen-cli.mjs (classifyHeygenErrorResult at 21), packages/cli/src/media-use/lib/heygen-cli.mjs (heygen-cli.classifyHeygenErrorResult at 21), packages/cli/src/registry/localSemantic.ts (localSemantic.isMediaVectorRow at 20), and 5 more not listed here. 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.
+ 625 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with make-cinematic.main (cyclomatic 456), sync.planSync (cyclomatic 255), hyper-shader.init (cyclomatic 245). — 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 6 together lifts Cyclomatic Complexity from 2.1 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 800 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 13 bodies over 120 down to 120 or less in Cognitive Complexity — start with make-cinematic.main (cognitive 685), sync.planSync (cognitive 406), renderOrchestrator.executeRenderPipeline (cognitive 365). — 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 13 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.2 / 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.
Resolve the 343 FunctionTooLong finding(s) in God Classes — start with make-theme.cjs (31), videoFrameExtractor.ts (3), useDomEditOverlayGestures.ts (3). — One of this dimension's main actionable groups (343 warning-level).
Resolve the 84 FileTooLong finding(s) in God Classes — start with service.ts (3), init.ts (2), colorGrading.ts (2). — One of this dimension's main actionable groups (84 warning-level).
Resolve the 15 ClassTooLong finding(s) in God Classes — start with service.ts (3), REDACTED, hyperframes-slideshow.ts. — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
0 duplicated block group(s) detected. 0.0 % of the production lines (0 of 597,324) are in a reported copy. Measured on part of this repository only: .ts, .tsx (100% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
✓ On the Gold path — maintain.
Detailed fixes: d4_recommendation.md.
Do you agree with this assessment?
D5 · Coupling6.6 / 10Adequate✓ 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.
14 production modules (Cargo+npm), 1 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 11 of the 14 (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).
Circular dependencypackages/core/REDACTED:465
Off the main sequence: @hyperframes/parsers
What to do
Resolve the 1 Circular dependency finding(s) in Coupling — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
D10 · Test Quality10.0 / 10Stronggated by 34 serious 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.
117 skipped (110 with a documented reason), 25 zero-assertion, 2 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 21738 tests.
No assertions: published memory scripts run without reaching outside the skill · ×25skills/media-use/scripts/compatibility.test.mjs:18
Skipped test: survives a full parse-edit-serialize round-trip with stagger intact (write-path) · ×7packages/parsers/src/gsapParserAcorn.full.test.ts:599
Fixed-sleep synchronisation: serializes gestures: B's z phase waits for A's mirror phase · ×2packages/studio/src/components/nle/zLaneGesture.test.ts:49
Mock-dominated test: passes the live handle selection to transform and every animation actor · ×97packages/studio/src/webmcp/tools/targetedWriteTools.test.ts:67
Resolve the 25 No assertions finding(s) in Test Quality — start with processTracker.test.ts (4), compatibility.test.mjs (3), assertSwiftShader.test.ts (3). — One of this dimension's main actionable groups (25 warning-level).
Resolve the 7 Skipped test finding(s) in Test Quality — start with gsapParserAcorn.full.test.ts (4), drawElementService.integration.test.ts (3). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 2 Fixed-sleep synchronisation finding(s) in Test Quality — start with zLaneGesture.test.ts, captureStreamingStage.test.ts. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
9 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: flate2 · ×9
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 of 520 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate 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.
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.
Top hotspots: packages/core/src/runtime/init.ts (7×871=6097); packages/agent-protocol/src/validate.ts (20×58=1160); packages/studio-server/src/story/sync.ts (4×255=1020) Repeated repair below the complexity floor: apps/desktop/scripts/stage-runtime.mjs (4 of 7 changes were fixes); apps/desktop/src-tauri/src/proc.rs (3 of 5 changes were fixes); packages/studio-server/src/history/ownerLock.ts (3 of 5 changes were fixes)
Resolve the 159 Hotspot finding(s) in Churn × Complexity Hotspots — start with executor.ts (3), render.ts (2), tools.ts (2). — One of this dimension's main actionable groups (159 warning-level).
Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with stage-runtime.mjs, proc.rs, ownerLock.ts. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
10 deducted task-comment markers across 515207 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 10 TodoComment finding(s) in Explicit Debt — start with gsapRuntimeKeyframes.test.ts, keyframeBackfill.ts, captureCost.ts. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 of 2 documentation facets pass in full. 86 document(s) read across 19 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — 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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
8 naming inconsistencies among 586 declarations measured against a convention their peers follow.
`toDataURL` spells `URL` where 18 names in the project spell it `Url`packages/studio/src/shims/canvasBrowserStub.js:37
`heygenJSON` spells `JSON` where 13 names in the project spell it `Json`skills/media-use/audio/scripts/lib/heygen.mjs:111
`ensureDOMParser` spells `DOM` where 245 names in the project spell it `Dom`packages/cli/src/utils/dom.ts:7
`CreateGSAPFrameAdapterOptions` spells `GSAP` where 261 names in the project spell it `Gsap`packages/core/src/adapters/gsap.ts:12
`createGSAPFrameAdapter` spells `GSAP` where 261 names in the project spell it `Gsap`packages/core/src/adapters/gsap.ts:18
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 `toDataURL` spells `URL` where 18 names in the project spell it `Url` finding(s) in Naming Consistency — start with canvasBrowserStub.js. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `heygenJSON` spells `JSON` where 13 names in the project spell it `Json` finding(s) in Naming Consistency — start with heygen.mjs. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `ensureDOMParser` spells `DOM` where 245 names in the project spell it… finding(s) in Naming Consistency — start with dom.ts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
275 domain type(s) cross context boundaries across 14 contexts; they are measured and withheld (not published, not scored). Contexts: agent-protocol, agent-runtime, cli, core, desktop, engine, lint, parsers, player, producer, sdk, shader-transitions and 2 more.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
8 of 16 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×8REDACTED:1
What to do
Resolve the 8 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (8). — One of this dimension's main actionable groups (8 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
221 finding(s): 0 critical, 7 high, 131 medium, 83 low. 7 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 163 file(s) — `apps/desktop/src-tauri/src/home_page/home.js`, `packages/agent-protocol/src/analysis.ts` (line 55), `packages/agent-protocol/src/editing.ts` (line 454), `packages/agent-protocol/src/editingParseMore.ts` (line 33), `packages/agent-protocol/src/qa.ts` (line 391), … (+158 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 65 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (12), REDACTED (9), REDACTED (4). — One of this dimension's main actionable groups (65 warning-level).
Resolve the 35 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (35 warning-level).
No action in Static Analysis (SAST) — all 7 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (7 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 18 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (11), REDACTED (7). — One of this dimension's main actionable groups (18 issue-level).
Resolve the 8 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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.
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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No dependency in any ecosystem this repository declares is published as malicious.
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.0 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×4) — packages/engine/src/services/screenshotService.ts:621, packages/engine/src/services/screenshotService.ts:751, packages/player/src/controls-setup.ts:59, …
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×27) — packages/engine/src/services/threeDProjection.ts:573, packages/shader-transitions/src/capture.ts:141, REDACTED:961, …
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). (×2) — packages/studio/src/components/MediaPreview.tsx:59, packages/studio/src/media/MediaInspectorParts.tsx:124
Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way). — skills/talking-head-recut/references/frames/polaroid.html:28
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.3 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×7) — apps/desktop/src-tauri/src/home_page/index.html:346, apps/desktop/src-tauri/src/home_page/index.html:355, apps/desktop/src-tauri/src/home_page/index.html:532, …
This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×3) — packages/studio/src/captions/components/CaptionOverlay.tsx:421, packages/studio/src/components/editor/DomEditSelectionChrome.tsx:95, packages/studio/src/components/editor/DomEditSelectionChrome.tsx:191
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×15) — packages/studio/src/components/ExternalFileConflictBanner.tsx:118, packages/studio/src/components/editor/AnimationCardParts.tsx:121, packages/studio/src/components/editor/AnimationCardParts.tsx:189, …
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×6) — packages/studio/src/components/editor/BlockParamsPanel.tsx:240, packages/studio/src/components/panels/SlideshowHotspotTool.tsx:76, packages/studio/src/components/panels/SlideshowHotspotTool.tsx:85, …
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×4) — packages/studio/src/components/editor/propertyPanelFont.tsx:402, packages/studio/src/components/panels/SlideshowSubPanels.tsx:187, packages/studio/src/components/panels/VariablesValueControls.tsx:43, …
This <div> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label. — packages/studio/src/player/components/BeatStrip.tsx:417
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×2) — registry/components/input-feedback/demo.html:112, registry/components/input-feedback/input-feedback.html:34
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — skills/hyperframes-creative/templates/design-picker.html:758
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×19) — apps/desktop/src-tauri/src/home_page/report.html:2, packages/cli/src/templates/blank/index.html:2, packages/cli/src/templates/from-file/index.html:2, …
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×13) — packages/cli/src/templates/blank/index.html:2, packages/cli/src/templates/from-file/index.html:2, packages/parsers/src/hfIds.ts:24, …
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×5) — packages/parsers/src/hfIds.ts:24, REDACTED:848, packages/sdk/src/engine/model.ts:29, …
An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. (×3) — packages/producer/src/services/htmlCompiler.ts:307, packages/studio/src/player/hooks/timelinePlayerTestHarness.ts:62, packages/studio/src/webmcp/webmcpTestUtils.ts:23
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — apps/desktop/src-tauri/src/home_page/index.html:554
This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — apps/desktop/src-tauri/src/home_page/settings.html:31, packages/studio/src/components/editor/propertyPanelColor.tsx:325
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×8) — packages/studio/src/captions/components/CaptionOverlay.tsx:402, packages/studio/src/captions/components/CaptionOverlay.tsx:421, packages/studio/src/components/editor/DomEditSelectionChrome.tsx:95, …
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×2) — packages/studio/src/captions/components/CaptionTimeline.tsx:89, packages/studio/src/components/editor/propertyPanelFill.tsx:261
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×7) — packages/studio/src/components/ExternalFileConflictBanner.tsx:51, packages/studio/src/components/editor/TimelineFxPopover.tsx:138, packages/studio/src/components/nle/AssetPreviewOverlay.tsx:265, …
This <div> binds double-click and nothing else. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — packages/studio/src/components/nle/TimelinePane.tsx:98
This <svg> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — packages/studio/src/player/components/TimelineAutomationLane.tsx:436
This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — packages/studio/src/voice/panel/VoiceLineCard.tsx:201
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — skills/hyperframes-creative/templates/design-picker.html:642, skills/hyperframes-creative/templates/design-picker.html:643
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The slider role requires aria-valuenow to convey its state. Add it. — packages/studio/src/components/editor/Transform3DCube.tsx:189
What to do
Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<span> moves — its inline style sets `animation: hf` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — packages/player/src/slideshow/hyperframes-slideshow.ts:1054
<svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — packages/studio/src/components/ui/Button.tsx:97
<span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — packages/studio/src/components/ui/Status.tsx:105
<span> moves — its inline style sets `transition: transform 80ms ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — packages/studio/src/player/components/TimelineClipFades.tsx:327
`.ios-location` sets color: #fff on background-color: #2f80ed — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:96
`.ios-battery` sets color: #fff on background-color: #59d768 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:162
The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them. (×6) — registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:659, registry/blocks/macos-tahoe-liquid-glass/macos-tahoe-liquid-glass.html:471, registry/blocks/macos-tahoe-liquid-glass/macos-tahoe-liquid-glass.html:588, …
`[data-composition-id="ui-3d-reveal"] .share-btn` sets color: white on background-color: #18a0fb — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/ui-3d-reveal/ui-3d-reveal.html:1431
`[data-composition-id="ui-3d-reveal"] .hg-notifbadge` sets color: white on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/ui-3d-reveal/ui-3d-reveal.html:2036
`[data-composition-id="ui-3d-reveal"] .hg-styleico` sets color: #888 on background-color: #e8e8e8 — 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/ui-3d-reveal/ui-3d-reveal.html:2135
`.search-pill` sets color: #6e6e73 on background-color: #e9e9ed — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:205
`.get-button, .open-button` sets color: #007aff on background-color: #ececf1 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:368
`.install-button` sets color: #ffffff on background-color: #007aff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:436
`.check` sets color: #ffffff on background-color: #34c759 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:576
`.hf-transition-badge-count` sets color: #ffffff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — registry/components/badge-pop/badge-pop.html:76, registry/components/badge-pop/demo.html:62, registry/components/badge-pop/demo.html:212
`.a .badge` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/components/fade-through/demo.html:73
`.b .badge` sets color: #a1a1aa on background-color: #3f3f46 — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — registry/components/fade-through/demo.html:77
`#grain-overlay .grain-texture` moves (`animation: hf-grain-noise 0.5s steps(1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — registry/components/grain-overlay/demo.html:119, registry/components/grain-overlay/grain-overlay.html:73
`.hf-transition-input-clear` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — registry/components/input-feedback/demo.html:73, registry/components/input-feedback/demo.html:230, registry/components/input-feedback/input-feedback.html:85
`.hf-micro-bell span` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — registry/components/micro-transitions/demo.html:64, registry/components/micro-transitions/demo.html:321, registry/components/micro-transitions/micro-transitions.html:93
`.hf-transition-success-check` sets color: #16a34a on background-color: #dcfce7 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×3) — registry/components/success-check/demo.html:34, registry/components/success-check/demo.html:175, registry/components/success-check/success-check.html:52
`.imgph span` sets color: #8a8178 on background-color: #e2dbd1 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — skills/hyperframes-creative/frame-presets/cartesian/frame-showcase.html:414
`.team .ph` sets color: #8a8178 on background-color: #e2dbd1 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — skills/hyperframes-creative/frame-presets/cartesian/frame-showcase.html:433
`.callout` sets color: #faf9f5 on background-color: #cc785c — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — skills/hyperframes-creative/frame-presets/code-editorial/frame-showcase.html:319
`.cf6 .cta` sets color: #faf9f5 on background-color: #cc785c — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — skills/hyperframes-creative/frame-presets/code-editorial/frame-showcase.html:778
`.cover .chip.g` sets color: #efe9d9 on background-color: #1f8a4c — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — skills/hyperframes-creative/frame-presets/creative-mode/frame-showcase.html:151
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
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.
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.
The projects @hyperframes/core → @hyperframes/studio-server → @hyperframes/core form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference. — packages/core/REDACTED:465
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
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.
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.
`CheckAuditDriver` declares 17 required operations: `initialize`, `getDuration`, `hasNoTimelineDeclaration`, `getTransitionBoundaries`, `getCanvas`, `findAmbiguousSelectors`, `seek`, `seekGeometry`, `collectLayout`, `collectOverlap`, `collectLayoutGeometry`, `collectRotationSample`, `collectOffPivotRotationSample`, `collectGeometryCandidates`, `collectMotionFrame`, `anchorMotionIssues`, `collectContrast`. 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/cli/src/utils/checkTypes.ts:180
`PlayerAPI` declares 43 required operations: `play`, `pause`, `seek`, `getTime`, `getDuration`, `isPlaying`, `getMainTimeline`, `getElementBounds`, `getElementsAtPoint`, `setElementPosition`, `previewElementPosition`, `setElementKeyframes`, `setElementScale`, `setElementFontSize`, `setElementTextContent`, `setElementTextColor`, `setElementTextShadow`, `setElementTextFontWeight`, `setElementTextFontFamily`, `setElementTextOutline`, `setElementTextHighlight`, `setElementVolume`, `setStageZoom`, `getStageZoom`, `setStageZoomKeyframes`, `getStageZoomKeyframes`, `addElement`, `removeElement`, `updateElementTiming`, `setElementTiming`, `updateElementSrc`, `updateElementLayer`, `updateElementBasePosition`, `markTimelineDirty`, `isTimelineDirty`, `rebuildTimeline`, `ensureTimeline`, `enableRenderMode`, `disableRenderMode`, `renderSeek`, and 3 more. 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/parsers/src/types.ts:367
`Composition` declares 51 required operations: `setStyle`, `setText`, `setAttribute`, `setTiming`, `removeElement`, `addElement`, `setVariableValue`, `getVariableValue`, `listVariables`, `removeVariable`, `declareVariable`, `updateVariableDeclaration`, `removeVariableDeclaration`, `getVariableDeclarations`, `getVariableValues`, `validateVariableValues`, `getVariableUsage`, `setPreviewVariables`, `getElementTimings`, `setElementTiming`, `setHold`, `addGsapTween`, `setGsapTween`, `removeGsapTween`, `addWithKeyframes`, `replaceWithKeyframes`, `undo`, `redo`, `canUndo`, `canRedo`, `getElements`, `getRootElements`, `getElement`, `find`, `getAllAnimationIds`, `selection`, `element`, `getSelection`, `setSelection`, `dispatch`, and 11 more. 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. Those 51 declarations carry 48 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 48 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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/sdk/src/types.ts:419
`ProjectHistory` declares 16 required operations: `beginWindow`, `claim`, `noteChange`, `list`, `step`, `next`, `undo`, `restore`, `peek`, `checkout`, `readBlob`, `pin`, `onEntry`, `flush`, `replacedAtPath`, `close`. 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/studio-server/src/history/projectHistory.ts:135
`AgentClient` declares 39 required operations: `listChats`, `listModels`, `createChat`, `getChat`, `updateChat`, `startTurn`, `steerTurn`, `abortTurn`, `revertTurn`, `unrevertTurn`, `answerPermission`, `answerStoryOffer`, `answerVoiceSetup`, `answerVoicePilot`, `answerQuestion`, `cancelRun`, `deleteChat`, `chatEventsUrl`, `projectEventsUrl`, `getSettings`, `updateSettings`, `setJevApiKey`, `testJev`, `listProviders`, `refreshProviders`, `setProviderApiKey`, `startOAuthLogin`, `getOAuthLogin`, `submitOAuthLoginInput`, `cancelOAuthLogin`, `logoutProvider`, `listProviderModels`, `getQaReport`, `acceptQaIssue`, `listQaAccepted`, `removeQaAccepted`, `getUsage`, `renderFileUrl`, `claimIntake`. 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/studio/src/agent/agentClient.ts:110
`UseDomEditWiringParams` declares 25 required operations: `refreshDomEditGroupSelectionsFromPreview`, `bumpGsapCache`, `showToast`, `refreshPreviewDocumentVersion`, `syncPreviewHotkeys`, `applyDomSelection`, `buildDomSelectionFromTarget`, `updateGsapProperty`, `updateGsapMeta`, `deleteGsapAnimation`, `deleteAllForSelector`, `addGsapAnimation`, `addGsapProperty`, `removeGsapProperty`, `updateGsapFromProperty`, `addGsapFromProperty`, `removeGsapFromProperty`, `addKeyframe`, `addKeyframeBatch`, `removeKeyframe`, `moveKeyframe`, `resizeKeyframedTween`, `convertToKeyframes`, `removeAllKeyframes`, `handleDomManualEditsReset`. 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/studio/src/hooks/useDomEditWiring.ts:21
`AgentSettingsSlice` declares 20 required operations: `loadSettings`, `updateSettings`, `setJevApiKey`, `testJev`, `loadProviders`, `reloadProviders`, `refreshProviders`, `setProviderApiKey`, `startOAuthLogin`, `pollOAuthLogin`, `submitOAuthInput`, `cancelOAuthLogin`, `reloadAfterSignIn`, `signOutProvider`, `loadProviderModels`, `selectThread`, `setEnabledAgents`, `setAgentOverride`, `setDirectorConfig`, `setExecutionQuality`. 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/studio/src/agent/agentSettingsSlice.ts:37
`FxRackChainProps` declares 17 required operations: `onToggleCarveOpen`, `onCarveChange`, `onCarvePreview`, `onToggleEq`, `onPreviewEqBand`, `onCommitEqBand`, `onRemoveEq`, `onToggleOpenNode`, `onUpdateNode`, `onMoveNode`, `onRemoveNode`, `onPreviewNode`, `onToggleCollapse`, `onSetRunAmount`, `onRemoveRun`, `presetAutomateHandler`, `presetRemoveAutomationHandler`. 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/studio/src/components/editor/propertyPanelFxRackChain.tsx:22
`VoiceClient` declares 23 required operations: `providers`, `updateProvider`, `setApiKey`, `removeApiKey`, `checkProvider`, `controls`, `voices`, `designVoice`, `presets`, `createPreset`, `updatePreset`, `deletePreset`, `sample`, `audioUrl`, `dialects`, `script`, `saveScript`, `setProjectVoice`, `check`, `synthesize`, `progress`, `cancel`, `selectTake`. 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/studio/src/voice/voiceClient.ts:106
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
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.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of 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.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`classifyIcon` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/capture/iconClassifier.ts:185
`finalizeCli` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/cli.ts:213
`colorMiss` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/media-use/resolve.mjs:652
`showCandidates` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/media-use/resolve.mjs:869
`result` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/media-use/resolve.mjs:1163
`fetchLocalVectors` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/cli/src/registry/localSemantic.ts:150
`init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/core/src/runtime/webAudioTransport.ts:193
The guard above `return 0.5;` also returns `0.5`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/engine/src/utils/alphaBlit.ts:745
Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×5) — packages/player/src/controls.ts:39, packages/studio/src/hooks/gsapDragCommit.ts:467, packages/studio/src/hooks/gsapDragCommit.ts:469, …
`onLoad` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/components/nle/NLEPreview.tsx:520
`materializeIfDynamic` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/studio/src/hooks/gsapDragCommit.ts:127
`onHoverStart` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/player/components/TimelineGestureOverlay.tsx:81
`onHoverEnd` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/player/components/TimelineGestureOverlay.tsx:82
`onResizeStart` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/player/components/TimelineGestureOverlay.tsx:83
`onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/player/components/TimelineGestureOverlay.tsx:84
`onDoubleClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/studio/src/player/components/TimelineGestureOverlay.tsx:85
`getTimelineTrackStyle` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — packages/studio/src/player/components/timelineTheme.ts:89
`main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — skills/embedded-captions/scripts/matte.cjs:119
A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. — REDACTED:48
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×10) — packages/engine/src/services/drawElementService.integration.test.ts:42, packages/engine/src/services/drawElementService.integration.test.ts:43, packages/engine/src/services/drawElementService.integration.test.ts:44, …
`onAddAnimation` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:14
`onUpdateProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:15
`onUpdateMeta` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:16
`onDeleteAnimation` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:17
`onAddProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:18
`onRemoveProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:19
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
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
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
packages/studio/README.md names Zustand 4, but the manifest declares `zustand` ^5.0.0. 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. — packages/studio/README.md:31
What to do
Reconcile the README with reality: packages/studio/README.md names Zustand 4, but the manifest declares `zustand` ^5.0.0.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
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's code 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.
Do you agree with this assessment?
P2 · Observability7.9 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `apps/desktop/src-tauri`, `packages/agent-runtime`, `packages/engine`, `packages/studio-server`.
`packages/producer/src/parity-fixtures.ts` reports through `console.*` at line 21 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/producer/src/parity-fixtures.ts:21
`packages/producer/src/perf-gate.ts` reports through `console.*` at line 26 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/producer/src/perf-gate.ts:26
`packages/producer/src/runtime-conformance.ts` reports through `console.*` at line 38 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/producer/src/runtime-conformance.ts:38
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 155 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/producer/src/services/audioExtractor.ts:155
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 267 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/producer/src/services/audioExtractor.ts:267
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 271 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/producer/src/services/audioExtractor.ts:271
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 287 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/producer/src/services/audioExtractor.ts:287
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 311 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/producer/src/services/audioExtractor.ts:311
`packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 321 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/producer/src/services/audioExtractor.ts:321
`packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 109 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/producer/src/services/compilationRunner.ts:109
`packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 131 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/producer/src/services/compilationRunner.ts:131
`packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 136 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/producer/src/services/compilationRunner.ts:136
`packages/producer/src/services/fontCompression.ts` reports through `console.*` at line 110 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/producer/src/services/fontCompression.ts:110
`packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 169 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/producer/src/services/healthWorker.ts:169
`packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 170 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/producer/src/services/healthWorker.ts:170
`packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 171 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/producer/src/services/healthWorker.ts:171
`packages/producer/src/services/shaderTransitionWorker.ts` reports through `console.*` at line 94 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/producer/src/services/shaderTransitionWorker.ts:94
`packages/producer/src/services/render/shared.ts` reports through `console.*` at line 172 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/producer/src/services/render/shared.ts:172
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.
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 3 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. — REDACTED:6
`REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:45
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.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ 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.
The changelog this check read carries 1 versioned entry, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×6) — packages/cli/scripts/sync-agent-dirs.ts:142, packages/cli/src/commands/figma/download.ts:5, packages/cli/src/utils/historyOwner.ts:126, …
`fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — REDACTED:113, REDACTED:141, REDACTED:153
`fetcher(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — packages/studio-server/src/design/googleFonts.ts:141, packages/studio-server/src/design/googleFonts.ts:171
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
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 each language's code 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.
`readFileSync` in `processStartKey` 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/agent-runtime/src/processLock.ts:29, packages/agent-runtime/src/processLock.ts:32
`rmSync` in `removeIfDead` 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/agent-runtime/src/processLock.ts:159
`existsSync` in `ensureModel` 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/cli/src/background-removal/manager.ts:86, packages/cli/src/background-removal/manager.ts:92
`mkdirSync` in `ensureModel` 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/cli/src/background-removal/manager.ts:88
`renameSync` in `render` 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/cli/src/background-removal/pipeline.ts:312, packages/cli/src/background-removal/pipeline.ts:313
`rmSync` in `render` 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/cli/src/background-removal/pipeline.ts:328, packages/cli/src/background-removal/pipeline.ts:329
`existsSync` in `findFromHyperframesCache` 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/cli/src/browser/manager.ts:365, packages/cli/src/browser/manager.ts:395
`existsSync` in `ensureLinuxArmBrowser` 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/cli/src/browser/manager.ts:634
`spawnSync` in `ensureLinuxArmBrowser` 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/cli/src/browser/manager.ts:642
`rmSync` in `callback to installWithCorruptArchiveRecovery` 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/cli/src/browser/manager.ts:864
`mkdirSync` in `callback to installWithCorruptArchiveRecovery` 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/cli/src/browser/manager.ts:865
`existsSync` in `chromeSharedLibOutcome` 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/cli/src/browser/preflight.ts:203
`existsSync` in `checkChrome` 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/cli/src/browser/preflight.ts:290
`existsSync` in `addToProject` 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/cli/src/commands/add.ts:308, packages/cli/src/commands/add.ts:309
`existsSync` in `run` 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. (×4) — packages/cli/src/commands/add.ts:454, packages/cli/src/commands/add.ts:465, packages/cli/src/commands/add.ts:518, …
`mkdirSync` in `renderBatchRow` 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/cli/src/commands/batchRender.ts:336
`readFileSync` in `app.get("/player.js")` 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/cli/src/commands/play.ts:146, REDACTED:122
`readFileSync` in `app.get("/runtime.js")` 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/cli/src/commands/play.ts:155
`existsSync` in `app.get("/composition/*")` 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/cli/src/commands/play.ts:227, REDACTED:316
`readFileSync` in `app.get("/composition/*")` 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. (×4) — packages/cli/src/commands/play.ts:231, packages/cli/src/commands/play.ts:246, REDACTED:317, …
`readFileSync` in `run` 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:92
`readFileSync` in `app.get("/slideshow.js")` 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:128
`mkdirSync` in `executeRenderPlan` 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/cli/src/commands/render/execute.ts:69
`readFileSync` in `runResolutionPreflight` 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/cli/src/commands/render/execute.ts:294
`readFileSync` in `warnForSlideshow` 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/cli/src/commands/render/present.ts:64
`readFileSync` in `search` 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/cli/src/media-use/lib/brand-provider.mjs:39
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.
Do you agree with this assessment?
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.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
packages/cli/src/media-use/ and skills/media-use/scripts/ are near-verbatim copies of each other: 13 files are byte-identical under the same relative paths (~1564 lines; the trees hold 92 and 26 files). That is one structural fact, not 13 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — packages/cli/src/media-use/lib/recipe-store.mjs:1
184 duplicated blocks under packages/ have copies in at least two of the sibling directories agent-protocol, agent-runtime, cli, core, engine, lint (+7 more sibling(s) not listed) — 105 of them are reported below, and 79 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 184 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 184 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 184 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/cli/src/media-use/lib/grade-analyzer.mjs:19
112 duplicated blocks under packages/studio/src/ have copies in at least two of the sibling directories agent, captions, components, contexts, design, hooks (+8 more sibling(s) not listed) — 34 of them are reported below, and 78 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 112 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 112 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 112 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/studio/src/research/SourceApiKeyControl.tsx:23
54 duplicated blocks under packages/agent-runtime/src/ have copies in at least two of the sibling directories agents, analysis, crossProject, design, editing, omp (+8 more sibling(s) not listed) — 36 of them are reported below, and 18 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 54 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 54 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 54 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/agent-runtime/src/research/transport.ts:21
53 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, packages, registry, scripts, skills — 45 of them are reported below, and 8 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 53 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 53 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 53 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/cli/src/media-use/lib/recipe-store.mjs:10
32 duplicated blocks under packages/studio/src/components/ have copies in at least two of the sibling directories chat, dock, editor, nle, panels, renders (+4 more sibling(s) not listed) — 6 of them are reported below, and 26 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 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 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 32 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/studio/src/components/chat/ChatDialog.tsx:65
30 duplicated blocks under skills/ have copies in at least two of the sibling directories embedded-captions, faceless-explainer, general-video, hyperframes, hyperframes-animation, hyperframes-creative (+4 more sibling(s) not listed) — 29 of them are reported below, and 1 is 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 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 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 30 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:29
21 duplicated blocks under packages/studio-server/src/ have copies in at least two of the sibling directories analysis, crossProject, design, editing, helpers, qa (+3 more sibling(s) not listed) — 17 of them are reported below, and 4 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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/studio-server/src/research/sources/apiKeys.ts:6
20 duplicated blocks under packages/cli/src/ have copies in at least two of the sibling directories browser, capture, commands, media-use, registry, server (+3 more sibling(s) not listed) — 19 of them are reported below, and 1 is 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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/cli/src/commands/layout-audit.browser.js:1977
REDACTED:29 · REDACTED:29 · REDACTED:29 — these 3 files are line-for-line copies of one another — 338 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. — REDACTED:29
skills/faceless-explainer/scripts/assemble-index.mjs:53 · skills/pr-to-video/scripts/assemble-index.mjs:53 — these 2 files are line-for-line copies of one another — 289 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. — skills/faceless-explainer/scripts/assemble-index.mjs:53
REDACTED:26 · REDACTED:26 · REDACTED:26 — these 3 files are line-for-line copies of one another — 250 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. — REDACTED:26
skills/faceless-explainer/scripts/captions.mjs:2 · skills/pr-to-video/scripts/captions.mjs:2 · skills/product-launch-video/scripts/captions.mjs:2 — these 3 files are line-for-line copies of one another — 229 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. — skills/faceless-explainer/scripts/captions.mjs:2
skills/hyperframes-animation/scripts/package-loader.mjs:11 · skills/hyperframes-creative/scripts/package-loader.mjs:11 — these 2 files are line-for-line copies of one another — 224 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. — skills/hyperframes-animation/scripts/package-loader.mjs:11
REDACTED:1444 · REDACTED:1811 — 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. — REDACTED:1444
packages/cli/src/media-use/lib/recipe-store.mjs:10 · skills/media-use/scripts/lib/recipe-store.mjs:10 — these 2 files are line-for-line copies of one another — 201 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/cli/src/media-use/lib/recipe-store.mjs:10
packages/cli/src/media-use/lib/grade-analyzer.mjs:19 · packages/core/src/mediaGradeAnalyzer.ts:88 — the two spans are one implementation copied and then locally edited — 1382 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/cli/src/media-use/lib/grade-analyzer.mjs:19
packages/cli/src/media-use/lib/error-diffusion.mjs:1 · skills/media-use/scripts/lib/error-diffusion.mjs:1 — these 2 files are line-for-line copies of one another — 173 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/cli/src/media-use/lib/error-diffusion.mjs:1
skills/faceless-explainer/scripts/audio.mjs:25 · skills/pr-to-video/scripts/audio.mjs:25 · skills/product-launch-video/scripts/audio.mjs:23 — these 3 files are line-for-line copies of one another — 166 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. — skills/faceless-explainer/scripts/audio.mjs:25
skills/faceless-explainer/scripts/lib/storyboard.mjs:13 · skills/music-to-video/scripts/lib/storyboard.mjs:13 · skills/pr-to-video/scripts/lib/storyboard.mjs:13 · skills/product-launch-video/scripts/lib/storyboard.mjs:13 — these 4 files are line-for-line copies of one another — 161 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. — skills/faceless-explainer/scripts/lib/storyboard.mjs:13
apps/desktop/src-tauri/src/home_page/settings-assets.js:95 · apps/desktop/src-tauri/src/home_page/settings-voice.js:163 — the two spans are one implementation copied and then locally edited — 976 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. — apps/desktop/src-tauri/src/home_page/settings-assets.js:95
REDACTED:110 · REDACTED:172 — the two spans are one implementation copied and then locally edited — 1001 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:110
packages/agent-runtime/src/research/transport.ts:21 · packages/agent-runtime/src/voice/transport.ts:18 — the two spans are one implementation copied and then locally edited — 948 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/agent-runtime/src/research/transport.ts:21
REDACTED:12 · REDACTED:12 — these 2 files are line-for-line copies of one another — 132 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. — REDACTED:12
packages/studio/src/research/SourceApiKeyControl.tsx:23 · packages/studio/src/voice/VoiceKeyControl.tsx:31 — the two spans are one implementation copied and then locally edited — 815 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/studio/src/research/SourceApiKeyControl.tsx:23
packages/agent-runtime/src/processLock.ts:26 · packages/studio-server/src/history/ownerLock.ts:21 — the two spans are one implementation copied and then locally edited — 1068 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/agent-runtime/src/processLock.ts:26
packages/engine/src/services/chunkEncoder.ts:251 · packages/engine/src/services/streamingEncoder.ts:271 — the two spans are one implementation copied and then locally edited — 836 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/engine/src/services/chunkEncoder.ts:251
packages/cli/src/media-use/lib/cutlist.mjs:1 · skills/media-use/scripts/lib/cutlist.mjs:1 — 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/cli/src/media-use/lib/cutlist.mjs:1
REDACTED:7 · REDACTED:7 · REDACTED:7 — these 3 files are line-for-line copies of one another — 127 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. — REDACTED:7
packages/studio/src/components/editor/propertyPanelFlatTextSection.tsx:84 · packages/studio/src/components/editor/propertyPanelSections.tsx:341 — the two spans are one implementation copied and then locally edited — 750 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/studio/src/components/editor/propertyPanelFlatTextSection.tsx:84
packages/cli/src/media-use/lib/cube-validate.mjs:24 · packages/core/src/colorLuts.ts:35 — the two spans are one implementation copied and then locally edited — 754 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/cli/src/media-use/lib/cube-validate.mjs:24
REDACTED:12 · REDACTED:12 · REDACTED:12 · REDACTED:12 · +1 more site(s) not listed — these 5 files are line-for-line copies of one another — 117 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. — REDACTED:12
packages/studio-server/src/research/sources/connectors/pexels.ts:18 · packages/studio-server/src/research/sources/connectors/pixabay.ts:23 — the two spans are one implementation copied and then locally edited — 772 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/studio-server/src/research/sources/connectors/pexels.ts:18
packages/studio/src/components/chat/VoicePilotCard.tsx:42 · packages/studio/src/components/chat/VoiceSetupCard.tsx:97 — the two spans are one implementation copied and then locally edited — 549 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/studio/src/components/chat/VoicePilotCard.tsx:42
packages/cli/src/commands/play.ts:82 · REDACTED:46 — the two spans are one implementation copied and then locally edited — 635 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/cli/src/commands/play.ts:82
packages/cli/src/media-use/lib/prefs-store.mjs:1 · skills/media-use/scripts/lib/prefs-store.mjs:1 — these 2 files are line-for-line copies of one another — 84 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/cli/src/media-use/lib/prefs-store.mjs:1
packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:70 · packages/studio/src/components/editor/propertyPanelMediaSection.tsx:41 — the two spans are one implementation copied and then locally edited — 567 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/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:70
packages/core/src/audioFx.ts:784 · packages/core/src/vfx.ts:470 — the two spans are one implementation copied and then locally edited — 506 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/core/src/audioFx.ts:784
REDACTED:1666 · REDACTED:2037 — 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. — REDACTED:1666
packages/cli/src/media-use/lib/duck.mjs:1 · skills/media-use/scripts/lib/duck.mjs:1 — these 2 files are line-for-line copies of one another — 68 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/cli/src/media-use/lib/duck.mjs:1
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.
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/cli/src/registry/validation.ts:1 imports ajv/dist/2020.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/cli/src/registry/validation.ts:1
packages/cli/src/server/studioServer.ts:110 reaches into another package with a relative path (../../../producer/src/index.js) — import the package by name instead. — packages/cli/src/server/studioServer.ts:110
packages/cli/src/server/studioServer.ts:509 reaches into another package with a relative path (../../../producer/src/services/deterministicFonts.js) — import the package by name instead. — packages/cli/src/server/studioServer.ts:509
packages/cli/src/server/studioServer.ts:511 reaches into another package with a relative path (../../../producer/src/services/animatedGifPrep.js) — import the package by name instead. — packages/cli/src/server/studioServer.ts:511
packages/cli/src/server/studioServer.ts:512 reaches into another package with a relative path (../../../producer/src/utils/urlDownloader.js) — import the package by name instead. — packages/cli/src/server/studioServer.ts:512
packages/engine/scripts/test-fitTextFontSize-browser.ts:12 reaches into another package with a relative path (../../core/src/inline-scripts/hyperframesRuntime.engine) — import the package by name instead. — packages/engine/scripts/test-fitTextFontSize-browser.ts:12
packages/engine/scripts/test-runtime-position-edits-browser.ts:25 reaches into another package with a relative path (../../core/src/inline-scripts/hyperframesRuntime.engine) — import the package by name instead. — packages/engine/scripts/test-runtime-position-edits-browser.ts:25
packages/producer/scripts/build-hf-early-stub.ts:16 reaches into another package with a relative path (../../core/scripts/writeGeneratedFile.js) — import the package by name instead. — packages/producer/scripts/build-hf-early-stub.ts:16
packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:7 reaches past another workspace package's public entry into its internals with a relative path (../../../engine/src/services/videoFrameExtractor.ts) — 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. — packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:7
packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:12 reaches past another workspace package's public entry into its internals with a relative path (../../../engine/src/services/audioMixer.ts) — 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. — packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:12
packages/studio-server/src/agent/launch.ts:33 imports @hyperframes/agent-runtime/REDACTED, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/studio-server/src/agent/launch.ts:33
packages/studio/vite.adapter.ts:30 reaches into another package with a relative path (../cli/src/server/siteAdapter) — import the package by name instead. — packages/studio/vite.adapter.ts:30
packages/studio/vite.adapter.ts:31 reaches into another package with a relative path (../cli/src/server/framesAdapter) — import the package by name instead. — packages/studio/vite.adapter.ts:31
packages/studio/vite.adapter.ts:279 reaches into another package with a relative path (../producer/src/services/deterministicFonts.js) — import the package by name instead. — packages/studio/vite.adapter.ts:279
packages/studio/vite.request-guard.ts:4 reaches into another package with a relative path (../studio-server/src/helpers/hostGuard) — import the package by name instead. — packages/studio/vite.request-guard.ts:4
packages/studio/vite.studioMotion.ts:3 reaches into another package with a relative path (../core/src/studio-api/helpers/manualEditsRenderScript) — import the package by name instead. — packages/studio/vite.studioMotion.ts:3
packages/studio/vite.studioMotion.ts:7 reaches into another package with a relative path (../core/src/studio-api/helpers/studioMotionRenderScript) — import the package by name instead. — packages/studio/vite.studioMotion.ts:7
scripts/lint-skills.ts:15 reaches into another package with a relative path (../packages/core/src/index.js) — import the package by name instead. — scripts/lint-skills.ts:15
What to do
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (17 rows); declare the workspace packages these files import in the importing package's own REDACTED dependencies (1 row) — those imports are already bare package specifiers, so the import statements do not change, only the manifest.
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.
main has cyclomatic complexity 347 and cognitive complexity 577; 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. — skills/embedded-captions/scripts/make-cinematic.cjs:69
planSync has cyclomatic complexity 286 and cognitive complexity 453; 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/studio-server/src/story/sync.ts:292
executeRenderPipeline has cyclomatic complexity 231 and cognitive complexity 384; 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:2908
collectRuntimeTimelinePayload has cyclomatic complexity 130 and cognitive complexity 212; 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/core/src/runtime/timeline.ts:241
readOperation has cyclomatic complexity 120 and cognitive complexity 141; 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/agent-protocol/src/editingParse.ts:85
planCut has cyclomatic complexity 112 and cognitive complexity 170; 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/studio-server/src/analysis/cutPlan.ts:441
syncRuntimeMedia has cyclomatic complexity 105 and cognitive complexity 148; 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/core/src/runtime/media.ts:277
readMoreOperation has cyclomatic complexity 94 and cognitive complexity 116; 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/agent-protocol/src/editingParseMore.ts:90
createRenderPlan has cyclomatic complexity 94 and cognitive complexity 99; 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/cli/src/commands/render/plan.ts:222
bundleProject has cyclomatic complexity 93 and cognitive complexity 171; 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/core/src/compiler/htmlBundler.ts:954
executeGsapMutationAcorn has cyclomatic complexity 93 and cognitive complexity 74; 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:1439
executeGsapMutationRecast has cyclomatic complexity 93 and cognitive complexity 74; 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:1779
runProbeStage has cyclomatic complexity 92 and cognitive complexity 278; 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/producer/src/services/render/stages/probeStage.ts:266
compileIntent has cyclomatic complexity 91 and cognitive complexity 171; 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/studio-server/src/story/compile.ts:239
inlineSubCompositions has cyclomatic complexity 81 and cognitive complexity 150; 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/core/src/compiler/inlineSubCompositions.ts:272
validateOp has cyclomatic complexity 78 and cognitive complexity 65; 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/sdk/src/engine/mutate.ts:1606
frontFx has cyclomatic complexity 77 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 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. — skills/embedded-captions/scripts/make-theme.cjs:1348
inspectHtml has cyclomatic complexity 73 and cognitive complexity 89; 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/studio-server/src/research/sources/pageInspector.ts:142
tryGsapResizeIntercept has cyclomatic complexity 72 and cognitive complexity 117; 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/studio/src/hooks/gsapResizeIntercept.ts:97
run has cyclomatic complexity 70 and cognitive complexity 107; 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/cli/src/commands/catalog.ts:204
applyOne has cyclomatic complexity 68 and cognitive complexity 123; 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/sdk/src/engine/apply-patches.ts:181
run has cyclomatic complexity 68 and cognitive complexity 109; 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/cli/src/commands/init.ts:723
initThreeDProjectionInPage has cyclomatic complexity 66 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/engine/src/services/threeDProjection.ts:53
tweenCallToAnimation has cyclomatic complexity 63 and cognitive complexity 98; 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:1223
run has cyclomatic complexity 60 and cognitive complexity 106; 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:249
transportTick has cyclomatic complexity 60 and cognitive complexity 89; 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/core/src/runtime/init.ts:4315
recordSite has cyclomatic complexity 59 and cognitive complexity 80; 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/cli/src/siteInspect/recordSite.ts:316
toolRow has cyclomatic complexity 59 and cognitive complexity 76; 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. — apps/desktop/src-tauri/src/home_page/onboarding-system.js:185
FlatMediaSection has cyclomatic complexity 59 and cognitive complexity 52; 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/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:42
parseStartTurn has cyclomatic complexity 58 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/agent-protocol/src/validate.ts:786
run has cyclomatic complexity 58 and cognitive complexity 70; 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/cli/src/media-use/resolve.mjs:308
runTestSuite has cyclomatic complexity 57 and cognitive complexity 97; 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/producer/src/regression-harness.ts:849
main has cyclomatic complexity 57 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. — skills/embedded-captions/scripts/transcribe.cjs:97
PropertyPanel has cyclomatic complexity 57 and cognitive complexity 47; 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/studio/src/components/editor/PropertyPanel.tsx:56
captureSnapshots has cyclomatic complexity 56 and cognitive complexity 95; 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/cli/src/commands/snapshot.ts:281
extractAllVideoFrames has cyclomatic complexity 56 and cognitive complexity 93; 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/engine/src/services/videoFrameExtractor.ts:1658
validateMetadata has cyclomatic complexity 55 and cognitive complexity 51; 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/producer/src/regression-harness.ts:196
main has cyclomatic complexity 54 and cognitive complexity 55; 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. — skills/embedded-captions/scripts/make-composition.cjs:236
StyleSections has cyclomatic complexity 54 and cognitive complexity 39; 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/studio/src/components/editor/propertyPanelStyleSections.tsx:42
isChatEvent has cyclomatic complexity 54 and cognitive complexity 26; 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/agent-runtime/src/store/index.ts:327
Do you agree with this assessment?
R3 · Large Files5.1 / 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 5206 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/core/src/runtime/init.ts has 4740 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/core/src/runtime/init.ts:1
packages/engine/src/services/frameCapture.ts has 4637 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/engine/src/services/frameCapture.ts:1
packages/core/src/runtime/colorGrading.ts has 3673 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/core/src/runtime/colorGrading.ts:1
REDACTED has 3296 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
REDACTED has 3154 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
apps/desktop/src-tauri/src/home_page/home.js has 2756 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/desktop/src-tauri/src/home_page/home.js:1
packages/parsers/src/gsapWriterAcorn.ts has 2623 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/parsers/src/gsapWriterAcorn.ts:1
packages/producer/src/services/htmlCompiler.ts has 2540 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/producer/src/services/htmlCompiler.ts:1
packages/engine/src/services/videoFrameExtractor.ts has 2417 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/engine/src/services/videoFrameExtractor.ts:1
REDACTED has 2379 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
REDACTED has 2339 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/cli/src/commands/layout-audit.browser.js has 1986 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/cli/src/commands/layout-audit.browser.js:1
REDACTED has 1928 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/agent-protocol/src/story.ts has 1813 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/agent-protocol/src/story.ts:1
packages/sdk/src/engine/mutate.ts has 1695 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/sdk/src/engine/mutate.ts:1
packages/engine/src/services/audioMixer.ts has 1646 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/engine/src/services/audioMixer.ts:1
REDACTED has 1622 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/producer/src/services/deterministicFonts.ts has 1538 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/producer/src/services/deterministicFonts.ts:1
packages/lint/src/rules/composition.ts has 1522 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/lint/src/rules/composition.ts:1
packages/cli/src/utils/checkPipeline.ts has 1499 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/cli/src/utils/checkPipeline.ts:1
packages/core/src/colorGrading.ts has 1452 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/core/src/colorGrading.ts:1
packages/core/src/compiler/htmlBundler.ts has 1447 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/core/src/compiler/htmlBundler.ts:1
packages/player/src/slideshow/hyperframes-slideshow.ts has 1392 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/player/src/slideshow/hyperframes-slideshow.ts:1
packages/studio-server/src/story/sync.ts has 1387 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/studio-server/src/story/sync.ts:1
packages/producer/src/regression-harness.ts has 1349 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/producer/src/regression-harness.ts:1
packages/core/src/runtime/vfx.ts has 1298 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/core/src/runtime/vfx.ts:1
packages/engine/src/utils/urlDownloader.ts has 1277 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/engine/src/utils/urlDownloader.ts:1
REDACTED has 1258 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/cli/src/utils/checkBrowser.ts has 1220 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/cli/src/utils/checkBrowser.ts:1
packages/cli/src/commands/render.ts has 1215 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/cli/src/commands/render.ts:1
packages/engine/src/services/drawElementService.ts 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. — packages/engine/src/services/drawElementService.ts:1
packages/studio-server/src/history/projectHistory.ts has 1151 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/studio-server/src/history/projectHistory.ts:1
packages/engine/src/services/parallelCoordinator.ts has 1148 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/engine/src/services/parallelCoordinator.ts:1
packages/studio-server/src/research/service.ts has 1135 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/studio-server/src/research/service.ts:1
packages/cli/src/media-use/resolve.mjs has 1133 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/cli/src/media-use/resolve.mjs:1
packages/agent-protocol/src/validate.ts has 1091 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/agent-protocol/src/validate.ts:1
packages/agent-protocol/src/qa.ts has 1089 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/agent-protocol/src/qa.ts:1
packages/engine/src/config.ts has 1076 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/engine/src/config.ts:1
packages/cli/src/server/studioServer.ts has 1070 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/cli/src/server/studioServer.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.5 / 10Exemplary✓ 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) — apps/desktop/src-tauri/src/home_page/home.js:1, registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:1, skills/embedded-captions/scripts/make-cinematic.cjs:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
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.
Do you agree with this assessment?
R7 · Dead Code8.1 / 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.
385 file(s) (~97630 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/core/src/index.ts imports './generated/runtime-inline', 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/core
Unreachable from the 721 application, 115 tooling and 1805 test entry point(s) detected in this repo. Gate removals on `bun run build` — an undetected custom entry would make these reachable.
no import path from any entry point (721 application, 115 tooling, 1805 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 (×7) — packages/producer/src/verifyStaticPage.ts, packages/studio/src/player/components/TimelineDropInsertionLine.tsx, packages/producer/src/parity-fixtures.ts, …
Nothing imports this binding — it is safe to review for removal. (×27) — apps/desktop/scripts/licenses.mjs:26, packages/agent-runtime/src/voice/transport.ts:18, packages/cli/src/audio/providers.ts:96, …
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/components/editor/studioMotion.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/components/editor/studioMotion.ts in the same commit, or the barrel will import a name that no longer exists. — packages/studio/src/components/editor/studioMotionTypes.ts:54
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/components/ui/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/components/ui/index.ts in the same commit, or the barrel will import a name that no longer exists. — packages/studio/src/components/ui/BrandLoader.tsx:49
Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/i18n/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/i18n/index.ts in the same commit, or the barrel will import a name that no longer exists. (×2) — packages/studio/src/i18n/format.ts:44, packages/studio/src/i18n/format.ts:50
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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. (×4) — skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx:13, skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx:14, skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx:15, …
Declared in 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) — REDACTED:31, REDACTED:35
Declared in packages/producer/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. (×18) — packages/producer/REDACTED:39, packages/producer/REDACTED:40, packages/producer/REDACTED:41, …
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Do you agree with this assessment?
R9 · Circular Imports4.6 / 10Weak✓ 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.
Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×13) — packages/cli/src/capture/assetDownloader.ts:74, packages/core/src/compiler/scenePartsManifest.ts:5, packages/engine/src/utils/urlDownloader.ts:281, …
`https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 447 such include(s) across the repository's markup. — packages/cli/src/templates/blank/index.html:6
`server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) (×2) — packages/cli/src/utils/compositionServer.ts:179, packages/producer/src/services/healthWorkerThread.ts:70
`serve(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) (×2) — packages/engine/src/services/fileServer.ts:149, packages/producer/src/server.ts:947
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 13 sites, not one: `packages/cli/src/capture/assetDownloader.ts:74` (createHash("sha1")), `packages/core/src/compiler/scenePartsManifest.ts:5` (createHash("sha1")), `packages/engine/src/utils/urlDownloader.ts:281` (createHash("md5")), `packages/engine/src/utils/urlDownloader.ts:866` (createHash("md5")), `packages/producer/src/services/deterministicFonts.ts:887` (createHash("sha1")), `packages/studio-server/src/analysis/store.ts:336` (createHash("sha1")), `packages/studio-server/src/editing/captions.ts:21` (createHash("sha1")), `packages/studio-server/src/helpers/hfIdPersist.ts:20` (createHash("sha1")), and 5 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
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.
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.
Do you agree with this assessment?
X13 · Undrained process stream6.4 / 10Adequate✓ Tool-verified
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.
`spawn` pipes `stderr` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `proc.stderr`, while `proc.stdout` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stderr (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`proc.stderr.on('data', …)`, or `proc.stderr.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot. — packages/studio-server/src/helpers/proxyTranscoder.ts:283
`spawn` pipes both `stdout` and `stderr` here — it is given no `stdio` option, or `'pipe'` — and the parent waits for the child's end while nothing consumes either: nothing in this scope ever reads `child.stdout` or `child.stderr`. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to either stream (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles and the stuck child holds its resources until something kills it. Consume both streams before the wait (`.on('data', …)`, or `.resume()` to discard one), or stop piping what you do not want — `stdio: 'ignore'`, `'inherit'`, or those values in its slots. — packages/cli/src/commands/init.ts:184
What to do
Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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.
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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.3 / 10Critical✓ Tool-verified
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.
`sameJson` is exported and takes `a: unknown` from its caller, and it calls itself at line 162 (`sameJson`) with a piece of `a` (and at line 169) — and nowhere in `sameJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sameJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio-server/src/story/graphIo.ts:162
`findUnsafeMutationValues` is exported and takes `value: unknown` from its caller, and it calls itself at line 24 (`findUnsafeMutationValues`) with a piece of `value` (and at line 28) — and nowhere in `findUnsafeMutationValues` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findUnsafeMutationValues` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio-server/src/helpers/finiteMutation.ts:24
`isStudioSaveErrorAlreadyToasted` is exported and takes `error: unknown` from its caller, and it calls itself at line 100 (`isStudioSaveErrorAlreadyToasted`) with a piece of `error` — and nowhere in `isStudioSaveErrorAlreadyToasted` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `isStudioSaveErrorAlreadyToasted` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio/src/utils/studioSaveDiagnostics.ts:100
`getStudioSaveStatusCode` is exported and takes `error: unknown` from its caller, and it calls itself at line 112 (`getStudioSaveStatusCode`) with a piece of `error` — and nowhere in `getStudioSaveStatusCode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `getStudioSaveStatusCode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio/src/utils/studioSaveDiagnostics.ts:112
`collectSubCompositionDomChildren` is exported, takes a document from its caller (line 122) and hands it to `collectHostDomChildren`, which calls itself at line 97 (`collectHostDomChildren`) with a piece of `parentEl` (and at line 110) — and nowhere in `collectHostDomChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectHostDomChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio/src/player/hooks/timelineSyncHydration.ts:97
`isActiveInSubtree` is exported and takes `node: TreeNode` from its caller, and it calls itself at line 120 (`isActiveInSubtree`) with a piece of `node` — and nowhere in `isActiveInSubtree` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `isActiveInSubtree` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio/src/components/editor/FileTreeIcons.tsx:120
`parseDockLayout` is exported, takes a document from its caller (line 55) and hands it to `collectLeafViews`, which calls itself at line 18 (`collectLeafViews`) with a piece of `node` — and nowhere in `collectLeafViews` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectLeafViews` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/studio/src/components/dock/dockLayoutSchema.ts:18
`buildRoots` is exported, takes a document from its caller (line 247) and hands it to `buildChildren`, which calls itself at line 136 (`buildChildren`) with a piece of `parent` — and nowhere in `buildChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `buildChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/sdk/src/document.ts:136
`compositionPaintsAt` is exported, takes a document from its caller (line 741) and hands it to `inkAt`, which calls itself at line 609 (`inkAt`) with a piece of `el` — and nowhere in `inkAt` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `inkAt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/sdk/src/adapters/iframe.ts:609
`resolveHfColorGradingVariables` is exported and takes `raw: unknown` from its caller, and it calls itself at line 1396 (`resolveHfColorGradingVariables`) with a piece of `raw` (and at line 1402) — and nowhere in `resolveHfColorGradingVariables` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `resolveHfColorGradingVariables` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/colorGrading.ts:1396
`createDrawnProbe` is exported, takes a document from its caller (line 106) and hands it to `glyphsUnder`, which calls itself at line 154 (`glyphsUnder`) with a piece of `el` — and nowhere in `glyphsUnder` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `glyphsUnder` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/core/src/runtime/pickerDrawn.ts:154
`sameValue` is exported and takes `a: unknown` from its caller, and it calls itself at line 99 (`sameValue`) with a piece of `a` — and nowhere in `sameValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sameValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agent-runtime/src/store/compact.ts:99
`extractPathArguments` is exported, takes a document from its caller (line 50) and hands it to `collectStrings`, which calls itself at line 36 (`collectStrings`) with a piece of `value` (and at line 43, line 45) — and nowhere in `collectStrings` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectStrings` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agent-runtime/src/omp/path-guard.ts:36
`extractPathArguments` is exported and takes `input: unknown` from its caller, and it calls itself at line 59 (`extractPathArguments`) with a piece of `input` (and at line 61) — and nowhere in `extractPathArguments` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `extractPathArguments` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/agent-runtime/src/omp/path-guard.ts:59
`merge` is public and takes `target: &mut Value` from its caller, and it calls itself at line 167 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `merge` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — apps/desktop/src-tauri/src/prefs.rs:167
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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.
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.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 111/161 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`heygenJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — skills/media-use/audio/scripts/lib/heygen.mjs:111
`probeFrame` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/webmcp/StudioAgentTools.tsx:142
`applyOnServer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/voice/clip/voiceCaptions.ts:17
`installRegistryItem` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/blockInstaller.ts:59
`readHomeAbout` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/openvidsHost.ts:183
`readFileVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/razorSplitTransaction.ts:104
`requestAtomicCut` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/razorSplitTransaction.ts:117
`readProjectFileContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/studioFileHistory.ts:52
`resolveDroppedAssetHasAudio` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/studioHelpers.ts:397
`insertTimelineComposition` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/utils/timelineCompositionInsert.ts:17
`requireGsapOwnershipProtocol` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/gsapMutationClient.ts:7
`rollbackOwnedMutation` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/gsapMutationClient.ts:23
`postGsapMutation` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/gsapMutationClient.ts:90
`assignGsapTargetAutoIdIfNeeded` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/gsapScriptCommitHelpers.ts:98
`requestParsedAnimations` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/keyframeCacheAstLoad.ts:73
`readFileContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/timelineTimingSync.ts:24
`patchElementBatches` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useDomEditCommitsHelpers.ts:90
`postPatchElement` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useDomEditCommitsHelpers.ts:166
`rewrite` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×3) — packages/studio/src/hooks/useElementLifecycleOps.ts:156, packages/studio/src/hooks/useGroupCommits.ts:135, packages/studio/src/hooks/useTimelineDeleteOps.ts:119
`mutateGsapScript` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useGsapScriptCommits.ts:38
`mutateGsapScriptBatch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useGsapScriptCommits.ts:57
`fetchLintFindings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useLintModal.ts:28
`readProjectFileOptional` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useSdkSession.ts:153
`resolveHashProject` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useServerConnection.ts:37
`firstProjectId` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/hooks/useServerConnection.ts:47
`openRenderFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/renders/openRender.ts:21
`probe` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/renders/useFfmpegStatus.ts:63
`probeSourceElement` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/editor/probeSourceElement.ts:3
`decode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/editor/useFxCarveNodes.ts:89
`decodeTrack` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/editor/useFxLevelling.ts:64
`importSystemFont` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/studio/src/components/editor/propertyPanelFont.tsx:346
`resolveInlineRenderHtml` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/producer/src/server.ts:406
`runFfprobe` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`. — packages/engine/src/utils/ffprobe.ts:50
`extractFinalVideoFrameTimestamp` holds an AbortSignal but calls `probe(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `probe(…, { signal })`. — packages/engine/src/utils/ffprobe.ts:862
`processCompositionAudio` holds an AbortSignal but calls `extractAudioMetadata(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `extractAudioMetadata(…, { signal })`. — packages/engine/src/services/audioMixer.ts:1246
`spawnStreamingEncoder` holds an AbortSignal but calls `spawn(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `spawn(…, { signal })`. — packages/engine/src/services/streamingEncoder.ts:457
`toDataUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/engine/src/services/threeDProjection.ts:186
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.
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. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.
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.
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.
`debug` at line 316 is called with an argument built by `samples.map((sample) => sample.frameIndex)` (line 318), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — packages/producer/src/services/render/captureCost.ts:316
What to do
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped6.4 / 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.
`OVI18N.rich("home.composer.modelHelp",{},{link:(inner)=>'<button class="link" type="button" aria-label="'+esc(T("home…` 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. — apps/desktop/src-tauri/src/home_page/composer.js:656
`esc(c)` is text this program did not author, and it is written into a script or style context through markup this function returns 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — apps/desktop/src-tauri/src/home_page/design.js:115
`esc(fileUrl(s.id,"thumbnail.svg")+"?v="+s.version+"-"+s.updatedAt)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — apps/desktop/src-tauri/src/home_page/design.js:166
`g.items.map((p)=>(S.view==="grid"?cardHtml:rowHtml)(p,p.id===tabId?0:-1)).join("")` is text this program did not author, and it is written into the text of an element through markup built here 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. — apps/desktop/src-tauri/src/home_page/home.js:775
`left` 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. — apps/desktop/src-tauri/src/home_page/home.js:837
`el.hasAttribute("data-lo")?loCardHtml(p,tab):(S.view==="grid"?cardHtml:rowHtml)(p,tab)` 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. — apps/desktop/src-tauri/src/home_page/home.js:851
`OVI18N.rich("home.fork.text",{name:p.name},{name:(inner)=>'<span class="name">'+inner+"</span>"},)` 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. — apps/desktop/src-tauri/src/home_page/home.js:1027
`msg` 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. (×2) — apps/desktop/src-tauri/src/home_page/home.js:1627, apps/desktop/src-tauri/src/home_page/sheets.js:21
`(auto?tr(l):r)` 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. — apps/desktop/src-tauri/src/home_page/home.js:2180
`rich("onboarding.system.chromeAt",{path:c.systemPath},{path:(inner)=>`<span class="mono">${inner}</span>`},)` is text this program did not author, and it is written into the text of an element through markup this function returns 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. — apps/desktop/src-tauri/src/home_page/onboarding-system.js:210
`brew().note?esc(brew().note).replace(/`([^`]*)`/g,'<code class="mono">$1</code>'):rich("onboarding.system.brewRuns",{…` is text this program did not author, and it is written into the text of an element through markup this function returns 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. — apps/desktop/src-tauri/src/home_page/onboarding-system.js:253
`rich("onboarding.system.downloadRuns",{size:"115 MB"},{link:(inner)=>`<button type="button" class="link" data-act="ob…` is text this program did not author, and it is written into the text of an element through markup this function returns 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. — apps/desktop/src-tauri/src/home_page/onboarding-system.js:262
`rich(noBrew?failed?"onboarding.system.orRunItNoBrew":"onboarding.system.runItNoBrew":failed?"onboarding.system.orRunI…` is text this program did not author, and it is written into the text of an element through markup this function returns 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. — apps/desktop/src-tauri/src/home_page/onboarding-system.js:276
`esc(url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — apps/desktop/src-tauri/src/home_page/report.js:432
`esc(p.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — apps/desktop/src-tauri/src/home_page/report.js:453
`OVI18N.rich("report.done.published",{number:String(done.number)},{a:(inner)=>'<a href="#" class="link" data-act="issu…` 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. — apps/desktop/src-tauri/src/home_page/report.js:499
`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. (×2) — apps/desktop/src-tauri/src/home_page/settings-core.js:320, apps/desktop/src-tauri/src/home_page/sheets.js:144
`err?' aria-invalid="true" aria-describedby="err-signin-'+id+'"':""` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — apps/desktop/src-tauri/src/home_page/settings-signin.js:294
`name` is text this program did not author, and it is written into a URL attribute through markup this function returns 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. — apps/desktop/src-tauri/src/home_page/shared.js:126
`sym` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` 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. — apps/desktop/src-tauri/src/home_page/shared.js:139
`it.label` is text this program did not author, and it is written into the text of an element through markup built here 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. — apps/desktop/src-tauri/src/home_page/sheets.js:73
`it.kbd` is text this program did not author, and it is written into the text of an element through markup built here 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. — apps/desktop/src-tauri/src/home_page/sheets.js:75
`(opening?' aria-disabled="true" aria-label="'+esc(full)+'"':"")` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — apps/desktop/src-tauri/src/home_page/tabs.js:128
`(home?"":' title="'+esc(full)+'"')` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — apps/desktop/src-tauri/src/home_page/tabs.js:129
`escapeXml(options.frameSrc)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — packages/cli/src/commands/grade-compare.ts:335
`svg` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` 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/cli/src/commands/motionShot.ts:711
`markup` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` 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/cli/src/commands/motionShot.ts:752
`attrs({points:corners.map((p)=>`${round(p.x)},${round(p.y)}`).join(" "),fill,"fill-opacity":fillOpacity.toFixed(2),st…` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:162
`attrs({x1:round(a.x),y1:round(a.y),x2:round(b.x),y2:round(b.y),stroke,"stroke-width":w,opacity:o,"stroke-linecap":"ro…` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:172
`attrs({cx:round(p.x),cy:round(p.y),r,fill})` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:175
`attrs({x:round(p.x),y:round(p.y),fill,"font-family":"ui-monospace,monospace","font-size":size,"font-weight":600})` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:178
`attrs({x:round(cellX+3),y:round(cellY+3),width:round(cellW-6),height:round(cellH-6),fill:"none",stroke:"#1c2531","str…` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:237
`attrs({x:round(imageX),y:round(imageY),width:round(imageW),height:round(imageH),href:frame.dataUrl,preserveAspectRati…` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/cli/src/commands/motionShotLayout.ts:238
`projectName` is text this program did not author, and it is written into the text of an element through markup this function returns 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. (×2) — packages/cli/src/commands/play.ts:303, packages/cli/src/commands/play.ts:328
`JSON.stringify(projectName).replace(/</g,"\\u003c")` is text this program did not author, and it is written into a script or style context through markup this function returns 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — REDACTED:194
`islandJson` is text this program did not author, and it is written into a script or style context through markup this function returns 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — REDACTED:210
`preparedInnerRoot.outerHTML||""` 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. — packages/core/src/compiler/htmlBundler.ts:1184
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×29) — REDACTED:691, skills/product-launch-video/scripts/captions.mjs:205, skills/pr-to-video/scripts/assemble-index.mjs:549, …
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×5) — skills/product-launch-video/scripts/captions.mjs:361, skills/pr-to-video/scripts/captions.mjs:361, skills/pr-to-video/scripts/fetch-pr.mjs:172, …
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×6) — skills/hyperframes-creative/scripts/contrast-report.mjs:166, skills/hyperframes-creative/scripts/package-loader.mjs:129, skills/hyperframes-animation/scripts/animation-map.mjs:161, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
~1.1 `!` null assertions per 1k TypeScript source lines — 582 assertion(s) across the 512452 source line(s) of the 2329 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/core/src/audioCarve.ts (33), REDACTED (29), packages/core/src/speedRamp.ts (22). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Unscored — 6 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.
P12 CI test-gate honesty — 11 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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 2 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 — 40 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.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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 (`npm run dev`) exited before it served a page. Likely cause (not identified): the dev server exited, and its output does not match a cause we recognise. Last output: "> dev / > bun run studio / $ bun run --filter @hyperframes/studio dev / @hyperframes/studio dev: error: Module not found "./node_modules/.bin/vite" / @hyperframes/studio dev: Exited with code 1 / error: script "studio" exited with code 1" No runtime evidence was gathered. 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 a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Rust surface was not measured.
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 .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 115 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — history too condensed to judge knowledge freshness
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.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 6 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R5 Dependency Freshness — uses a bun lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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.
AC3 · Page structure· Document without a <title> · ×13
Document without a <title> packages/cli/src/templates/blank/index.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/cli/src/templates/from-file/index.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/parsers/src/hfIds.ts:24— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> REDACTED:848— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/sdk/src/engine/model.ts:29— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/studio-server/src/helpers/sourceMutation.ts:34— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> packages/studio-server/src/helpers/subComposition.ts:282— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/apple-money-count/apple-money-count.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/camcorder-hud/camcorder-hud.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/camera-dolly-zoom/camera-dolly-zoom.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/chatgpt-exchange/chatgpt-exchange.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/chromatic-radial-split/chromatic-radial-split.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> registry/blocks/cinematic-zoom/cinematic-zoom.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×12
Click handler on a non-interactive <div> packages/studio/src/captions/components/CaptionOverlay.tsx:402— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/captions/components/CaptionOverlay.tsx:421— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/captions/components/CaptionTimeline.tsx:89— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Click handler on a non-interactive <div> packages/studio/src/components/editor/DomEditSelectionChrome.tsx:95— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/components/editor/DomEditSelectionChrome.tsx:191— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/components/editor/propertyPanelFill.tsx:261— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Click handler on a non-interactive <div> packages/studio/src/components/editor/propertyPanelFlatTextSection.tsx:381— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/media/MediaBrowser.tsx:290— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/media/MediaInspectorParts.tsx:164— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> packages/studio/src/player/components/BeatStrip.tsx:417— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> skills/hyperframes-creative/templates/design-picker.html:642— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <div> skills/hyperframes-creative/templates/design-picker.html:643— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <input> without a programmatic label · ×9
<input> without a programmatic label packages/studio/src/components/editor/AnimationCardParts.tsx:121— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/editor/FileTreeNodes.tsx:280— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/editor/propertyPanelFont.tsx:402— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label packages/studio/src/components/panels/VariablesBindElement.tsx:230— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/panels/VariablesDeclarationForm.tsx:196— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/panels/VariablesValueControls.tsx:43— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label packages/studio/src/components/panels/VariablesValueControls.tsx:101— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/panels/VariablesValueControls.tsx:145— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label packages/studio/src/components/panels/VariablesValueControls.tsx:187— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <label> that labels no control · ×8
<label> that labels no control packages/studio/src/components/editor/BlockParamsPanel.tsx:240— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control packages/studio/src/components/panels/SlideshowHotspotTool.tsx:76— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control packages/studio/src/components/panels/SlideshowHotspotTool.tsx:85— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control packages/studio/src/components/panels/SlideshowSubPanels.tsx:186— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control packages/studio/src/components/panels/VariablesBindElement.tsx:227— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control packages/studio/src/components/panels/VariablesDeclarationForm.tsx:170— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control registry/components/input-feedback/demo.html:112— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control registry/components/input-feedback/input-feedback.html:34— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels· <button> with no accessible text · ×7
<button> with no accessible text apps/desktop/src-tauri/src/home_page/index.html:346— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/index.html:355— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/index.html:532— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/report.html:51— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/report.html:133— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/report.html:134— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text apps/desktop/src-tauri/src/home_page/report.html:158— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· <textarea> without a programmatic label · ×6
<textarea> without a programmatic label packages/studio/src/components/ExternalFileConflictBanner.tsx:118— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label packages/studio/src/components/editor/propertyPanelSections.tsx:146— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label packages/studio/src/components/panels/SlideshowSubPanels.tsx:187— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label packages/studio/src/components/sidebar/PromptPreviewModal.tsx:85— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label packages/studio/src/player/components/EditModal.tsx:161— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label skills/hyperframes-creative/templates/design-picker.html:758— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <select> without a programmatic label · ×5
<select> without a programmatic label packages/studio/src/components/editor/AnimationCardParts.tsx:189— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label packages/studio/src/components/editor/propertyPanelFill.tsx:172— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label packages/studio/src/components/editor/propertyPanelSections.tsx:197— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label packages/studio/src/components/panels/VariablesDeclarationForm.tsx:185— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label packages/studio/src/components/panels/VariablesValueControls.tsx:72— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<html> without a lang packages/parsers/src/hfIds.ts:24— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang REDACTED:848— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang packages/sdk/src/engine/model.ts:29— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang packages/studio-server/src/helpers/sourceMutation.ts:34— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang packages/studio-server/src/helpers/subComposition.ts:282— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC1 · Text alternatives· <img> without a text alternative · ×4
<img> without a text alternative packages/engine/src/services/screenshotService.ts:621— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative packages/engine/src/services/screenshotService.ts:751— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative packages/player/src/controls-setup.ts:59— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative packages/producer/src/parity-harness.ts:170— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×3
Custom control with no accessible name on <div> packages/studio/src/captions/components/CaptionOverlay.tsx:421— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <div> packages/studio/src/components/editor/DomEditSelectionChrome.tsx:95— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <div> packages/studio/src/components/editor/DomEditSelectionChrome.tsx:191— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure· <iframe> without a title · ×3
<iframe> without a title packages/producer/src/services/htmlCompiler.ts:307— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
<iframe> without a title packages/studio/src/player/hooks/timelinePlayerTestHarness.ts:62— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
<iframe> without a title packages/studio/src/webmcp/webmcpTestUtils.ts:23— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
Import cycle (2 files) packages/producer/src/services/render/stages/captureStage.ts:61— packages/producer/src/services/render/stages/captureStage.ts → REDACTED → packages/producer/src/services/render/stages/captureStage.ts (one verified cycle inside a mutually-dependent group of 3 files)
AC2 · Forms & labels· Custom control named only by title on <div> · ×1
Custom control named only by title on <div> packages/studio/src/player/components/BeatStrip.tsx:417— This <div> carries a click handler, which makes it a control, and its only name is a title attribute. A plain element maps to role="generic", which does not support a name from the author, so the title is announced as nothing at all — it is a mouse-only tooltip, unreachable on touch. Give it role="button" (which it needs anyway to be operable) so the title becomes a real name, or add an aria-label.
AC4 · Keyboard semantics· Double-click handler on a non-interactive <div> · ×1
Double-click handler on a non-interactive <div> packages/studio/src/components/nle/TimelinePane.tsx:98— This <div> binds double-click and nothing else. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
AC4 · Keyboard semantics· Double-click handler on a non-interactive <svg> · ×1
Double-click handler on a non-interactive <svg> packages/studio/src/player/components/TimelineAutomationLane.tsx:436— This <svg> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
role="slider" missing required aria-valuenow packages/studio/src/components/editor/Transform3DCube.tsx:189— The slider role requires aria-valuenow to convey its state. Add it.
Project dependency cycle packages/core/REDACTED:465— The projects @hyperframes/core → @hyperframes/studio-server → @hyperframes/core form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
Unlisted import '@chakra-ui/react' skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx:13— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@mui/material' skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx:14— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@remotion/lambda' skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx:15— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'three' registry/blocks/cuboid-carousel/assets/addons/environments/RoomEnvironment.js:1— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
FunctionTooLong: init.initSandboxRuntimeModular packages/core/src/runtime/init.ts:273— FunctionTooLong — initSandboxRuntimeModular runs 2964 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2864 over it, 29.64× 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: renderOrchestrator.executeRenderPipeline REDACTED:2908— FunctionTooLong — executeRenderPipeline runs 1631 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1531 over it, 16.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: make-theme.norm skills/embedded-captions/scripts/make-theme.cjs:196— FunctionTooLong — norm runs 1228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1128 over it, 12.28× 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: hyper-shader.init REDACTED:867— FunctionTooLong — init runs 1129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1029 over it, 11.29× 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: make-cinematic.main skills/embedded-captions/scripts/make-cinematic.cjs:69— FunctionTooLong — main runs 804 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 704 over it, 8.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.
FunctionTooLong: takes.detectTakeIssues packages/studio-server/src/analysis/takes.ts:144— FunctionTooLong — detectTakeIssues runs 598 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 498 over it, 5.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: threeDProjection.initThreeDProjectionInPage packages/engine/src/services/threeDProjection.ts:53— FunctionTooLong — initThreeDProjectionInPage runs 563 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 463 over it, 5.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: useTimelineProviderState.useTimelineProviderState packages/studio/src/player/components/useTimelineProviderState.tsx:46— FunctionTooLong — useTimelineProviderState runs 501 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 401 over it, 5.01× 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: studioServer.createStudioServer packages/cli/src/server/studioServer.ts:411— FunctionTooLong — createStudioServer runs 475 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 375 over it, 4.75× 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: TimelineLanes.TimelineLanes packages/studio/src/player/components/TimelineLanes.tsx:40— FunctionTooLong — TimelineLanes 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: App.StudioApp packages/studio/src/App.tsx:79— FunctionTooLong — StudioApp runs 465 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 365 over it, 4.65× 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: videoFrameExtractor.extractAllVideoFrames packages/engine/src/services/videoFrameExtractor.ts:1658— FunctionTooLong — extractAllVideoFrames runs 455 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 355 over it, 4.55× 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: PropertyPanel.PropertyPanel packages/studio/src/components/editor/PropertyPanel.tsx:56— FunctionTooLong — PropertyPanel runs 455 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 355 over it, 4.55× 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: PropertyPanelFlat.PropertyPanelFlat packages/studio/src/components/editor/PropertyPanelFlat.tsx:51— FunctionTooLong — PropertyPanelFlat runs 429 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 329 over it, 4.29× 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: useDomEditSession.useDomEditSession packages/studio/src/hooks/useDomEditSession.ts:61— FunctionTooLong — useDomEditSession runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.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.
FunctionTooLong: propertyPanelStyleSections.StyleSections packages/studio/src/components/editor/propertyPanelStyleSections.tsx:42— FunctionTooLong — StyleSections runs 414 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 314 over it, 4.14× 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: useTimelineEditing.useTimelineEditing packages/studio/src/hooks/useTimelineEditing.ts:57— FunctionTooLong — useTimelineEditing runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.10× 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: probeStage.runProbeStage packages/producer/src/services/render/stages/probeStage.ts:266— FunctionTooLong — runProbeStage runs 395 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 295 over it, 3.95× 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: propertyPanelFlatEffectsSection.FlatEffectsSection packages/studio/src/components/editor/propertyPanelFlatEffectsSection.tsx:60— FunctionTooLong — FlatEffectsSection runs 395 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 295 over it, 3.95× 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: CaptionOverlay.CaptionOverlay packages/studio/src/captions/components/CaptionOverlay.tsx:35— FunctionTooLong — CaptionOverlay runs 393 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 293 over it, 3.93× 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: NLEPreview.NLEPreview packages/studio/src/components/nle/NLEPreview.tsx:117— FunctionTooLong — NLEPreview 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: timeline.collectRuntimeTimelinePayload packages/core/src/runtime/timeline.ts:241— FunctionTooLong — collectRuntimeTimelinePayload runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75× 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: useTimelinePlayer.useTimelinePlayer packages/studio/src/player/hooks/useTimelinePlayer.ts:49— FunctionTooLong — useTimelinePlayer runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.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: propertyPanelFlatColorGradingSection.FlatColorGradingSection packages/studio/src/components/editor/propertyPanelFlatColorGradingSection.tsx:101— FunctionTooLong — FlatColorGradingSection runs 361 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 261 over it, 3.61× 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: DomEditOverlay.DomEditOverlay packages/studio/src/components/editor/DomEditOverlay.tsx:112— FunctionTooLong — DomEditOverlay runs 357 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 257 over it, 3.57× 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.
Hotspot: packages/core/src/runtime/init.ts packages/core/src/runtime/init.ts:273— packages/core/src/runtime/init.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 871 in init.initSandboxRuntimeModular at line 273. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/core/src/runtime/init.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/agent-protocol/src/validate.ts packages/agent-protocol/src/validate.ts:786— packages/agent-protocol/src/validate.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in validate.parseStartTurn at line 786. 4 of those changes were fix/bug commits, and the other 16 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-protocol/src/validate.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/studio-server/src/story/sync.ts packages/studio-server/src/story/sync.ts:292— packages/studio-server/src/story/sync.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 255 in sync.planSync at line 292. 1 of those changes was a fix/bug commit, and the other 3 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio-server/src/story/sync.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:2384— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 204 in files.registerFileRoutes at line 2384. 3 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04: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/agent-runtime/src/server.ts packages/agent-runtime/src/server.ts:113— packages/agent-runtime/src/server.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in server.createRuntimeApp at line 113. 2 of those changes were fix/bug commits, and the other 15 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-runtime/src/server.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/cli/src/server/studioServer.ts packages/cli/src/server/studioServer.ts:411— packages/cli/src/server/studioServer.ts changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in studioServer.createStudioServer at line 411. 1 of those changes was a fix/bug commit, 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/cli/src/server/studioServer.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: apps/desktop/src-tauri/src/home_page/home.js apps/desktop/src-tauri/src/home_page/home.js:1561— apps/desktop/src-tauri/src/home_page/home.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in home.newSheet at line 1561. 7 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/src-tauri/src/home_page/home.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.
Hotspot: packages/studio/src/components/chat/Composer.tsx packages/studio/src/components/chat/Composer.tsx:42— packages/studio/src/components/chat/Composer.tsx changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in Composer.Composer at line 42. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/components/chat/Composer.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: apps/desktop/src-tauri/src/lib.rs apps/desktop/src-tauri/src/lib.rs:616— apps/desktop/src-tauri/src/lib.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in openvids_desktop::run at line 616. 3 of those changes were fix/bug commits, and the other 20 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/src-tauri/src/lib.rs`: 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/agent-runtime/src/store/index.ts packages/agent-runtime/src/store/index.ts:327— packages/agent-runtime/src/store/index.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in index.isChatEvent at line 327. 4 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-runtime/src/store/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.
Hotspot: packages/agent-runtime/src/turns.ts packages/agent-runtime/src/turns.ts:116— packages/agent-runtime/src/turns.ts changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in TurnRunner.start at line 116. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-runtime/src/turns.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/studio-server/src/routes/render.ts packages/studio-server/src/routes/render.ts:53— packages/studio-server/src/routes/render.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in render.registerRenderRoutes at line 53. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio-server/src/routes/render.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/agent-runtime/src/agents/tools.ts packages/agent-runtime/src/agents/tools.ts:201— packages/agent-runtime/src/agents/tools.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in tools.buildHostTools at line 201. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-runtime/src/agents/tools.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/studio/vite.adapter.ts packages/studio/vite.adapter.ts:104— packages/studio/vite.adapter.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in vite.adapter.createViteAdapter at line 104. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/vite.adapter.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: apps/desktop/src-tauri/src/home_page/composer.js apps/desktop/src-tauri/src/home_page/composer.js:111— apps/desktop/src-tauri/src/home_page/composer.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in composer.mount at line 111. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/src-tauri/src/home_page/composer.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.
Hotspot: packages/studio/src/story/StoryPanel.tsx packages/studio/src/story/StoryPanel.tsx:108— packages/studio/src/story/StoryPanel.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in StoryPanel.StoryWorkspace at line 108. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/story/StoryPanel.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/agent-protocol/src/reduce.ts packages/agent-protocol/src/reduce.ts:190— packages/agent-protocol/src/reduce.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in reduce.applyChatEvent at line 190. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/agent-protocol/src/reduce.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/studio/src/components/renders/useRenderQueue.ts packages/studio/src/components/renders/useRenderQueue.ts:100— packages/studio/src/components/renders/useRenderQueue.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in useRenderQueue.useRenderQueue at line 100. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/components/renders/useRenderQueue.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: apps/desktop/src-tauri/src/home_page/onboarding-system.js apps/desktop/src-tauri/src/home_page/onboarding-system.js:185— apps/desktop/src-tauri/src/home_page/onboarding-system.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in onboarding-system.toolRow at line 185. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/src-tauri/src/home_page/onboarding-system.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.
Hotspot: packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:42— packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in propertyPanelFlatMediaSection.FlatMediaSection at line 42. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/components/editor/propertyPanelFlatMediaSection.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/studio/src/hooks/appHotkeysDispatch.ts packages/studio/src/hooks/appHotkeysDispatch.ts:200— packages/studio/src/hooks/appHotkeysDispatch.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in appHotkeysDispatch.dispatchPlainKey at line 200. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/hooks/appHotkeysDispatch.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/studio-server/src/editing/operations.ts packages/studio-server/src/editing/operations.ts:178— packages/studio-server/src/editing/operations.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in operations.applyEdits 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio-server/src/editing/operations.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/engine/src/services/videoFrameExtractor.ts packages/engine/src/services/videoFrameExtractor.ts:1658— packages/engine/src/services/videoFrameExtractor.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in videoFrameExtractor.extractAllVideoFrames at line 1658. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/engine/src/services/videoFrameExtractor.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/studio-server/src/story/compile.ts packages/studio-server/src/story/compile.ts:239— packages/studio-server/src/story/compile.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in compile.compileIntent at line 239. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio-server/src/story/compile.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/studio/src/agent/agentStore.ts packages/studio/src/agent/agentStore.ts:493— packages/studio/src/agent/agentStore.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in agentStore.createAgentStore.store.send at line 493. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio/src/agent/agentStore.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.
FileTooLong: scripts/make-theme.cjs skills/embedded-captions/scripts/make-theme.cjs— FileTooLong — 6383 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5883 over it, 12.77× 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: runtime/init.ts packages/core/src/runtime/init.ts— FileTooLong — 3188 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: initSandboxRuntimeModular (273-4920). The bar is 500 significant lines; this is 2688 over it, 6.38× 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: REDACTED REDACTED— FileTooLong — 3148 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2648 over it, 6.30× 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: services/frameCapture.ts packages/engine/src/services/frameCapture.ts— FileTooLong — 2791 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2291 over it, 5.58× 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 — 2481 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1981 over it, 4.96× 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: runtime/colorGrading.ts packages/core/src/runtime/colorGrading.ts— FileTooLong — 2246 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1746 over it, 4.49× 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 — 2231 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1731 over it, 4.46× 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 — 1900 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1400 over it, 3.80× 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: src/gsapWriterAcorn.ts packages/parsers/src/gsapWriterAcorn.ts— FileTooLong — 1845 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1345 over it, 3.69× 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: services/videoFrameExtractor.ts packages/engine/src/services/videoFrameExtractor.ts— FileTooLong — 1731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1231 over it, 3.46× 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 — 1665 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1165 over it, 3.33× 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: services/htmlCompiler.ts packages/producer/src/services/htmlCompiler.ts— FileTooLong — 1572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1072 over it, 3.14× 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: commands/layout-audit.browser.js packages/cli/src/commands/layout-audit.browser.js— FileTooLong — 1498 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 998 over it, 3.00× 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 — 1391 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 891 over it, 2.78× 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: engine/mutate.ts packages/sdk/src/engine/mutate.ts— FileTooLong — 1278 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 778 over it, 2.56× 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 — 1237 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 737 over it, 2.47× 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: src/colorGrading.ts packages/core/src/colorGrading.ts— FileTooLong — 1191 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 691 over it, 2.38× 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: services/audioMixer.ts packages/engine/src/services/audioMixer.ts— FileTooLong — 1152 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 652 over it, 2.30× 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: utils/checkPipeline.ts packages/cli/src/utils/checkPipeline.ts— FileTooLong — 1134 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 634 over it, 2.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: story/sync.ts packages/studio-server/src/story/sync.ts— FileTooLong — 1122 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: TOUCHING (278-1343). The bar is 500 significant lines; this is 622 over it, 2.24× 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: services/deterministicFonts.ts packages/producer/src/services/deterministicFonts.ts— FileTooLong — 1079 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 579 over it, 2.16× 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: compiler/htmlBundler.ts packages/core/src/compiler/htmlBundler.ts— FileTooLong — 1028 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 528 over it, 2.06× 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: slideshow/hyperframes-slideshow.ts packages/player/src/slideshow/hyperframes-slideshow.ts— FileTooLong — 1008 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: HyperframesSlideshow (211-1381). The bar is 500 significant lines; this is 508 over it, 2.02× 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: utils/urlDownloader.ts packages/engine/src/utils/urlDownloader.ts— FileTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 499 over it, 2.00× 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: utils/checkBrowser.ts packages/cli/src/utils/checkBrowser.ts— FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× 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.
Sync-over-async blocking packages/agent-runtime/src/processLock.ts:29— `readFileSync` in `processStartKey` 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/agent-runtime/src/processLock.ts:32— `readFileSync` in `processStartKey` 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/agent-runtime/src/processLock.ts:159— `rmSync` in `removeIfDead` 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/cli/src/background-removal/manager.ts:86— `existsSync` in `ensureModel` 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/cli/src/background-removal/manager.ts:88— `mkdirSync` in `ensureModel` 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/cli/src/background-removal/manager.ts:92— `existsSync` in `ensureModel` 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/cli/src/background-removal/pipeline.ts:312— `renameSync` in `render` 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/cli/src/background-removal/pipeline.ts:313— `renameSync` in `render` 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/cli/src/background-removal/pipeline.ts:328— `rmSync` in `render` 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/cli/src/background-removal/pipeline.ts:329— `rmSync` in `render` 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/cli/src/browser/manager.ts:365— `existsSync` in `findFromHyperframesCache` 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/cli/src/browser/manager.ts:395— `existsSync` in `findFromHyperframesCache` 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/cli/src/browser/manager.ts:634— `existsSync` in `ensureLinuxArmBrowser` 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/cli/src/browser/manager.ts:642— `spawnSync` in `ensureLinuxArmBrowser` 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/cli/src/browser/manager.ts:864— `rmSync` in `callback to installWithCorruptArchiveRecovery` 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/cli/src/browser/manager.ts:865— `mkdirSync` in `callback to installWithCorruptArchiveRecovery` 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/cli/src/browser/preflight.ts:203— `existsSync` in `chromeSharedLibOutcome` 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/cli/src/browser/preflight.ts:290— `existsSync` in `checkChrome` 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/cli/src/commands/add.ts:308— `existsSync` in `addToProject` 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/cli/src/commands/add.ts:309— `existsSync` in `addToProject` 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/cli/src/commands/add.ts:454— `existsSync` in `run` 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/cli/src/commands/add.ts:465— `existsSync` in `run` 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/cli/src/commands/add.ts:518— `existsSync` in `run` 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/cli/src/commands/add.ts:519— `existsSync` in `run` 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/cli/src/commands/batchRender.ts:336— `mkdirSync` in `renderBatchRow` 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 apps/desktop/src-tauri/src/home_page/home.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 registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.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 skills/embedded-captions/scripts/make-cinematic.cjs: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 apps/desktop/src-tauri/src/home_page/composer.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 skills/embedded-captions/scripts/safe-zones.cjs: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 registry/blocks/hw-write-title/assets/baked/caveat-pen.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 apps/desktop/src-tauri/src/home_page/report.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 apps/desktop/src-tauri/src/home_page/settings-voice.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 skills/pr-to-video/scripts/ingest.mjs: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 apps/desktop/src-tauri/src/home_page/settings-general.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 apps/desktop/src-tauri/src/home_page/design.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 skills/hyperframes-creative/scripts/contrast-report.mjs: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 apps/desktop/src-tauri/src/home_page/settings-core.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 apps/desktop/src-tauri/src/home_page/settings-providers.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 apps/desktop/src-tauri/src/home_page/settings-signin.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/producer/src/parity-harness.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 skills/embedded-captions/scripts/make-composition.cjs: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 apps/desktop/src-tauri/src/home_page/settings-assets.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 apps/desktop/src-tauri/src/home_page/settings-jev.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 apps/desktop/src-tauri/src/home_page/onboarding-system.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 skills/media-use/scripts/eval.mjs: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 apps/desktop/src-tauri/src/home_page/settings-execution.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 apps/desktop/src-tauri/src/home_page/design-sheets.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/producer/src/transparency-test.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.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×40
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/composer.js:656— `OVI18N.rich("home.composer.modelHelp",{},{link:(inner)=>'<button class="link" type="button" aria-label="'+esc(T("home…` 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 apps/desktop/src-tauri/src/home_page/design.js:115— `esc(c)` is text this program did not author, and it is written into a script or style context through markup this function returns 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/design.js:166— `esc(fileUrl(s.id,"thumbnail.svg")+"?v="+s.version+"-"+s.updatedAt)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/home.js:775— `g.items.map((p)=>(S.view==="grid"?cardHtml:rowHtml)(p,p.id===tabId?0:-1)).join("")` is text this program did not author, and it is written into the text of an element through markup built here 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 apps/desktop/src-tauri/src/home_page/home.js:837— `left` 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 apps/desktop/src-tauri/src/home_page/home.js:851— `el.hasAttribute("data-lo")?loCardHtml(p,tab):(S.view==="grid"?cardHtml:rowHtml)(p,tab)` 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 apps/desktop/src-tauri/src/home_page/home.js:1027— `OVI18N.rich("home.fork.text",{name:p.name},{name:(inner)=>'<span class="name">'+inner+"</span>"},)` 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 apps/desktop/src-tauri/src/home_page/home.js:1627— `msg` 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 apps/desktop/src-tauri/src/home_page/home.js:2180— `(auto?tr(l):r)` 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 apps/desktop/src-tauri/src/home_page/onboarding-system.js:210— `rich("onboarding.system.chromeAt",{path:c.systemPath},{path:(inner)=>`<span class="mono">${inner}</span>`},)` is text this program did not author, and it is written into the text of an element through markup this function returns 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 apps/desktop/src-tauri/src/home_page/onboarding-system.js:253— `brew().note?esc(brew().note).replace(/`([^`]*)`/g,'<code class="mono">$1</code>'):rich("onboarding.system.brewRuns",{…` is text this program did not author, and it is written into the text of an element through markup this function returns 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 apps/desktop/src-tauri/src/home_page/onboarding-system.js:262— `rich("onboarding.system.downloadRuns",{size:"115 MB"},{link:(inner)=>`<button type="button" class="link" data-act="ob…` is text this program did not author, and it is written into the text of an element through markup this function returns 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 apps/desktop/src-tauri/src/home_page/onboarding-system.js:276— `rich(noBrew?failed?"onboarding.system.orRunItNoBrew":"onboarding.system.runItNoBrew":failed?"onboarding.system.orRunI…` is text this program did not author, and it is written into the text of an element through markup this function returns 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 apps/desktop/src-tauri/src/home_page/report.js:432— `esc(url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/report.js:453— `esc(p.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/report.js:499— `OVI18N.rich("report.done.published",{number:String(done.number)},{a:(inner)=>'<a href="#" class="link" data-act="issu…` 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 apps/desktop/src-tauri/src/home_page/settings-core.js:320— `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 apps/desktop/src-tauri/src/home_page/settings-signin.js:294— `err?' aria-invalid="true" aria-describedby="err-signin-'+id+'"':""` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped apps/desktop/src-tauri/src/home_page/shared.js:126— `name` is text this program did not author, and it is written into a URL attribute through markup this function returns 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 apps/desktop/src-tauri/src/home_page/shared.js:139— `sym` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` 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 apps/desktop/src-tauri/src/home_page/sheets.js:21— `msg` 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 apps/desktop/src-tauri/src/home_page/sheets.js:73— `it.label` is text this program did not author, and it is written into the text of an element through markup built here 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 apps/desktop/src-tauri/src/home_page/sheets.js:75— `it.kbd` is text this program did not author, and it is written into the text of an element through markup built here 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 apps/desktop/src-tauri/src/home_page/sheets.js:144— `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 apps/desktop/src-tauri/src/home_page/tabs.js:128— `(opening?' aria-disabled="true" aria-label="'+esc(full)+'"':"")` is text this program did not author, and it is written into an unquoted attribute through markup this function returns 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
+ 15 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×39
Async function without AbortSignal: heygenJSON skills/media-use/audio/scripts/lib/heygen.mjs:111— `heygenJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: probeFrame packages/studio/src/webmcp/StudioAgentTools.tsx:142— `probeFrame` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: applyOnServer packages/studio/src/voice/clip/voiceCaptions.ts:17— `applyOnServer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: installRegistryItem packages/studio/src/utils/blockInstaller.ts:59— `installRegistryItem` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: readHomeAbout packages/studio/src/utils/openvidsHost.ts:183— `readHomeAbout` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: readFileVersion packages/studio/src/utils/razorSplitTransaction.ts:104— `readFileVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: requestAtomicCut packages/studio/src/utils/razorSplitTransaction.ts:117— `requestAtomicCut` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: readProjectFileContent packages/studio/src/utils/studioFileHistory.ts:52— `readProjectFileContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: resolveDroppedAssetHasAudio packages/studio/src/utils/studioHelpers.ts:397— `resolveDroppedAssetHasAudio` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: insertTimelineComposition packages/studio/src/utils/timelineCompositionInsert.ts:17— `insertTimelineComposition` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: requireGsapOwnershipProtocol packages/studio/src/hooks/gsapMutationClient.ts:7— `requireGsapOwnershipProtocol` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: rollbackOwnedMutation packages/studio/src/hooks/gsapMutationClient.ts:23— `rollbackOwnedMutation` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: postGsapMutation packages/studio/src/hooks/gsapMutationClient.ts:90— `postGsapMutation` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: assignGsapTargetAutoIdIfNeeded packages/studio/src/hooks/gsapScriptCommitHelpers.ts:98— `assignGsapTargetAutoIdIfNeeded` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: requestParsedAnimations packages/studio/src/hooks/keyframeCacheAstLoad.ts:73— `requestParsedAnimations` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: readFileContent packages/studio/src/hooks/timelineTimingSync.ts:24— `readFileContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: patchElementBatches packages/studio/src/hooks/useDomEditCommitsHelpers.ts:90— `patchElementBatches` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: postPatchElement packages/studio/src/hooks/useDomEditCommitsHelpers.ts:166— `postPatchElement` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: rewrite packages/studio/src/hooks/useElementLifecycleOps.ts:156— `rewrite` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: rewrite packages/studio/src/hooks/useGroupCommits.ts:135— `rewrite` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: mutateGsapScript packages/studio/src/hooks/useGsapScriptCommits.ts:38— `mutateGsapScript` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: mutateGsapScriptBatch packages/studio/src/hooks/useGsapScriptCommits.ts:57— `mutateGsapScriptBatch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchLintFindings packages/studio/src/hooks/useLintModal.ts:28— `fetchLintFindings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: readProjectFileOptional packages/studio/src/hooks/useSdkSession.ts:153— `readProjectFileOptional` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: resolveHashProject packages/studio/src/hooks/useServerConnection.ts:37— `resolveHashProject` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Swallowed exception (empty catch) REDACTED:691— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/product-launch-video/scripts/captions.mjs:205— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/pr-to-video/scripts/assemble-index.mjs:549— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/pr-to-video/scripts/captions.mjs:205— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/pr-to-video/scripts/fetch-pr.mjs:201— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/motion-graphics/categories/maps/bake-basemap.mjs:42— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/eval.mjs:108— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/eval.mjs:144— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/eval.mjs:164— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/transcribe.mjs:167— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/transcribe.mjs:173— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/lib/config-lock.mjs:16— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/lib/config-lock.mjs:43— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:64— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/lib/prefs-store.mjs:175— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/scripts/lib/recipe-store.mjs:283— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/media-use/audio/scripts/lib/tts.mjs:298— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-creative/scripts/contrast-report.mjs:166— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-creative/scripts/package-loader.mjs:129— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-creative/scripts/package-loader.mjs:214— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-animation/scripts/animation-map.mjs:161— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-animation/scripts/package-loader.mjs:129— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) skills/hyperframes-animation/scripts/package-loader.mjs:214— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/faceless-explainer/scripts/assemble-index.mjs:543— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) skills/faceless-explainer/scripts/captions.mjs:205— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
+ 10 more in this group — see findings.md.
AC1 · Text alternatives· <canvas> without a text alternative · ×27
<canvas> without a text alternative packages/engine/src/services/threeDProjection.ts:573— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative packages/shader-transitions/src/capture.ts:141— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative REDACTED:961— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative packages/studio/src/player/components/AudioWaveform.tsx:227— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/code-3d-extrude/code-3d-extrude.html:45— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/code-particle-assemble/code-particle-assemble.html:45— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/code-shader-dissolve/code-shader-dissolve.html:45— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/cosmic-orb/cosmic-orb.html:62— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/gallery-tunnel/gallery-tunnel.html:100— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/halftone-field/halftone-field.html:64— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:724— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/liquid-glass-notification/liquid-glass-notification.html:217— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/liquid-glass-widgets/liquid-glass-widgets.html:413— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/macos-tahoe-liquid-glass/macos-tahoe-liquid-glass.html:713— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/oscilloscope-trace/oscilloscope-trace.html:103— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/rack-focus/rack-focus.html:122— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/spiral-galaxy/spiral-galaxy.html:76— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/transitions-destruction/transitions-destruction.html:177— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-anamorphic-flare/vfx-anamorphic-flare.html:55— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-iphone-device/vfx-iphone-device.html:264— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-liquid-background/vfx-liquid-background.html:500— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-liquid-glass/vfx-liquid-glass.html:177— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-portal/vfx-portal.html:422— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/blocks/vfx-shatter/vfx-shatter.html:495— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative registry/components/three-orbiting-cards/demo.html:75— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
No assertions: published memory scripts run without reaching outside the skill skills/media-use/scripts/compatibility.test.mjs:18— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: published audio helpers import without the CLI package tree skills/media-use/scripts/compatibility.test.mjs:33— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: general-video packet builder starts from its installed directory alone skills/media-use/scripts/compatibility.test.mjs:75— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: takes over a lock file that holds no pid packages/studio-server/src/history/ownerLock.test.ts:67— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: boots cleanly when the browser has no native WebMCP packages/studio/src/webmcp/useStudioAgentTools.test.tsx:203— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: stays mounted when registration fails with a non-abort error packages/studio/src/webmcp/useStudioAgentTools.test.tsx:236— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: renders the public Timeline export without TimelineEditProvider packages/studio/src/player/components/Timeline.test.ts:293— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: the pending-edit flush resolves immediately once the delete has already finished packages/studio/src/hooks/useTimelineDeleteOps.test.tsx:243— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: commitPreview without a dispatch callback is a no-op packages/sdk/src/adapters/iframe.test.ts:397— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: accepts the canonical SwiftShader vendor + renderer pair packages/engine/src/utils/assertSwiftShader.test.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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: accepts SwiftShader regardless of trailing whitespace on vendor packages/engine/src/utils/assertSwiftShader.test.ts:32— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: accepts case-insensitive renderer token packages/engine/src/utils/assertSwiftShader.test.ts:39— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: tracks a spawned process and removes it after exit packages/engine/src/utils/processTracker.test.ts:11— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: removes the process on spawn error packages/engine/src/utils/processTracker.test.ts:39— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: handles already-exited processes gracefully packages/engine/src/utils/processTracker.test.ts:75— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: is idempotent — second call is a no-op packages/engine/src/utils/processTracker.test.ts:98— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: drainBrowserPool is safe to call when no browser is pooled packages/engine/src/services/browserManager.test.ts:955— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: fast-paths waitForFrame(cursor) without queueing packages/engine/src/services/streamingEncoder.test.ts:427— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: waitForAllDone fast-paths when cursor already past endFrame packages/engine/src/services/streamingEncoder.test.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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: discover finds elements with CSS animations packages/core/src/runtime/adapters/css.test.ts:45— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: play releases forced time packages/core/src/runtime/adapters/three.test.ts:48— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: revert resets all state packages/core/src/runtime/adapters/three.test.ts:55— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: reports every installed item, marking only the requested one packages/cli/src/commands/add.test.ts:409— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: waits for a holder that lets go within the wait packages/agent-runtime/src/processLock.test.ts:30— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: disposes an idle session after the configured timeout packages/agent-runtime/src/turns.test.ts:574— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
AC3 · Page structure· Page without a main landmark · ×19
Page without a main landmark apps/desktop/src-tauri/src/home_page/report.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/cli/src/templates/blank/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/cli/src/templates/from-file/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/parsers/src/hfIds.ts:24— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark REDACTED:848— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/sdk/src/engine/model.ts:29— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/studio-server/src/helpers/sourceMutation.ts:34— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark packages/studio-server/src/helpers/subComposition.ts:282— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/ai-chat-reveal/ai-chat-reveal.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/app-showcase/app-showcase.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/apple-money-count/apple-money-count.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/bar-chart-race/bar-chart-race.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/beat-freeze-cut/beat-freeze-cut.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/blue-sweater-intro-video/blue-sweater-intro-video.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/camcorder-hud/camcorder-hud.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/camcorder-hud/demo.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/camera-dolly-zoom/camera-dolly-zoom.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/canopy-part-title/canopy-part-title.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/blocks/chromatic-radial-split/chromatic-radial-split.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Boundary violation [package:third-party-deep-import] packages/cli/src/registry/validation.ts:1— packages/cli/src/registry/validation.ts:1 imports ajv/dist/2020.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/cli/src/server/studioServer.ts:110— packages/cli/src/server/studioServer.ts:110 reaches into another package with a relative path (../../../producer/src/index.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/cli/src/server/studioServer.ts:509— packages/cli/src/server/studioServer.ts:509 reaches into another package with a relative path (../../../producer/src/services/deterministicFonts.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/cli/src/server/studioServer.ts:511— packages/cli/src/server/studioServer.ts:511 reaches into another package with a relative path (../../../producer/src/services/animatedGifPrep.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/cli/src/server/studioServer.ts:512— packages/cli/src/server/studioServer.ts:512 reaches into another package with a relative path (../../../producer/src/utils/urlDownloader.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/engine/scripts/test-fitTextFontSize-browser.ts:12— packages/engine/scripts/test-fitTextFontSize-browser.ts:12 reaches into another package with a relative path (../../core/src/inline-scripts/hyperframesRuntime.engine) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/engine/scripts/test-runtime-position-edits-browser.ts:25— packages/engine/scripts/test-runtime-position-edits-browser.ts:25 reaches into another package with a relative path (../../core/src/inline-scripts/hyperframesRuntime.engine) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/producer/scripts/build-hf-early-stub.ts:16— packages/producer/scripts/build-hf-early-stub.ts:16 reaches into another package with a relative path (../../core/scripts/writeGeneratedFile.js) — import the package by name instead.
Boundary violation [package:test-cross-package-internals] packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:7— packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:7 reaches past another workspace package's public entry into its internals with a relative path (../../../engine/src/services/videoFrameExtractor.ts) — 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] packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:12— packages/producer/tests/playback-rate-av-parity/playback-rate-av-parity.test.ts:12 reaches past another workspace package's public entry into its internals with a relative path (../../../engine/src/services/audioMixer.ts) — 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:undeclared-workspace-dep] packages/studio-server/src/agent/launch.ts:33— packages/studio-server/src/agent/launch.ts:33 imports @hyperframes/agent-runtime/REDACTED, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
Boundary violation [package:relative-cross-package] packages/studio/vite.adapter.ts:30— packages/studio/vite.adapter.ts:30 reaches into another package with a relative path (../cli/src/server/siteAdapter) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/studio/vite.adapter.ts:31— packages/studio/vite.adapter.ts:31 reaches into another package with a relative path (../cli/src/server/framesAdapter) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/studio/vite.adapter.ts:279— packages/studio/vite.adapter.ts:279 reaches into another package with a relative path (../producer/src/services/deterministicFonts.js) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/studio/vite.request-guard.ts:4— packages/studio/vite.request-guard.ts:4 reaches into another package with a relative path (../studio-server/src/helpers/hostGuard) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/studio/vite.studioMotion.ts:3— packages/studio/vite.studioMotion.ts:3 reaches into another package with a relative path (../core/src/studio-api/helpers/manualEditsRenderScript) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/studio/vite.studioMotion.ts:7— packages/studio/vite.studioMotion.ts:7 reaches into another package with a relative path (../core/src/studio-api/helpers/studioMotionRenderScript) — import the package by name instead.
Boundary violation [package:relative-cross-package] scripts/lint-skills.ts:15— scripts/lint-skills.ts:15 reaches into another package with a relative path (../packages/core/src/index.js) — import the package by name instead.
ClassTooLong: HyperframesPlayer REDACTED:85— ClassTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded), 71 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: HyperframesSlideshow packages/player/src/slideshow/hyperframes-slideshow.ts:211— ClassTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 375 over it, 1.94× 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: ResearchService packages/studio-server/src/research/service.ts:221— ClassTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 319 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.
ClassTooLong: Engine packages/studio-server/src/history/projectHistory.ts:288— ClassTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 247 over it, 1.62× 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: AnalysisService packages/studio-server/src/analysis/service.ts:120— ClassTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 151 over it, 1.38× 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: useTimelineProviderState packages/studio/src/player/components/useTimelineProviderState.tsx:1— ClassTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 101 over it, 1.25× 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: TimelineLanes packages/studio/src/player/components/TimelineLanes.tsx:1— ClassTooLong — 473 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 73 over it, 1.18× 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: PropertyPanel packages/studio/src/components/editor/PropertyPanel.tsx:1— ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 55 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: StoryService packages/studio-server/src/story/service.ts:177— ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 44 over it, 1.11× 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: WebAudioTransport packages/core/src/runtime/webAudioTransport.ts:140— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 42 over it, 1.11× 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: PropertyPanelFlat packages/studio/src/components/editor/PropertyPanelFlat.tsx:1— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 29 over it, 1.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.
ClassTooLong: CompositionImpl packages/sdk/src/session.ts:83— ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 22 over it, 1.06× 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: useDomEditSession packages/studio/src/hooks/useDomEditSession.ts:1— ClassTooLong — 420 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 20 over it, 1.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: useTimelineEditing packages/studio/src/hooks/useTimelineEditing.ts:1— ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 10 over it, 1.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.
ClassTooLong: VoiceEngineImpl packages/studio-server/src/voice/engine.ts:136— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 8 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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×15
Recursive walk over a caller-supplied document has no depth cap packages/studio-server/src/story/graphIo.ts:162— `sameJson` is exported and takes `a: unknown` from its caller, and it calls itself at line 162 (`sameJson`) with a piece of `a` (and at line 169) — and nowhere in `sameJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sameJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio-server/src/helpers/finiteMutation.ts:24— `findUnsafeMutationValues` is exported and takes `value: unknown` from its caller, and it calls itself at line 24 (`findUnsafeMutationValues`) with a piece of `value` (and at line 28) — and nowhere in `findUnsafeMutationValues` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `findUnsafeMutationValues` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio/src/utils/studioSaveDiagnostics.ts:100— `isStudioSaveErrorAlreadyToasted` is exported and takes `error: unknown` from its caller, and it calls itself at line 100 (`isStudioSaveErrorAlreadyToasted`) with a piece of `error` — and nowhere in `isStudioSaveErrorAlreadyToasted` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `isStudioSaveErrorAlreadyToasted` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio/src/utils/studioSaveDiagnostics.ts:112— `getStudioSaveStatusCode` is exported and takes `error: unknown` from its caller, and it calls itself at line 112 (`getStudioSaveStatusCode`) with a piece of `error` — and nowhere in `getStudioSaveStatusCode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `getStudioSaveStatusCode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio/src/player/hooks/timelineSyncHydration.ts:97— `collectSubCompositionDomChildren` is exported, takes a document from its caller (line 122) and hands it to `collectHostDomChildren`, which calls itself at line 97 (`collectHostDomChildren`) with a piece of `parentEl` (and at line 110) — and nowhere in `collectHostDomChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectHostDomChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio/src/components/editor/FileTreeIcons.tsx:120— `isActiveInSubtree` is exported and takes `node: TreeNode` from its caller, and it calls itself at line 120 (`isActiveInSubtree`) with a piece of `node` — and nowhere in `isActiveInSubtree` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `isActiveInSubtree` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/studio/src/components/dock/dockLayoutSchema.ts:18— `parseDockLayout` is exported, takes a document from its caller (line 55) and hands it to `collectLeafViews`, which calls itself at line 18 (`collectLeafViews`) with a piece of `node` — and nowhere in `collectLeafViews` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectLeafViews` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/sdk/src/document.ts:136— `buildRoots` is exported, takes a document from its caller (line 247) and hands it to `buildChildren`, which calls itself at line 136 (`buildChildren`) with a piece of `parent` — and nowhere in `buildChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `buildChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/sdk/src/adapters/iframe.ts:609— `compositionPaintsAt` is exported, takes a document from its caller (line 741) and hands it to `inkAt`, which calls itself at line 609 (`inkAt`) with a piece of `el` — and nowhere in `inkAt` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `inkAt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/core/src/colorGrading.ts:1396— `resolveHfColorGradingVariables` is exported and takes `raw: unknown` from its caller, and it calls itself at line 1396 (`resolveHfColorGradingVariables`) with a piece of `raw` (and at line 1402) — and nowhere in `resolveHfColorGradingVariables` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `resolveHfColorGradingVariables` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/core/src/runtime/pickerDrawn.ts:154— `createDrawnProbe` is exported, takes a document from its caller (line 106) and hands it to `glyphsUnder`, which calls itself at line 154 (`glyphsUnder`) with a piece of `el` — and nowhere in `glyphsUnder` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `glyphsUnder` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/agent-runtime/src/store/compact.ts:99— `sameValue` is exported and takes `a: unknown` from its caller, and it calls itself at line 99 (`sameValue`) with a piece of `a` — and nowhere in `sameValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sameValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/agent-runtime/src/omp/path-guard.ts:36— `extractPathArguments` is exported, takes a document from its caller (line 50) and hands it to `collectStrings`, which calls itself at line 36 (`collectStrings`) with a piece of `value` (and at line 43, line 45) — and nowhere in `collectStrings` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `collectStrings` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap packages/agent-runtime/src/omp/path-guard.ts:59— `extractPathArguments` is exported and takes `input: unknown` from its caller, and it calls itself at line 59 (`extractPathArguments`) with a piece of `input` (and at line 61) — and nowhere in `extractPathArguments` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `extractPathArguments` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap apps/desktop/src-tauri/src/prefs.rs:167— `merge` is public and takes `target: &mut Value` from its caller, and it calls itself at line 167 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `merge` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Weak hash algorithm packages/cli/src/capture/assetDownloader.ts:74— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/core/src/compiler/scenePartsManifest.ts:5— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/engine/src/utils/urlDownloader.ts:281— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/engine/src/utils/urlDownloader.ts:866— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/producer/src/services/deterministicFonts.ts:887— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/studio-server/src/analysis/store.ts:336— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/studio-server/src/editing/captions.ts:21— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/studio-server/src/helpers/hfIdPersist.ts:20— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/studio-server/src/routes/preview.ts:248— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/studio-server/src/routes/preview.ts:536— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm REDACTED:114— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm REDACTED:169— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm REDACTED:197— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×11
Modal dialog does not manage focus apps/desktop/src-tauri/src/home_page/index.html:554— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus apps/desktop/src-tauri/src/home_page/settings.html:31— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/components/ExternalFileConflictBanner.tsx:51— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/components/editor/TimelineFxPopover.tsx:138— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/components/editor/propertyPanelColor.tsx:325— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/components/nle/AssetPreviewOverlay.tsx:265— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/player/components/TimelineFxButton.tsx:81— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/player/components/TimelineFxButton.tsx:99— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/research/ExportLicenseDialog.tsx:36— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/story/StoryDialog.tsx:37— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus packages/studio/src/voice/panel/VoiceLineCard.tsx:201— This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
P12 · CI test-gate honesty· Workspace package's tests never run by CI · ×11
Workspace package's tests never run by CI packages/agent-protocol/REDACTED:21— `packages/agent-protocol` is a workspace package with 144 test(s) in 13 file(s) (e.g. `packages/agent-protocol/src/analysis.test.ts`, `packages/agent-protocol/src/crossProject.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI REDACTED:25— `packages/agent-runtime` is a workspace package with 1109 test(s) in 110 file(s) (e.g. `packages/agent-runtime/src/analysis.integration.test.ts`, `packages/agent-runtime/src/autonomy.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/core/REDACTED:437— `packages/core` is a workspace package with 2784 test(s) in 160 file(s) (e.g. `packages/core/scripts/writeGeneratedFile.test.ts`, `packages/core/src/audioAutomation.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/engine/REDACTED:34— `packages/engine` is a workspace package with 1569 test(s) in 91 file(s) (e.g. `packages/engine/src/config.test.ts`, `packages/engine/src/services/audioAutomationRender.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI REDACTED:26— `packages/lint` is a workspace package with 712 test(s) in 20 file(s) (e.g. `packages/lint/src/browser.test.ts`, `packages/lint/src/hevcPreviewLint.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/parsers/REDACTED:140— `packages/parsers` is a workspace package with 947 test(s) in 40 file(s) (e.g. `packages/parsers/src/assetResolution.test.ts`, `REDACTED`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/player/REDACTED:26— `packages/player` is a workspace package with 452 test(s) in 14 file(s) (e.g. `packages/player/src/composition-probe.test.ts`, `packages/player/src/controls.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/producer/REDACTED:26— `packages/producer` is a workspace package with 1434 test(s) in 104 file(s) (e.g. `packages/producer/scripts/test-classification.test.mjs`, `packages/producer/src/logger.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/sdk/REDACTED:42— `packages/sdk` is a workspace package with 547 test(s) in 18 file(s) (e.g. `packages/sdk/src/session.dispatch.test.ts`, `packages/sdk/src/session.render-faithful.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/shader-transitions/REDACTED:21— `packages/shader-transitions` is a workspace package with 59 test(s) in 9 file(s) (e.g. `packages/shader-transitions/src/capture.clone.test.ts`, `packages/shader-transitions/src/capture.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI packages/studio-server/REDACTED:85— `packages/studio-server` is a workspace package with 2124 test(s) in 163 file(s) (e.g. `packages/studio-server/src/agent/gateway.test.ts`, `packages/studio-server/src/agent/launch.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Outbound HTTP without resilience packages/cli/scripts/sync-agent-dirs.ts:142— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/cli/src/commands/figma/download.ts:5— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/cli/src/utils/historyOwner.ts:126— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/cli/src/utils/historyOwner.ts:192— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:113— `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:141— `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:153— `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/engine/src/services/threeDProjection.ts:187— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/producer/src/server.ts:418— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/studio-server/src/design/googleFonts.ts:141— `fetcher(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience packages/studio-server/src/design/googleFonts.ts:171— `fetcher(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
TodoComment packages/studio/src/hooks/gsapRuntimeKeyframes.test.ts:27— // TODO(core follow-up): re-export STUDIO_HOLD_MARKER via the @hyperframes/core/ — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/sdk/src/engine/keyframeBackfill.ts:22— // TODO: lift the canonical table into @hyperframes/core and import from both. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/producer/src/services/render/captureCost.ts:151— // TODO(htmlInCanvas): workaround — Chrome's experimental drawElementImage — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/player/tests/perf/index.ts:123— // TODO(player-perf): once baselines have settled on CI for ~1–2 weeks and we — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/player/tests/perf/perf-gate.ts:94— // TODO lives at that call site so it is a one-line change. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/player/tests/perf/scenarios/05-drift.ts:279— // TODO(player-perf): once we have ~2 weeks of CI baseline data, decide — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/parsers/src/htmlParser.test.ts:871— // TODO(R1): remove cast once ColorVariable.brandRole is typed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/lint/src/rules/gsap.test.ts:1339— // TODO load MotionPathPlugin</script> — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment packages/engine/src/services/parallelCoordinator.ts:147— // TODO(PRINFRA-341): decide enforcement after ~2 weeks of fleet soak.
TodoComment packages/core/src/runtime/compositionLoader.ts:751— // TODO(template-var-carriers): reads `<html>` only. A template/fragment — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
init.initSandboxRuntimeModular::bindRootTimelineIfAvailable (cognitive 110) packages/core/src/runtime/init.ts:1780— init.initSandboxRuntimeModular::bindRootTimelineIfAvailable has cognitive complexity 110 (threshold 15). Drivers by points: if/else 30 (86 pts), loops 4 (11 pts), error handling 2 (5 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 68). 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: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::transportTick (cognitive 89) packages/core/src/runtime/init.ts:4315— init.initSandboxRuntimeModular::transportTick has cognitive complexity 89 (threshold 15). Drivers by points: if/else 35 (63 pts), boolean chains 19, ternaries 1 (4 pts), loops 1 (3 pts) (nesting depth added 33). 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: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::resolveRootTimelineFromDocument (cognitive 57) packages/core/src/runtime/init.ts:1319— init.initSandboxRuntimeModular::resolveRootTimelineFromDocument has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 8, error handling 2 (8 pts), ternaries 3 (6 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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::swapScenes (cognitive 51) packages/core/src/runtime/init.ts:3339— init.initSandboxRuntimeModular::swapScenes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 9 (16 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 22). 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: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::applyClipLayout (cognitive 44) packages/core/src/runtime/init.ts:653— init.initSandboxRuntimeModular::applyClipLayout has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 12, loops 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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::applyTimedElementVisibility (cognitive 44) packages/core/src/runtime/init.ts:2569— init.initSandboxRuntimeModular::applyTimedElementVisibility has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 10, loops 2 (3 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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::teardown (cognitive 29) packages/core/src/runtime/init.ts:4823— init.initSandboxRuntimeModular::teardown has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 5 (10 pts), loops 5, boolean chains 1 (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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::scheduleWebAudioForActiveClips (cognitive 25) packages/core/src/runtime/init.ts:4567— init.initSandboxRuntimeModular::scheduleWebAudioForActiveClips has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (6 pts), boolean chains 4, 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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::seekRootAndChildTimelines (cognitive 19) packages/core/src/runtime/init.ts:4098— init.initSandboxRuntimeModular::seekRootAndChildTimelines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (5 pts), boolean chains 2 (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: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
init.initSandboxRuntimeModular::hardSyncAllMedia (cognitive 19) packages/core/src/runtime/init.ts:4538— init.initSandboxRuntimeModular::hardSyncAllMedia has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (3 pts), ternaries 1 (2 pts), boolean chains 1, 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. This shape REPEATS in the file: 10 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
TooManyMethods: HyperframesPlayer REDACTED:85— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× 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: Engine packages/studio-server/src/history/projectHistory.ts:288— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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: HyperframesSlideshow packages/player/src/slideshow/hyperframes-slideshow.ts:211— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: CompositionImpl packages/sdk/src/session.ts:83— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. Most of these members implement types.Composition (48 of 56 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: VoiceEngineImpl packages/studio-server/src/voice/engine.ts:136— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.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: ResearchService packages/studio-server/src/research/service.ts:221— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: ParentMediaManager packages/player/src/parent-media.ts:71— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.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: AnalysisService packages/studio-server/src/analysis/service.ts:120— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.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: WebAudioTransport packages/core/src/runtime/webAudioTransport.ts:140— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.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.
Fake-async — async method never awaits packages/cli/src/capture/iconClassifier.ts:185— `classifyIcon` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/cli/src/cli.ts:213— `finalizeCli` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/cli/src/media-use/resolve.mjs:652— `colorMiss` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/cli/src/media-use/resolve.mjs:869— `showCandidates` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/cli/src/media-use/resolve.mjs:1163— `result` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/cli/src/registry/localSemantic.ts:150— `fetchLocalVectors` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/core/src/runtime/webAudioTransport.ts:193— `init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits packages/studio/src/hooks/gsapDragCommit.ts:127— `materializeIfDynamic` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits skills/embedded-captions/scripts/matte.cjs:119— `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
init.initSandboxRuntimeModular::transportTick (cyclomatic 60) packages/core/src/runtime/init.ts:4315— init.initSandboxRuntimeModular::transportTick has cyclomatic complexity 60 (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: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::bindRootTimelineIfAvailable (cyclomatic 45) packages/core/src/runtime/init.ts:1780— init.initSandboxRuntimeModular::bindRootTimelineIfAvailable 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. This shape REPEATS in the file: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::applyClipLayout (cyclomatic 38) packages/core/src/runtime/init.ts:653— init.initSandboxRuntimeModular::applyClipLayout has cyclomatic complexity 38 (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: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::resolveRootTimelineFromDocument (cyclomatic 30) packages/core/src/runtime/init.ts:1319— init.initSandboxRuntimeModular::resolveRootTimelineFromDocument 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. This shape REPEATS in the file: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::applyTimedElementVisibility (cyclomatic 29) packages/core/src/runtime/init.ts:2569— init.initSandboxRuntimeModular::applyTimedElementVisibility 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. This shape REPEATS in the file: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::swapScenes (cyclomatic 29) packages/core/src/runtime/init.ts:3339— init.initSandboxRuntimeModular::swapScenes 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. This shape REPEATS in the file: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::teardown (cyclomatic 24) packages/core/src/runtime/init.ts:4823— init.initSandboxRuntimeModular::teardown has cyclomatic complexity 24 (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: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
init.initSandboxRuntimeModular::scheduleWebAudioForActiveClips (cyclomatic 16) packages/core/src/runtime/init.ts:4567— init.initSandboxRuntimeModular::scheduleWebAudioForActiveClips 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: 8 other methods here (init.initSandboxRuntimeModular, init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
Low contrast colour pair in CSS (3.8:1) registry/blocks/ui-3d-reveal/ui-3d-reveal.html:2036— `[data-composition-id="ui-3d-reveal"] .hg-notifbadge` sets color: white on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/badge-pop/badge-pop.html:76— `.hf-transition-badge-count` sets color: #ffffff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/badge-pop/demo.html:62— `.hf-transition-badge-count` sets color: #ffffff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/badge-pop/demo.html:212— `.hf-transition-badge-count` sets color: #ffffff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/micro-transitions/demo.html:64— `.hf-micro-bell span` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/micro-transitions/demo.html:321— `.hf-micro-bell span` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.8:1) registry/components/micro-transitions/micro-transitions.html:93— `.hf-micro-bell span` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Skipped test: survives a full parse-edit-serialize round-trip with stagger intact (write-path) packages/parsers/src/gsapParserAcorn.full.test.ts:599— Skipped — switched off by it.skip
Skipped test: does not rewrite the array argument when editing the tween (write-path) packages/parsers/src/gsapParserAcorn.full.test.ts:747— Skipped — switched off by it.skip
Skipped test: edits one link of a chain in place, leaving the other intact (write-path) packages/parsers/src/gsapParserAcorn.full.test.ts:769— Skipped — switched off by it.skip
Skipped test: deletes one link of a chain, keeping the other (write-path) packages/parsers/src/gsapParserAcorn.full.test.ts:773— Skipped — switched off by it.skip
Skipped test: T1+T2 validated against real SwiftShader (Docker) packages/engine/src/services/drawElementService.integration.test.ts:43— Skipped — switched off by it.skip
Skipped test: E2E validated through the producer pipeline (--experimental-fast-capture) packages/engine/src/services/drawElementService.integration.test.ts:44— Skipped — switched off by it.skip
Skipped test: T3 validated on a real-GPU host packages/engine/src/services/drawElementService.integration.test.ts:45— Skipped — switched off by it.skip
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×6
Animation without a prefers-reduced-motion guard packages/player/src/slideshow/hyperframes-slideshow.ts:1054— <span> moves — its inline style sets `animation: hf` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard packages/studio/src/components/ui/Button.tsx:97— <svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard packages/studio/src/components/ui/Status.tsx:105— <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard packages/studio/src/player/components/TimelineClipFades.tsx:327— <span> moves — its inline style sets `transition: transform 80ms ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard registry/components/grain-overlay/demo.html:119— `#grain-overlay .grain-texture` moves (`animation: hf-grain-noise 0.5s steps(1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard registry/components/grain-overlay/grain-overlay.html:73— `#grain-overlay .grain-texture` moves (`animation: hf-grain-noise 0.5s steps(1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×6
Markup wires an event to an empty handler packages/studio/src/components/nle/NLEPreview.tsx:520— `onLoad` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler packages/studio/src/player/components/TimelineGestureOverlay.tsx:81— `onHoverStart` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler packages/studio/src/player/components/TimelineGestureOverlay.tsx:82— `onHoverEnd` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler packages/studio/src/player/components/TimelineGestureOverlay.tsx:83— `onResizeStart` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler packages/studio/src/player/components/TimelineGestureOverlay.tsx:84— `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Markup wires an event to an empty handler packages/studio/src/player/components/TimelineGestureOverlay.tsx:85— `onDoubleClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
Repeated repair: apps/desktop/scripts/stage-runtime.mjs apps/desktop/scripts/stage-runtime.mjs:519— apps/desktop/scripts/stage-runtime.mjs 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 13 (its worst body is stage-runtime.pruneBundlerOnlyBuilds at line 519), AT OR 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(desktop): keep declarations.d.ts in the staged runtime on Windows”; “fix: harden agent boundaries, data safety and render parity”; “fix(agent): turn-long checkpoint transactions, packaged runtime hardening”; “fix(agent): harden Director guard, packaging and history signature invalidation”. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/scripts/stage-runtime.mjs`: 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: apps/desktop/src-tauri/src/proc.rs apps/desktop/src-tauri/src/proc.rs:298— apps/desktop/src-tauri/src/proc.rs 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 7 (its worst body is openvids_desktop::proc::track_in_job at line 298), AT OR 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(desktop): Windows tests — compare canonical dirs without the verbatim prefix, an exited process has no start”; “fix(desktop): fork review fixes: stale agent lease by start time, stable Cancel, sweep-safe marker, seq after dropped events”; “fix: harden agent boundaries, data safety and render parity”. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/src-tauri/src/proc.rs`: 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/studio-server/src/history/ownerLock.ts packages/studio-server/src/history/ownerLock.ts:21— packages/studio-server/src/history/ownerLock.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 ownerLock.processStartKey at line 21), AT OR 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(windows): read this process's own history lock without PowerShell”; “fix(windows): truncate the history log without an append-only handle”; “fix: harden agent boundaries, data safety and render parity”. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/studio-server/src/history/ownerLock.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: apps/desktop/sidecar/serve.mjs apps/desktop/sidecar/serve.mjs:80— apps/desktop/sidecar/serve.mjs 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 13 (its worst body is serve.stop at line 80), AT OR 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: harden agent boundaries, data safety and render parity”; “fix(desktop): review fixes for the Windows shell”; “fix(desktop): verify in WKWebView, correct the CSP and teardown claims”. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- apps/desktop/sidecar/serve.mjs`: 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/engine/src/services/orphanBrowsers.ts packages/engine/src/services/orphanBrowsers.ts:205— packages/engine/src/services/orphanBrowsers.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 15 (its worst body is orphanBrowsers.sweepOrphanBrowsers at line 205), AT OR 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: harden agent boundaries, data safety and render parity”; “fix(engine): give the Windows command-line lookup 15 s, and the slow Windows tests room”; “fix(engine): reap only the browsers the engine launched, and hide probe consoles on Windows”. 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-11..2026-10-09, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-11 15:40:16 +04:00' --until='2026-10-09 15:40:16 +04:00' --full-history --no-merges -- packages/engine/src/services/orphanBrowsers.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.
IC1 · Incompleteness & stubs· Both branches are identical · ×5
Both branches are identical — the condition decides nothing packages/player/src/controls.ts:39— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing packages/studio/src/hooks/gsapDragCommit.ts:467— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing packages/studio/src/hooks/gsapDragCommit.ts:469— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing packages/studio/vite.request-body.ts:7— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing skills/embedded-captions/scripts/make-cinematic.cjs:608— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Swallowed exception (caught, then discarded) skills/product-launch-video/scripts/captions.mjs:361— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) skills/pr-to-video/scripts/captions.mjs:361— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) skills/pr-to-video/scripts/fetch-pr.mjs:172— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) REDACTED:149— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) skills/faceless-explainer/scripts/captions.mjs:361— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Low contrast colour pair (2.5:1) registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:659— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair (2.5:1) registry/blocks/macos-tahoe-liquid-glass/macos-tahoe-liquid-glass.html:471— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair (2.5:1) registry/blocks/vfx-iphone-device/vfx-iphone-device.html:88— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair (2.5:1) registry/blocks/vfx-iphone-device/vfx-iphone-device.html:199— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair in CSS (4.4:1) registry/components/fade-through/demo.html:73— `.a .badge` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) registry/components/input-feedback/demo.html:73— `.hf-transition-input-clear` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) registry/components/input-feedback/demo.html:230— `.hf-transition-input-clear` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) registry/components/input-feedback/input-feedback.html:85— `.hf-transition-input-clear` sets color: #71717a on background-color: #f4f4f5 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×4
REDACTED
REDACTED
REDACTED
REDACTED
AC1 · Text alternatives· <video> without a captions track · ×3
<video> without a captions track packages/studio/src/components/MediaPreview.tsx:59— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
<video> without a captions track packages/studio/src/media/MediaInspectorParts.tsx:124— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
<video> without a captions track skills/talking-head-recut/references/frames/polaroid.html:28— Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way).
Low contrast colour pair in CSS (2.8:1) registry/blocks/ui-3d-reveal/ui-3d-reveal.html:1431— `[data-composition-id="ui-3d-reveal"] .share-btn` sets color: white on background-color: #18a0fb — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.8:1) skills/hyperframes-creative/frame-presets/cartesian/frame-showcase.html:414— `.imgph span` sets color: #8a8178 on background-color: #e2dbd1 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.8:1) skills/hyperframes-creative/frame-presets/cartesian/frame-showcase.html:433— `.team .ph` sets color: #8a8178 on background-color: #e2dbd1 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) registry/components/success-check/demo.html:34— `.hf-transition-success-check` sets color: #16a34a on background-color: #dcfce7 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) registry/components/success-check/demo.html:175— `.hf-transition-success-check` sets color: #16a34a on background-color: #dcfce7 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) registry/components/success-check/success-check.html:52— `.hf-transition-success-check` sets color: #16a34a on background-color: #dcfce7 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
captions.runBuild (cyclomatic 37) skills/faceless-explainer/scripts/captions.mjs:58— captions.runBuild has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 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.
captions.runBuild (cyclomatic 37) skills/pr-to-video/scripts/captions.mjs:58— captions.runBuild has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 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.
captions.runBuild (cyclomatic 37) skills/product-launch-video/scripts/captions.mjs:58— captions.runBuild has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 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.
captions.brandFontFaces (cyclomatic 24) skills/faceless-explainer/scripts/captions.mjs:290— captions.brandFontFaces has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
captions.brandFontFaces (cyclomatic 24) skills/pr-to-video/scripts/captions.mjs:290— captions.brandFontFaces has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
captions.brandFontFaces (cyclomatic 24) skills/product-launch-video/scripts/captions.mjs:290— captions.brandFontFaces has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
tokens.pickAccent (cyclomatic 21) REDACTED:70— tokens.pickAccent has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 87, roles, ok, …). 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.
tokens.pickAccent (cyclomatic 21) REDACTED:70— tokens.pickAccent has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 87, roles, ok, …). 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.
tokens.pickAccent (cyclomatic 21) REDACTED:77— tokens.pickAccent has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 94, roles, ok, …). 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.
transitions.runVerify (cyclomatic 21) REDACTED:309— transitions.runVerify has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
transitions.runVerify (cyclomatic 21) REDACTED:308— transitions.runVerify has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
transitions.runVerify (cyclomatic 21) REDACTED:308— transitions.runVerify has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
tokens.brandRolesFromStats (cyclomatic 19) REDACTED:108— tokens.brandRolesFromStats has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
tokens.brandRolesFromStats (cyclomatic 19) REDACTED:108— tokens.brandRolesFromStats has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
tokens.brandRolesFromStats (cyclomatic 19) REDACTED:115— tokens.brandRolesFromStats has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
captions.brandFontFaces (cognitive 47) skills/faceless-explainer/scripts/captions.mjs:290— captions.brandFontFaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 5 (9 pts), loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 24). Of this number, 34 points are the body's own statements and 13 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.
captions.brandFontFaces (cognitive 47) skills/pr-to-video/scripts/captions.mjs:290— captions.brandFontFaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 5 (9 pts), loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 24). Of this number, 34 points are the body's own statements and 13 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.
captions.brandFontFaces (cognitive 47) skills/product-launch-video/scripts/captions.mjs:290— captions.brandFontFaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (29 pts), ternaries 5 (9 pts), loops 3 (6 pts), error handling 1 (3 pts) (nesting depth added 24). Of this number, 34 points are the body's own statements and 13 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.
captions.runBuild (cognitive 45) skills/faceless-explainer/scripts/captions.mjs:58— captions.runBuild has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 11, loops 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 12). Of this number, 41 points are the body's own statements and 4 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.
captions.runBuild (cognitive 45) skills/pr-to-video/scripts/captions.mjs:58— captions.runBuild has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 11, loops 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 12). Of this number, 41 points are the body's own statements and 4 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.
captions.runBuild (cognitive 45) skills/product-launch-video/scripts/captions.mjs:58— captions.runBuild has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 11, loops 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 12). Of this number, 41 points are the body's own statements and 4 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.
captured-fonts.stageCapturedFonts (cognitive 30) skills/faceless-explainer/scripts/lib/captured-fonts.mjs:6— captured-fonts.stageCapturedFonts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts) (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.
captured-fonts.stageCapturedFonts (cognitive 30) skills/pr-to-video/scripts/lib/captured-fonts.mjs:6— captured-fonts.stageCapturedFonts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts) (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.
captured-fonts.stageCapturedFonts (cognitive 30) skills/product-launch-video/scripts/lib/captured-fonts.mjs:6— captured-fonts.stageCapturedFonts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts) (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.
transitions.runVerify (cognitive 29) REDACTED:309— transitions.runVerify has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 9). Of this number, 28 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.
transitions.runVerify (cognitive 29) REDACTED:308— transitions.runVerify has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 9). Of this number, 28 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.
transitions.runVerify (cognitive 29) REDACTED:308— transitions.runVerify has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 9). Of this number, 28 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.
transitions.buildGsap (cognitive 22) REDACTED:164— transitions.buildGsap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 9). 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 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.
transitions.buildGsap (cognitive 22) REDACTED:164— transitions.buildGsap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 9). 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 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.
transitions.buildGsap (cognitive 22) REDACTED:164— transitions.buildGsap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), boolean chains 3, loops 1 (nesting depth added 9). 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 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.
tokens.brandRolesFromStats (cognitive 16) REDACTED:108— tokens.brandRolesFromStats has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 3. Of this number, 8 points are the body's own statements and 8 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.
tokens.brandRolesFromStats (cognitive 16) REDACTED:108— tokens.brandRolesFromStats has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 3. Of this number, 8 points are the body's own statements and 8 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.
tokens.brandRolesFromStats (cognitive 16) REDACTED:115— tokens.brandRolesFromStats has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 3. Of this number, 8 points are the body's own statements and 8 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.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×3
JavaScript dependencies are not locked skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/REDACTED:8— skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/REDACTED declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/REDACTED:8— skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/REDACTED declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked REDACTED:8— REDACTED declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Low contrast colour pair in CSS (3.1:1) skills/hyperframes-creative/frame-presets/code-editorial/frame-showcase.html:319— `.callout` sets color: #faf9f5 on background-color: #cc785c — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) skills/hyperframes-creative/frame-presets/code-editorial/frame-showcase.html:778— `.cf6 .cta` sets color: #faf9f5 on background-color: #cc785c — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
assemble-index.guardFrame (cyclomatic 22) skills/faceless-explainer/scripts/assemble-index.mjs:173— assemble-index.guardFrame 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.
assemble-index.guardFrame (cyclomatic 22) skills/pr-to-video/scripts/assemble-index.mjs:174— assemble-index.guardFrame 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.
audio.runGenerate (cyclomatic 18) skills/faceless-explainer/scripts/audio.mjs:124— audio.runGenerate 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.
audio.runGenerate (cyclomatic 18) skills/pr-to-video/scripts/audio.mjs:124— audio.runGenerate 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×2
Fixed-sleep synchronisation: serializes gestures: B's z phase waits for A's mirror phase packages/studio/src/components/nle/zLaneGesture.test.ts:49— This test starts work it did not wait for (`a`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 10))` — 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: does not arm the watchdog while every worker is still initialising packages/producer/src/services/render/stages/captureStreamingStage.test.ts:373— This test starts work it did not wait for (`run`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 250))` — 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.
manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyMotionTimeline (cognitive 38) packages/studio-server/src/helpers/manualEditsRenderScript.ts:102— manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyMotionTimeline has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 8, ternaries 3 (6 pts), error handling 2 (5 pts), loops 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. This shape REPEATS in the file: one other method here (manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyAll) 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.
manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyAll (cognitive 18) packages/studio-server/src/helpers/manualEditsRenderScript.ts:219— manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyAll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3, boolean chains 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. This shape REPEATS in the file: one other method here (manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyMotionTimeline) 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.
assemble-index.guardFrame (cognitive 25) skills/faceless-explainer/scripts/assemble-index.mjs:173— assemble-index.guardFrame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (5 pts), boolean chains 3 (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.
assemble-index.guardFrame (cognitive 25) skills/pr-to-video/scripts/assemble-index.mjs:174— assemble-index.guardFrame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (5 pts), boolean chains 3 (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.
config-lock.withFileLock (cognitive 16) packages/cli/src/media-use/lib/config-lock.mjs:3— config-lock.withFileLock has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 2 (6 pts), boolean chains 1, 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.
config-lock.withFileLock (cognitive 16) skills/media-use/scripts/lib/config-lock.mjs:3— config-lock.withFileLock has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 2 (6 pts), boolean chains 1, 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.
MethodTooLong: ResearchService.importLocked packages/studio-server/src/research/service.ts:719— MethodTooLong — importLocked runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× 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: ResearchService.search packages/studio-server/src/research/service.ts:332— MethodTooLong — search runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×2
REDACTED
REDACTED
X13 · Undrained process stream· Redirected process stream is never drained (deadlock) · ×2
Redirected process stream is never drained (deadlock) packages/studio-server/src/helpers/proxyTranscoder.ts:283— `spawn` pipes `stderr` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `proc.stderr`, while `proc.stdout` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stderr (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`proc.stderr.on('data', …)`, or `proc.stderr.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot.
Redirected process stream is never drained (deadlock) packages/cli/src/commands/init.ts:184— `spawn` pipes both `stdout` and `stderr` here — it is given no `stdio` option, or `'pipe'` — and the parent waits for the child's end while nothing consumes either: nothing in this scope ever reads `child.stdout` or `child.stderr`. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to either stream (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles and the stuck child holds its resources until something kills it. Consume both streams before the wait (`.on('data', …)`, or `.resume()` to discard one), or stop piping what you do not want — `stdio: 'ignore'`, `'inherit'`, or those values in its slots.
Low contrast colour pair in CSS (3.9:1) registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:96— `.ios-location` sets color: #fff on background-color: #2f80ed — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.9:1) registry/blocks/ios26-liquid-glass/ios26-liquid-glass.html:162— `.ios-battery` sets color: #fff on background-color: #59d768 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair (3.8:1) registry/blocks/macos-tahoe-liquid-glass/macos-tahoe-liquid-glass.html:588— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair in CSS (2.9:1) registry/blocks/ui-3d-reveal/ui-3d-reveal.html:2135— `[data-composition-id="ui-3d-reveal"] .hg-styleico` sets color: #888 on background-color: #e8e8e8 — 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair (3.0:1) registry/blocks/vfx-liquid-background/vfx-liquid-background.html:375— The inline foreground/background colours fall below the 4.5:1 WCAG AA minimum for normal text. Darken/lighten one of them.
Low contrast colour pair in CSS (4.2:1) registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:205— `.search-pill` sets color: #6e6e73 on background-color: #e9e9ed — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.4:1) registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:368— `.get-button, .open-button` sets color: #007aff on background-color: #ececf1 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.0:1) registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:436— `.install-button` sets color: #ffffff on background-color: #007aff — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.2:1) registry/blocks/vpn-youtube-spot/vpn-youtube-spot.html:576— `.check` sets color: #ffffff on background-color: #34c759 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.1:1) registry/components/fade-through/demo.html:77— `.b .badge` sets color: #a1a1aa on background-color: #3f3f46 — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.6:1) skills/hyperframes-creative/frame-presets/creative-mode/frame-showcase.html:151— `.cover .chip.g` sets color: #efe9d9 on background-color: #1f8a4c — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
make-cinematic.main (cyclomatic 456) skills/embedded-captions/scripts/make-cinematic.cjs:69— make-cinematic.main has cyclomatic complexity 456 (threshold 15). Of this number, 349 points are the body's own statements and 107 belong to 42 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.
sync.planSync (cyclomatic 255) packages/studio-server/src/story/sync.ts:292— sync.planSync has cyclomatic complexity 255 (threshold 15). Of this number, 248 points are the body's own statements and 7 belong to 6 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.
hyper-shader.init (cyclomatic 245) REDACTED:867— hyper-shader.init has cyclomatic complexity 245 (threshold 15). Of this number, 39 points are the body's own statements and 206 belong to 56 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.
renderOrchestrator.executeRenderPipeline (cyclomatic 220) REDACTED:2908— renderOrchestrator.executeRenderPipeline has cyclomatic complexity 220 (threshold 15). Of this number, 199 points are the body's own statements and 21 belong to 9 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.
files.registerFileRoutes (cyclomatic 204) REDACTED:2384— files.registerFileRoutes has cyclomatic complexity 204 (threshold 15). Most of this is not in the body itself: 1 of the 204 points is its own statement and the rest belongs to 25 function literals inside it that branch (lines 2442, 2812, 2642, …). 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.
timeline.collectRuntimeTimelinePayload (cyclomatic 137) packages/core/src/runtime/timeline.ts:241— timeline.collectRuntimeTimelinePayload has cyclomatic complexity 137 (threshold 15). Of this number, 107 points are the body's own statements and 30 belong to 6 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.
cutPlan.planCut (cyclomatic 114) packages/studio-server/src/analysis/cutPlan.ts:441— cutPlan.planCut has cyclomatic complexity 114 (threshold 15). Of this number, 98 points are the body's own statements and 16 belong to 9 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.
htmlBundler.bundleProject (cyclomatic 105) packages/core/src/compiler/htmlBundler.ts:954— htmlBundler.bundleProject has cyclomatic complexity 105 (threshold 15). Of this number, 90 points are the body's own statements and 15 belong to 7 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.
media.syncRuntimeMedia (cyclomatic 103) packages/core/src/runtime/media.ts:277— media.syncRuntimeMedia has cyclomatic complexity 103 (threshold 15). Of this number, 99 points are the body's own statements and 4 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.
inlineSubCompositions.inlineSubCompositions (cyclomatic 96) packages/core/src/compiler/inlineSubCompositions.ts:272— inlineSubCompositions.inlineSubCompositions has cyclomatic complexity 96 (threshold 15). Of this number, 80 points are the body's own statements and 16 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.
files.executeGsapMutationAcorn (cyclomatic 93) REDACTED:1439— files.executeGsapMutationAcorn has cyclomatic complexity 93 (threshold 15). Of this number, 90 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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: one other method here (files.executeGsapMutationRecast) 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.
files.executeGsapMutationRecast (cyclomatic 93) REDACTED:1779— files.executeGsapMutationRecast has cyclomatic complexity 93 (threshold 15). Of this number, 90 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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: one other method here (files.executeGsapMutationAcorn) 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.
probeStage.runProbeStage (cyclomatic 91) packages/producer/src/services/render/stages/probeStage.ts:266— probeStage.runProbeStage has cyclomatic complexity 91 (threshold 15). Of this number, 90 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.
colorGrading.createColorGradingRuntime (cyclomatic 83) packages/core/src/runtime/colorGrading.ts:3481— colorGrading.createColorGradingRuntime has cyclomatic complexity 83 (threshold 15). Most of this is not in the body itself: 3 of the 83 points are its own statements and the rest belongs to 15 function items inside it that branch (getStatus, upsert, redrawAnimated, …). 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.
videoFrameExtractor.extractAllVideoFrames (cyclomatic 81) packages/engine/src/services/videoFrameExtractor.ts:1658— videoFrameExtractor.extractAllVideoFrames has cyclomatic complexity 81 (threshold 15). Of this number, 52 points are the body's own statements and 29 belong to 8 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.
MotionPathOverlay.MotionPathOverlay (cyclomatic 81) packages/studio/src/components/editor/MotionPathOverlay.tsx:81— MotionPathOverlay.MotionPathOverlay has cyclomatic complexity 81 (threshold 15). Of this number, 30 points are the body's own statements and 51 belong to 17 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.
manualEditsRenderScript.studioManualEditsRenderRuntime (cyclomatic 79) packages/studio-server/src/helpers/manualEditsRenderScript.ts:378— manualEditsRenderScript.studioManualEditsRenderRuntime has cyclomatic complexity 79 (threshold 15). Most of this is not in the body itself: 4 of the 79 points are its own statements and the rest belongs to 27 function items inside it that branch (resolveTarget, splitTopLevelWhitespace, applyBoxSize, …). 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.
videoFrameInjector.queryElementStacking (cyclomatic 78) packages/engine/src/services/videoFrameInjector.ts:460— videoFrameInjector.queryElementStacking has cyclomatic complexity 78 (threshold 15). Most of this is not in the body itself: 1 of the 78 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 655, 607, 466, …). 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.
snapshot.captureSnapshots (cyclomatic 76) packages/cli/src/commands/snapshot.ts:281— snapshot.captureSnapshots has cyclomatic complexity 76 (threshold 15). Of this number, 49 points are the body's own statements and 27 belong to 7 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.
compile.compileIntent (cyclomatic 76) packages/studio-server/src/story/compile.ts:239— compile.compileIntent has cyclomatic complexity 76 (threshold 15). Of this number, 75 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.
gsapResizeIntercept.tryGsapResizeIntercept (cyclomatic 76) packages/studio/src/hooks/gsapResizeIntercept.ts:97— gsapResizeIntercept.tryGsapResizeIntercept has cyclomatic complexity 76 (threshold 15). Of this number, 60 points are the body's own statements and 16 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.
CaptionOverlay.CaptionOverlay (cyclomatic 76) packages/studio/src/captions/components/CaptionOverlay.tsx:35— CaptionOverlay.CaptionOverlay has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 5 of the 76 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 172, 98, 355, …). 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.
plan.createRenderPlan (cyclomatic 73) packages/cli/src/commands/render/plan.ts:222— plan.createRenderPlan has cyclomatic complexity 73 (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.
safe-zones.analyze (cyclomatic 73) skills/embedded-captions/scripts/safe-zones.cjs:75— safe-zones.analyze has cyclomatic complexity 73 (threshold 15). Of this number, 47 points are the body's own statements and 26 belong to 7 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.
propertyPanelFont.FontFamilyField (cyclomatic 71) packages/studio/src/components/editor/propertyPanelFont.tsx:138— propertyPanelFont.FontFamilyField has cyclomatic complexity 71 (threshold 15). Of this number, 19 points are the body's own statements and 52 belong to 18 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.
safe-zones.main (cyclomatic 71) skills/embedded-captions/scripts/safe-zones.cjs:550— safe-zones.main has cyclomatic complexity 71 (threshold 15). Of this number, 52 points are the body's own statements and 19 belong to 8 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.
audioMixer.processCompositionAudio (cyclomatic 69) packages/engine/src/services/audioMixer.ts:1246— audioMixer.processCompositionAudio has cyclomatic complexity 69 (threshold 15). Of this number, 29 points are the body's own statements and 40 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.
propertyPanelFlatMediaSection.FlatMediaSection (cyclomatic 69) packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:42— propertyPanelFlatMediaSection.FlatMediaSection has cyclomatic complexity 69 (threshold 15). Of this number, 52 points are the body's own statements and 17 belong to 10 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.
contrast-audit.browser.__contrastAuditPrepare (cyclomatic 67) REDACTED:49— contrast-audit.browser.__contrastAuditPrepare has cyclomatic complexity 67 (threshold 15). Of this number, 41 points are the body's own statements and 26 belong to 6 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.
htmlParser.parseHtml (cyclomatic 66) REDACTED:181— htmlParser.parseHtml has cyclomatic complexity 66 (threshold 15). Of this number, 22 points are the body's own statements and 44 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.
mutate.validateOp (cyclomatic 66) packages/sdk/src/engine/mutate.ts:1606— mutate.validateOp has cyclomatic complexity 66 (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.
preview.registerPreviewRoutes (cyclomatic 66) packages/studio-server/src/routes/preview.ts:352— preview.registerPreviewRoutes has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 1 of the 66 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 569, buildPreview, a function literal at line 516, …). 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.
postExtractionPhase.runPostExtraction (cyclomatic 64) packages/cli/src/capture/postExtractionPhase.ts:87— postExtractionPhase.runPostExtraction has cyclomatic complexity 64 (threshold 15). Most of this is not in the body itself: 6 of the 64 points are its own statements and the rest belongs to 16 function items inside it that branch (runAssetDownload::rewriteTokenAssets::applyLocalAssetPaths, runAnimationCatalog, runFontExtraction, …). 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.
render.registerRenderRoutes (cyclomatic 64) packages/studio-server/src/routes/render.ts:53— render.registerRenderRoutes has cyclomatic complexity 64 (threshold 15). Most of this is not in the body itself: 1 of the 64 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 104, 390, 345, …). 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.
make-theme.frontFx (cyclomatic 64) skills/embedded-captions/scripts/make-theme.cjs:1348— make-theme.frontFx has cyclomatic complexity 64 (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.
apply-patches.applyOne (cyclomatic 63) packages/sdk/src/engine/apply-patches.ts:181— apply-patches.applyOne has cyclomatic complexity 63 (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.
gsapParserAcorn.tweenCallToAnimation (cyclomatic 61) REDACTED:1223— gsapParserAcorn.tweenCallToAnimation has cyclomatic complexity 61 (threshold 15). Of this number, 60 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.
NLEPreview.NLEPreview (cyclomatic 61) packages/studio/src/components/nle/NLEPreview.tsx:117— NLEPreview.NLEPreview has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 4 of the 61 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 259, 357, 318, …). 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.
transcribe.main (cyclomatic 61) skills/embedded-captions/scripts/transcribe.cjs:97— transcribe.main has cyclomatic complexity 61 (threshold 15). Of this number, 58 points are the body's own statements and 3 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.
resolve.run (cyclomatic 60) packages/cli/src/media-use/resolve.mjs:308— resolve.run has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 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.
studioServer.createStudioServer (cyclomatic 59) packages/cli/src/server/studioServer.ts:411— studioServer.createStudioServer has cyclomatic complexity 59 (threshold 15). Of this number, 19 points are the body's own statements and 40 belong to 18 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.
threeDProjection.initThreeDProjectionInPage (cyclomatic 59) packages/engine/src/services/threeDProjection.ts:53— threeDProjection.initThreeDProjectionInPage has cyclomatic complexity 59 (threshold 15). Of this number, 57 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.
timelineClipDragGestureLifecycle.mountTimelineClipDragGestureLifecycle (cyclomatic 59) packages/studio/src/player/components/timelineClipDragGestureLifecycle.ts:79— timelineClipDragGestureLifecycle.mountTimelineClipDragGestureLifecycle has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 19 function items inside it that branch (handleWindowPointerMove, claimActiveGesture, handleWindowPointerCancel, …). 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.
Composer.Composer (cyclomatic 59) packages/studio/src/components/chat/Composer.tsx:42— Composer.Composer has cyclomatic complexity 59 (threshold 15). Of this number, 39 points are the body's own statements and 20 belong to 8 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.
StoryPanel.StoryWorkspace (cyclomatic 58) packages/studio/src/story/StoryPanel.tsx:108— StoryPanel.StoryWorkspace has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 12 of the 58 points are its own statements and the rest belongs to 16 function items inside it that branch (onKeyDown, a function literal at line 222, a function literal at line 142, …). 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.
contentExtractor.captionImagesWithGemini (cyclomatic 56) packages/cli/src/capture/contentExtractor.ts:251— contentExtractor.captionImagesWithGemini has cyclomatic complexity 56 (threshold 15). Of this number, 44 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.
pageInspector.inspectHtml (cyclomatic 56) packages/studio-server/src/research/sources/pageInspector.ts:142— pageInspector.inspectHtml has cyclomatic complexity 56 (threshold 15). Of this number, 55 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.
propertyPanelFxSection.FxSection (cyclomatic 56) packages/studio/src/components/editor/propertyPanelFxSection.tsx:74— propertyPanelFxSection.FxSection has cyclomatic complexity 56 (threshold 15). Of this number, 19 points are the body's own statements and 37 belong to 23 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.
regression-harness.runTestSuite (cyclomatic 55) packages/producer/src/regression-harness.ts:849— regression-harness.runTestSuite has cyclomatic complexity 55 (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.
check-occlusion.main (cyclomatic 55) skills/embedded-captions/scripts/check-occlusion.cjs:84— check-occlusion.main has cyclomatic complexity 55 (threshold 15). Of this number, 52 points are the body's own statements and 3 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.
assetDownloader.downloadAssets (cyclomatic 54) packages/cli/src/capture/assetDownloader.ts:310— assetDownloader.downloadAssets has cyclomatic complexity 54 (threshold 15). Of this number, 45 points are the body's own statements and 9 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.
regression-harness.validateMetadata (cyclomatic 54) packages/producer/src/regression-harness.ts:196— regression-harness.validateMetadata has cyclomatic complexity 54 (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.
engineModePageComposite.installPageSideCompositor (cyclomatic 54) packages/shader-transitions/src/engineModePageComposite.ts:148— engineModePageComposite.installPageSideCompositor has cyclomatic complexity 54 (threshold 15). Of this number, 17 points are the body's own statements and 37 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.
TimelineLanes.TimelineLanes (cyclomatic 54) packages/studio/src/player/components/TimelineLanes.tsx:40— TimelineLanes.TimelineLanes has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 2 of the 54 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 159, 366, 320, …). 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.
AnimationCard.AnimationCard (cyclomatic 54) packages/studio/src/components/editor/AnimationCard.tsx:36— AnimationCard.AnimationCard has cyclomatic complexity 54 (threshold 15). Of this number, 37 points are the body's own statements and 17 belong to 10 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.
vite.adapter.createViteAdapter (cyclomatic 54) packages/studio/vite.adapter.ts:104— vite.adapter.createViteAdapter has cyclomatic complexity 54 (threshold 15). Of this number, 30 points are the body's own statements and 24 belong to 8 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.
streamingEncoder.buildStreamingArgs (cyclomatic 52) packages/engine/src/services/streamingEncoder.ts:210— streamingEncoder.buildStreamingArgs has cyclomatic complexity 52 (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.
useRenderQueue.useRenderQueue (cyclomatic 52) packages/studio/src/components/renders/useRenderQueue.ts:100— useRenderQueue.useRenderQueue has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 2 of the 52 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 261, 383, 177, …). 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.
Player.Player (cyclomatic 52) packages/studio/src/player/components/Player.tsx:150— Player.Player has cyclomatic complexity 52 (threshold 15). Of this number, 17 points are the body's own statements and 35 belong to 15 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.
DomEditOverlay.DomEditOverlay (cyclomatic 52) packages/studio/src/components/editor/DomEditOverlay.tsx:112— DomEditOverlay.DomEditOverlay has cyclomatic complexity 52 (threshold 15). Of this number, 26 points are the body's own statements and 26 belong to 8 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.
PropertyPanelFlat.PropertyPanelFlat (cyclomatic 52) packages/studio/src/components/editor/PropertyPanelFlat.tsx:51— PropertyPanelFlat.PropertyPanelFlat has cyclomatic complexity 52 (threshold 15). Of this number, 38 points are the body's own statements and 14 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.
check-timing.check (cyclomatic 52) skills/embedded-captions/scripts/check-timing.cjs:54— check-timing.check has cyclomatic complexity 52 (threshold 15). Of this number, 35 points are the body's own statements and 17 belong to 4 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.
make-composition.main (cyclomatic 52) skills/embedded-captions/scripts/make-composition.cjs:236— make-composition.main has cyclomatic complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to one function item 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.
transcribe.transcribeAudio (cyclomatic 51) packages/cli/src/commands/transcribe.ts:285— transcribe.transcribeAudio has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 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.
chunkEncoder.buildEncoderArgs (cyclomatic 51) packages/engine/src/services/chunkEncoder.ts:222— chunkEncoder.buildEncoderArgs has cyclomatic complexity 51 (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.
LayersPanel.LayersPanel (cyclomatic 51) packages/studio/src/components/editor/LayersPanel.tsx:97— LayersPanel.LayersPanel has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 7 of the 51 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 434, 208, 286, …). 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.
render.executeLocalRender (cyclomatic 50) packages/cli/src/commands/render.ts:596— render.executeLocalRender has cyclomatic complexity 50 (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.
recordSite.recordSite (cyclomatic 50) packages/cli/src/siteInspect/recordSite.ts:316— recordSite.recordSite has cyclomatic complexity 50 (threshold 15). Of this number, 45 points are the body's own statements and 5 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.
threeDProjection.detectCssEffectRisk (cyclomatic 50) packages/engine/src/services/threeDProjection.ts:920— threeDProjection.detectCssEffectRisk has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 2 of the 50 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 937, 991, 963, …). 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.
TimelineClipDiamonds.TimelineDiamondLane (cyclomatic 50) packages/studio/src/player/components/TimelineClipDiamonds.tsx:70— TimelineClipDiamonds.TimelineDiamondLane has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 14 of the 50 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 266, a function literal at line 202, a function literal at line 316, …). 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.
propertyPanelMediaSection.MediaSection (cyclomatic 50) packages/studio/src/components/editor/propertyPanelMediaSection.tsx:27— propertyPanelMediaSection.MediaSection has cyclomatic complexity 50 (threshold 15). Of this number, 40 points are the body's own statements and 10 belong to 5 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.
TimelineTrackHeader.TimelineTrackHeader (cyclomatic 49) packages/studio/src/player/components/TimelineTrackHeader.tsx:87— TimelineTrackHeader.TimelineTrackHeader has cyclomatic complexity 49 (threshold 15). Of this number, 32 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.
storyStore.createStoryStore (cyclomatic 49) packages/studio/src/story/storyStore.ts:94— storyStore.createStoryStore has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 1 of the 49 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 108, 122, 157, …). 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.
appHotkeysDispatch.dispatchPlainKey (cyclomatic 49) packages/studio/src/hooks/appHotkeysDispatch.ts:200— appHotkeysDispatch.dispatchPlainKey has cyclomatic complexity 49 (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.
ProviderRow.ProviderRow (cyclomatic 49) packages/studio/src/components/settings/ProviderRow.tsx:233— ProviderRow.ProviderRow has cyclomatic complexity 49 (threshold 15). Of this number, 48 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.
FileTree.FileTree (cyclomatic 48) packages/studio/src/components/editor/FileTree.tsx:40— FileTree.FileTree has cyclomatic complexity 48 (threshold 15). Of this number, 21 points are the body's own statements and 27 belong to 12 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.
AssetsTab.AssetsTab (cyclomatic 48) packages/studio/src/components/sidebar/AssetsTab.tsx:121— AssetsTab.AssetsTab has cyclomatic complexity 48 (threshold 15). Of this number, 19 points are the body's own statements and 29 belong to 16 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.
propertyPanelStyleSections.StyleSections (cyclomatic 48) packages/studio/src/components/editor/propertyPanelStyleSections.tsx:42— propertyPanelStyleSections.StyleSections has cyclomatic complexity 48 (threshold 15). Of this number, 35 points are the body's own statements and 13 belong to 9 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.
lib-dna.resolveTokens (cyclomatic 48) skills/embedded-captions/scripts/lib-dna.cjs:80— lib-dna.resolveTokens has cyclomatic complexity 48 (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.
drawElementService.produceDrawElementFrameBatch (cyclomatic 47) packages/engine/src/services/drawElementService.ts:979— drawElementService.produceDrawElementFrameBatch has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1020, 999, 1064, …). 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.
videoFrameExtractor.extractVideoFramesRangeNow (cyclomatic 47) packages/engine/src/services/videoFrameExtractor.ts:855— videoFrameExtractor.extractVideoFramesRangeNow has cyclomatic complexity 47 (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.
thumbnail.registerThumbnailRoutes (cyclomatic 47) REDACTED:118— thumbnail.registerThumbnailRoutes has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 119, 225). 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.
CaptionPropertyPanel.CaptionPropertyPanel (cyclomatic 47) packages/studio/src/captions/components/CaptionPropertyPanel.tsx:44— CaptionPropertyPanel.CaptionPropertyPanel has cyclomatic complexity 47 (threshold 15). Of this number, 16 points are the body's own statements and 31 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.
MediaInspector.AssetInspector (cyclomatic 47) packages/studio/src/media/MediaInspector.tsx:290— MediaInspector.AssetInspector has cyclomatic complexity 47 (threshold 15). Of this number, 35 points are the body's own statements and 12 belong to 5 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.
frameCapture.computeStaticFrameSet (cyclomatic 46) packages/engine/src/services/frameCapture.ts:2833— frameCapture.computeStaticFrameSet has cyclomatic complexity 46 (threshold 15). Of this number, 21 points are the body's own statements and 25 belong to 4 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.
timelineDOM.parseTimelineFromDOM (cyclomatic 46) packages/studio/src/player/lib/timelineDOM.ts:223— timelineDOM.parseTimelineFromDOM has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to one function literal inside it that branches (line 237). 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.
TimelineToolbar.TimelineToolbar (cyclomatic 46) packages/studio/src/components/TimelineToolbar.tsx:175— TimelineToolbar.TimelineToolbar has cyclomatic complexity 46 (threshold 15). Of this number, 33 points are the body's own statements and 13 belong to 4 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.
gsapParser.tweenCallToAnimation (cyclomatic 45) REDACTED:1006— gsapParser.tweenCallToAnimation has cyclomatic complexity 45 (threshold 15). Of this number, 44 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.
validate.validateDesignSystemHtml (cyclomatic 45) packages/studio-server/src/design/validate.ts:109— validate.validateDesignSystemHtml has cyclomatic complexity 45 (threshold 15). Of this number, 44 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.
hyperframes.generateElementHtml (cyclomatic 44) packages/core/src/generators/hyperframes.ts:509— hyperframes.generateElementHtml has cyclomatic complexity 44 (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.
compositionLoader.mountCompositionContent (cyclomatic 44) packages/core/src/runtime/compositionLoader.ts:388— compositionLoader.mountCompositionContent has cyclomatic complexity 44 (threshold 15). Of this number, 36 points are the body's own statements and 8 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.
propertyPanelColorCurveGraph.CurveGraph (cyclomatic 44) packages/studio/src/components/editor/propertyPanelColorCurveGraph.tsx:259— propertyPanelColorCurveGraph.CurveGraph has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to 14 function items inside it that branch (handleSelectionKey, handleArrowKey, addKeyboardPoint, …). 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.
engine.html.HEROES.forEach() (cyclomatic 44) skills/embedded-captions/modes/cinematic/engine.html:213— engine.html.HEROES.forEach() has cyclomatic complexity 44 (threshold 15). Of this number, 27 points are the body's own statements and 17 belong to 4 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.
contentExtractor.generateAssetDescriptions (cyclomatic 43) packages/cli/src/capture/contentExtractor.ts:662— contentExtractor.generateAssetDescriptions has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 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.
captureStreamingStage.runCaptureStreamingStage (cyclomatic 43) packages/producer/src/services/render/stages/captureStreamingStage.ts:585— captureStreamingStage.runCaptureStreamingStage has cyclomatic complexity 43 (threshold 15). Of this number, 31 points are the body's own statements and 12 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.
drawElementService.captureDrawElementFrame (cyclomatic 43) packages/engine/src/services/drawElementService.ts:328— drawElementService.captureDrawElementFrame has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 409, 344, 528, …). 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.
TimelineClip.TimelineClip (cyclomatic 43) packages/studio/src/player/components/TimelineClip.tsx:57— TimelineClip.TimelineClip has cyclomatic complexity 43 (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.
voiceScriptStore.createVoiceScriptStore (cyclomatic 43) packages/studio/src/voice/script/voiceScriptStore.ts:146— voiceScriptStore.createVoiceScriptStore has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 147, 161, 323, …). 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.
make-theme.paradigmCarbonstrip (cyclomatic 43) skills/embedded-captions/scripts/make-theme.cjs:2584— make-theme.paradigmCarbonstrip has cyclomatic complexity 43 (threshold 15). Of this number, 25 points are the body's own statements and 18 belong to 4 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.
drawElementService.produceDrawElementFrame (cyclomatic 42) packages/engine/src/services/drawElementService.ts:752— drawElementService.produceDrawElementFrame has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 838, 800, 774, …). 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.
ffprobe.probeMediaMetadataUncached (cyclomatic 42) packages/engine/src/utils/ffprobe.ts:704— ffprobe.probeMediaMetadataUncached has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 1 of the 42 points is its own statement and the rest belongs to one function literal inside it that branches (line 705). 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.
media.registerMediaRoutes (cyclomatic 41) packages/studio-server/src/routes/media.ts:130— media.registerMediaRoutes has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 166, a function literal at line 148, cleanupFinishedJobs, …). 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.
domEditOverlayStartGesture.startGesture (cyclomatic 41) packages/studio/src/components/editor/domEditOverlayStartGesture.ts:119— domEditOverlayStartGesture.startGesture has cyclomatic complexity 41 (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.
frameCapture.initializeSession (cyclomatic 40) packages/engine/src/services/frameCapture.ts:2187— frameCapture.initializeSession has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 2208, a function literal at line 2339, a function literal at line 2506, …). 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.
segmentation.draftSegments (cyclomatic 40) packages/studio-server/src/analysis/segmentation.ts:166— segmentation.draftSegments has cyclomatic complexity 40 (threshold 15). Of this number, 35 points are the body's own statements and 5 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.
gsapRuntimeReaders.readAllAnimatedProperties (cyclomatic 40) packages/studio/src/hooks/gsapRuntimeReaders.ts:74— gsapRuntimeReaders.readAllAnimatedProperties has cyclomatic complexity 40 (threshold 15). Of this number, 39 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.
TimelineClipFades.TimelineClipFades (cyclomatic 40) packages/studio/src/player/components/TimelineClipFades.tsx:35— TimelineClipFades.TimelineClipFades has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 84, onHandlePointerMove, finish, …). 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.
coreExtractionPhase.runCoreExtraction (cyclomatic 39) packages/cli/src/capture/coreExtractionPhase.ts:75— coreExtractionPhase.runCoreExtraction 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 9 function items inside it that branch (runAnimationCapture, runAnimationDiscovery::saveDiscoveredLotties, runAnimationDiscovery::scanDomLotties, …). 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.
utils.stripJsStringLiterals (cyclomatic 39) REDACTED:620— utils.stripJsStringLiterals has cyclomatic complexity 39 (threshold 15). Of this number, 36 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.
ResearchService.search (cyclomatic 39) packages/studio-server/src/research/service.ts:332— ResearchService.search has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 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.
studioUiPreferences.readStorage (cyclomatic 39) packages/studio/src/utils/studioUiPreferences.ts:77— studioUiPreferences.readStorage has cyclomatic complexity 39 (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.
store.useCaptionStore (cyclomatic 39) packages/studio/src/captions/store.ts:111— store.useCaptionStore 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 18 function literals inside it that branch (lines 304, 339, 247, …). 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.
useCaptionDetection.useCaptionDetection (cyclomatic 39) packages/studio/src/hooks/useCaptionDetection.ts:20— useCaptionDetection.useCaptionDetection 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 6 function literals inside it that branch (lines 55, 135, 115, …). 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.
useTimelineEditCallbacks.useTimelineEditCallbacks (cyclomatic 39) packages/studio/src/components/nle/useTimelineEditCallbacks.ts:123— useTimelineEditCallbacks.useTimelineEditCallbacks 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 12 function literals inside it that branch (lines 295, 367, 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.
VariablesPanel.VariablesPanel (cyclomatic 39) packages/studio/src/components/panels/VariablesPanel.tsx:286— VariablesPanel.VariablesPanel has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 11 of the 39 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 525, 471, 383, …). 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.
PropertyPanel.PropertyPanel (cyclomatic 39) packages/studio/src/components/editor/PropertyPanel.tsx:56— PropertyPanel.PropertyPanel has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 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.
htmlCompiler.discoverAudioVolumeAutomationFromTimeline (cyclomatic 38) packages/producer/src/services/htmlCompiler.ts:2366— htmlCompiler.discoverAudioVolumeAutomationFromTimeline has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 3 of the 38 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 2496, 2412, 2395, …). 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.
projects.findProjects (cyclomatic 38) packages/core/src/projects.ts:61— projects.findProjects has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 11 function items inside it that branch (walk::visit, a function literal at line 116, namesBelowRoot, …). 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.
gsapParserAcorn.resolveNode (cyclomatic 38) REDACTED:171— gsapParserAcorn.resolveNode has cyclomatic complexity 38 (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.
operations.applyEdits (cyclomatic 38) packages/studio-server/src/editing/operations.ts:178— operations.applyEdits has cyclomatic complexity 38 (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.
useStudioUrlState.useStudioUrlState (cyclomatic 38) packages/studio/src/hooks/useStudioUrlState.ts:163— useStudioUrlState.useStudioUrlState has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 288, 329, 356, …). 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.
propertyPanelCommitField.CommitField (cyclomatic 38) packages/studio/src/components/editor/propertyPanelCommitField.tsx:13— propertyPanelCommitField.CommitField has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 5 of the 38 points are its own statements and the rest belongs to 14 function items inside it that branch (handleKeyDown, a function literal at line 166, a function literal at line 202, …). 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.
RenderQaCard.PassRow (cyclomatic 38) packages/studio/src/components/chat/RenderQaCard.tsx:81— RenderQaCard.PassRow has cyclomatic complexity 38 (threshold 15). Of this number, 34 points are the body's own statements and 4 belong 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.
cssAnalysis.analyzeCss (cyclomatic 37) packages/cli/src/siteInspect/cssAnalysis.ts:141— cssAnalysis.analyzeCss has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 196, 160, 220, …). 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.
mutate.handleSetTiming (cyclomatic 37) packages/sdk/src/engine/mutate.ts:441— mutate.handleSetTiming has cyclomatic complexity 37 (threshold 15). Of this number, 31 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.
useDomEditOverlayRects.useDomEditOverlayRects (cyclomatic 37) packages/studio/src/components/editor/useDomEditOverlayRects.ts:56— useDomEditOverlayRects.useDomEditOverlayRects has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to one function literal inside it that branches (line 117). 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.
propertyPanelColor.ColorField (cyclomatic 37) packages/studio/src/components/editor/propertyPanelColor.tsx:148— propertyPanelColor.ColorField has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 193, a function literal at line 240, 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.
generator.buildGroupStyleDecls (cyclomatic 37) packages/studio/src/captions/generator.ts:109— generator.buildGroupStyleDecls has cyclomatic complexity 37 (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.
init.initSandboxRuntimeModular (cyclomatic 36) packages/core/src/runtime/init.ts:273— init.initSandboxRuntimeModular has cyclomatic complexity 36 (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: 8 other methods here (init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 9 times rather than 9 independent problems. Splitting this body alone leaves the other 8 exactly as they are. Where these are variations on one operation, the change that clears all 9 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.
config.resolveConfig (cyclomatic 36) packages/engine/src/config.ts:794— config.resolveConfig has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 belong to 7 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.
utils.scanJsComments (cyclomatic 36) REDACTED:421— utils.scanJsComments has cyclomatic complexity 36 (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.
gsapParser.updateKeyframeInScript (cyclomatic 36) REDACTED:2548— gsapParser.updateKeyframeInScript has cyclomatic complexity 36 (threshold 15). Of this number, 33 points are the body's own statements and 3 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.
StoryOfferCard.StoryOfferCard (cyclomatic 36) packages/studio/src/components/chat/StoryOfferCard.tsx:31— StoryOfferCard.StoryOfferCard has cyclomatic complexity 36 (threshold 15). Of this number, 34 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.
measure-layout.main (cyclomatic 36) skills/embedded-captions/scripts/measure-layout.cjs:97— measure-layout.main has cyclomatic complexity 36 (threshold 15). Of this number, 19 points are the body's own statements and 17 belong to 4 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.
gsapParserAcorn.findAllTweenCalls::visit (cyclomatic 35) REDACTED:889— gsapParserAcorn.findAllTweenCalls::visit has cyclomatic complexity 35 (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.
timelineDOM.createTimelineElementFromManifestClip (cyclomatic 35) packages/studio/src/player/lib/timelineDOM.ts:68— timelineDOM.createTimelineElementFromManifestClip has cyclomatic complexity 35 (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.
gsapDragPositionCommit.commitGsapPositionFromDrag (cyclomatic 35) packages/studio/src/hooks/gsapDragPositionCommit.ts:267— gsapDragPositionCommit.commitGsapPositionFromDrag has cyclomatic complexity 35 (threshold 15). Of this number, 34 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.
useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerUp (cyclomatic 35) packages/studio/src/components/editor/useDomEditOverlayGestures.ts:275— useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerUp has cyclomatic complexity 35 (threshold 15). Of this number, 22 points are the body's own statements and 13 belong to 7 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.
ffprobe.extractPngMetadataFromBuffer (cyclomatic 34) packages/engine/src/utils/ffprobe.ts:503— ffprobe.extractPngMetadataFromBuffer has cyclomatic complexity 34 (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.
audioMixer.parseAudioElements (cyclomatic 34) packages/engine/src/services/audioMixer.ts:561— audioMixer.parseAudioElements has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 6 function items inside it that branch (build, resolveEnd, isHidden, …). 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.
takes.detectTakeIssues.detectRestartCues (cyclomatic 34) packages/studio-server/src/analysis/takes.ts:238— takes.detectTakeIssues.detectRestartCues has cyclomatic complexity 34 (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.
files.bakeGroupTransformIntoMembers (cyclomatic 34) REDACTED:765— files.bakeGroupTransformIntoMembers has cyclomatic complexity 34 (threshold 15). Of this number, 29 points are the body's own statements and 5 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.
playerStore.usePlayerStore (cyclomatic 34) packages/studio/src/player/store/playerStore.ts:253— playerStore.usePlayerStore has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 453, 465, 519, …). 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.
DomEditCropHandles.DomEditCropHandles (cyclomatic 34) packages/studio/src/components/editor/DomEditCropHandles.tsx:100— DomEditCropHandles.DomEditCropHandles has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (finishCropGesture, a function literal at line 156, a function literal at line 357, …). 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.
useGestureCommit.useGestureCommit.stopAndCommitRecording (cyclomatic 34) packages/studio/src/hooks/useGestureCommit.ts:169— useGestureCommit.useGestureCommit.stopAndCommitRecording has cyclomatic complexity 34 (threshold 15). Of this number, 26 points are the body's own statements and 8 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.
useProjectMentions.useProjectMentions (cyclomatic 34) packages/studio/src/components/chat/useProjectMentions.tsx:54— useProjectMentions.useProjectMentions has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 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.
make-theme.paradigmPopuprail (cyclomatic 34) skills/embedded-captions/scripts/make-theme.cjs:4036— make-theme.paradigmPopuprail has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 belong to 3 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.
htmlCompiler.inlineSubCompositions (cyclomatic 33) packages/producer/src/services/htmlCompiler.ts:942— htmlCompiler.inlineSubCompositions has cyclomatic complexity 33 (threshold 15). Of this number, 28 points are the body's own statements and 5 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.
layout.createInspectCommand (cyclomatic 33) packages/cli/src/commands/layout.ts:443— layout.createInspectCommand 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.
screenshotService.injectVideoFramesBatch (cyclomatic 33) packages/engine/src/services/screenshotService.ts:651— screenshotService.injectVideoFramesBatch has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 657, 695). 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.
runtime-message-handler.handleRuntimeMessage (cyclomatic 33) packages/player/src/runtime-message-handler.ts:60— runtime-message-handler.handleRuntimeMessage 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.
takes.detectTakeIssues.detectStutters (cyclomatic 33) packages/studio-server/src/analysis/takes.ts:708— takes.detectTakeIssues.detectStutters has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs 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.
TimelineAutomationLane.TimelineAutomationLane (cyclomatic 33) packages/studio/src/player/components/TimelineAutomationLane.tsx:206— TimelineAutomationLane.TimelineAutomationLane has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 336, 395, 268, …). 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.
propertyPanelFlatPrimitives.FlatSlider (cyclomatic 33) packages/studio/src/components/editor/propertyPanelFlatPrimitives.tsx:282— propertyPanelFlatPrimitives.FlatSlider has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 510, cancelDrag, a function literal at line 465, …). 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.
animation-map.describeTween (cyclomatic 33) skills/hyperframes-animation/scripts/animation-map.mjs:266— animation-map.describeTween 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.
renderOrchestrator.executeDiskCaptureWithAdaptiveRetry (cyclomatic 32) REDACTED:1155— renderOrchestrator.executeDiskCaptureWithAdaptiveRetry 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.
pickerDrawn.createDrawnProbe (cyclomatic 32) packages/core/src/runtime/pickerDrawn.ts:106— pickerDrawn.createDrawnProbe has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 7 function items inside it that branch (glyphsUnder, glyphsNear, pseudoDraws, …). 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.
alphaBlit.decodePngRaw (cyclomatic 32) packages/engine/src/utils/alphaBlit.ts:32— alphaBlit.decodePngRaw has cyclomatic complexity 32 (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.
gsapParser.addKeyframeToScript (cyclomatic 32) REDACTED:2264— gsapParser.addKeyframeToScript has cyclomatic complexity 32 (threshold 15). Of this number, 30 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.
manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyMotionTimeline (cyclomatic 32) packages/studio-server/src/helpers/manualEditsRenderScript.ts:102— manualEditsRenderScript.studioPositionSeekReapplyRuntime::reapplyMotionTimeline 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.
NLEContext.NLEProvider (cyclomatic 32) packages/studio/src/components/nle/NLEContext.tsx:74— NLEContext.NLEProvider has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 219, 168, 271, …). 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.
parser.parseCaptionComposition (cyclomatic 32) packages/studio/src/captions/parser.ts:137— parser.parseCaptionComposition 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.
FileTreeIcons.FileIcon (cyclomatic 32) packages/studio/src/components/editor/FileTreeIcons.tsx:24— FileTreeIcons.FileIcon 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.
AudioRow.AudioRow (cyclomatic 32) packages/studio/src/components/sidebar/AudioRow.tsx:32— AudioRow.AudioRow has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 115, 88, 78, …). 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.
CompositionsTab.CompCard (cyclomatic 32) packages/studio/src/components/sidebar/CompositionsTab.tsx:130— CompositionsTab.CompCard has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 belong to 8 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.
ChatHeader.ChatHeader (cyclomatic 32) packages/studio/src/components/chat/ChatHeader.tsx:161— ChatHeader.ChatHeader has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 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.
check-overflow.main (cyclomatic 32) REDACTED:54— check-overflow.main has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 130, waitTL, num, …). 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.
fit-fonts.main (cyclomatic 32) skills/embedded-captions/scripts/fit-fonts.cjs:86— fit-fonts.main has cyclomatic complexity 32 (threshold 15). Of this number, 31 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.
make-theme.paradigmScoperail (cyclomatic 32) skills/embedded-captions/scripts/make-theme.cjs:3610— make-theme.paradigmScoperail has cyclomatic complexity 32 (threshold 15). Of this number, 29 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.
make-theme.paradigmPaperrail (cyclomatic 32) skills/embedded-captions/scripts/make-theme.cjs:3877— make-theme.paradigmPaperrail has cyclomatic complexity 32 (threshold 15). Of this number, 23 points are the body's own statements and 9 belong to 3 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.
hdrCompositor.blitHdrVideoLayer (cyclomatic 31) packages/producer/src/services/hdrCompositor.ts:169— hdrCompositor.blitHdrVideoLayer has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 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.
preview.printCurrentContext (cyclomatic 31) REDACTED:1003— preview.printCurrentContext has cyclomatic complexity 31 (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.
catalog.prepareOnDeviceTier (cyclomatic 31) packages/cli/src/commands/catalog.ts:53— catalog.prepareOnDeviceTier 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.
frameCapture.initDrawElementOrTransparentBackground (cyclomatic 31) packages/engine/src/services/frameCapture.ts:868— frameCapture.initDrawElementOrTransparentBackground has cyclomatic complexity 31 (threshold 15). Of this number, 29 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.
gsapParser.resolveNode (cyclomatic 31) REDACTED:109— gsapParser.resolveNode 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.
opsAdd.addClip (cyclomatic 31) packages/studio-server/src/editing/opsAdd.ts:68— opsAdd.addClip 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.
usePreviewInteraction.usePreviewInteraction.handlePreviewCanvasMouseDown (cyclomatic 31) packages/studio/src/hooks/usePreviewInteraction.ts:87— usePreviewInteraction.usePreviewInteraction.handlePreviewCanvasMouseDown has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item 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.
useFxCarve.useFxCarve (cyclomatic 31) packages/studio/src/components/editor/useFxCarve.ts:120— useFxCarve.useFxCarve has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 440, 400, 207, …). 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.
StoryCanvas.StoryCanvas (cyclomatic 31) packages/studio/src/story/StoryCanvas.tsx:50— StoryCanvas.StoryCanvas 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 8 function literals inside it that branch (lines 80, 143, 123, …). 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.
mediaCapture.captureVideoManifest (cyclomatic 30) packages/cli/src/capture/mediaCapture.ts:413— mediaCapture.captureVideoManifest has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 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.
previewMediaBudget.createPreviewMediaBudget.update (cyclomatic 30) packages/core/src/runtime/previewMediaBudget.ts:467— previewMediaBudget.createPreviewMediaBudget.update 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.
gsapParser.splitIntoPropertyGroups (cyclomatic 30) REDACTED:3241— gsapParser.splitIntoPropertyGroups 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.
gsapWriterAcorn.updateAnimationInScript (cyclomatic 30) packages/parsers/src/gsapWriterAcorn.ts:340— gsapWriterAcorn.updateAnimationInScript 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.
editing.registerEditingRoutes (cyclomatic 30) packages/studio-server/src/routes/editing.ts:179— editing.registerEditingRoutes has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 276, 215, 242, …). 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.
EaseCurveSection.EaseCurveSection (cyclomatic 30) packages/studio/src/components/editor/EaseCurveSection.tsx:258— EaseCurveSection.EaseCurveSection has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 516, handlePointerMove, a function literal at line 293, …). 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.
useDomEditCommits.useDomEditCommits.performPersistDomEditOperations (cyclomatic 30) packages/studio/src/hooks/useDomEditCommits.ts:133— useDomEditCommits.useDomEditCommits.performPersistDomEditOperations has cyclomatic complexity 30 (threshold 15). Of this number, 21 points are the body's own statements and 9 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.
propertyPanelFill.GradientField (cyclomatic 30) packages/studio/src/components/editor/propertyPanelFill.tsx:215— propertyPanelFill.GradientField has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 281, a function literal at line 302, a function literal at line 265, …). 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.
make-theme.paradigmChalkrail (cyclomatic 30) skills/embedded-captions/scripts/make-theme.cjs:4198— make-theme.paradigmChalkrail has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong 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.
screenshotCapture.captureScrollScreenshots (cyclomatic 29) packages/cli/src/capture/screenshotCapture.ts:114— screenshotCapture.captureScrollScreenshots has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 132, 201). 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.
gif.parseAnimatedGifMetadata (cyclomatic 29) packages/core/src/media/gif.ts:86— gif.parseAnimatedGifMetadata 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.
videoFrameExtractor.classifyVideoExtractionError (cyclomatic 29) packages/engine/src/services/videoFrameExtractor.ts:415— videoFrameExtractor.classifyVideoExtractionError 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.
HyperframesPlayer.attributeChangedCallback (cyclomatic 29) REDACTED:249— HyperframesPlayer.attributeChangedCallback 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.
takes.detectTakeIssues.detectRestartedRuns (cyclomatic 29) packages/studio-server/src/analysis/takes.ts:486— takes.detectTakeIssues.detectRestartedRuns has cyclomatic complexity 29 (threshold 15). Of this number, 28 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.
files.processUploadedFiles (cyclomatic 29) REDACTED:2257— files.processUploadedFiles 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.
importFiles.importProjectFiles (cyclomatic 29) packages/studio-server/src/crossProject/importFiles.ts:206— importFiles.importProjectFiles has cyclomatic complexity 29 (threshold 15). Of this number, 27 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.
gsapSoftReload.applySoftReload::doReload (cyclomatic 29) packages/studio/src/utils/gsapSoftReload.ts:318— gsapSoftReload.applySoftReload::doReload has cyclomatic complexity 29 (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.
useElementLifecycleOps.useElementLifecycleOps.handleDomEditElementsDelete (cyclomatic 29) packages/studio/src/hooks/useElementLifecycleOps.ts:87— useElementLifecycleOps.useElementLifecycleOps.handleDomEditElementsDelete has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 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.
useGsapTweenCache.useGsapAnimationsForElement (cyclomatic 29) packages/studio/src/hooks/useGsapTweenCache.ts:75— useGsapTweenCache.useGsapAnimationsForElement has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 238, 116, 97, …). 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.
appHotkeysDispatch.dispatchModifierKey (cyclomatic 29) packages/studio/src/hooks/appHotkeysDispatch.ts:113— appHotkeysDispatch.dispatchModifierKey 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.
ProvidersSection.ProvidersSection (cyclomatic 29) packages/studio/src/components/settings/ProvidersSection.tsx:31— ProvidersSection.ProvidersSection has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 81, row, run, …). 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.
make-theme.paradigmBrushrail (cyclomatic 29) skills/embedded-captions/scripts/make-theme.cjs:4527— make-theme.paradigmBrushrail has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 3 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.
index.html.attachMotionBlur (cyclomatic 29) skills/music-to-video/references/templates/logo-split-lockup-pulse/index.html:28— index.html.attachMotionBlur has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 120, 134, 52, …). 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.
hdrCompositor.compositeHdrFrame (cyclomatic 28) packages/producer/src/services/hdrCompositor.ts:496— hdrCompositor.compositeHdrFrame has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 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.
captureHdrStage.runCaptureHdrStage (cyclomatic 28) packages/producer/src/services/render/stages/captureHdrStage.ts:133— captureHdrStage.runCaptureHdrStage has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 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.
layout-audit.browser.connectorDetachmentIssues (cyclomatic 28) packages/cli/src/commands/layout-audit.browser.js:1505— layout-audit.browser.connectorDetachmentIssues has cyclomatic complexity 28 (threshold 15). Of this number, 23 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.
streamingEncoder.spawnStreamingEncoder (cyclomatic 28) packages/engine/src/services/streamingEncoder.ts:457— streamingEncoder.spawnStreamingEncoder has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 558, a function literal at line 606, a function literal at line 503, …). 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.
HyperframesSlideshow.onKey (cyclomatic 28) packages/player/src/slideshow/hyperframes-slideshow.ts:863— HyperframesSlideshow.onKey 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.
regression-harness.saveFailureDetails (cyclomatic 28) packages/producer/src/regression-harness.ts:628— regression-harness.saveFailureDetails 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.
opsVoiceCaptions.captionsFromVoiceover (cyclomatic 28) packages/studio-server/src/editing/opsVoiceCaptions.ts:150— opsVoiceCaptions.captionsFromVoiceover has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 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.
Transform3DCube.Transform3DCube (cyclomatic 28) packages/studio/src/components/editor/Transform3DCube.tsx:30— Transform3DCube.Transform3DCube has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (onKeyDown, a function literal at line 87, onPointerMove, …). 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.
SlideshowPanel.SlideshowPanel (cyclomatic 28) packages/studio/src/components/panels/SlideshowPanel.tsx:168— SlideshowPanel.SlideshowPanel has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 414, 224, 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.
AgentsMenu.AgentsMenu (cyclomatic 28) packages/studio/src/components/chat/AgentsMenu.tsx:66— AgentsMenu.AgentsMenu has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 5 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.
VoiceCatalogPicker.VoiceCatalogPicker (cyclomatic 28) packages/studio/src/voice/VoiceCatalogPicker.tsx:90— VoiceCatalogPicker.VoiceCatalogPicker has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 246, a function literal at line 134, a function literal at line 156, …). 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.
AssetRangeStrip.AssetRangeStrip (cyclomatic 28) packages/studio/src/media/AssetRangeStrip.tsx:54— AssetRangeStrip.AssetRangeStrip has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (keyDown, end, move, …). 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.
AssetRangeEditor.AssetRangeEditor (cyclomatic 28) packages/studio/src/media/AssetRangeEditor.tsx:40— AssetRangeEditor.AssetRangeEditor has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (flush, playFragment, a function literal at line 179, …). 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.
useKeyframeKeyboard.useKeyframeKeyboard (cyclomatic 28) packages/studio/src/hooks/useKeyframeKeyboard.ts:22— useKeyframeKeyboard.useKeyframeKeyboard has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 33, 93). 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.
assetDownloader.deriveAssetName (cyclomatic 27) packages/cli/src/capture/assetDownloader.ts:711— assetDownloader.deriveAssetName has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 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.
video.runVideoMode (cyclomatic 27) packages/cli/src/commands/capture/video.ts:187— video.runVideoMode has cyclomatic complexity 27 (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.
urlDownloader.fetchToPartial (cyclomatic 27) packages/engine/src/utils/urlDownloader.ts:791— urlDownloader.fetchToPartial has cyclomatic complexity 27 (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.
gsapParser.parseMotionPathNode (cyclomatic 27) REDACTED:932— gsapParser.parseMotionPathNode 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.
opsTranscript.captionsFromTranscript (cyclomatic 27) packages/studio-server/src/editing/opsTranscript.ts:73— opsTranscript.captionsFromTranscript has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 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.
manifest.readDesignManifest (cyclomatic 27) packages/studio-server/src/design/manifest.ts:74— manifest.readDesignManifest 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.
gsapRuntimeKeyframes.resolveRuntimeTween (cyclomatic 27) packages/studio/src/hooks/gsapRuntimeKeyframes.ts:233— gsapRuntimeKeyframes.resolveRuntimeTween 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.
usePlaybackKeyboard.usePlaybackKeyboard.handlePlaybackKeyDown (cyclomatic 27) packages/studio/src/player/hooks/usePlaybackKeyboard.ts:94— usePlaybackKeyboard.usePlaybackKeyboard.handlePlaybackKeyDown has cyclomatic complexity 27 (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.
useCaptionSync.useCaptionSync.loadOverrides (cyclomatic 27) packages/studio/src/captions/hooks/useCaptionSync.ts:165— useCaptionSync.useCaptionSync.loadOverrides 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.
useTimelineDeleteOps.useTimelineDeleteOps.handleTimelineElementsDelete (cyclomatic 27) packages/studio/src/hooks/useTimelineDeleteOps.ts:83— useTimelineDeleteOps.useTimelineDeleteOps.handleTimelineElementsDelete has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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.
BlocksTab.BlockCard (cyclomatic 27) packages/studio/src/components/sidebar/BlocksTab.tsx:283— BlocksTab.BlockCard has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 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.
GestureTrailOverlay.GestureTrailOverlay (cyclomatic 27) packages/studio/src/components/editor/GestureTrailOverlay.tsx:15— GestureTrailOverlay.GestureTrailOverlay has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 39, 52, 26, …). 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.
propertyPanelFlatEffectsSection.FlatEffectsSection (cyclomatic 27) packages/studio/src/components/editor/propertyPanelFlatEffectsSection.tsx:60— propertyPanelFlatEffectsSection.FlatEffectsSection has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 90, renderPalette, a function literal at line 150, …). 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.
PermissionCard.PermissionCard (cyclomatic 27) packages/studio/src/components/chat/PermissionCard.tsx:138— PermissionCard.PermissionCard has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item 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.
VoiceLineCard.VoiceLineCard (cyclomatic 27) packages/studio/src/voice/panel/VoiceLineCard.tsx:46— VoiceLineCard.VoiceLineCard has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong 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.
contrast-report.prepareTextElements (cyclomatic 27) skills/hyperframes-creative/scripts/contrast-report.mjs:178— contrast-report.prepareTextElements has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 179, 200, 213, …). 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.
startResolver.createRuntimeStartTimeResolver.resolveDurationForElement (cyclomatic 26) packages/core/src/runtime/startResolver.ts:46— startResolver.createRuntimeStartTimeResolver.resolveDurationForElement has cyclomatic complexity 26 (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.
colorGrading.drawEntry (cyclomatic 26) packages/core/src/runtime/colorGrading.ts:3047— colorGrading.drawEntry 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.
urlDownloader.classifyRangeDisposition (cyclomatic 26) packages/engine/src/utils/urlDownloader.ts:680— urlDownloader.classifyRangeDisposition has cyclomatic complexity 26 (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.
gsapParser.splitAnimationsInScript (cyclomatic 26) REDACTED:1896— gsapParser.splitAnimationsInScript has cyclomatic complexity 26 (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.
iframe.imageAlphaOpaqueAt (cyclomatic 26) packages/sdk/src/adapters/iframe.ts:389— iframe.imageAlphaOpaqueAt 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.
orphans.removeOrphans (cyclomatic 26) packages/studio-server/src/analysis/orphans.ts:30— orphans.removeOrphans has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 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.
preferences.validatePreferencesPatch (cyclomatic 26) packages/studio-server/src/app/preferences.ts:313— preferences.validatePreferencesPatch has cyclomatic complexity 26 (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.
sourceMutation.patchElementInHtml (cyclomatic 26) packages/studio-server/src/helpers/sourceMutation.ts:235— sourceMutation.patchElementInHtml has cyclomatic complexity 26 (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.
ops.resolveMissing (cyclomatic 26) packages/studio-server/src/story/ops.ts:715— ops.resolveMissing has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 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.
voice.registerVoiceRoutes (cyclomatic 26) packages/studio-server/src/routes/voice.ts:49— voice.registerVoiceRoutes has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 8 function items inside it that branch (presetBody, answer, a function literal at line 149, …). 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.
timelineKeyboardNavigation.resolveTimelineNavigationTarget (cyclomatic 26) packages/studio/src/player/components/timelineKeyboardNavigation.ts:380— timelineKeyboardNavigation.resolveTimelineNavigationTarget has cyclomatic complexity 26 (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.
CanvasContextMenu.CanvasContextMenu (cyclomatic 26) packages/studio/src/components/editor/CanvasContextMenu.tsx:147— CanvasContextMenu.CanvasContextMenu has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 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.
ModelList.ModelList (cyclomatic 26) packages/studio/src/components/chat/ModelList.tsx:44— ModelList.ModelList has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 127, onKeyDown, choose, …). 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.
VoiceoverPanel.VoiceoverPanel (cyclomatic 26) packages/studio/src/voice/panel/VoiceoverPanel.tsx:24— VoiceoverPanel.VoiceoverPanel has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 belong to 6 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.
htmlEditor.findElementBlock (cyclomatic 26) packages/studio/src/utils/htmlEditor.ts:59— htmlEditor.findElementBlock has cyclomatic complexity 26 (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.
check-rail-climax.main (cyclomatic 26) skills/embedded-captions/scripts/check-rail-climax.cjs:151— check-rail-climax.main has cyclomatic complexity 26 (threshold 15). 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, 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.
applyErrorDiffusionRgba (cyclomatic 26) packages/cli/src/media-use/lib/error-diffusion.mjs:118— applyErrorDiffusionRgba 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.
captureHdrResources.probeHdrExtractionDims (cyclomatic 25) packages/producer/src/services/render/stages/captureHdrResources.ts:124— captureHdrResources.probeHdrExtractionDims has cyclomatic complexity 25 (threshold 15). Of this number, 21 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.
parallelCoordinator.captureFrameRange (cyclomatic 25) packages/engine/src/services/parallelCoordinator.ts:554— parallelCoordinator.captureFrameRange has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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.
gpuParityDiff.diffGpuParityFrames (cyclomatic 25) packages/engine/src/utils/gpuParityDiff.ts:140— gpuParityDiff.diffGpuParityFrames has cyclomatic complexity 25 (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.
gateway.createAgentGateway.handle (cyclomatic 25) packages/studio-server/src/agent/gateway.ts:502— gateway.createAgentGateway.handle 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.
stages.runAnalysis (cyclomatic 25) packages/studio-server/src/analysis/stages.ts:427— stages.runAnalysis has cyclomatic complexity 25 (threshold 15). Of this number, 22 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.
sourceMutation.splitElementInHtml (cyclomatic 25) packages/studio-server/src/helpers/sourceMutation.ts:345— sourceMutation.splitElementInHtml has cyclomatic complexity 25 (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.
RenderQueue.enqueue (cyclomatic 25) packages/studio-server/src/render/renderQueue.ts:230— RenderQueue.enqueue has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (tick, a function literal at line 279, publish, …). 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.
opsClips.setClip (cyclomatic 25) packages/studio-server/src/editing/opsClips.ts:262— opsClips.setClip has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function item 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.
sync.planSync.finish (cyclomatic 25) packages/studio-server/src/story/sync.ts:1200— sync.planSync.finish has cyclomatic complexity 25 (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.
domEditingLayers.resolveDomEditSelection (cyclomatic 25) packages/studio/src/components/editor/domEditingLayers.ts:286— domEditingLayers.resolveDomEditSelection has cyclomatic complexity 25 (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.
gsapDragPositionCommit.commitFlatViaKeyframes (cyclomatic 25) packages/studio/src/hooks/gsapDragPositionCommit.ts:159— gsapDragPositionCommit.commitFlatViaKeyframes has cyclomatic complexity 25 (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.
gsapRuntimeBridge.tryGsapDragIntercept (cyclomatic 25) packages/studio/src/hooks/gsapRuntimeBridge.ts:173— gsapRuntimeBridge.tryGsapDragIntercept has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 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.
useAnimatedPropertyCommit.commitKeyframeProps (cyclomatic 25) packages/studio/src/hooks/useAnimatedPropertyCommit.ts:305— useAnimatedPropertyCommit.commitKeyframeProps has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 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.
useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.drainOnePending (cyclomatic 25) packages/studio/src/hooks/useExternalFileChangeCoordinator.ts:273— useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.drainOnePending has cyclomatic complexity 25 (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.
CaptionOverlayUtils.readWordBoxes (cyclomatic 25) packages/studio/src/captions/components/CaptionOverlayUtils.ts:14— CaptionOverlayUtils.readWordBoxes has cyclomatic complexity 25 (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.
designStore.createDesignStore (cyclomatic 25) packages/studio/src/design/designStore.ts:67— designStore.createDesignStore 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 4 function literals inside it that branch (lines 133, 74, 156, …). 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.
AssetContextMenu.ContextMenu (cyclomatic 25) packages/studio/src/components/sidebar/AssetContextMenu.tsx:57— AssetContextMenu.ContextMenu has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 98, 130, 248, …). 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.
propertyPanelColorGradingControls.ColorGradingControls (cyclomatic 25) packages/studio/src/components/editor/propertyPanelColorGradingControls.tsx:116— propertyPanelColorGradingControls.ColorGradingControls has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 belong to 5 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.
VoiceGenerate.VoiceGenerate (cyclomatic 25) packages/studio/src/voice/panel/VoiceGenerate.tsx:41— VoiceGenerate.VoiceGenerate has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 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.
propertyPanelColorCurves.ColorCurves (cyclomatic 25) packages/studio/src/components/editor/propertyPanelColorCurves.tsx:22— propertyPanelColorCurves.ColorCurves has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (deleteSelected, updateSelected, resetActive, …). 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.
VoiceKeyControl.VoiceKeyControl (cyclomatic 25) packages/studio/src/voice/VoiceKeyControl.tsx:19— VoiceKeyControl.VoiceKeyControl has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 6 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.
BufferGeometryUtils.mergeGeometries (cyclomatic 25) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:115— BufferGeometryUtils.mergeGeometries has cyclomatic complexity 25 (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.
preview-frames.main (cyclomatic 25) skills/embedded-captions/scripts/preview-frames.cjs:152— preview-frames.main has cyclomatic complexity 25 (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.
parseCube (cyclomatic 25) packages/cli/src/media-use/lib/cube-validate.mjs:76— parseCube has cyclomatic complexity 25 (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.
htmlCompiler.discoverVideoVisibilityFromTimeline (cyclomatic 24) packages/producer/src/services/htmlCompiler.ts:2560— htmlCompiler.discoverVideoVisibilityFromTimeline has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2566, 2586). 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.
debug-timeline.main (cyclomatic 24) packages/core/scripts/debug-timeline.ts:195— debug-timeline.main has cyclomatic complexity 24 (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.
project.lintProject (cyclomatic 24) REDACTED:175— project.lintProject has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 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.
htmlParser.updateElementInHtml (cyclomatic 24) REDACTED:554— htmlParser.updateElementInHtml 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.
ParentMediaManager._observeDynamicMedia (cyclomatic 24) packages/player/src/parent-media.ts:496— ParentMediaManager._observeDynamicMedia has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 500). 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.
iframe.mapPointToImagePixel (cyclomatic 24) packages/sdk/src/adapters/iframe.ts:135— iframe.mapPointToImagePixel has cyclomatic complexity 24 (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.
takesStore.takeOf (cyclomatic 24) packages/studio-server/src/voice/project/takesStore.ts:112— takesStore.takeOf has cyclomatic complexity 24 (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.
opsClips.trimClip (cyclomatic 24) packages/studio-server/src/editing/opsClips.ts:135— opsClips.trimClip has cyclomatic complexity 24 (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.
align.splitScene (cyclomatic 24) packages/studio-server/src/voice/project/align.ts:94— align.splitScene has cyclomatic complexity 24 (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.
sync.planSync.decide (cyclomatic 24) packages/studio-server/src/story/sync.ts:578— sync.planSync.decide has cyclomatic complexity 24 (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.
useDomSelection.useDomSelection.applyDomSelection (cyclomatic 24) packages/studio/src/hooks/useDomSelection.ts:106— useDomSelection.useDomSelection.applyDomSelection has cyclomatic complexity 24 (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.
useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerMove (cyclomatic 24) packages/studio/src/components/editor/useDomEditOverlayGestures.ts:107— useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerMove 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, 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.
TimelineCanvas.TimelineCanvas (cyclomatic 24) packages/studio/src/player/components/TimelineCanvas.tsx:23— TimelineCanvas.TimelineCanvas has cyclomatic complexity 24 (threshold 15). Of this number, 20 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.
ClipContextMenu.ClipContextMenu (cyclomatic 24) packages/studio/src/player/components/ClipContextMenu.tsx:30— ClipContextMenu.ClipContextMenu has cyclomatic complexity 24 (threshold 15). Of this number, 20 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.
propertyPanelFlatColorGradingSection.FlatColorGradingSection (cyclomatic 24) packages/studio/src/components/editor/propertyPanelFlatColorGradingSection.tsx:101— propertyPanelFlatColorGradingSection.FlatColorGradingSection has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 8 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.
VoiceSetupCard.VoiceSetupCard (cyclomatic 24) packages/studio/src/components/chat/VoiceSetupCard.tsx:92— VoiceSetupCard.VoiceSetupCard has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 5 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.
MediaBrowser.MediaBrowser (cyclomatic 24) packages/studio/src/media/MediaBrowser.tsx:91— MediaBrowser.MediaBrowser has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 104, a function literal at line 123, dropOn, …). 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.
make-composition.buildPerGroupCss (cyclomatic 24) skills/embedded-captions/scripts/make-composition.cjs:176— make-composition.buildPerGroupCss has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 178, 207). 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.
make-theme.paradigmRail (cyclomatic 24) skills/embedded-captions/scripts/make-theme.cjs:647— make-theme.paradigmRail has cyclomatic complexity 24 (threshold 15). 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, 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.
make-theme.paradigmLedboard (cyclomatic 24) skills/embedded-captions/scripts/make-theme.cjs:2076— make-theme.paradigmLedboard has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 3 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.
matte.main (cyclomatic 24) skills/embedded-captions/scripts/matte.cjs:119— matte.main 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.
carve.main (cyclomatic 24) skills/hyperframes-audio/scripts/carve.mjs:380— carve.main has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 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.
assemble-index.guardFrame (cyclomatic 24) REDACTED:287— assemble-index.guardFrame has cyclomatic complexity 24 (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.
cancellableProcess.runCancellableProcess (cyclomatic 23) packages/cli/src/utils/cancellableProcess.ts:50— cancellableProcess.runCancellableProcess has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 129, 58, 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.
fileServer.createFileServer (cyclomatic 23) packages/producer/src/services/fileServer.ts:757— fileServer.createFileServer has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 777, 784, 922). 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.
layout-audit.browser.__hyperframesOffPivotRotationSample (cyclomatic 23) packages/cli/src/commands/layout-audit.browser.js:2068— layout-audit.browser.__hyperframesOffPivotRotationSample 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.
alphaBlit.blitRgb48leAffine (cyclomatic 23) packages/engine/src/utils/alphaBlit.ts:583— alphaBlit.blitRgb48leAffine 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.
urlDownloader.acquireCachePathLock (cyclomatic 23) packages/engine/src/utils/urlDownloader.ts:369— urlDownloader.acquireCachePathLock 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.
gsapParser.setArcPathInScript (cyclomatic 23) REDACTED:2928— gsapParser.setArcPathInScript has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 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.
gsapParserAcorn.collectTargetBindings (cyclomatic 23) REDACTED:446— gsapParserAcorn.collectTargetBindings has cyclomatic complexity 23 (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.
ShaderLoaderState.update (cyclomatic 23) packages/player/src/shader-loader-state.ts:80— ShaderLoaderState.update 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.
benchmark.runBenchmark (cyclomatic 23) packages/producer/src/benchmark.ts:181— benchmark.runBenchmark 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.
targets.visionTargets (cyclomatic 23) packages/studio-server/src/analysis/targets.ts:26— targets.visionTargets has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 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.
files.foldAtomicCutFile (cyclomatic 23) REDACTED:2163— files.foldAtomicCutFile has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 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.
captionWords.alignSourceWords (cyclomatic 23) packages/studio-server/src/voice/project/captionWords.ts:19— captionWords.alignSourceWords 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.
normalize.planNormalization (cyclomatic 23) REDACTED:209— normalize.planNormalization 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.
projectDesign.registerProjectDesignRoutes (cyclomatic 23) packages/studio-server/src/routes/projectDesign.ts:74— projectDesign.registerProjectDesignRoutes has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 88, 177, 159, …). 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.
DomEditSelectionChrome.DomEditSelectionChrome (cyclomatic 23) packages/studio/src/components/editor/DomEditSelectionChrome.tsx:145— DomEditSelectionChrome.DomEditSelectionChrome has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 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.
ProjectTabStrip.ProjectTabStripView (cyclomatic 23) packages/studio/src/components/shell/ProjectTabStrip.tsx:74— ProjectTabStrip.ProjectTabStripView 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 5 function items inside it that branch (onTabKeyDown, a function literal at line 161, switchable, …). 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.
TopologyLens.TopologyLens (cyclomatic 23) packages/studio/src/components/editor/TopologyLens.tsx:85— TopologyLens.TopologyLens has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 4 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.
propertyPanelAudioFxGroup.AudioFxGroup (cyclomatic 23) packages/studio/src/components/editor/propertyPanelAudioFxGroup.tsx:89— propertyPanelAudioFxGroup.AudioFxGroup 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 10 function items inside it that branch (automateParam, a function literal at line 113, a function literal at line 155, …). 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.
propertyPanelColorSecondary.PropertyPanelColorSecondary (cyclomatic 23) packages/studio/src/components/editor/propertyPanelColorSecondary.tsx:68— propertyPanelColorSecondary.PropertyPanelColorSecondary 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 8 function items inside it that branch (a function literal at line 88, a function literal at line 190, a function literal at line 252, …). 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.
VoicePilotCard.VoicePilotCard (cyclomatic 23) packages/studio/src/components/chat/VoicePilotCard.tsx:38— VoicePilotCard.VoicePilotCard has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 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.
storyFlow.toFlowNodes (cyclomatic 23) packages/studio/src/story/storyFlow.ts:101— storyFlow.toFlowNodes has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 121). 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.
collectOffPivotRotationSample (cyclomatic 23) packages/cli/src/commands/layout-audit.browser.js:2068— collectOffPivotRotationSample 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.
captureCompositionFrame.seekCompositionTimeline (cyclomatic 22) packages/cli/src/capture/captureCompositionFrame.ts:238— captureCompositionFrame.seekCompositionTimeline has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 249, 250, 256, …). 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.
htmlCompiler.discoverMediaFromBrowser (cyclomatic 22) packages/producer/src/services/htmlCompiler.ts:2256— htmlCompiler.discoverMediaFromBrowser has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 2290, 2348, 2277, …). 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.
checkBrowser.prepareContrast (cyclomatic 22) packages/cli/src/utils/checkBrowser.ts:882— checkBrowser.prepareContrast has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 916, 894, 884, …). 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.
inspectSite.watchResponse (cyclomatic 22) packages/cli/src/siteInspect/inspectSite.ts:84— inspectSite.watchResponse has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 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.
inspectSite.captureLogo (cyclomatic 22) packages/cli/src/siteInspect/inspectSite.ts:251— inspectSite.captureLogo 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, 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.
layout-audit.browser.connectorOrphanIssues (cyclomatic 22) packages/cli/src/commands/layout-audit.browser.js:1632— layout-audit.browser.connectorOrphanIssues 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.
colorLuts.parseCubeLut (cyclomatic 22) packages/core/src/colorLuts.ts:94— colorLuts.parseCubeLut 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.
timeline.isRuntimeElementVisibleAt (cyclomatic 22) packages/core/src/runtime/timeline.ts:37— timeline.isRuntimeElementVisibleAt has cyclomatic complexity 22 (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.
screenshotService.applyDomLayerMask (cyclomatic 22) packages/engine/src/services/screenshotService.ts:399— screenshotService.applyDomLayerMask has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 405, 443, 466, …). 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.
media.findImperativeMediaControlFindings (cyclomatic 22) packages/lint/src/rules/media.ts:213— media.findImperativeMediaControlFindings 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, 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.
composition.variablesDeclarationFindings (cyclomatic 22) packages/lint/src/rules/composition.ts:387— composition.variablesDeclarationFindings 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.
gsapParser.unrollDynamicAnimations (cyclomatic 22) REDACTED:3382— gsapParser.unrollDynamicAnimations 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.
gsapParserAcorn.parseMotionPathNode (cyclomatic 22) REDACTED:1174— gsapParserAcorn.parseMotionPathNode 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.
gsapParserAcorn.gsapScriptMotionPathFirstUseIndex (cyclomatic 22) REDACTED:1963— gsapParserAcorn.gsapScriptMotionPathFirstUseIndex has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 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.
takes.detectTakeIssues.detectFalseStarts (cyclomatic 22) packages/studio-server/src/analysis/takes.ts:575— takes.detectTakeIssues.detectFalseStarts 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.
takes.detectTakeIssues.detectRetakes (cyclomatic 22) packages/studio-server/src/analysis/takes.ts:619— takes.detectTakeIssues.detectRetakes 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.
transcript.dropLoops (cyclomatic 22) packages/studio-server/src/analysis/transcript.ts:173— transcript.dropLoops 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, 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.
deferredPreviewMedia.readAttributes (cyclomatic 22) REDACTED:37— deferredPreviewMedia.readAttributes has cyclomatic complexity 22 (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.
RenderQueue.survey (cyclomatic 22) packages/studio-server/src/render/renderQueue.ts:363— RenderQueue.survey 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.
sync.planSync.workUnits (cyclomatic 22) packages/studio-server/src/story/sync.ts:454— sync.planSync.workUnits has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 469). 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.
requests.parseRecordWebsiteRequest (cyclomatic 22) packages/studio-server/src/research/requests.ts:359— requests.parseRecordWebsiteRequest has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 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.
normalize.ffprobeInspect (cyclomatic 22) REDACTED:54— normalize.ffprobeInspect has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 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.
logoSvg.svgRefusal (cyclomatic 22) packages/studio-server/src/design/logoSvg.ts:59— logoSvg.svgRefusal 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.
address.isPrivateAddress (cyclomatic 22) packages/studio-server/src/research/sources/address.ts:63— address.isPrivateAddress has cyclomatic complexity 22 (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.
ResearchService.inspectUrl (cyclomatic 22) packages/studio-server/src/research/service.ts:554— ResearchService.inspectUrl has cyclomatic complexity 22 (threshold 15). Of this number, 21 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.
ResearchService.importLocked (cyclomatic 22) packages/studio-server/src/research/service.ts:719— ResearchService.importLocked has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 5 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.
cues.readCaptionCues (cyclomatic 22) packages/studio-server/src/qa/cues.ts:29— cues.readCaptionCues 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.
dockWorkspace.restoreEdit (cyclomatic 22) packages/studio/src/components/dock/dockWorkspace.ts:300— dockWorkspace.restoreEdit has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 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.
domEditingDom.escapeCssIdentifier (cyclomatic 22) packages/studio/src/components/editor/domEditingDom.ts:222— domEditingDom.escapeCssIdentifier has cyclomatic complexity 22 (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.
gsapRuntimeKeyframes.readRuntimeKeyframes (cyclomatic 22) packages/studio/src/hooks/gsapRuntimeKeyframes.ts:312— gsapRuntimeKeyframes.readRuntimeKeyframes 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.
timelineZMirror.resolveRepositionLaneMove (cyclomatic 22) packages/studio/src/player/components/timelineZMirror.ts:221— timelineZMirror.resolveRepositionLaneMove has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to one function item 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.
gsapAnimatesProperty.gsapAnimatesProperty (cyclomatic 22) packages/studio/src/components/editor/gsapAnimatesProperty.ts:34— gsapAnimatesProperty.gsapAnimatesProperty 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.
useTimelineKeyboardActor.useTimelineKeyboardActor.onKeyDown (cyclomatic 22) packages/studio/src/player/components/useTimelineKeyboardActor.ts:97— useTimelineKeyboardActor.useTimelineKeyboardActor.onKeyDown has cyclomatic complexity 22 (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.
FileTreeNodes.ContextMenu (cyclomatic 22) packages/studio/src/components/editor/FileTreeNodes.tsx:35— FileTreeNodes.ContextMenu has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (handleMenuKeyDown, a function literal at line 57, a function literal at line 62, …). 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.
useColorGradingPreviews.useColorGradingPreviews (cyclomatic 22) packages/studio/src/components/editor/useColorGradingPreviews.ts:132— useColorGradingPreviews.useColorGradingPreviews has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 187, 160, 200, …). 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.
BlockParamsPanel.BlockParamsPanel (cyclomatic 22) packages/studio/src/components/editor/BlockParamsPanel.tsx:35— BlockParamsPanel.BlockParamsPanel has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 62, 136, 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.
markdownParse.parseMarkdownLite (cyclomatic 22) REDACTED:136— markdownParse.parseMarkdownLite 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.
CreateDesignDialog.CreateDesignDialog (cyclomatic 22) packages/studio/src/design/CreateDesignDialog.tsx:48— CreateDesignDialog.CreateDesignDialog has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 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.
make-theme.paradigmPlanktonrail (cyclomatic 22) skills/embedded-captions/scripts/make-theme.cjs:3286— make-theme.paradigmPlanktonrail has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 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.
design-picker.html.renderMoodBoards (cyclomatic 22) skills/hyperframes-creative/templates/design-picker.html:873— design-picker.html.renderMoodBoards has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 876). 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.
design-picker.html.showOutput (cyclomatic 22) skills/hyperframes-creative/templates/design-picker.html:1308— design-picker.html.showOutput has cyclomatic complexity 22 (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.
gemini-tts.synthesizeGemini (cyclomatic 22) skills/media-use/audio/scripts/lib/gemini-tts.mjs:17— gemini-tts.synthesizeGemini 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.
eval.evalBlock (cyclomatic 22) skills/media-use/scripts/eval.mjs:70— eval.evalBlock 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, 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.
mediaCapture.renderLottiePreviews (cyclomatic 21) packages/cli/src/capture/mediaCapture.ts:114— mediaCapture.renderLottiePreviews 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.
lintFormat.formatLintFindings (cyclomatic 21) packages/cli/src/utils/lintFormat.ts:18— lintFormat.formatLintFindings has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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.
assetMediaType.preflightCompositionAssetMediaTypes (cyclomatic 21) packages/producer/src/services/assetMediaType.ts:100— assetMediaType.preflightCompositionAssetMediaTypes has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 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.
layout-audit.browser.imageAlphaAt (cyclomatic 21) packages/cli/src/commands/layout-audit.browser.js:898— layout-audit.browser.imageAlphaAt 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.
htmlMarkupScan.parseStartTagAttributes (cyclomatic 21) packages/core/src/compiler/htmlMarkupScan.ts:140— htmlMarkupScan.parseStartTagAttributes has cyclomatic complexity 21 (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.
core.types.parseFps (cyclomatic 21) packages/core/src/core.types.ts:86— core.types.parseFps 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.
validateVariables.checkType (cyclomatic 21) packages/core/src/runtime/validateVariables.ts:39— validateVariables.checkType 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.
frameCapture.armStaticDedup (cyclomatic 21) packages/engine/src/services/frameCapture.ts:3399— frameCapture.armStaticDedup 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. This is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
HyperframesSlideshow.buildNavCluster (cyclomatic 21) packages/player/src/slideshow/hyperframes-slideshow.ts:1012— HyperframesSlideshow.buildNavCluster 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.
css.analyseCss (cyclomatic 21) packages/studio-server/src/design/css.ts:29— css.analyseCss has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (visit, a function literal at line 58, a function literal at line 50). 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.
googleFonts.fetchGoogleFontFaces (cyclomatic 21) packages/studio-server/src/design/googleFonts.ts:129— googleFonts.fetchGoogleFontFaces has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
timelineClipDragCommit.commitDraggedClipMove (cyclomatic 21) packages/studio/src/player/components/timelineClipDragCommit.ts:221— timelineClipDragCommit.commitDraggedClipMove has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 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.
useGsapAnimationOps.useGsapAnimationOps.addGsapAnimation (cyclomatic 21) packages/studio/src/hooks/useGsapAnimationOps.ts:126— useGsapAnimationOps.useGsapAnimationOps.addGsapAnimation 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.
gsapRuntimeBridge.tryGsapRotationIntercept (cyclomatic 21) packages/studio/src/hooks/gsapRuntimeBridge.ts:315— gsapRuntimeBridge.tryGsapRotationIntercept 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.
ExternalFileConflictBanner.ExternalFileConflictBanner (cyclomatic 21) packages/studio/src/components/ExternalFileConflictBanner.tsx:197— ExternalFileConflictBanner.ExternalFileConflictBanner 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.
gsapUndoRestore.applyUndoRestoreToPreview (cyclomatic 21) packages/studio/src/utils/gsapUndoRestore.ts:181— gsapUndoRestore.applyUndoRestoreToPreview 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.
useRenderClipContent.useRenderClipContent (cyclomatic 21) packages/studio/src/hooks/useRenderClipContent.ts:112— useRenderClipContent.useRenderClipContent 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 one function literal inside it that branches (line 126). 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.
FileTreeNodes.InlineInput (cyclomatic 21) packages/studio/src/components/editor/FileTreeNodes.tsx:199— FileTreeNodes.InlineInput has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (handleKeyDown, a function literal at line 225, handleBlur, …). 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.
voiceClient.failureOf (cyclomatic 21) packages/studio/src/voice/voiceClient.ts:158— voiceClient.failureOf has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong 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.
QaReportView.ReportBody (cyclomatic 21) packages/studio/src/components/chat/QaReportView.tsx:67— QaReportView.ReportBody has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 3 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.
ChapterInspector.ChapterInspector (cyclomatic 21) packages/studio/src/story/ChapterInspector.tsx:143— ChapterInspector.ChapterInspector has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 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.
make-theme.paradigmPoem (cyclomatic 21) skills/embedded-captions/scripts/make-theme.cjs:870— make-theme.paradigmPoem has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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.
make-theme.paradigmFlaprail (cyclomatic 21) skills/embedded-captions/scripts/make-theme.cjs:1872— make-theme.paradigmFlaprail has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
design-picker.html.renderPreview (cyclomatic 21) skills/hyperframes-creative/templates/design-picker.html:1230— design-picker.html.renderPreview 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.
fileWatcher.watchProjectTree (cyclomatic 20) packages/cli/src/server/fileWatcher.ts:66— fileWatcher.watchProjectTree has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (watchDirectory, descend, a function literal at line 72, …). 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.
fileServer.parseRangeHeader (cyclomatic 20) packages/producer/src/services/fileServer.ts:154— fileServer.parseRangeHeader 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.
captureStreamingStage.createDrainFrameGuard.<returned closure> (cyclomatic 20) packages/producer/src/services/render/stages/captureStreamingStage.ts:358— captureStreamingStage.createDrainFrameGuard.<returned closure> 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.
renderOrchestrator.probeAdaptersUsed (cyclomatic 20) REDACTED:1976— renderOrchestrator.probeAdaptersUsed has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 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.
manifest.isFigmaManifestRecord (cyclomatic 20) REDACTED:33— manifest.isFigmaManifestRecord 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.
hyperframes.generateGsapTimelineScript (cyclomatic 20) packages/core/src/generators/hyperframes.ts:218— hyperframes.generateGsapTimelineScript 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.
lottie.createLottieAdapter.seek (cyclomatic 20) packages/core/src/runtime/adapters/lottie.ts:93— lottie.createLottieAdapter.seek 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.
colorGrading.resolveTarget (cyclomatic 20) packages/core/src/runtime/colorGrading.ts:2410— colorGrading.resolveTarget 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.
parity-harness.emulateProducerVideoSwap (cyclomatic 20) packages/producer/src/parity-harness.ts:161— parity-harness.emulateProducerVideoSwap 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 163). 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.
compilationTester.validateCompilation (cyclomatic 20) packages/producer/src/services/compilationTester.ts:245— compilationTester.validateCompilation 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.
mediaMetadata.probeMediaMetadata (cyclomatic 20) packages/studio-server/src/helpers/mediaMetadata.ts:187— mediaMetadata.probeMediaMetadata has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 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.
policyStore.storedPolicyOf (cyclomatic 20) packages/studio-server/src/research/sources/policyStore.ts:97— policyStore.storedPolicyOf 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.
DesignTally.addGroup (cyclomatic 20) packages/studio-server/src/design/designTally.ts:207— DesignTally.addGroup 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.
useMusicBeatAnalysis.useMusicBeatAnalysis (cyclomatic 20) packages/studio/src/hooks/useMusicBeatAnalysis.ts:106— useMusicBeatAnalysis.useMusicBeatAnalysis has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 159, 194, 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.
manualEdits.installStudioManualEditSeekReapply (cyclomatic 20) packages/studio/src/components/editor/manualEdits.ts:258— manualEdits.installStudioManualEditSeekReapply 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.
useGsapTweenCache.usePopulateKeyframeCacheForFile (cyclomatic 20) packages/studio/src/hooks/useGsapTweenCache.ts:338— useGsapTweenCache.usePopulateKeyframeCacheForFile 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 420, 404, 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.
useSdkSession.useSdkSession (cyclomatic 20) packages/studio/src/hooks/useSdkSession.ts:315— useSdkSession.useSdkSession 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 6 function literals inside it that branch (lines 412, 380, 409, …). 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.
propertyPanelColorGradingSlider.ColorGradingSliderControl (cyclomatic 20) packages/studio/src/components/editor/propertyPanelColorGradingSlider.tsx:30— propertyPanelColorGradingSlider.ColorGradingSliderControl has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 6 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.
RebuildDialog.RebuildDialog (cyclomatic 20) packages/studio/src/story/RebuildDialog.tsx:135— RebuildDialog.RebuildDialog 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, 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.
Messages.AssistantBlock (cyclomatic 20) packages/studio/src/components/chat/Messages.tsx:321— Messages.AssistantBlock has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 349). 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.
make-theme.paradigmLastpage (cyclomatic 20) skills/embedded-captions/scripts/make-theme.cjs:1768— make-theme.paradigmLastpage has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
make-theme.paradigmHudrail (cyclomatic 20) skills/embedded-captions/scripts/make-theme.cjs:2475— make-theme.paradigmHudrail has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 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.
make-theme.paradigmMarkerrail (cyclomatic 20) skills/embedded-captions/scripts/make-theme.cjs:4385— make-theme.paradigmMarkerrail has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
eval.generateReport (cyclomatic 20) skills/media-use/scripts/eval.mjs:192— eval.generateReport has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 217, 198, 219, …). 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.
mediaCapture.downloadVideoBody (cyclomatic 19) packages/cli/src/capture/mediaCapture.ts:245— mediaCapture.downloadVideoBody has cyclomatic complexity 19 (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.
deterministicFonts.buildFontFaceCss (cyclomatic 19) packages/producer/src/services/deterministicFonts.ts:670— deterministicFonts.buildFontFaceCss has cyclomatic complexity 19 (threshold 15). 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, 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.
htmlCompiler.collectExternalAssets (cyclomatic 19) packages/producer/src/services/htmlCompiler.ts:1283— htmlCompiler.collectExternalAssets has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
compileStage.runCompileStage (cyclomatic 19) packages/producer/src/services/render/stages/compileStage.ts:151— compileStage.runCompileStage has cyclomatic complexity 19 (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.
play.registerCompositionRoute (cyclomatic 19) packages/cli/src/commands/play.ts:211— play.registerCompositionRoute 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 one function literal inside it that branches (line 218). 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.
types.resolveBlockCategory (cyclomatic 19) packages/core/src/registry/types.ts:228— types.resolveBlockCategory has cyclomatic complexity 19 (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.
positionEdits.installPositionEditsSeekReapply (cyclomatic 19) packages/core/src/runtime/positionEdits.ts:220— positionEdits.installPositionEditsSeekReapply has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 9 function items inside it that branch (observeGlobalContainer, observeSeekProperty, isWrapped, …). 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.
frameCapture.collectMediaReadinessWarnings (cyclomatic 19) packages/engine/src/services/frameCapture.ts:1915— frameCapture.collectMediaReadinessWarnings 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 1920, append). 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. This is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
urlDownloader.fetchPublicHttpsBytes (cyclomatic 19) packages/engine/src/utils/urlDownloader.ts:535— urlDownloader.fetchPublicHttpsBytes 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.
htmlParser.addElementToHtml (cyclomatic 19) REDACTED:636— htmlParser.addElementToHtml has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
compilationTester.extractTimedElements (cyclomatic 19) packages/producer/src/services/compilationTester.ts:42— compilationTester.extractTimedElements 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.
gateway.createAgentGateway.launchRuntime (cyclomatic 19) packages/studio-server/src/agent/gateway.ts:298— gateway.createAgentGateway.launchRuntime has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
cutPlan.createCleaner.tidy (cyclomatic 19) packages/studio-server/src/analysis/cutPlan.ts:266— cutPlan.createCleaner.tidy has cyclomatic complexity 19 (threshold 15). Of this number, 18 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.
preferences.normalize (cyclomatic 19) packages/studio-server/src/app/preferences.ts:237— preferences.normalize has cyclomatic complexity 19 (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.
opsAdd.addSequence (cyclomatic 19) packages/studio-server/src/editing/opsAdd.ts:192— opsAdd.addSequence 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.
editingFrames.registerCompositionFrameRoutes (cyclomatic 19) packages/studio-server/src/routes/editingFrames.ts:90— editingFrames.registerCompositionFrameRoutes 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 one function literal inside it that branches (line 99). 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.
aroll.cleanChapterAroll (cyclomatic 19) packages/studio-server/src/story/aroll.ts:33— aroll.cleanChapterAroll has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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.
assets.resolveFont (cyclomatic 19) packages/studio-server/src/design/assets.ts:147— assets.resolveFont 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.
scriptScan.scanScript (cyclomatic 19) packages/studio-server/src/design/scriptScan.ts:80— scriptScan.scanScript 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.
gemini.fail (cyclomatic 19) packages/studio-server/src/voice/connectors/gemini.ts:75— gemini.fail 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.
useTimelinePlayhead.useTimelinePlayhead (cyclomatic 19) packages/studio/src/player/components/useTimelinePlayhead.ts:38— useTimelinePlayhead.useTimelinePlayhead 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 7 function literals inside it that branch (lines 144, 69, 109, …). 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.
useTimelineAssetDropOps.useTimelineAssetDropOps.dropAssetAt (cyclomatic 19) packages/studio/src/hooks/useTimelineAssetDropOps.ts:98— useTimelineAssetDropOps.useTimelineAssetDropOps.dropAssetAt has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 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.
useMotionPathData.useMotionPathData (cyclomatic 19) packages/studio/src/components/editor/useMotionPathData.ts:97— useMotionPathData.useMotionPathData 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 8 function literals inside it that branch (lines 125, 149, 137, …). 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.
PreviewOverlays.PreviewOverlays (cyclomatic 19) packages/studio/src/components/nle/PreviewOverlays.tsx:129— PreviewOverlays.PreviewOverlays has cyclomatic complexity 19 (threshold 15). 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: 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.
voiceGuards.isVoiceControl (cyclomatic 19) packages/studio/src/voice/voiceGuards.ts:96— voiceGuards.isVoiceControl has cyclomatic complexity 19 (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.
propertyPanelFlatSliderReadout.FlatSliderReadout (cyclomatic 19) packages/studio/src/components/editor/propertyPanelFlatSliderReadout.tsx:5— propertyPanelFlatSliderReadout.FlatSliderReadout has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 5 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.
propertyPanelFlatTextSection.FlatTextFieldEditor (cyclomatic 19) packages/studio/src/components/editor/propertyPanelFlatTextSection.tsx:49— propertyPanelFlatTextSection.FlatTextFieldEditor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 169, 178, 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.
QaIssueRow.QaIssueRow (cyclomatic 19) packages/studio/src/components/chat/QaIssueRow.tsx:36— QaIssueRow.QaIssueRow has cyclomatic complexity 19 (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.
TurnFooter.TurnFooter (cyclomatic 19) packages/studio/src/components/chat/TurnFooter.tsx:155— TurnFooter.TurnFooter has cyclomatic complexity 19 (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.
MessageList.MainThread (cyclomatic 19) packages/studio/src/components/chat/MessageList.tsx:77— MessageList.MainThread has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 117, retryFor, a function literal at line 89, …). 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.
StorySectionStrip.StorySectionStrip (cyclomatic 19) packages/studio/src/story/StorySectionStrip.tsx:22— StorySectionStrip.StorySectionStrip has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
make-theme.paradigmVhsrail (cyclomatic 19) skills/embedded-captions/scripts/make-theme.cjs:2238— make-theme.paradigmVhsrail has cyclomatic complexity 19 (threshold 15). Of this number, 15 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.
make-theme.setpieceHoloboot (cyclomatic 19) skills/embedded-captions/scripts/make-theme.cjs:6372— make-theme.setpieceHoloboot has cyclomatic complexity 19 (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.
safe-zones.scenePalette (cyclomatic 19) skills/embedded-captions/scripts/safe-zones.cjs:353— safe-zones.scenePalette 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.
animation-map.enumerateTweens (cyclomatic 19) skills/hyperframes-animation/scripts/animation-map.mjs:186— animation-map.enumerateTweens 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 3 function literals inside it that branch (lines 198, 191, 187). 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.
animation-map.computeFlags (cyclomatic 19) skills/hyperframes-animation/scripts/animation-map.mjs:339— animation-map.computeFlags has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 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.
error-diffusion.applyErrorDiffusionRgba (cyclomatic 19) skills/media-use/scripts/lib/error-diffusion.mjs:118— error-diffusion.applyErrorDiffusionRgba has cyclomatic complexity 19 (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.
audio.runGenerate (cyclomatic 19) skills/product-launch-video/scripts/audio.mjs:122— audio.runGenerate has cyclomatic complexity 19 (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.
assetDownloader.downloadAndRewriteFonts (cyclomatic 18) packages/cli/src/capture/assetDownloader.ts:536— assetDownloader.downloadAndRewriteFonts has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
agentPromptGenerator.buildPrompt (cyclomatic 18) packages/cli/src/capture/agentPromptGenerator.ts:60— agentPromptGenerator.buildPrompt has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
mediaCapture.saveLottieAnimations (cyclomatic 18) packages/cli/src/capture/mediaCapture.ts:49— mediaCapture.saveLottieAnimations 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.
transcribe.transcribe (cyclomatic 18) packages/cli/src/whisper/transcribe.ts:540— transcribe.transcribe 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.
htmlCompiler.detectAncestorBackgroundImage (cyclomatic 18) packages/producer/src/services/htmlCompiler.ts:379— htmlCompiler.detectAncestorBackgroundImage 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.
htmlCompiler.coalesceHeadStylesAndBodyScripts (cyclomatic 18) packages/producer/src/services/htmlCompiler.ts:875— htmlCompiler.coalesceHeadStylesAndBodyScripts has cyclomatic complexity 18 (threshold 15). Of this number, 16 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.
hdrCompositor.blitHdrImageLayer (cyclomatic 18) packages/producer/src/services/hdrCompositor.ts:334— hdrCompositor.blitHdrImageLayer has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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.
captureHdrSequentialLoop.runSequentialLayeredFrameLoop (cyclomatic 18) packages/producer/src/services/render/stages/captureHdrSequentialLoop.ts:70— captureHdrSequentialLoop.runSequentialLayeredFrameLoop has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
audioPadTrim.padOrTrimAudioToVideoFrameCount (cyclomatic 18) packages/producer/src/services/render/audioPadTrim.ts:284— audioPadTrim.padOrTrimAudioToVideoFrameCount 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.
diarize.parseTurns (cyclomatic 18) packages/cli/src/whisper/diarize.ts:170— diarize.parseTurns has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
assemble.assembleStyle (cyclomatic 18) packages/cli/src/siteInspect/assemble.ts:116— assemble.assembleStyle 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 3 function literals inside it that branch (lines 131, 165, 211). 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.
contrast-audit.browser.__contrastAuditFinish (cyclomatic 18) REDACTED:330— contrast-audit.browser.__contrastAuditFinish 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.
htmlBundler.rebaseEntryAuthoredAssetPaths (cyclomatic 18) packages/core/src/compiler/htmlBundler.ts:194— htmlBundler.rebaseEntryAuthoredAssetPaths 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.
textures.collectTextureCss (cyclomatic 18) packages/lint/src/rules/textures.ts:62— textures.collectTextureCss has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 79, 100). 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.
gsapParser.parseSimpleArrayKeyframes (cyclomatic 18) REDACTED:878— gsapParser.parseSimpleArrayKeyframes 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.
gsapParserAcorn.parseSimpleArrayKeyframes (cyclomatic 18) REDACTED:1086— gsapParserAcorn.parseSimpleArrayKeyframes 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.
gsapWriterAcorn.computeForwardBaselines (cyclomatic 18) packages/parsers/src/gsapWriterAcorn.ts:2364— gsapWriterAcorn.computeForwardBaselines 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.
htmlParser.normalizeKeyframes (cyclomatic 18) REDACTED:505— htmlParser.normalizeKeyframes 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 3 function items inside it that branch (a function literal at line 531, a function literal at line 519, hasBaseCheck). 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.
regression-harness.discoverTestSuites (cyclomatic 18) packages/producer/src/regression-harness.ts:329— regression-harness.discoverTestSuites has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (tryAddSuite). 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.
iframe.parseObjectPosition (cyclomatic 18) packages/sdk/src/adapters/iframe.ts:213— iframe.parseObjectPosition 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 3 function items inside it that branch (resolveToken, isVert, isHoriz). 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.
Engine.confirmUnmoved (cyclomatic 18) packages/studio-server/src/history/projectHistory.ts:945— Engine.confirmUnmoved has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 978, look, a function literal at line 966, …). 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.
store.evaluateStages (cyclomatic 18) packages/studio-server/src/analysis/store.ts:152— store.evaluateStages 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.
sourceMutation.wrapElementsInHtml (cyclomatic 18) packages/studio-server/src/helpers/sourceMutation.ts:533— sourceMutation.wrapElementsInHtml 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.
files.applyGsapMutations (cyclomatic 18) REDACTED:1358— files.applyGsapMutations 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.
studioMotionRenderScript.studioMotionRenderRuntime::applyManifest (cyclomatic 18) packages/studio-server/src/helpers/studioMotionRenderScript.ts:208— studioMotionRenderScript.studioMotionRenderRuntime::applyManifest 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.
ops.updateNode (cyclomatic 18) packages/studio-server/src/story/ops.ts:338— ops.updateNode has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
UrlGuard.vetUrl (cyclomatic 18) packages/studio-server/src/research/sources/urlPolicy.ts:88— UrlGuard.vetUrl 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.
PolicyFetcher.download (cyclomatic 18) packages/studio-server/src/research/sources/policyFetch.ts:387— PolicyFetcher.download 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.
cssScan.readBlock (cyclomatic 18) packages/studio-server/src/design/cssScan.ts:94— cssScan.readBlock 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 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.
requests.planRequests (cyclomatic 18) packages/studio-server/src/voice/project/requests.ts:118— requests.planRequests has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong 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.
PlayerControls.PlayerControls (cyclomatic 18) packages/studio/src/player/components/PlayerControls.tsx:63— PlayerControls.PlayerControls has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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.
timelineClipDragCommit.buildTrackInsertEdits (cyclomatic 18) packages/studio/src/player/components/timelineClipDragCommit.ts:333— timelineClipDragCommit.buildTrackInsertEdits 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.
useTimelineKeyframeHandlers.beginTimelineKeyframeRetime (cyclomatic 18) packages/studio/src/player/components/useTimelineKeyframeHandlers.ts:188— useTimelineKeyframeHandlers.beginTimelineKeyframeRetime has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
useProjectFileWriter.useProjectFileWriter (cyclomatic 18) packages/studio/src/hooks/useProjectFileWriter.ts:19— useProjectFileWriter.useProjectFileWriter 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 4 function literals inside it that branch (lines 90, 65, 34, …). 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.
useElementLifecycleOps.useElementLifecycleOps.handleDomZIndexReorderCommit (cyclomatic 18) packages/studio/src/hooks/useElementLifecycleOps.ts:235— useElementLifecycleOps.useElementLifecycleOps.handleDomZIndexReorderCommit 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 3 function literals inside it that branch (lines 252, 306, 339). 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.
useDomEditCommitsHelpers.patchElementBatches (cyclomatic 18) packages/studio/src/hooks/useDomEditCommitsHelpers.ts:90— useDomEditCommitsHelpers.patchElementBatches has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong 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.
useGsapTweenCache.useGsapAnimationsForElement.animations (cyclomatic 18) packages/studio/src/hooks/useGsapTweenCache.ts:171— useGsapTweenCache.useGsapAnimationsForElement.animations has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
useAnimatedPropertyCommit.useAnimatedPropertyCommit.commitAnimatedProperties (cyclomatic 18) packages/studio/src/hooks/useAnimatedPropertyCommit.ts:423— useAnimatedPropertyCommit.useAnimatedPropertyCommit.commitAnimatedProperties 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.
useTimelineFocusCoordinator.useTimelineFocusCoordinator (cyclomatic 18) packages/studio/src/player/components/useTimelineFocusCoordinator.ts:130— useTimelineFocusCoordinator.useTimelineFocusCoordinator has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 180, 149). 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.
EditModal.EditPopover (cyclomatic 18) packages/studio/src/player/components/EditModal.tsx:38— EditModal.EditPopover has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 165, 76, 109, …). 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.
storyGraphOps.connectNodes (cyclomatic 18) packages/studio/src/story/storyGraphOps.ts:261— storyGraphOps.connectNodes has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
clipboardPayload.deserializeClipboardPayload (cyclomatic 18) REDACTED:33— clipboardPayload.deserializeClipboardPayload has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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.
AssetPreviewOverlay.AssetPreviewOverlay (cyclomatic 18) packages/studio/src/components/nle/AssetPreviewOverlay.tsx:199— AssetPreviewOverlay.AssetPreviewOverlay has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 4 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.
useColorGradingController.useColorGradingController (cyclomatic 18) packages/studio/src/components/editor/useColorGradingController.ts:186— useColorGradingController.useColorGradingController 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 8 function literals inside it that branch (lines 442, 253, 284, …). 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.
StoryToolbar.StoryToolbar (cyclomatic 18) packages/studio/src/story/StoryToolbar.tsx:64— StoryToolbar.StoryToolbar has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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.
MaterialInspector.KindFields (cyclomatic 18) packages/studio/src/story/MaterialInspector.tsx:124— MaterialInspector.KindFields has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 216, 151, 152, …). 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.
useStoryDrop.useStoryDrop (cyclomatic 18) packages/studio/src/story/useStoryDrop.tsx:27— useStoryDrop.useStoryDrop 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 6 function items inside it that branch (placeOf, a function literal at line 71, a function literal at line 77, …). 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.
SourceRecord.SourceRecord (cyclomatic 18) packages/studio/src/research/SourceRecord.tsx:80— SourceRecord.SourceRecord has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
engine.html.GROUPS.forEach() (cyclomatic 18) skills/embedded-captions/modes/cinematic/engine.html:177— engine.html.GROUPS.forEach() 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.
safe-zones.sceneOptics (cyclomatic 18) skills/embedded-captions/scripts/safe-zones.cjs:445— safe-zones.sceneOptics 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.
transcript-cut.run (cyclomatic 18) skills/media-use/scripts/transcript-cut.mjs:59— transcript-cut.run has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
analyze-beatgrid.analyze (cyclomatic 18) skills/music-to-video/scripts/analyze-beatgrid.py:408— analyze-beatgrid.analyze 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.
mfluxImageGenerate (cyclomatic 18) packages/cli/src/media-use/lib/mflux-provider.mjs:31— mfluxImageGenerate 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.
freezeRecipe (cyclomatic 18) packages/cli/src/media-use/lib/recipe-store.mjs:205— freezeRecipe 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.
pipeline.runPipeline (cyclomatic 17) packages/cli/src/background-removal/pipeline.ts:371— pipeline.runPipeline 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.
htmlExtractor.extractHtml (cyclomatic 17) packages/cli/src/capture/htmlExtractor.ts:16— htmlExtractor.extractHtml has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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.
htmlCompiler.resolveMediaDuration (cyclomatic 17) packages/producer/src/services/htmlCompiler.ts:435— htmlCompiler.resolveMediaDuration 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 2 function items inside it that branch (a function literal at line 491, withSrcContext). 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.
htmlCompiler.compileForRender (cyclomatic 17) packages/producer/src/services/htmlCompiler.ts:1987— htmlCompiler.compileForRender has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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.
captureHdrHybridLoop.runHybridLayeredFrameLoop::workerTaskOf (cyclomatic 17) packages/producer/src/services/render/stages/captureHdrHybridLoop.ts:202— captureHdrHybridLoop.runHybridLayeredFrameLoop::workerTaskOf 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.
checkBrowser.collectTweenBoundaries (cyclomatic 17) packages/cli/src/utils/checkBrowser.ts:476— checkBrowser.collectTweenBoundaries has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 478, 479, 489, …). 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.
motionShot.timelineDuration (cyclomatic 17) packages/cli/src/commands/motionShot.ts:435— motionShot.timelineDuration has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 437, 441, 463, …). 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.
inspectSite.inspectSite (cyclomatic 17) packages/cli/src/siteInspect/inspectSite.ts:377— inspectSite.inspectSite 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.
layout-audit.browser.textOverflowFixHint (cyclomatic 17) packages/cli/src/commands/layout-audit.browser.js:418— layout-audit.browser.textOverflowFixHint 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.
resolve.ingest (cyclomatic 17) packages/cli/src/media-use/resolve.mjs:809— resolve.ingest 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, 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.
audioLeveller.analyseLevelling (cyclomatic 17) packages/core/src/audioLeveller.ts:97— audioLeveller.analyseLevelling has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 152, 136). 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.
inlineSubCompositions.refuseSwapsReachedByRootScripts (cyclomatic 17) packages/core/src/compiler/inlineSubCompositions.ts:66— inlineSubCompositions.refuseSwapsReachedByRootScripts has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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.
htmlBundler.autoHealMissingCompositionIds (cyclomatic 17) packages/core/src/compiler/htmlBundler.ts:634— htmlBundler.autoHealMissingCompositionIds 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.
colorGrading.applyUniforms (cyclomatic 17) packages/core/src/runtime/colorGrading.ts:2820— colorGrading.applyUniforms 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.
alphaBlit.blitRgb48leRegion (cyclomatic 17) packages/engine/src/utils/alphaBlit.ts:474— alphaBlit.blitRgb48leRegion 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.
drawElementService.classifyGpuRenderer (cyclomatic 17) packages/engine/src/services/drawElementService.ts:160— drawElementService.classifyGpuRenderer 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.
frameCapture.captureFrameSurface (cyclomatic 17) packages/engine/src/services/frameCapture.ts:3787— frameCapture.captureFrameSurface 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 is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
frameCapture.captureFramesBatchPipelined (cyclomatic 17) packages/engine/src/services/frameCapture.ts:4417— frameCapture.captureFramesBatchPipelined 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 is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
frameCapture.closeCaptureSession (cyclomatic 17) packages/engine/src/services/frameCapture.ts:4569— frameCapture.closeCaptureSession 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 is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
frameCapture.captureDeVerificationFrames (cyclomatic 17) packages/engine/src/services/frameCapture.ts:4703— frameCapture.captureDeVerificationFrames has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 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. This is NOT this file's highest cyclomatic complexity: frameCapture.decodeDynamicCssBackgroundImages (cyclomatic 26) 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.
ffprobe.probeAudioMetadataUncached (cyclomatic 17) packages/engine/src/utils/ffprobe.ts:958— ffprobe.probeAudioMetadataUncached has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 962). 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.
videoFrameExtractor.extractionFrameCountForDuration (cyclomatic 17) packages/engine/src/services/videoFrameExtractor.ts:125— videoFrameExtractor.extractionFrameCountForDuration 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.
gsapSerialize.serializeGsapAnimations (cyclomatic 17) packages/parsers/src/gsapSerialize.ts:233— gsapSerialize.serializeGsapAnimations has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 245, 238). 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.
gsapParser.parsePercentageKeyframes (cyclomatic 17) REDACTED:768— gsapParser.parsePercentageKeyframes 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.
gsapParserAcorn.parsePercentageKeyframes (cyclomatic 17) REDACTED:974— gsapParserAcorn.parsePercentageKeyframes 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.
playback-state.applyRuntimeStateMessage (cyclomatic 17) packages/player/src/playback-state.ts:57— playback-state.applyRuntimeStateMessage 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.
regression-harness.run (cyclomatic 17) packages/producer/src/regression-harness.ts:1321— regression-harness.run has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 4 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.
cutPlan.createCleaner.cutSilences (cyclomatic 17) packages/studio-server/src/analysis/cutPlan.ts:223— cutPlan.createCleaner.cutSilences 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.
speakers.absorbMicroSpeakers (cyclomatic 17) packages/studio-server/src/analysis/speakers.ts:40— speakers.absorbMicroSpeakers has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 54, isMicro). 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.
transcript.buildTranscript (cyclomatic 17) packages/studio-server/src/analysis/transcript.ts:314— transcript.buildTranscript has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. 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.
sourceStyleMutation.parseStyleDecls (cyclomatic 17) packages/studio-server/src/helpers/sourceStyleMutation.ts:1— sourceStyleMutation.parseStyleDecls 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.
opsCaptions.retimeCaptions (cyclomatic 17) packages/studio-server/src/editing/opsCaptions.ts:150— opsCaptions.retimeCaptions has cyclomatic complexity 17 (threshold 15). Of this number, 9 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.
opsClips.setSpeed (cyclomatic 17) packages/studio-server/src/editing/opsClips.ts:350— opsClips.setSpeed 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.
sync.unitReasons (cyclomatic 17) packages/studio-server/src/story/sync.ts:165— sync.unitReasons 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.
ccmixter.toCandidate (cyclomatic 17) packages/studio-server/src/research/sources/connectors/ccmixter.ts:53— ccmixter.toCandidate 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.
site.searchThroughWeb (cyclomatic 17) packages/studio-server/src/research/sources/connectors/site.ts:19— site.searchThroughWeb 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.
QaService.loadTimeline (cyclomatic 17) packages/studio-server/src/qa/service.ts:268— QaService.loadTimeline has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 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.
extract.addPageFacts (cyclomatic 17) packages/studio-server/src/design/extract.ts:152— extract.addPageFacts 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.
VoiceSynthesizer.takeOf (cyclomatic 17) packages/studio-server/src/voice/project/synthesize.ts:590— VoiceSynthesizer.takeOf has cyclomatic complexity 17 (threshold 15). 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, 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.
SegmentedControl.SegmentedControl (cyclomatic 17) packages/studio/src/components/ui/SegmentedControl.tsx:42— SegmentedControl.SegmentedControl has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (onKeyDown, a function literal at line 98, a function literal at line 53, …). 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.
timelineKeyframeIdentity.timelineKeyframeTargetFromSelectionKey (cyclomatic 17) packages/studio/src/player/components/timelineKeyframeIdentity.ts:32— timelineKeyframeIdentity.timelineKeyframeTargetFromSelectionKey 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.
timelineIframeHelpers.autoHealMissingCompositionIds (cyclomatic 17) packages/studio/src/player/lib/timelineIframeHelpers.ts:51— timelineIframeHelpers.autoHealMissingCompositionIds 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.
useDomEditCommits.useDomEditCommits.commitDomEditPatchBatches (cyclomatic 17) packages/studio/src/hooks/useDomEditCommits.ts:282— useDomEditCommits.useDomEditCommits.commitDomEditPatchBatches has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 288, 348, 309). 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.
useTimelineProviderState.useTimelineProviderState (cyclomatic 17) packages/studio/src/player/components/useTimelineProviderState.tsx:46— useTimelineProviderState.useTimelineProviderState has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
retryTurn.retryTurnRequest (cyclomatic 17) packages/studio/src/agent/retryTurn.ts:52— retryTurn.retryTurnRequest 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.
useCaptionSync.buildOverrides (cyclomatic 17) packages/studio/src/captions/hooks/useCaptionSync.ts:24— useCaptionSync.buildOverrides 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.
propertyPanelColor.ColorSlider (cyclomatic 17) packages/studio/src/components/editor/propertyPanelColor.tsx:23— propertyPanelColor.ColorSlider has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 101, previewFromClientX, a function literal at line 97, …). 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.
propertyPanelGradingNumberField.GradingNumberField (cyclomatic 17) packages/studio/src/components/editor/propertyPanelGradingNumberField.tsx:4— propertyPanelGradingNumberField.GradingNumberField has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function items inside it that branch (settle, a function literal at line 85, a function literal at line 99, …). 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.
CaptionAnimationPanel.CaptionAnimationPanel (cyclomatic 17) packages/studio/src/captions/components/CaptionAnimationPanel.tsx:193— CaptionAnimationPanel.CaptionAnimationPanel has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 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.
RenderQueueItem.RenderQueueItem (cyclomatic 17) packages/studio/src/components/renders/RenderQueueItem.tsx:95— RenderQueueItem.RenderQueueItem 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.
RenderQueue.RenderQueue (cyclomatic 17) packages/studio/src/components/renders/RenderQueue.tsx:147— RenderQueue.RenderQueue 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, 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.
AgentConfigDialog.AgentConfigDialog (cyclomatic 17) packages/studio/src/components/chat/AgentConfigDialog.tsx:55— AgentConfigDialog.AgentConfigDialog has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function item 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.
QaAcceptedList.QaAcceptedList (cyclomatic 17) packages/studio/src/components/chat/QaAcceptedList.tsx:14— QaAcceptedList.QaAcceptedList has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 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.
ChatView.statusSentence (cyclomatic 17) packages/studio/src/components/chat/ChatView.tsx:24— ChatView.statusSentence 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.
StoryNodeCard.MaterialCardImpl (cyclomatic 17) packages/studio/src/story/StoryNodeCard.tsx:239— StoryNodeCard.MaterialCardImpl 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.
StoryProvenance.ResolutionSection (cyclomatic 17) packages/studio/src/story/StoryProvenance.tsx:58— StoryProvenance.ResolutionSection 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.
SourceApiKeyControl.SourceApiKeyControl (cyclomatic 17) packages/studio/src/research/SourceApiKeyControl.tsx:14— SourceApiKeyControl.SourceApiKeyControl has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 4 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.
AssetSearchPolicyView.AssetSearchPolicyView (cyclomatic 17) packages/studio/src/research/AssetSearchPolicyView.tsx:275— AssetSearchPolicyView.AssetSearchPolicyView 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.
MediaInspectorParts.MediaPreview (cyclomatic 17) packages/studio/src/media/MediaInspectorParts.tsx:79— MediaInspectorParts.MediaPreview has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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.
BufferGeometryUtils.mergeVertices (cyclomatic 17) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:560— BufferGeometryUtils.mergeVertices 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.
fill-timings.main (cyclomatic 17) skills/embedded-captions/scripts/fill-timings.cjs:63— fill-timings.main 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, 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.
make-theme.paradigmLaserrail (cyclomatic 17) skills/embedded-captions/scripts/make-theme.cjs:2833— make-theme.paradigmLaserrail has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
make-theme.paradigmRansomrail (cyclomatic 17) skills/embedded-captions/scripts/make-theme.cjs:4861— make-theme.paradigmRansomrail has cyclomatic complexity 17 (threshold 15). Of this number, 9 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.
preview-frames.shotAt (cyclomatic 17) skills/embedded-captions/scripts/preview-frames.cjs:92— preview-frames.shotAt has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 105, 132, 137). 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.
sfx.resolveSfx (cyclomatic 17) skills/media-use/audio/scripts/lib/sfx.mjs:30— sfx.resolveSfx 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.
speechSpans (cyclomatic 17) packages/cli/src/media-use/lib/duck.mjs:4— speechSpans 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.
preview.handlePreviewKillAll (cyclomatic 16) REDACTED:760— preview.handlePreviewKillAll 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.
wordpiece.isChinese (cyclomatic 16) packages/cli/src/registry/wordpiece.ts:182— wordpiece.isChinese 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.
validate.validateInBrowser (cyclomatic 16) packages/cli/src/commands/validate.ts:386— validate.validateInBrowser has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 456, 477, 490, …). 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.
video.streamToFile (cyclomatic 16) packages/cli/src/commands/capture/video.ts:11— video.streamToFile 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, 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.
layout-audit.browser.textOverflowIssues (cyclomatic 16) packages/cli/src/commands/layout-audit.browser.js:520— layout-audit.browser.textOverflowIssues 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.
media-search.rankMediaRows (cyclomatic 16) packages/cli/src/media-use/lib/media-search.mjs:35— media-search.rankMediaRows has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
debug-timeline.shouldIncludeTimelineNode (cyclomatic 16) packages/core/scripts/debug-timeline.ts:118— debug-timeline.shouldIncludeTimelineNode 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.
htmlCompiler.compileHtml (cyclomatic 16) packages/core/src/compiler/htmlCompiler.ts:33— htmlCompiler.compileHtml 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, 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.
previewMediaBudget.planPreviewMediaBudget (cyclomatic 16) packages/core/src/runtime/previewMediaBudget.ts:150— previewMediaBudget.planPreviewMediaBudget 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, 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.
media.refreshRuntimeMediaCache (cyclomatic 16) packages/core/src/runtime/media.ts:102— media.refreshRuntimeMediaCache 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.
affordances.isIdentityTransform (cyclomatic 16) packages/core/src/editing/affordances.ts:87— affordances.isIdentityTransform 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.
gsap.objectLiteralHasTopLevelRelativeValue (cyclomatic 16) REDACTED:684— gsap.objectLiteralHasTopLevelRelativeValue 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.
variableUsage.scanVariableUsage (cyclomatic 16) packages/parsers/src/variableUsage.ts:111— variableUsage.scanVariableUsage 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.
gsapInline.isSafeDefaultExpression::visit (cyclomatic 16) packages/parsers/src/gsapInline.ts:258— gsapInline.isSafeDefaultExpression::visit 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.
gsapParser.findAllTweenCalls (cyclomatic 16) REDACTED:608— gsapParser.findAllTweenCalls 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.
gsapParser.buildTweenStatementCode (cyclomatic 16) REDACTED:1473— gsapParser.buildTweenStatementCode 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.
gsapParserAcorn.resolveTimelinePositions (cyclomatic 16) REDACTED:1664— gsapParserAcorn.resolveTimelinePositions 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 2 function items inside it that branch (a function literal at line 1689, defineLabel). 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.
controls.createControls (cyclomatic 16) packages/player/src/controls.ts:53— controls.createControls has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 238, 178, 218, …). 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.
apply-patches.applyOverrideSet (cyclomatic 16) packages/sdk/src/engine/apply-patches.ts:126— apply-patches.applyOverrideSet has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 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.
presets.matchingPresets (cyclomatic 16) packages/studio-server/src/editing/presets.ts:40— presets.matchingPresets has cyclomatic complexity 16 (threshold 15). 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, 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.
StoryService.resolveRanges (cyclomatic 16) packages/studio-server/src/story/service.ts:475— StoryService.resolveRanges 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.
StoryService.execute (cyclomatic 16) packages/studio-server/src/story/service.ts:648— StoryService.execute 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 one function literal inside it that branches (line 659). 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.
DesignLibrary.commit (cyclomatic 16) packages/studio-server/src/design/library.ts:233— DesignLibrary.commit has cyclomatic complexity 16 (threshold 15). 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, 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.
commons.pickVideo (cyclomatic 16) packages/studio-server/src/research/sources/connectors/commons.ts:219— commons.pickVideo has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (fromDerivative). 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.
commons.toCandidate (cyclomatic 16) packages/studio-server/src/research/sources/connectors/commons.ts:319— commons.toCandidate 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.
design.registerDesignRoutes (cyclomatic 16) packages/studio-server/src/routes/design.ts:95— design.registerDesignRoutes 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 7 function items inside it that branch (a function literal at line 152, resolveProjectFile, a function literal at line 110, …). 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.
VoiceCache.entry (cyclomatic 16) packages/studio-server/src/voice/cache.ts:57— VoiceCache.entry 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.
sourcePatcher.resolveSourceFile (cyclomatic 16) REDACTED:113— sourcePatcher.resolveSourceFile 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.
Player.hasUnloadedAssets (cyclomatic 16) packages/studio/src/player/components/Player.tsx:104— Player.hasUnloadedAssets 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.
timelineTimingSync.foldGsapMutationInQueue (cyclomatic 16) packages/studio/src/hooks/timelineTimingSync.ts:234— timelineTimingSync.foldGsapMutationInQueue has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
timelineClipDragPreview.computeResizePreview (cyclomatic 16) packages/studio/src/player/components/timelineClipDragPreview.ts:259— timelineClipDragPreview.computeResizePreview 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.
EaseParamFields.EaseBezierField (cyclomatic 16) packages/studio/src/components/editor/EaseParamFields.tsx:41— EaseParamFields.EaseBezierField has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (commit, a function literal at line 91, a function literal at line 54). 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.
EaseCurveSection.EaseTypeDropdown (cyclomatic 16) packages/studio/src/components/editor/EaseCurveSection.tsx:52— EaseCurveSection.EaseTypeDropdown 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 4 function items inside it that branch (handleMenuKeyDown, a function literal at line 77, a function literal at line 69, …). 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.
useDomEditTextCommits.useDomEditTextCommits.handleDomStyleCommitForSelection (cyclomatic 16) packages/studio/src/hooks/useDomEditTextCommits.ts:138— useDomEditTextCommits.useDomEditTextCommits.handleDomStyleCommitForSelection has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 176, 198, 169, …). 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.
gsapDragCommit.commitWholePathOffset (cyclomatic 16) packages/studio/src/hooks/gsapDragCommit.ts:426— gsapDragCommit.commitWholePathOffset has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 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.
useTimelinePlayer.useTimelinePlayer (cyclomatic 16) packages/studio/src/player/hooks/useTimelinePlayer.ts:49— useTimelinePlayer.useTimelinePlayer 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 4 function literals inside it that branch (lines 332, 505, 407, …). 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.
agentStore.createAgentStore.store.send (cyclomatic 16) packages/studio/src/agent/agentStore.ts:493— agentStore.createAgentStore.store.send 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.
useTimelineEditing.useTimelineEditing.handleTimelineElementMove (cyclomatic 16) packages/studio/src/hooks/useTimelineEditing.ts:179— useTimelineEditing.useTimelineEditing.handleTimelineElementMove 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 4 function items inside it that branch (commitMove, a function literal at line 252, commitMove::buildMovePatches, …). 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.
useOpenvidsDesktopShortcuts.useOpenvidsDesktopShortcuts (cyclomatic 16) packages/studio/src/hooks/useOpenvidsDesktopShortcuts.ts:31— useOpenvidsDesktopShortcuts.useOpenvidsDesktopShortcuts 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 literals inside it that branch (lines 44, 38). 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.
propertyPanelFxControls.FxParamRow (cyclomatic 16) packages/studio/src/components/editor/propertyPanelFxControls.tsx:118— propertyPanelFxControls.FxParamRow has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 4 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.
SlideshowSubPanels.BranchItem (cyclomatic 16) packages/studio/src/components/panels/SlideshowSubPanels.tsx:326— SlideshowSubPanels.BranchItem 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 4 function literals inside it that branch (lines 419, 341, 357, …). 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.
ExecutionQualityMenu.ExecutionQualityMenu (cyclomatic 16) packages/studio/src/components/chat/ExecutionQualityMenu.tsx:171— ExecutionQualityMenu.ExecutionQualityMenu has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 5 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.
QuestionCard.QuestionCard (cyclomatic 16) packages/studio/src/components/chat/QuestionCard.tsx:21— QuestionCard.QuestionCard has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item 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.
AssetSearchPolicyView.SourceRow (cyclomatic 16) packages/studio/src/research/AssetSearchPolicyView.tsx:96— AssetSearchPolicyView.SourceRow 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.
JevSection.JevSection (cyclomatic 16) packages/studio/src/components/settings/JevSection.tsx:26— JevSection.JevSection has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 4 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.
VoiceDesignControl.VoiceDesignControl (cyclomatic 16) packages/studio/src/voice/VoiceDesignControl.tsx:22— VoiceDesignControl.VoiceDesignControl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (design, a function literal at line 86, a function literal at line 113, …). 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.
useEnableKeyframes.useEnableKeyframes (cyclomatic 16) packages/studio/src/hooks/useEnableKeyframes.ts:471— useEnableKeyframes.useEnableKeyframes 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 4 function literals inside it that branch (lines 474, 498, 499, …). 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.
BufferGeometryUtils.computeMorphedAttributes (cyclomatic 16) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:794— BufferGeometryUtils.computeMorphedAttributes has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
make-theme.sceneHeroXY (cyclomatic 16) skills/embedded-captions/scripts/make-theme.cjs:132— make-theme.sceneHeroXY has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
make-theme.paradigmSheenrail (cyclomatic 16) skills/embedded-captions/scripts/make-theme.cjs:3469— make-theme.paradigmSheenrail has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 3497, 3496, 3511). 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.
make-theme.setpieceInkbloom (cyclomatic 16) skills/embedded-captions/scripts/make-theme.cjs:8180— make-theme.setpieceInkbloom 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.
safe-zones.sceneLighting (cyclomatic 16) skills/embedded-captions/scripts/safe-zones.cjs:473— safe-zones.sceneLighting 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.
duck.speechSpans (cyclomatic 16) skills/media-use/scripts/lib/duck.mjs:4— duck.speechSpans 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.
frame-contract.validateFrameHtml (cyclomatic 16) REDACTED:12— frame-contract.validateFrameHtml 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.
ingest.parseDiff (cyclomatic 16) skills/pr-to-video/scripts/ingest.mjs:313— ingest.parseDiff has cyclomatic complexity 16 (threshold 15). 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, 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.
make-cinematic.main (cognitive 685) skills/embedded-captions/scripts/make-cinematic.cjs:69— make-cinematic.main has cognitive complexity 685 (threshold 15). Drivers by points: if/else 107 (284 pts), boolean chains 202, ternaries 47 (110 pts), loops 37 (67 pts), error handling 11 (22 pts) (nesting depth added 281). Of this number, 564 points are the body's own statements and 121 belong to 42 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.
sync.planSync (cognitive 406) packages/studio-server/src/story/sync.ts:292— sync.planSync has cognitive complexity 406 (threshold 15). Drivers by points: if/else 87 (187 pts), ternaries 34 (79 pts), loops 39 (71 pts), boolean chains 69 (nesting depth added 177). Of this number, 401 points are the body's own statements and 5 belong to 6 function literals 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.
renderOrchestrator.executeRenderPipeline (cognitive 365) REDACTED:2908— renderOrchestrator.executeRenderPipeline has cognitive complexity 365 (threshold 15). Drivers by points: if/else 82 (155 pts), ternaries 53 (144 pts), boolean chains 55, error handling 5 (11 pts) (nesting depth added 170). Of this number, 339 points are the body's own statements and 26 belong to 9 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.
probeStage.runProbeStage (cognitive 276) packages/producer/src/services/render/stages/probeStage.ts:266— probeStage.runProbeStage has cognitive complexity 276 (threshold 15). Drivers by points: if/else 57 (194 pts), ternaries 10 (34 pts), loops 6 (18 pts), boolean chains 16, error handling 5 (14 pts) (nesting depth added 182). Of this number, 273 points are the body's own statements and 3 belong 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.
timeline.collectRuntimeTimelinePayload (cognitive 242) packages/core/src/runtime/timeline.ts:241— timeline.collectRuntimeTimelinePayload has cognitive complexity 242 (threshold 15). Drivers by points: if/else 51 (135 pts), ternaries 22 (42 pts), boolean chains 35, loops 11 (26 pts), error handling 2 (4 pts) (nesting depth added 121). Of this number, 196 points are the body's own statements and 46 belong to 6 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.
hyper-shader.init (cognitive 226) REDACTED:867— hyper-shader.init has cognitive complexity 226 (threshold 15). Drivers by points: if/else 81 (117 pts), boolean chains 59, loops 22 (28 pts), ternaries 14 (18 pts), error handling 2 (4 pts) (nesting depth added 48). Of this number, 49 points are the body's own statements and 177 belong to 56 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.
files.registerFileRoutes (cognitive 224) REDACTED:2384— files.registerFileRoutes has cognitive complexity 224 (threshold 15). Drivers by points: if/else 106 (139 pts), boolean chains 30, error handling 18 (26 pts), ternaries 10 (18 pts), loops 9 (11 pts) (nesting depth added 51). None of this is in the body itself: all 224 points belong to 25 function literals inside it that branch (lines 2812, 2442, 2577, …). 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.
htmlBundler.bundleProject (cognitive 185) packages/core/src/compiler/htmlBundler.ts:954— htmlBundler.bundleProject has cognitive complexity 185 (threshold 15). Drivers by points: if/else 50 (98 pts), ternaries 14 (34 pts), loops 18 (27 pts), boolean chains 26 (nesting depth added 77). Of this number, 166 points are the body's own statements and 19 belong to 7 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.
inlineSubCompositions.inlineSubCompositions (cognitive 183) packages/core/src/compiler/inlineSubCompositions.ts:272— inlineSubCompositions.inlineSubCompositions has cognitive complexity 183 (threshold 15). Drivers by points: if/else 32 (74 pts), ternaries 16 (52 pts), boolean chains 37, loops 9 (20 pts) (nesting depth added 89). Of this number, 145 points are the body's own statements and 38 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.
cutPlan.planCut (cognitive 171) packages/studio-server/src/analysis/cutPlan.ts:441— cutPlan.planCut has cognitive complexity 171 (threshold 15). Drivers by points: if/else 43 (84 pts), loops 25 (35 pts), boolean chains 26, ternaries 15 (26 pts) (nesting depth added 62). Of this number, 156 points are the body's own statements and 15 belong to 9 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.
compile.compileIntent (cognitive 153) packages/studio-server/src/story/compile.ts:239— compile.compileIntent has cognitive complexity 153 (threshold 15). Drivers by points: if/else 27 (79 pts), ternaries 12 (40 pts), boolean chains 22, loops 6 (9 pts), match/switch 1 (3 pts) (nesting depth added 85). Of this number, 152 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.
media.syncRuntimeMedia (cognitive 139) packages/core/src/runtime/media.ts:277— media.syncRuntimeMedia has cognitive complexity 139 (threshold 15). Drivers by points: if/else 30 (74 pts), boolean chains 40, error handling 3 (14 pts), ternaries 3 (10 pts), loops 1 (nesting depth added 62). Of this number, 130 points are the body's own statements and 9 belong 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.
snapshot.captureSnapshots (cognitive 128) packages/cli/src/commands/snapshot.ts:281— snapshot.captureSnapshots has cognitive complexity 128 (threshold 15). Drivers by points: if/else 34 (65 pts), ternaries 12 (26 pts), boolean chains 21, error handling 4 (10 pts), loops 3 (6 pts) (nesting depth added 54). Of this number, 88 points are the body's own statements and 40 belong to 7 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.
videoFrameExtractor.extractAllVideoFrames (cognitive 120) packages/engine/src/services/videoFrameExtractor.ts:1658— videoFrameExtractor.extractAllVideoFrames has cognitive complexity 120 (threshold 15). Drivers by points: if/else 41 (71 pts), loops 12 (15 pts), ternaries 10 (14 pts), boolean chains 12, error handling 6 (8 pts) (nesting depth added 39). Of this number, 89 points are the body's own statements and 31 belong to 8 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.
safe-zones.analyze (cognitive 120) skills/embedded-captions/scripts/safe-zones.cjs:75— safe-zones.analyze has cognitive complexity 120 (threshold 15). Drivers by points: if/else 22 (55 pts), loops 18 (39 pts), ternaries 10 (17 pts), boolean chains 9 (nesting depth added 61). Of this number, 86 points are the body's own statements and 34 belong to 7 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.
safe-zones.main (cognitive 119) skills/embedded-captions/scripts/safe-zones.cjs:550— safe-zones.main has cognitive complexity 119 (threshold 15). Drivers by points: if/else 28 (55 pts), ternaries 11 (29 pts), loops 13 (23 pts), boolean chains 10, error handling 2 (nesting depth added 55). Of this number, 96 points are the body's own statements and 23 belong to 8 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.
apply-patches.applyOne (cognitive 118) packages/sdk/src/engine/apply-patches.ts:181— apply-patches.applyOne has cognitive complexity 118 (threshold 15). Drivers by points: if/else 51 (96 pts), ternaries 7 (15 pts), boolean chains 6, match/switch 1 (nesting depth added 53). 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.
audioMixer.processCompositionAudio (cognitive 114) packages/engine/src/services/audioMixer.ts:1246— audioMixer.processCompositionAudio has cognitive complexity 114 (threshold 15). Drivers by points: ternaries 27 (54 pts), if/else 30 (43 pts), error handling 7 (10 pts), boolean chains 6, loops 1 (nesting depth added 43). Of this number, 51 points are the body's own statements and 63 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.
threeDProjection.initThreeDProjectionInPage (cognitive 112) packages/engine/src/services/threeDProjection.ts:53— threeDProjection.initThreeDProjectionInPage has cognitive complexity 112 (threshold 15). Drivers by points: if/else 29 (64 pts), loops 17 (31 pts), boolean chains 6, error handling 2 (6 pts), ternaries 2 (5 pts) (nesting depth added 56). Of this number, 108 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.
gsapResizeIntercept.tryGsapResizeIntercept (cognitive 108) packages/studio/src/hooks/gsapResizeIntercept.ts:97— gsapResizeIntercept.tryGsapResizeIntercept has cognitive complexity 108 (threshold 15). Drivers by points: if/else 34 (64 pts), ternaries 14 (20 pts), boolean chains 18, loops 3 (6 pts) (nesting depth added 39). Of this number, 95 points are the body's own statements and 13 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.
streamingEncoder.buildStreamingArgs (cognitive 107) packages/engine/src/services/streamingEncoder.ts:210— streamingEncoder.buildStreamingArgs has cognitive complexity 107 (threshold 15). Drivers by points: if/else 34 (68 pts), ternaries 10 (26 pts), boolean chains 10, match/switch 1 (3 pts) (nesting depth added 52). 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.
chunkEncoder.buildEncoderArgs (cognitive 104) packages/engine/src/services/chunkEncoder.ts:222— chunkEncoder.buildEncoderArgs has cognitive complexity 104 (threshold 15). Drivers by points: if/else 35 (72 pts), ternaries 7 (19 pts), boolean chains 10, match/switch 1 (3 pts) (nesting depth added 51). 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.
gsapParserAcorn.tweenCallToAnimation (cognitive 102) REDACTED:1223— gsapParserAcorn.tweenCallToAnimation has cognitive complexity 102 (threshold 15). Drivers by points: if/else 35 (61 pts), ternaries 8 (17 pts), boolean chains 12, loops 5 (12 pts) (nesting depth added 42). Of this number, 99 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.
postExtractionPhase.runPostExtraction (cognitive 99) packages/cli/src/capture/postExtractionPhase.ts:87— postExtractionPhase.runPostExtraction has cognitive complexity 99 (threshold 15). Drivers by points: if/else 28 (44 pts), ternaries 14 (28 pts), boolean chains 16, loops 4 (6 pts), error handling 4 (5 pts) (nesting depth added 33). Most of this is not in the body itself: 6 of the 99 points are its own statements and the rest belongs to 16 function items inside it that branch (runAssetDownload::rewriteTokenAssets::applyLocalAssetPaths, runAnimationCatalog, runAssetDownload::runAssetFetch, …). 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.
videoFrameInjector.queryElementStacking (cognitive 98) packages/engine/src/services/videoFrameInjector.ts:460— videoFrameInjector.queryElementStacking has cognitive complexity 98 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 25, ternaries 10 (18 pts), loops 7, error handling 1 (4 pts) (nesting depth added 32). None of this is in the body itself: all 98 points belong to 10 function literals inside it that branch (lines 607, 655, 466, …). 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.
htmlParser.parseHtml (cognitive 93) REDACTED:181— htmlParser.parseHtml has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 22 (39 pts), if/else 17 (25 pts), boolean chains 17, error handling 3 (7 pts), loops 4 (5 pts) (nesting depth added 30). Of this number, 28 points are the body's own statements and 65 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.
contrast-audit.browser.__contrastAuditPrepare (cognitive 92) REDACTED:49— contrast-audit.browser.__contrastAuditPrepare has cognitive complexity 92 (threshold 15). Drivers by points: if/else 28 (52 pts), boolean chains 25, loops 6 (9 pts), ternaries 4 (6 pts) (nesting depth added 29). Of this number, 62 points are the body's own statements and 30 belong to 6 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.
manualEditsRenderScript.studioManualEditsRenderRuntime (cognitive 92) packages/studio-server/src/helpers/manualEditsRenderScript.ts:378— manualEditsRenderScript.studioManualEditsRenderRuntime has cognitive complexity 92 (threshold 15). Drivers by points: if/else 44 (57 pts), boolean chains 14, ternaries 10 (12 pts), error handling 5 (6 pts), loops 3 (nesting depth added 16). Most of this is not in the body itself: 4 of the 92 points are its own statements and the rest belongs to 27 function items inside it that branch (splitTopLevelWhitespace, resolveTarget, applyManifest, …). 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.
contentExtractor.captionImagesWithGemini (cognitive 90) packages/cli/src/capture/contentExtractor.ts:251— contentExtractor.captionImagesWithGemini has cognitive complexity 90 (threshold 15). Drivers by points: if/else 25 (44 pts), boolean chains 15, error handling 5 (12 pts), loops 6 (10 pts), ternaries 4 (9 pts) (nesting depth added 35). Of this number, 74 points are the body's own statements and 16 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.
regression-harness.runTestSuite (cognitive 90) packages/producer/src/regression-harness.ts:849— regression-harness.runTestSuite has cognitive complexity 90 (threshold 15). Drivers by points: if/else 43 (68 pts), ternaries 5 (10 pts), boolean chains 5, loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 33). 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.
drawElementService.produceDrawElementFrameBatch (cognitive 88) packages/engine/src/services/drawElementService.ts:979— drawElementService.produceDrawElementFrameBatch has cognitive complexity 88 (threshold 15). Drivers by points: if/else 22 (51 pts), error handling 7 (17 pts), loops 7 (12 pts), boolean chains 7, ternaries 1 (nesting depth added 44). Most of this is not in the body itself: 11 of the 88 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1020, 999, 1064, …). 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.
check-timing.check (cognitive 87) skills/embedded-captions/scripts/check-timing.cjs:54— check-timing.check has cognitive complexity 87 (threshold 15). Drivers by points: if/else 19 (54 pts), boolean chains 20, loops 6 (11 pts), ternaries 2 (nesting depth added 40). Of this number, 50 points are the body's own statements and 37 belong to 4 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.
CaptionOverlay.CaptionOverlay (cognitive 82) packages/studio/src/captions/components/CaptionOverlay.tsx:35— CaptionOverlay.CaptionOverlay has cognitive complexity 82 (threshold 15). Drivers by points: if/else 41 (50 pts), boolean chains 16, ternaries 8 (11 pts), loops 2 (3 pts), error handling 2 (nesting depth added 13). Most of this is not in the body itself: 2 of the 82 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 172, 355, 98, …). 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.
check-occlusion.main (cognitive 80) skills/embedded-captions/scripts/check-occlusion.cjs:84— check-occlusion.main has cognitive complexity 80 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 20, loops 7 (13 pts), ternaries 5 (8 pts) (nesting depth added 29). Of this number, 77 points are the body's own statements and 3 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.
assetDownloader.downloadAssets (cognitive 79) packages/cli/src/capture/assetDownloader.ts:310— assetDownloader.downloadAssets has cognitive complexity 79 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 14, loops 6 (9 pts), error handling 3 (7 pts), ternaries 1 (2 pts) (nesting depth added 33). Of this number, 70 points are the body's own statements and 9 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.
resolve.run (cognitive 79) packages/cli/src/media-use/resolve.mjs:308— resolve.run has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (30 pts), ternaries 10 (24 pts), boolean chains 20, error handling 4 (5 pts) (nesting depth added 22). Of this number, 76 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.
render.registerRenderRoutes (cognitive 78) packages/studio-server/src/routes/render.ts:53— render.registerRenderRoutes has cognitive complexity 78 (threshold 15). Drivers by points: if/else 32 (43 pts), boolean chains 11, ternaries 8 (11 pts), loops 5 (7 pts), error handling 5 (6 pts) (nesting depth added 17). None of this is in the body itself: all 78 points belong to 15 function literals inside it that branch (lines 104, 345, 390, …). 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.
gsapParser.splitIntoPropertyGroups (cognitive 77) REDACTED:3241— gsapParser.splitIntoPropertyGroups has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (44 pts), loops 10 (25 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 46). 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.
gsapRuntimeReaders.readAllAnimatedProperties (cognitive 77) packages/studio/src/hooks/gsapRuntimeReaders.ts:74— gsapRuntimeReaders.readAllAnimatedProperties has cognitive complexity 77 (threshold 15). Drivers by points: if/else 22 (50 pts), loops 10 (20 pts), boolean chains 4, error handling 3 (nesting depth added 38). Of this number, 76 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.
propertyPanelFxSection.FxSection (cognitive 77) packages/studio/src/components/editor/propertyPanelFxSection.tsx:74— propertyPanelFxSection.FxSection has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (37 pts), ternaries 16 (25 pts), boolean chains 13, loops 2 (nesting depth added 22). Of this number, 30 points are the body's own statements and 47 belong to 23 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.
plan.createRenderPlan (cognitive 76) packages/cli/src/commands/render/plan.ts:222— plan.createRenderPlan has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (31 pts), ternaries 18 (24 pts), boolean chains 21 (nesting depth added 10). 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.
pageInspector.inspectHtml (cognitive 76) packages/studio-server/src/research/sources/pageInspector.ts:142— pageInspector.inspectHtml has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (33 pts), loops 13 (21 pts), boolean chains 16, ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 23). Of this number, 75 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.
CaptionPropertyPanel.CaptionPropertyPanel (cognitive 75) packages/studio/src/captions/components/CaptionPropertyPanel.tsx:44— CaptionPropertyPanel.CaptionPropertyPanel has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (42 pts), boolean chains 14, loops 6 (12 pts), ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 32). Of this number, 20 points are the body's own statements and 55 belong to 3 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.
transcribe.main (cognitive 74) skills/embedded-captions/scripts/transcribe.cjs:97— transcribe.main has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 24, if/else 16 (24 pts), ternaries 5 (12 pts), error handling 4 (7 pts), loops 3 (7 pts) (nesting depth added 22). 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.
cssAnalysis.analyzeCss (cognitive 72) packages/cli/src/siteInspect/cssAnalysis.ts:141— cssAnalysis.analyzeCss has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 5 (13 pts), boolean chains 10, error handling 1 (2 pts) (nesting depth added 39). Most of this is not in the body itself: 3 of the 72 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 196, 160, 190, …). 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.
hdrCompositor.compositeHdrFrame (cognitive 71) packages/producer/src/services/hdrCompositor.ts:496— hdrCompositor.compositeHdrFrame has cognitive complexity 71 (threshold 15). Drivers by points: if/else 16 (39 pts), ternaries 8 (24 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (nesting depth added 41). Of this number, 65 points are the body's own statements and 6 belong to 2 function literals 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.
captureStreamingStage.runCaptureStreamingStage (cognitive 71) packages/producer/src/services/render/stages/captureStreamingStage.ts:585— captureStreamingStage.runCaptureStreamingStage has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (41 pts), ternaries 5 (11 pts), error handling 5 (9 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 32). Of this number, 57 points are the body's own statements and 14 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.
gsapParser.tweenCallToAnimation (cognitive 71) REDACTED:1006— gsapParser.tweenCallToAnimation has cognitive complexity 71 (threshold 15). Drivers by points: if/else 27 (43 pts), loops 5 (12 pts), ternaries 6 (9 pts), boolean chains 7 (nesting depth added 26). Of this number, 68 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.
transcribe.transcribeAudio (cognitive 70) packages/cli/src/commands/transcribe.ts:285— transcribe.transcribeAudio has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (32 pts), ternaries 14 (24 pts), boolean chains 10, error handling 3 (4 pts) (nesting depth added 23). Of this number, 65 points are the body's own statements and 5 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.
hyperframes.generateElementHtml (cognitive 70) packages/core/src/generators/hyperframes.ts:509— hyperframes.generateElementHtml has cognitive complexity 70 (threshold 15). Drivers by points: if/else 30 (57 pts), boolean chains 9, loops 1 (3 pts), match/switch 1 (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.
files.executeGsapMutationAcorn (cognitive 70) REDACTED:1439— files.executeGsapMutationAcorn has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (42 pts), ternaries 6 (12 pts), boolean chains 11, loops 2 (4 pts), match/switch 1 (nesting depth added 28). Of this number, 67 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. This shape REPEATS in the file: one other method here (files.executeGsapMutationRecast) 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.
files.executeGsapMutationRecast (cognitive 70) REDACTED:1779— files.executeGsapMutationRecast has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (42 pts), ternaries 6 (12 pts), boolean chains 11, loops 2 (4 pts), match/switch 1 (nesting depth added 28). Of this number, 67 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. This shape REPEATS in the file: one other method here (files.executeGsapMutationAcorn) 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.
useGestureCommit.useGestureCommit.stopAndCommitRecording (cognitive 70) packages/studio/src/hooks/useGestureCommit.ts:169— useGestureCommit.useGestureCommit.stopAndCommitRecording has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 8 (29 pts), if/else 18 (26 pts), loops 2 (8 pts), boolean chains 6, error handling 1 (nesting depth added 35). Of this number, 55 points are the body's own statements and 15 belong to 5 function literals 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.
render.executeLocalRender (cognitive 69) packages/cli/src/commands/render.ts:596— render.executeLocalRender has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 11 (18 pts), boolean chains 10, loops 3 (6 pts), error handling 3 (4 pts) (nesting depth added 25). 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.
recordSite.recordSite (cognitive 69) packages/cli/src/siteInspect/recordSite.ts:316— recordSite.recordSite has cognitive complexity 69 (threshold 15). Drivers by points: if/else 26 (34 pts), ternaries 8 (20 pts), boolean chains 8, loops 2 (4 pts), error handling 3 (nesting depth added 22). Of this number, 63 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.
useDomEditOverlayRects.useDomEditOverlayRects (cognitive 69) packages/studio/src/components/editor/useDomEditOverlayRects.ts:56— useDomEditOverlayRects.useDomEditOverlayRects has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (46 pts), boolean chains 9, loops 3 (8 pts), ternaries 2 (6 pts) (nesting depth added 33). None of this is in the body itself: all 69 points belong to one function literal inside it that branches (line 117). 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.
vite.adapter.createViteAdapter (cognitive 69) packages/studio/vite.adapter.ts:104— vite.adapter.createViteAdapter has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (42 pts), error handling 6 (14 pts), boolean chains 7, loops 4 (6 pts) (nesting depth added 30). Of this number, 55 points are the body's own statements and 14 belong to 8 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.
studioServer.createStudioServer (cognitive 68) packages/cli/src/server/studioServer.ts:411— studioServer.createStudioServer has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (29 pts), ternaries 15 (20 pts), boolean chains 8, error handling 6 (8 pts), loops 3 (nesting depth added 11). Of this number, 22 points are the body's own statements and 46 belong to 18 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.
threeDProjection.detectCssEffectRisk (cognitive 68) packages/engine/src/services/threeDProjection.ts:920— threeDProjection.detectCssEffectRisk has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (40 pts), boolean chains 16, loops 6 (8 pts), error handling 2 (3 pts), ternaries 1 (nesting depth added 26). Most of this is not in the body itself: 1 of the 68 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 937, 991, 963, …). 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.
gsapParser.splitAnimationsInScript (cognitive 68) REDACTED:1896— gsapParser.splitAnimationsInScript has cognitive complexity 68 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 9 (29 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 41). 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.
gsapWriterAcorn.updateAnimationInScript (cognitive 66) packages/parsers/src/gsapWriterAcorn.ts:340— gsapWriterAcorn.updateAnimationInScript has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (48 pts), loops 2 (8 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 37). 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.
validate.validateDesignSystemHtml (cognitive 66) packages/studio-server/src/design/validate.ts:109— validate.validateDesignSystemHtml has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 10, loops 6 (8 pts), error handling 1 (nesting depth added 26). Of this number, 65 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.
LayersPanel.LayersPanel (cognitive 66) packages/studio/src/components/editor/LayersPanel.tsx:97— LayersPanel.LayersPanel has cognitive complexity 66 (threshold 15). Drivers by points: if/else 22 (31 pts), ternaries 11 (16 pts), boolean chains 15, loops 2 (3 pts), error handling 1 (nesting depth added 15). Most of this is not in the body itself: 6 of the 66 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 208, 434, 286, …). 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.
compositionLoader.mountCompositionContent (cognitive 65) packages/core/src/runtime/compositionLoader.ts:388— compositionLoader.mountCompositionContent has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (45 pts), boolean chains 10, ternaries 4 (7 pts), loops 3 (nesting depth added 21). Of this number, 54 points are the body's own statements and 11 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.
frameCapture.computeStaticFrameSet (cognitive 65) packages/engine/src/services/frameCapture.ts:2833— frameCapture.computeStaticFrameSet has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (39 pts), loops 8 (11 pts), boolean chains 7, ternaries 4 (7 pts), error handling 1 (nesting depth added 20). Of this number, 29 points are the body's own statements and 36 belong to 4 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.
make-theme.frontFx (cognitive 65) skills/embedded-captions/scripts/make-theme.cjs:1348— make-theme.frontFx has cognitive complexity 65 (threshold 15). Drivers by points: boolean chains 42, if/else 19 (21 pts), loops 1 (2 pts) (nesting depth added 3). 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.
gsapParser.addKeyframeToScript (cognitive 64) REDACTED:2264— gsapParser.addKeyframeToScript has cognitive complexity 64 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 5 (12 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 32). Of this number, 62 points are the body's own statements and 2 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.
mutate.handleSetTiming (cognitive 64) packages/sdk/src/engine/mutate.ts:441— mutate.handleSetTiming has cognitive complexity 64 (threshold 15). Drivers by points: if/else 12 (34 pts), ternaries 6 (14 pts), boolean chains 12, loops 2 (4 pts) (nesting depth added 32). Of this number, 51 points are the body's own statements and 13 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.
gif.parseAnimatedGifMetadata (cognitive 63) packages/core/src/media/gif.ts:86— gif.parseAnimatedGifMetadata has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (59 pts), boolean chains 3, loops 1 (nesting depth added 37). 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.
engineModePageComposite.installPageSideCompositor (cognitive 63) packages/shader-transitions/src/engineModePageComposite.ts:148— engineModePageComposite.installPageSideCompositor has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (32 pts), loops 14 (17 pts), boolean chains 7, error handling 5 (7 pts) (nesting depth added 13). Of this number, 21 points are the body's own statements and 42 belong to 7 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.
appHotkeysDispatch.dispatchPlainKey (cognitive 63) packages/studio/src/hooks/appHotkeysDispatch.ts:200— appHotkeysDispatch.dispatchPlainKey has cognitive complexity 63 (threshold 15). Drivers by points: if/else 27 (49 pts), boolean chains 12, ternaries 1 (2 pts) (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.
propertyPanelFont.FontFamilyField (cognitive 63) packages/studio/src/components/editor/propertyPanelFont.tsx:138— propertyPanelFont.FontFamilyField has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 21, ternaries 7 (10 pts), error handling 3 (4 pts), loops 3 (nesting depth added 5). Most of this is not in the body itself: 12 of the 63 points are its own statements and the rest belongs to 18 function items inside it that branch (commitFamily, loadBrowserLocalFonts, handleImportFonts, …). 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.
timelineClipDragGestureLifecycle.mountTimelineClipDragGestureLifecycle (cognitive 62) packages/studio/src/player/components/timelineClipDragGestureLifecycle.ts:79— timelineClipDragGestureLifecycle.mountTimelineClipDragGestureLifecycle has cognitive complexity 62 (threshold 15). Drivers by points: if/else 41 (46 pts), boolean chains 12, error handling 2, ternaries 2 (nesting depth added 5). None of this is in the body itself: all 62 points belong to 19 function items inside it that branch (handleWindowPointerMove, handleWindowPointerCancel, claimActiveGesture, …). 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.
drawElementService.captureDrawElementFrame (cognitive 61) packages/engine/src/services/drawElementService.ts:328— drawElementService.captureDrawElementFrame has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (34 pts), error handling 5 (8 pts), ternaries 4 (7 pts), boolean chains 6, loops 5 (6 pts) (nesting depth added 20). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 409, 344, 528, …). 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.
urlDownloader.acquireCachePathLock (cognitive 61) packages/engine/src/utils/urlDownloader.ts:369— urlDownloader.acquireCachePathLock has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (41 pts), error handling 6 (17 pts), boolean chains 2, loops 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.
AssetsTab.AssetsTab (cognitive 61) packages/studio/src/components/sidebar/AssetsTab.tsx:121— AssetsTab.AssetsTab has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 12 (27 pts), if/else 13 (16 pts), boolean chains 13, loops 3, error handling 1 (2 pts) (nesting depth added 19). Of this number, 18 points are the body's own statements and 43 belong to 16 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.
segmentation.draftSegments (cognitive 60) packages/studio-server/src/analysis/segmentation.ts:166— segmentation.draftSegments has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 7 (11 pts), ternaries 5 (11 pts), boolean chains 9 (nesting depth added 25). Of this number, 56 points are the body's own statements and 4 belong to 3 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.
sync.planSync.finish (cognitive 60) packages/studio-server/src/story/sync.ts:1200— sync.planSync.finish has cognitive complexity 60 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 5 (15 pts), ternaries 3 (14 pts), boolean chains 5 (nesting depth added 39). 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.
ResearchService.search (cognitive 60) packages/studio-server/src/research/service.ts:332— ResearchService.search has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 6 (13 pts), boolean chains 10, loops 3 (4 pts), error handling 1 (nesting depth added 24). Of this number, 50 points are the body's own statements and 10 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.
gsapDragPositionCommit.commitGsapPositionFromDrag (cognitive 60) packages/studio/src/hooks/gsapDragPositionCommit.ts:267— gsapDragPositionCommit.commitGsapPositionFromDrag has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 13, ternaries 4 (11 pts) (nesting depth added 26). Of this number, 59 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.
PropertyPanelFlat.PropertyPanelFlat (cognitive 60) packages/studio/src/components/editor/PropertyPanelFlat.tsx:51— PropertyPanelFlat.PropertyPanelFlat has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 18 (32 pts), if/else 16 (18 pts), boolean chains 10 (nesting depth added 16). Of this number, 36 points are the body's own statements and 24 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.
layout-audit.browser.connectorOrphanIssues (cognitive 59) packages/cli/src/commands/layout-audit.browser.js:1632— layout-audit.browser.connectorOrphanIssues has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (42 pts), loops 4 (10 pts), boolean chains 4, ternaries 1 (3 pts) (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.
drawElementService.produceDrawElementFrame (cognitive 59) packages/engine/src/services/drawElementService.ts:752— drawElementService.produceDrawElementFrame has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (36 pts), error handling 4 (7 pts), loops 5 (6 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 19). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 838, 800, 774, …). 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.
lib-dna.resolveTokens (cognitive 59) skills/embedded-captions/scripts/lib-dna.cjs:80— lib-dna.resolveTokens has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 26, ternaries 9 (25 pts), if/else 5 (8 pts) (nesting depth added 19). 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.
gsapAnimatesProperty.gsapAnimatesProperty (cognitive 58) packages/studio/src/components/editor/gsapAnimatesProperty.ts:34— gsapAnimatesProperty.gsapAnimatesProperty has cognitive complexity 58 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 6 (19 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 37). 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.
htmlCompiler.inlineSubCompositions (cognitive 57) packages/producer/src/services/htmlCompiler.ts:942— htmlCompiler.inlineSubCompositions has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 5 (14 pts), boolean chains 7, loops 4 (7 pts) (nesting depth added 25). Of this number, 50 points are the body's own statements and 7 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.
takes.detectTakeIssues.detectRestartCues (cognitive 57) packages/studio-server/src/analysis/takes.ts:238— takes.detectTakeIssues.detectRestartCues has cognitive complexity 57 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 7 (19 pts), boolean chains 10, loops 3 (5 pts) (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.
measure-layout.main (cognitive 57) skills/embedded-captions/scripts/measure-layout.cjs:97— measure-layout.main has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 6 (12 pts), boolean chains 10, error handling 2, ternaries 2 (nesting depth added 21). Of this number, 20 points are the body's own statements and 37 belong to 4 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.
htmlCompiler.discoverAudioVolumeAutomationFromTimeline (cognitive 56) packages/producer/src/services/htmlCompiler.ts:2366— htmlCompiler.discoverAudioVolumeAutomationFromTimeline has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 10, ternaries 6 (8 pts), loops 2 (3 pts) (nesting depth added 21). Most of this is not in the body itself: 2 of the 56 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 2496, 2412, 2395, …). 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.
renderOrchestrator.executeDiskCaptureWithAdaptiveRetry (cognitive 56) REDACTED:1155— renderOrchestrator.executeDiskCaptureWithAdaptiveRetry has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 7 (19 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 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.
layout-audit.browser.connectorDetachmentIssues (cognitive 56) packages/cli/src/commands/layout-audit.browser.js:1505— layout-audit.browser.connectorDetachmentIssues has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 4 (9 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 32). Of this number, 41 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.
screenshotService.injectVideoFramesBatch (cognitive 56) packages/engine/src/services/screenshotService.ts:651— screenshotService.injectVideoFramesBatch has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (31 pts), ternaries 6 (13 pts), boolean chains 8, loops 3 (4 pts) (nesting depth added 24). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 657, 695). 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.
utils.scanJsComments (cognitive 56) REDACTED:421— utils.scanJsComments has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 11, loops 3 (7 pts), ternaries 1 (4 pts) (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.
media.findImperativeMediaControlFindings (cognitive 56) packages/lint/src/rules/media.ts:213— media.findImperativeMediaControlFindings has cognitive complexity 56 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 5 (17 pts), ternaries 3 (14 pts), boolean chains 5 (nesting depth added 35). Of this number, 55 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.
gsapParser.updateKeyframeInScript (cognitive 56) REDACTED:2548— gsapParser.updateKeyframeInScript has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (42 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 22). Of this number, 51 points are the body's own statements and 5 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.
useRenderQueue.useRenderQueue (cognitive 56) packages/studio/src/components/renders/useRenderQueue.ts:100— useRenderQueue.useRenderQueue has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (22 pts), ternaries 7 (12 pts), boolean chains 11, error handling 7 (8 pts), loops 2 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 261, 212, 383, …). 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.
gsapSoftReload.applySoftReload::doReload (cognitive 56) packages/studio/src/utils/gsapSoftReload.ts:318— gsapSoftReload.applySoftReload::doReload has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 7 (18 pts), error handling 3 (9 pts), boolean chains 4 (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.
gsapRuntimeKeyframes.resolveRuntimeTween (cognitive 56) packages/studio/src/hooks/gsapRuntimeKeyframes.ts:233— gsapRuntimeKeyframes.resolveRuntimeTween has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (33 pts), ternaries 6 (15 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (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.
contentExtractor.generateAssetDescriptions (cognitive 55) packages/cli/src/capture/contentExtractor.ts:662— contentExtractor.generateAssetDescriptions has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 15, error handling 4, loops 4, ternaries 2 (4 pts) (nesting depth added 17). Of this number, 52 points are the body's own statements and 3 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.
videoFrameExtractor.extractVideoFramesRangeNow (cognitive 55) packages/engine/src/services/videoFrameExtractor.ts:855— videoFrameExtractor.extractVideoFramesRangeNow has cognitive complexity 55 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 10, ternaries 5 (9 pts), error handling 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.
useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerUp (cognitive 55) packages/studio/src/components/editor/useDomEditOverlayGestures.ts:275— useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerUp has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 9, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 19). Of this number, 31 points are the body's own statements and 24 belong to 7 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.
Composer.Composer (cognitive 54) packages/studio/src/components/chat/Composer.tsx:42— Composer.Composer has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 21, ternaries 12 (21 pts), if/else 12 (nesting depth added 9). Of this number, 34 points are the body's own statements and 20 belong to 8 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.
StoryPanel.StoryWorkspace (cognitive 54) packages/studio/src/story/StoryPanel.tsx:108— StoryPanel.StoryWorkspace has cognitive complexity 54 (threshold 15). Drivers by points: if/else 30, boolean chains 19, ternaries 5. Most of this is not in the body itself: 10 of the 54 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 222, onKeyDown, a function literal at line 142, …). 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.
frameCapture.initDrawElementOrTransparentBackground (cognitive 53) packages/engine/src/services/frameCapture.ts:868— frameCapture.initDrawElementOrTransparentBackground has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (42 pts), boolean chains 11 (nesting depth added 24). Of this number, 49 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.
useCaptionSync.buildOverrides (cognitive 53) packages/studio/src/captions/hooks/useCaptionSync.ts:24— useCaptionSync.buildOverrides has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (49 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 37). 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.
parallelCoordinator.captureFrameRange (cognitive 52) packages/engine/src/services/parallelCoordinator.ts:554— parallelCoordinator.captureFrameRange has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (43 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 27). Of this number, 50 points are the body's own statements and 2 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.
gpuParityDiff.diffGpuParityFrames (cognitive 52) packages/engine/src/utils/gpuParityDiff.ts:140— gpuParityDiff.diffGpuParityFrames has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (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.
gsapParser.setArcPathInScript (cognitive 52) REDACTED:2928— gsapParser.setArcPathInScript has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 2 (7 pts), boolean chains 6, ternaries 1 (nesting depth added 29). Of this number, 49 points are the body's own statements and 3 belong to 3 function literals 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.
files.processUploadedFiles (cognitive 52) REDACTED:2257— files.processUploadedFiles has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 5 (9 pts), loops 3 (6 pts), boolean chains 4, error handling 1 (3 pts) (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.
thumbnail.registerThumbnailRoutes (cognitive 52) REDACTED:118— thumbnail.registerThumbnailRoutes has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 16, ternaries 13 (14 pts), error handling 1 (nesting depth added 7). None of this is in the body itself: all 52 points belong to 2 function literals inside it that branch (lines 119, 225). 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.
TimelineClipDiamonds.TimelineDiamondLane (cognitive 52) packages/studio/src/player/components/TimelineClipDiamonds.tsx:70— TimelineClipDiamonds.TimelineDiamondLane has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 25 (27 pts), if/else 16 (17 pts), boolean chains 7, loops 1 (nesting depth added 3). Most of this is not in the body itself: 14 of the 52 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 266, a function literal at line 202, a function literal at line 316, …). 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.
parser.parseCaptionComposition (cognitive 52) packages/studio/src/captions/parser.ts:137— parser.parseCaptionComposition has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 25). 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.
NLEPreview.NLEPreview (cognitive 52) packages/studio/src/components/nle/NLEPreview.tsx:117— NLEPreview.NLEPreview has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (32 pts), boolean chains 10, ternaries 8 (10 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 52 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 259, 357, 526, …). 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.
lintFormat.formatLintFindings (cognitive 51) packages/cli/src/utils/lintFormat.ts:18— lintFormat.formatLintFindings has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 5 (14 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 30). Of this number, 38 points are the body's own statements and 13 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.
gsapWriterAcorn.computeForwardBaselines (cognitive 51) packages/parsers/src/gsapWriterAcorn.ts:2364— gsapWriterAcorn.computeForwardBaselines has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 6 (21 pts), ternaries 3 (7 pts) (nesting depth added 33). 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.
stages.runAnalysis (cognitive 51) packages/studio-server/src/analysis/stages.ts:427— stages.runAnalysis has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 5 (16 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 25). Of this number, 47 points are the body's own statements and 4 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.
timelineDOM.createTimelineElementFromManifestClip (cognitive 51) packages/studio/src/player/lib/timelineDOM.ts:68— timelineDOM.createTimelineElementFromManifestClip has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 10, ternaries 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.
BufferGeometryUtils.mergeGeometries (cognitive 51) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:115— BufferGeometryUtils.mergeGeometries has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 9 (17 pts), boolean chains 1 (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.
engine.html.HEROES.forEach() (cognitive 51) skills/embedded-captions/modes/cinematic/engine.html:213— engine.html.HEROES.forEach() has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 14, ternaries 5 (8 pts), loops 1 (2 pts) (nesting depth added 10). Of this number, 26 points are the body's own statements and 25 belong to 4 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.
coreExtractionPhase.runCoreExtraction (cognitive 50) packages/cli/src/capture/coreExtractionPhase.ts:75— coreExtractionPhase.runCoreExtraction has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (29 pts), error handling 8 (9 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). None of this is in the body itself: all 50 points belong to 9 function items inside it that branch (runAnimationCapture, runAnimationDiscovery::scanDomLotties, runAnimationDiscovery::saveDiscoveredLotties, …). 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.
utils.stripJsStringLiterals (cognitive 50) REDACTED:620— utils.stripJsStringLiterals has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 8, loops 2, ternaries 1 (nesting depth added 17). Of this number, 47 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.
regression-harness.saveFailureDetails (cognitive 50) packages/producer/src/regression-harness.ts:628— regression-harness.saveFailureDetails has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 5 (12 pts), boolean chains 8, error handling 1 (4 pts), loops 1 (3 pts) (nesting depth added 25). 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.
operations.applyEdits (cognitive 50) packages/studio-server/src/editing/operations.ts:178— operations.applyEdits has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 11, ternaries 3 (9 pts), error handling 3 (6 pts), loops 4 (5 pts) (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.
CaptionOverlayUtils.readWordBoxes (cognitive 50) packages/studio/src/captions/components/CaptionOverlayUtils.ts:14— CaptionOverlayUtils.readWordBoxes has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 5 (14 pts), boolean chains 7, error handling 1 (nesting depth added 25). 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.
make-composition.main (cognitive 50) skills/embedded-captions/scripts/make-composition.cjs:236— make-composition.main has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 18 (19 pts), boolean chains 18, if/else 10, error handling 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 48 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.
ParentMediaManager._observeDynamicMedia (cognitive 49) packages/player/src/parent-media.ts:496— ParentMediaManager._observeDynamicMedia has cognitive complexity 49 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 8 (18 pts), boolean chains 5 (nesting depth added 27). Most of this is not in the body itself: 3 of the 49 points are its own statements and the rest belongs to one function literal inside it that branches (line 500). 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.
regression-harness.validateMetadata (cognitive 49) packages/producer/src/regression-harness.ts:196— regression-harness.validateMetadata has cognitive complexity 49 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 21, ternaries 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.
timelineDOM.parseTimelineFromDOM (cognitive 49) packages/studio/src/player/lib/timelineDOM.ts:223— timelineDOM.parseTimelineFromDOM has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 14, ternaries 4 (7 pts) (nesting depth added 8). None of this is in the body itself: all 49 points belong to one function literal inside it that branches (line 237). 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.
orphans.removeOrphans (cognitive 48) packages/studio-server/src/analysis/orphans.ts:30— orphans.removeOrphans has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 5 (9 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 24). Of this number, 39 points are the body's own statements and 9 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.
files.bakeGroupTransformIntoMembers (cognitive 48) REDACTED:765— files.bakeGroupTransformIntoMembers has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 6 (10 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 21). Of this number, 44 points are the body's own statements and 4 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.
TimelineLanes.TimelineLanes (cognitive 48) packages/studio/src/player/components/TimelineLanes.tsx:40— TimelineLanes.TimelineLanes has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 19, ternaries 15 (16 pts), if/else 12 (13 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 48 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 159, 366, 320, …). 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.
propertyPanelColorCurveGraph.CurveGraph (cognitive 48) packages/studio/src/components/editor/propertyPanelColorCurveGraph.tsx:259— propertyPanelColorCurveGraph.CurveGraph has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (28 pts), ternaries 8 (11 pts), boolean chains 9 (nesting depth added 6). Most of this is not in the body itself: 2 of the 48 points are its own statements and the rest belongs to 14 function items inside it that branch (handleSelectionKey, handleArrowKey, handleRemovalKey, …). 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.
index.html.attachMotionBlur (cognitive 48) skills/music-to-video/references/templates/logo-split-lockup-pulse/index.html:28— index.html.attachMotionBlur has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 15 (33 pts), boolean chains 7, if/else 6 (7 pts), loops 1 (nesting depth added 19). Most of this is not in the body itself: 7 of the 48 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 120, 134, 52, …). 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.
takes.detectTakeIssues.detectRestartedRuns (cognitive 47) packages/studio-server/src/analysis/takes.ts:486— takes.detectTakeIssues.detectRestartedRuns has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 4 (9 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 24). Of this number, 46 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.
domEditOverlayStartGesture.startGesture (cognitive 47) packages/studio/src/components/editor/domEditOverlayStartGesture.ts:119— domEditOverlayStartGesture.startGesture has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 13, ternaries 9 (12 pts) (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.
animation-map.describeTween (cognitive 47) skills/hyperframes-animation/scripts/animation-map.mjs:266— animation-map.describeTween has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 3 (10 pts), boolean chains 9 (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.
sourceMutation.patchElementInHtml (cognitive 46) packages/studio-server/src/helpers/sourceMutation.ts:235— sourceMutation.patchElementInHtml has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 5 (13 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (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.
storyStore.createStoryStore (cognitive 46) packages/studio/src/story/storyStore.ts:94— storyStore.createStoryStore has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 13, ternaries 5, error handling 2, loops 1 (nesting depth added 4). None of this is in the body itself: all 46 points belong to 4 function literals inside it that branch (lines 108, 122, 157, …). 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.
propertyPanelFlatMediaSection.FlatMediaSection (cognitive 46) packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:42— propertyPanelFlatMediaSection.FlatMediaSection has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 25, ternaries 13 (18 pts), if/else 2, error handling 1 (nesting depth added 5). Of this number, 39 points are the body's own statements and 7 belong to 10 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.
deterministicFonts.buildFontFaceCss (cognitive 45) packages/producer/src/services/deterministicFonts.ts:670— deterministicFonts.buildFontFaceCss has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 5 (14 pts), ternaries 2 (7 pts), boolean chains 4 (nesting depth added 27). Of this number, 44 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.
mutate.validateOp (cognitive 45) packages/sdk/src/engine/mutate.ts:1606— mutate.validateOp has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 4, match/switch 1 (nesting depth added 20). 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.
media.registerMediaRoutes (cognitive 45) packages/studio-server/src/routes/media.ts:130— media.registerMediaRoutes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27 (32 pts), boolean chains 8, ternaries 3, loops 2 (nesting depth added 5). None of this is in the body itself: all 45 points belong to 5 function items inside it that branch (a function literal at line 166, a function literal at line 148, a function literal at line 262, …). 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.
check-overflow.main (cognitive 45) REDACTED:54— check-overflow.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 8, loops 5 (8 pts), ternaries 3, error handling 1 (nesting depth added 16). Of this number, 17 points are the body's own statements and 28 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.
parseCube (cognitive 45) packages/cli/src/media-use/lib/cube-validate.mjs:76— parseCube has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (40 pts), other 3, boolean chains 1, loops 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.
mediaCapture.captureVideoManifest (cognitive 44) packages/cli/src/capture/mediaCapture.ts:413— mediaCapture.captureVideoManifest has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 7, ternaries 4 (7 pts), error handling 1 (3 pts), loops 3 (nesting depth added 18). Of this number, 39 points are the body's own statements and 5 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.
layout.createInspectCommand (cognitive 44) packages/cli/src/commands/layout.ts:443— layout.createInspectCommand has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 16 (27 pts), boolean chains 8, if/else 6 (7 pts), error handling 1, loops 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.
inspectSite.captureLogo (cognitive 44) packages/cli/src/siteInspect/inspectSite.ts:251— inspectSite.captureLogo has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 2 (8 pts), boolean chains 6, loops 3 (nesting depth added 22). Of this number, 43 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.
gsapRuntimeKeyframes.readRuntimeKeyframes (cognitive 44) packages/studio/src/hooks/gsapRuntimeKeyframes.ts:312— gsapRuntimeKeyframes.readRuntimeKeyframes has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 4 (10 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (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.
propertyPanelCommitField.CommitField (cognitive 44) packages/studio/src/components/editor/propertyPanelCommitField.tsx:13— propertyPanelCommitField.CommitField has cognitive complexity 44 (threshold 15). Drivers by points: if/else 25 (31 pts), boolean chains 7, ternaries 4, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 5 of the 44 points are its own statements and the rest belongs to 14 function items inside it that branch (handleKeyDown, a function literal at line 202, a function literal at line 166, …). 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.
markdownParse.parseMarkdownLite (cognitive 44) REDACTED:136— markdownParse.parseMarkdownLite has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 24). 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.
Messages.AssistantBlock (cognitive 44) packages/studio/src/components/chat/Messages.tsx:321— Messages.AssistantBlock has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 10 (39 pts), boolean chains 5 (nesting depth added 29). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 349). 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.
init.initSandboxRuntimeModular (cognitive 43) packages/core/src/runtime/init.ts:273— init.initSandboxRuntimeModular has cognitive complexity 43 (threshold 15). Drivers by points: if/else 405 (660 pts), boolean chains 200, loops 83 (111 pts), ternaries 50 (78 pts), error handling 39 (73 pts) (nesting depth added 345). 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: 10 other methods here (init.initSandboxRuntimeModular::applyClipLayout, init.initSandboxRuntimeModular::resolveRootTimelineFromDocument, init.initSandboxRuntimeModular::bindRootTimelineIfAvailable, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 11 times rather than 11 independent problems. Splitting this body alone leaves the other 10 exactly as they are. Where these are variations on one operation, the change that clears all 11 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.
gsapParser.parseMotionPathNode (cognitive 43) REDACTED:932— gsapParser.parseMotionPathNode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 4 (7 pts), boolean chains 4, ternaries 2 (4 pts) (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.
preferences.validatePreferencesPatch (cognitive 43) packages/studio-server/src/app/preferences.ts:313— preferences.validatePreferencesPatch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 5 (9 pts), boolean chains 5 (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.
opsAdd.addClip (cognitive 43) packages/studio-server/src/editing/opsAdd.ts:68— opsAdd.addClip has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 10 (16 pts), boolean chains 9 (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.
voiceScriptStore.createVoiceScriptStore (cognitive 43) packages/studio/src/voice/script/voiceScriptStore.ts:146— voiceScriptStore.createVoiceScriptStore has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 12, error handling 6, ternaries 1 (3 pts) (nesting depth added 4). None of this is in the body itself: all 43 points belong to 5 function literals inside it that branch (lines 147, 161, 323, …). 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.
MediaInspector.AssetInspector (cognitive 43) packages/studio/src/media/MediaInspector.tsx:290— MediaInspector.AssetInspector has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 25, ternaries 9 (11 pts), if/else 7 (nesting depth added 2). Of this number, 33 points are the body's own statements and 10 belong to 5 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.
colorLuts.parseCubeLut (cognitive 42) packages/core/src/colorLuts.ts:94— colorLuts.parseCubeLut has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 1, loops 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.
frameCapture.initializeSession (cognitive 42) packages/engine/src/services/frameCapture.ts:2187— frameCapture.initializeSession has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 13, error handling 3, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 42 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 2339, a function literal at line 2506, a function literal at line 2208, …). 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.
takes.detectTakeIssues.detectRetakes (cognitive 42) packages/studio-server/src/analysis/takes.ts:619— takes.detectTakeIssues.detectRetakes has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 4 (6 pts), boolean chains 5, ternaries 2 (5 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.
extract.fontFaces (cognitive 42) packages/studio-server/src/design/extract.ts:258— extract.fontFaces has cognitive complexity 42 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 5 (14 pts), error handling 1 (4 pts), ternaries 1 (4 pts), boolean chains 1 (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.
useCaptionDetection.useCaptionDetection (cognitive 42) packages/studio/src/hooks/useCaptionDetection.ts:20— useCaptionDetection.useCaptionDetection has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 13, loops 2 (3 pts), error handling 1 (nesting depth added 7). None of this is in the body itself: all 42 points belong to 6 function literals inside it that branch (lines 55, 135, 36, …). 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.
AudioRow.AudioRow (cognitive 42) packages/studio/src/components/sidebar/AudioRow.tsx:32— AudioRow.AudioRow has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 10, loops 2 (7 pts), ternaries 4, error handling 1 (nesting depth added 11). Most of this is not in the body itself: 10 of the 42 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 115, 88, 86, …). 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.
htmlCompiler.embedLocalFontFaces (cognitive 41) packages/producer/src/services/htmlCompiler.ts:1817— htmlCompiler.embedLocalFontFaces has cognitive complexity 41 (threshold 15). Drivers by points: if/else 5 (21 pts), ternaries 2 (9 pts), loops 3 (6 pts), error handling 1 (4 pts), boolean chains 1 (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.
drawElementService.classifyGpuRenderer (cognitive 41) packages/engine/src/services/drawElementService.ts:160— drawElementService.classifyGpuRenderer has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 11 (36 pts), boolean chains 4, if/else 1 (nesting depth added 25). 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.
importFiles.importProjectFiles (cognitive 41) packages/studio-server/src/crossProject/importFiles.ts:206— importFiles.importProjectFiles has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 5, loops 4, error handling 2 (3 pts) (nesting depth added 14). Of this number, 40 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.
store.useCaptionStore (cognitive 41) packages/studio/src/captions/store.ts:111— store.useCaptionStore has cognitive complexity 41 (threshold 15). Drivers by points: if/else 30 (32 pts), boolean chains 5, loops 2, ternaries 2 (nesting depth added 2). None of this is in the body itself: all 41 points belong to 18 function literals inside it that branch (lines 339, 142, 304, …). 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.
useCaptionSync.useCaptionSync.loadOverrides (cognitive 41) packages/studio/src/captions/hooks/useCaptionSync.ts:165— useCaptionSync.useCaptionSync.loadOverrides has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 3 (4 pts), error handling 2, boolean chains 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.
appHotkeysDispatch.dispatchModifierKey (cognitive 41) packages/studio/src/hooks/appHotkeysDispatch.ts:113— appHotkeysDispatch.dispatchModifierKey has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 8 (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.
propertyPanelColor.ColorField (cognitive 41) packages/studio/src/components/editor/propertyPanelColor.tsx:148— propertyPanelColor.ColorField has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (18 pts), ternaries 9 (13 pts), boolean chains 10 (nesting depth added 5). Of this number, 17 points are the body's own statements and 24 belong to 12 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.
propertyPanelStyleSections.StyleSections (cognitive 41) packages/studio/src/components/editor/propertyPanelStyleSections.tsx:42— propertyPanelStyleSections.StyleSections has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 20, ternaries 6 (10 pts), if/else 8 (9 pts), loops 2 (nesting depth added 5). Of this number, 29 points are the body's own statements and 12 belong to 9 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.
htmlEditor.findElementBlock (cognitive 41) packages/studio/src/utils/htmlEditor.ts:59— htmlEditor.findElementBlock has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6, ternaries 2 (6 pts), loops 4 (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.
BufferGeometryUtils.mergeVertices (cognitive 41) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:560— BufferGeometryUtils.mergeVertices has cognitive complexity 41 (threshold 15). Drivers by points: loops 9 (23 pts), if/else 6 (15 pts), ternaries 2 (3 pts) (nesting depth added 24). 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.
fit-fonts.main (cognitive 41) skills/embedded-captions/scripts/fit-fonts.cjs:86— fit-fonts.main has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (16 pts), ternaries 3 (6 pts), error handling 1, loops 1 (nesting depth added 10). Of this number, 40 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.
htmlCompiler.coalesceHeadStylesAndBodyScripts (cognitive 40) packages/producer/src/services/htmlCompiler.ts:875— htmlCompiler.coalesceHeadStylesAndBodyScripts has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 22). Of this number, 36 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.
gsapParserAcorn.resolveNode (cognitive 40) REDACTED:171— gsapParserAcorn.resolveNode has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 13, ternaries 2 (6 pts), match/switch 1 (3 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.
aroll.cleanChapterAroll (cognitive 40) packages/studio-server/src/story/aroll.ts:33— aroll.cleanChapterAroll has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 3 (9 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 20). Of this number, 33 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.
TimelineClip.TimelineClip (cognitive 40) packages/studio/src/player/components/TimelineClip.tsx:57— TimelineClip.TimelineClip has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 22 (25 pts), boolean chains 15 (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.
TimelineTrackHeader.TimelineTrackHeader (cognitive 40) packages/studio/src/player/components/TimelineTrackHeader.tsx:87— TimelineTrackHeader.TimelineTrackHeader has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 18 (23 pts), boolean chains 13, if/else 4 (nesting depth added 5). Of this number, 27 points are the body's own statements and 13 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.
useTimelineEditCallbacks.useTimelineEditCallbacks (cognitive 40) packages/studio/src/components/nle/useTimelineEditCallbacks.ts:123— useTimelineEditCallbacks.useTimelineEditCallbacks has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 6, ternaries 6, loops 2 (nesting depth added 4). None of this is in the body itself: all 40 points belong to 12 function literals inside it that branch (lines 295, 367, 153, …). 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.
BufferGeometryUtils.computeMorphedAttributes (cognitive 40) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:794— BufferGeometryUtils.computeMorphedAttributes has cognitive complexity 40 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 11 (17 pts), boolean chains 1 (nesting depth added 21). Of this number, 28 points are the body's own statements and 12 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.
htmlCompiler.detectAncestorBackgroundImage (cognitive 39) packages/producer/src/services/htmlCompiler.ts:379— htmlCompiler.detectAncestorBackgroundImage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 6 (12 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 22). 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.
htmlCompiler.discoverVideoVisibilityFromTimeline (cognitive 39) packages/producer/src/services/htmlCompiler.ts:2560— htmlCompiler.discoverVideoVisibilityFromTimeline has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 6 (9 pts), boolean chains 3 (nesting depth added 14). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 2566, 2586). 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.
init.handleVideoFile (cognitive 39) packages/cli/src/commands/init.ts:363— init.handleVideoFile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (35 pts), ternaries 1 (3 pts), boolean chains 1 (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.
previewMediaBudget.createPreviewMediaBudget.update (cognitive 39) packages/core/src/runtime/previewMediaBudget.ts:467— previewMediaBudget.createPreviewMediaBudget.update has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 12, loops 7, ternaries 2 (5 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.
projects.findProjects (cognitive 39) packages/core/src/projects.ts:61— projects.findProjects has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 14, loops 4, error handling 1, ternaries 1 (nesting depth added 4). None of this is in the body itself: all 39 points belong to 11 function items inside it that branch (walk::visit, namesBelowRoot, walkWouldReach, …). 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.
alphaBlit.decodePngRaw (cognitive 39) packages/engine/src/utils/alphaBlit.ts:32— alphaBlit.decodePngRaw has cognitive complexity 39 (threshold 15). Drivers by points: loops 6 (14 pts), ternaries 4 (13 pts), if/else 7 (8 pts), boolean chains 2, match/switch 1 (2 pts) (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.
gsapParserAcorn.findAllTweenCalls::visit (cognitive 39) REDACTED:889— gsapParserAcorn.findAllTweenCalls::visit has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 11, ternaries 2 (7 pts), loops 2 (4 pts) (nesting depth added 15). 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.
StoryService.resolveRanges (cognitive 39) packages/studio-server/src/story/service.ts:475— StoryService.resolveRanges has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (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.
VariablesPanel.VariablesPanel (cognitive 39) packages/studio/src/components/panels/VariablesPanel.tsx:286— VariablesPanel.VariablesPanel has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16, boolean chains 12, ternaries 9 (10 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 383, 471, 525, …). 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.
screenshotCapture.captureScrollScreenshots (cognitive 38) packages/cli/src/capture/screenshotCapture.ts:114— screenshotCapture.captureScrollScreenshots has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 5 (6 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 13). Of this number, 17 points are the body's own statements and 21 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.
benchmark.runBenchmark (cognitive 38) packages/producer/src/benchmark.ts:181— benchmark.runBenchmark has cognitive complexity 38 (threshold 15). Drivers by points: loops 7 (13 pts), ternaries 3 (10 pts), if/else 4 (7 pts), error handling 2 (6 pts), boolean chains 2 (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.
ProviderRow.ProviderRow (cognitive 38) packages/studio/src/components/settings/ProviderRow.tsx:233— ProviderRow.ProviderRow has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 19, ternaries 8 (13 pts), if/else 4, match/switch 1 (2 pts) (nesting depth added 6). Of this number, 36 points are the body's own statements and 2 belong 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.
generator.buildGroupStyleDecls (cognitive 38) packages/studio/src/captions/generator.ts:109— generator.buildGroupStyleDecls has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 4). 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.
mediaCapture.saveLottieAnimations (cognitive 37) packages/cli/src/capture/mediaCapture.ts:49— mediaCapture.saveLottieAnimations has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 2, error handling 1 (2 pts), loops 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.
captureHdrStage.runCaptureHdrStage (cognitive 37) packages/producer/src/services/render/stages/captureHdrStage.ts:133— captureHdrStage.runCaptureHdrStage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 7 (10 pts), loops 5 (6 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 27 points are the body's own statements and 10 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.
preview.printCurrentContext (cognitive 37) REDACTED:1003— preview.printCurrentContext has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (22 pts), ternaries 7 (10 pts), boolean chains 3, error handling 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.
screenshotService.applyDomLayerMask (cognitive 37) packages/engine/src/services/screenshotService.ts:399— screenshotService.applyDomLayerMask has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 5, ternaries 2 (3 pts), boolean chains 1 (nesting depth added 12). None of this is in the body itself: all 37 points belong to 4 function literals inside it that branch (lines 405, 443, 425, …). 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.
frameCapture.captureFrameSurface (cognitive 37) packages/engine/src/services/frameCapture.ts:3787— frameCapture.captureFrameSurface has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 3 (10 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 18). 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.
textures.collectTextureCss (cognitive 37) packages/lint/src/rules/textures.ts:62— textures.collectTextureCss has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 7 (16 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 20). Most of this is not in the body itself: 4 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 79, 100). 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.
cutPlan.createCleaner.cutSilences (cognitive 37) packages/studio-server/src/analysis/cutPlan.ts:223— cutPlan.createCleaner.cutSilences has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 22). 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.
opsTranscript.captionsFromTranscript (cognitive 37) packages/studio-server/src/editing/opsTranscript.ts:73— opsTranscript.captionsFromTranscript has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, ternaries 3 (4 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 13). Of this number, 30 points are the body's own statements and 7 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.
useStudioUrlState.useStudioUrlState (cognitive 37) packages/studio/src/hooks/useStudioUrlState.ts:163— useStudioUrlState.useStudioUrlState has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26 (27 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 288, 356, 329, …). 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.
make-theme.paradigmCarbonstrip (cognitive 37) skills/embedded-captions/scripts/make-theme.cjs:2584— make-theme.paradigmCarbonstrip has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 22, ternaries 8 (9 pts), if/else 5 (6 pts) (nesting depth added 2). Of this number, 24 points are the body's own statements and 13 belong to 4 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.
captureHdrResources.probeHdrExtractionDims (cognitive 36) packages/producer/src/services/render/stages/captureHdrResources.ts:124— captureHdrResources.probeHdrExtractionDims has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 17). Of this number, 30 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.
captureStreamingStage.createDrainFrameGuard.<returned closure> (cognitive 36) packages/producer/src/services/render/stages/captureStreamingStage.ts:358— captureStreamingStage.createDrainFrameGuard.<returned closure> has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (12 pts), error handling 2 (5 pts), boolean chains 2 (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.
catalog.prepareOnDeviceTier (cognitive 36) packages/cli/src/commands/catalog.ts:53— catalog.prepareOnDeviceTier has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 12, if/else 10 (11 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.
runtime-message-handler.handleRuntimeMessage (cognitive 36) packages/player/src/runtime-message-handler.ts:60— runtime-message-handler.handleRuntimeMessage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 4 (9 pts), boolean chains 7, error handling 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.
logoSvg.svgRefusal (cognitive 36) packages/studio-server/src/design/logoSvg.ts:59— logoSvg.svgRefusal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 5, loops 2 (3 pts) (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.
NLEContext.NLEProvider (cognitive 36) packages/studio/src/components/nle/NLEContext.tsx:74— NLEContext.NLEProvider has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 8, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 5). None of this is in the body itself: all 36 points belong to 10 function literals inside it that branch (lines 168, 219, 271, …). 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.
useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.drainOnePending (cognitive 36) packages/studio/src/hooks/useExternalFileChangeCoordinator.ts:273— useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.drainOnePending has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 8, error handling 3 (7 pts), ternaries 1 (2 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.
FileTree.FileTree (cognitive 36) packages/studio/src/components/editor/FileTree.tsx:40— FileTree.FileTree has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 15, if/else 11, ternaries 9 (10 pts) (nesting depth added 1). Most of this is not in the body itself: 9 of the 36 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 206, 137, 239, …). 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.
contrast-report.prepareTextElements (cognitive 36) skills/hyperframes-creative/scripts/contrast-report.mjs:178— contrast-report.prepareTextElements has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, ternaries 4 (7 pts), loops 1 (nesting depth added 10). None of this is in the body itself: all 36 points belong to 5 function literals inside it that branch (lines 179, 200, 213, …). 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.
layout-audit.browser.__hyperframesOffPivotRotationSample (cognitive 35) packages/cli/src/commands/layout-audit.browser.js:2068— layout-audit.browser.__hyperframesOffPivotRotationSample has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 7 (14 pts), boolean chains 4, error handling 1 (2 pts), 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.
htmlMarkupScan.parseStartTagAttributes (cognitive 35) packages/core/src/compiler/htmlMarkupScan.ts:140— htmlMarkupScan.parseStartTagAttributes has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (10 pts), boolean chains 6, ternaries 1 (4 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.
startResolver.createRuntimeStartTimeResolver.resolveDurationForElement (cognitive 35) packages/core/src/runtime/startResolver.ts:46— startResolver.createRuntimeStartTimeResolver.resolveDurationForElement has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, error handling 1 (4 pts), ternaries 2 (3 pts) (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.
alphaBlit.blitRgb48leRegion (cognitive 35) packages/engine/src/utils/alphaBlit.ts:474— alphaBlit.blitRgb48leRegion has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (12 pts), boolean chains 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.
audioMixer.parseAudioElements (cognitive 35) packages/engine/src/services/audioMixer.ts:561— audioMixer.parseAudioElements has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 15 (17 pts), if/else 6 (11 pts), boolean chains 4, loops 3 (nesting depth added 7). Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 6 function items inside it that branch (build, resolveEnd, isHidden, …). 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.
project.lintProject (cognitive 35) REDACTED:175— project.lintProject has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 5 (7 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 12). Of this number, 20 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.
gsapParser.resolveNode (cognitive 35) REDACTED:109— gsapParser.resolveNode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 12, ternaries 2 (6 pts), match/switch 1 (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.
gsapParserAcorn.parseMotionPathNode (cognitive 35) REDACTED:1174— gsapParserAcorn.parseMotionPathNode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (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.
captionWords.alignSourceWords (cognitive 35) packages/studio-server/src/voice/project/captionWords.ts:19— captionWords.alignSourceWords has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (10 pts), loops 6 (8 pts), boolean chains 4 (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.
studioUiPreferences.readStorage (cognitive 35) packages/studio/src/utils/studioUiPreferences.ts:77— studioUiPreferences.readStorage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, boolean chains 8, error handling 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.
Player.Player (cognitive 35) packages/studio/src/player/components/Player.tsx:150— Player.Player has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20, boolean chains 12, ternaries 3. Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 256, a function literal at line 217, a function literal at line 206, …). 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.
timelineKeyboardNavigation.resolveTimelineNavigationTarget (cognitive 35) packages/studio/src/player/components/timelineKeyboardNavigation.ts:380— timelineKeyboardNavigation.resolveTimelineNavigationTarget has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 7 (12 pts), boolean chains 6 (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.
TimelineClipFades.TimelineClipFades (cognitive 35) packages/studio/src/player/components/TimelineClipFades.tsx:35— TimelineClipFades.TimelineClipFades has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 15, if/else 12, ternaries 8. Most of this is not in the body itself: 11 of the 35 points are its own statements and the rest belongs to 10 function items inside it that branch (onHandlePointerMove, finish, endGesture, …). 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.
collectOffPivotRotationSample (cognitive 35) packages/cli/src/commands/layout-audit.browser.js:2068— collectOffPivotRotationSample has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 7 (14 pts), boolean chains 4, error handling 1 (2 pts), 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.
captureHdrSequentialLoop.runSequentialLayeredFrameLoop (cognitive 34) packages/producer/src/services/render/stages/captureHdrSequentialLoop.ts:70— captureHdrSequentialLoop.runSequentialLayeredFrameLoop has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 4 (10 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 17). 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 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.
debug-timeline.main (cognitive 34) packages/core/scripts/debug-timeline.ts:195— debug-timeline.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 5 (13 pts), boolean chains 6, 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.
lottie.createLottieAdapter.seek (cognitive 34) packages/core/src/runtime/adapters/lottie.ts:93— lottie.createLottieAdapter.seek has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 6, ternaries 1 (4 pts), error handling 1 (2 pts), 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.
ffprobe.probeMediaMetadataUncached (cognitive 34) packages/engine/src/utils/ffprobe.ts:704— ffprobe.probeMediaMetadataUncached has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (8 pts), ternaries 8, error handling 1 (nesting depth added 2). None of this is in the body itself: all 34 points belong to one function literal inside it that branches (line 705). 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.
editing.registerEditingRoutes (cognitive 34) packages/studio-server/src/routes/editing.ts:179— editing.registerEditingRoutes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 5, error handling 5, ternaries 3 (nesting depth added 5). None of this is in the body itself: all 34 points belong to 9 function literals inside it that branch (lines 276, 242, 192, …). 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.
gsapDragPositionCommit.commitFlatViaKeyframes (cognitive 34) packages/studio/src/hooks/gsapDragPositionCommit.ts:159— gsapDragPositionCommit.commitFlatViaKeyframes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, loops 3 (7 pts), ternaries 4 (6 pts), error handling 1 (2 pts) (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.
PropertyPanel.PropertyPanel (cognitive 34) packages/studio/src/components/editor/PropertyPanel.tsx:56— PropertyPanel.PropertyPanel has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 23, ternaries 9, if/else 2. Of this number, 32 points are the body's own statements and 2 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.
compilationTester.extractTimedElements (cognitive 33) packages/producer/src/services/compilationTester.ts:42— compilationTester.extractTimedElements has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 12 (24 pts), if/else 3 (6 pts), loops 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.
deferredPreviewMedia.readAttributes (cognitive 33) REDACTED:37— deferredPreviewMedia.readAttributes has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (10 pts), boolean chains 8 (nesting depth added 13). 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.
opsVoiceCaptions.captionsFromVoiceover (cognitive 33) packages/studio-server/src/editing/opsVoiceCaptions.ts:150— opsVoiceCaptions.captionsFromVoiceover has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6, ternaries 4 (5 pts), loops 3 (nesting depth added 8). Of this number, 27 points are the body's own statements and 6 belong to 3 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.
playerStore.usePlayerStore (cognitive 33) packages/studio/src/player/store/playerStore.ts:253— playerStore.usePlayerStore has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 9, boolean chains 6 (nesting depth added 2). None of this is in the body itself: all 33 points belong to 16 function literals inside it that branch (lines 519, 453, 465, …). 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.
useDomSelection.useDomSelection.applyDomSelection (cognitive 33) packages/studio/src/hooks/useDomSelection.ts:106— useDomSelection.useDomSelection.applyDomSelection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 7 (14 pts), boolean chains 3 (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.
useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerMove (cognitive 33) packages/studio/src/components/editor/useDomEditOverlayGestures.ts:107— useDomEditOverlayGestures.createDomEditOverlayGestureHandlers.onPointerMove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (8 pts), boolean chains 6 (nesting depth added 11). Of this number, 30 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.
usePlaybackKeyboard.usePlaybackKeyboard.handlePlaybackKeyDown (cognitive 33) packages/studio/src/player/hooks/usePlaybackKeyboard.ts:94— usePlaybackKeyboard.usePlaybackKeyboard.handlePlaybackKeyDown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (22 pts), ternaries 4 (8 pts), boolean chains 3 (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.
propertyPanelMediaSection.MediaSection (cognitive 33) packages/studio/src/components/editor/propertyPanelMediaSection.tsx:27— propertyPanelMediaSection.MediaSection has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 20, ternaries 7 (10 pts), if/else 2, error handling 1 (nesting depth added 3). Of this number, 26 points are the body's own statements and 7 belong to 5 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.
AnimationCard.AnimationCard (cognitive 33) packages/studio/src/components/editor/AnimationCard.tsx:36— AnimationCard.AnimationCard has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 21, ternaries 7, if/else 5. Of this number, 23 points are the body's own statements and 10 belong to 10 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.
ProvidersSection.ProvidersSection (cognitive 33) packages/studio/src/components/settings/ProvidersSection.tsx:31— ProvidersSection.ProvidersSection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 10 (13 pts), boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 81, run, row, …). 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.
TimelineToolbar.TimelineToolbar (cognitive 33) packages/studio/src/components/TimelineToolbar.tsx:175— TimelineToolbar.TimelineToolbar has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 17 (18 pts), boolean chains 11, if/else 4 (nesting depth added 1). Of this number, 24 points are the body's own statements and 9 belong to 4 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.
make-theme.paradigmPopuprail (cognitive 33) skills/embedded-captions/scripts/make-theme.cjs:4036— make-theme.paradigmPopuprail has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 19, if/else 5 (7 pts), ternaries 6 (7 pts) (nesting depth added 3). Of this number, 20 points are the body's own statements and 13 belong to 3 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.
preview-frames.main (cognitive 33) skills/embedded-captions/scripts/preview-frames.cjs:152— preview-frames.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (7 pts), boolean chains 4, error handling 3 (4 pts), ternaries 3 (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.
assetCataloger.deduplicateSrcsetVariants (cognitive 32) packages/cli/src/capture/assetCataloger.ts:327— assetCataloger.deduplicateSrcsetVariants has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (4 pts), boolean chains 2, error handling 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.
assemble.assembleStyle (cognitive 32) packages/cli/src/siteInspect/assemble.ts:116— assemble.assembleStyle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (8 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 16). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 131, 165, 211). 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.
sourceMutation.splitElementInHtml (cognitive 32) packages/studio-server/src/helpers/sourceMutation.ts:345— sourceMutation.splitElementInHtml has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 10 (11 pts), boolean chains 5, 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.
editingFrames.registerCompositionFrameRoutes (cognitive 32) packages/studio-server/src/routes/editingFrames.ts:90— editingFrames.registerCompositionFrameRoutes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 2 (6 pts), loops 3 (4 pts), error handling 2 (3 pts) (nesting depth added 14). None of this is in the body itself: all 32 points belong to one function literal inside it that branches (line 99). 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.
googleFonts.fetchGoogleFontFaces (cognitive 32) packages/studio-server/src/design/googleFonts.ts:129— googleFonts.fetchGoogleFontFaces has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 3 (6 pts), loops 3 (4 pts), boolean chains 2, error handling 2 (nesting depth added 12). Of this number, 31 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.
dockWorkspace.createMissingHosts (cognitive 32) packages/studio/src/components/dock/dockWorkspace.ts:259— dockWorkspace.createMissingHosts has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (22 pts), if/else 2 (6 pts), loops 2 (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.
domEditingLayers.resolveDomEditSelection (cognitive 32) packages/studio/src/components/editor/domEditingLayers.ts:286— domEditingLayers.resolveDomEditSelection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 9, ternaries 3 (4 pts), loops 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.
useDomEditCommits.useDomEditCommits.performPersistDomEditOperations (cognitive 32) packages/studio/src/hooks/useDomEditCommits.ts:133— useDomEditCommits.useDomEditCommits.performPersistDomEditOperations has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, ternaries 5 (6 pts) (nesting depth added 5). Of this number, 23 points are the body's own statements and 9 belong to 3 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.
StoryOfferCard.StoryOfferCard (cognitive 32) packages/studio/src/components/chat/StoryOfferCard.tsx:31— StoryOfferCard.StoryOfferCard has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 19, if/else 6 (7 pts), ternaries 6 (nesting depth added 1). Of this number, 29 points are the body's own statements and 3 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.
make-theme.paradigmPaperrail (cognitive 32) skills/embedded-captions/scripts/make-theme.cjs:3877— make-theme.paradigmPaperrail has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 20, ternaries 6 (8 pts), if/else 3 (4 pts) (nesting depth added 3). Of this number, 22 points are the body's own statements and 10 belong to 3 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.
eval.evalBlock (cognitive 32) skills/media-use/scripts/eval.mjs:70— eval.evalBlock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 4 (9 pts), loops 3 (5 pts), boolean chains 4, ternaries 2 (nesting depth added 12). Of this number, 30 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.
applyErrorDiffusionRgba (cognitive 32) packages/cli/src/media-use/lib/error-diffusion.mjs:118— applyErrorDiffusionRgba has cognitive complexity 32 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 5 (8 pts), other 7, boolean chains 4 (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.
assetMediaType.preflightCompositionAssetMediaTypes (cognitive 31) packages/producer/src/services/assetMediaType.ts:100— assetMediaType.preflightCompositionAssetMediaTypes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (6 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 11). Of this number, 19 points are the body's own statements and 12 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.
core.types.parseFps (cognitive 31) packages/core/src/core.types.ts:86— core.types.parseFps has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 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.
alphaBlit.blitRgb48leAffine (cognitive 31) packages/engine/src/utils/alphaBlit.ts:583— alphaBlit.blitRgb48leAffine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (4 pts), boolean chains 2 (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.
project.lintDuplicateAudioTracks (cognitive 31) REDACTED:577— project.lintDuplicateAudioTracks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 3 (11 pts), loops 4 (6 pts), boolean chains 2 (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.
gsapParser.parseSimpleArrayKeyframes (cognitive 31) REDACTED:878— gsapParser.parseSimpleArrayKeyframes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (7 pts), ternaries 3 (4 pts), boolean chains 2 (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.
gsapParserAcorn.parseSimpleArrayKeyframes (cognitive 31) REDACTED:1086— gsapParserAcorn.parseSimpleArrayKeyframes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (7 pts), ternaries 3 (4 pts), boolean chains 2 (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.
store.evaluateStages (cognitive 31) packages/studio-server/src/analysis/store.ts:152— store.evaluateStages has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 5 (12 pts), boolean chains 3, loops 2 (3 pts) (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.
scriptScan.scanScript (cognitive 31) packages/studio-server/src/design/scriptScan.ts:80— scriptScan.scanScript has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (4 pts) (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.
extract.addPageFacts (cognitive 31) packages/studio-server/src/design/extract.ts:152— extract.addPageFacts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (8 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.
CompositionsTab.CompCard (cognitive 31) packages/studio/src/components/sidebar/CompositionsTab.tsx:130— CompositionsTab.CompCard has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 12, if/else 10, ternaries 6 (9 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 12 belong to 8 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.
propertyPanelFlatPrimitives.FlatSlider (cognitive 31) packages/studio/src/components/editor/propertyPanelFlatPrimitives.tsx:282— propertyPanelFlatPrimitives.FlatSlider has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 7, ternaries 4 (nesting depth added 1). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 510, a function literal at line 371, cancelDrag, …). 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.
make-composition.buildPerGroupCss (cognitive 31) skills/embedded-captions/scripts/make-composition.cjs:176— make-composition.buildPerGroupCss has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, ternaries 3 (6 pts) (nesting depth added 9). None of this is in the body itself: all 31 points belong to 2 function literals inside it that branch (lines 178, 207). 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.
inlineSubCompositions.refuseSwapsReachedByRootScripts (cognitive 30) packages/core/src/compiler/inlineSubCompositions.ts:66— inlineSubCompositions.refuseSwapsReachedByRootScripts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 5 (9 pts), ternaries 3 (9 pts), boolean chains 3 (nesting depth added 16). 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, 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.
hyperframes.generateGsapTimelineScript (cognitive 30) packages/core/src/generators/hyperframes.ts:218— hyperframes.generateGsapTimelineScript has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, ternaries 1 (4 pts), loops 1 (2 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, 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.
videoFrameExtractor.classifyVideoExtractionError (cognitive 30) packages/engine/src/services/videoFrameExtractor.ts:415— videoFrameExtractor.classifyVideoExtractionError has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6 (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.
targets.visionTargets (cognitive 30) packages/studio-server/src/analysis/targets.ts:26— targets.visionTargets has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, loops 6 (7 pts) (nesting depth added 9). Of this number, 17 points are the body's own statements and 13 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.
ops.resolveMissing (cognitive 30) packages/studio-server/src/story/ops.ts:715— ops.resolveMissing has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (7 pts), boolean chains 3, loops 3, match/switch 1 (nesting depth added 9). Of this number, 26 points are the body's own statements and 4 belong to 3 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.
DesignTally.addGroup (cognitive 30) packages/studio-server/src/design/designTally.ts:207— DesignTally.addGroup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (4 pts), boolean chains 3 (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.
useElementLifecycleOps.useElementLifecycleOps.handleDomEditElementsDelete (cognitive 30) packages/studio/src/hooks/useElementLifecycleOps.ts:87— useElementLifecycleOps.useElementLifecycleOps.handleDomEditElementsDelete has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 5 (8 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 4 belong to 3 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.
gsapRuntimeBridge.tryGsapDragIntercept (cognitive 30) packages/studio/src/hooks/gsapRuntimeBridge.ts:173— gsapRuntimeBridge.tryGsapDragIntercept has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 28 points are the body's own statements and 2 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.
useGsapTweenCache.useGsapAnimationsForElement (cognitive 30) packages/studio/src/hooks/useGsapTweenCache.ts:75— useGsapTweenCache.useGsapAnimationsForElement has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, loops 3 (4 pts), ternaries 2 (nesting depth added 6). None of this is in the body itself: all 30 points belong to 8 function literals inside it that branch (lines 238, 116, 97, …). 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.
TimelineAutomationLane.TimelineAutomationLane (cognitive 30) packages/studio/src/player/components/TimelineAutomationLane.tsx:206— TimelineAutomationLane.TimelineAutomationLane has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 9, if/else 9 (nesting depth added 1). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 395, 268, 292, …). 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.
designStore.createDesignStore (cognitive 30) packages/studio/src/design/designStore.ts:67— designStore.createDesignStore has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 7, error handling 4 (5 pts) (nesting depth added 6). None of this is in the body itself: all 30 points belong to 4 function literals inside it that branch (lines 133, 74, 156, …). 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.
ModelList.ModelList (cognitive 30) packages/studio/src/components/chat/ModelList.tsx:44— ModelList.ModelList has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 7 (9 pts), boolean chains 5 (nesting depth added 8). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 127, onKeyDown, choose, …). 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.
AssetRangeEditor.AssetRangeEditor (cognitive 30) packages/studio/src/media/AssetRangeEditor.tsx:40— AssetRangeEditor.AssetRangeEditor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 7 (8 pts), boolean chains 6, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 8 function items inside it that branch (flush, a function literal at line 179, playFragment, …). 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.
BufferGeometryUtils.toTrianglesDrawMode (cognitive 30) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:703— BufferGeometryUtils.toTrianglesDrawMode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (10 pts), boolean chains 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.
make-theme.paradigmScoperail (cognitive 30) skills/embedded-captions/scripts/make-theme.cjs:3610— make-theme.paradigmScoperail has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 23, ternaries 4, loops 1 (2 pts), if/else 1 (nesting depth added 1). Of this number, 27 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.
make-theme.paradigmBrushrail (cognitive 30) skills/embedded-captions/scripts/make-theme.cjs:4527— make-theme.paradigmBrushrail has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 21, ternaries 5 (7 pts), if/else 2 (nesting depth added 2). Of this number, 26 points are the body's own statements and 4 belong to 3 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.
heygen.loadEnvFromDir (cognitive 30) skills/media-use/audio/scripts/lib/heygen.mjs:21— heygen.loadEnvFromDir has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 2 (4 pts), boolean chains 2 (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.
mediaCapture.renderLottiePreviews (cognitive 29) packages/cli/src/capture/mediaCapture.ts:114— mediaCapture.renderLottiePreviews has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 9, error handling 2 (4 pts), ternaries 1 (2 pts), 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.
hdrCompositor.blitHdrVideoLayer (cognitive 29) packages/producer/src/services/hdrCompositor.ts:169— hdrCompositor.blitHdrVideoLayer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, ternaries 3 (5 pts), error handling 1 (nesting depth added 5). Of this number, 22 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.
config.resolveConfig (cognitive 29) packages/engine/src/config.ts:794— config.resolveConfig has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 11, ternaries 4. Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (resolveLowMemoryMode, envNum, envVp9CpuUsed, …). 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.
streamingEncoder.spawnStreamingEncoder (cognitive 29) packages/engine/src/services/streamingEncoder.ts:457— streamingEncoder.spawnStreamingEncoder has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 558, a function literal at line 606, a function literal at line 530, …). 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.
htmlParser.updateElementInHtml (cognitive 29) REDACTED:554— htmlParser.updateElementInHtml has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 7 (nesting depth added 4). 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.
HyperframesSlideshow.onKey (cognitive 29) packages/player/src/slideshow/hyperframes-slideshow.ts:863— HyperframesSlideshow.onKey has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 9 (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.
cutPlan.createCleaner.tidy (cognitive 29) packages/studio-server/src/analysis/cutPlan.ts:266— cutPlan.createCleaner.tidy has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, ternaries 2 (6 pts), loops 3 (4 pts) (nesting depth added 12). Of this number, 28 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.
opsClips.trimClip (cognitive 29) packages/studio-server/src/editing/opsClips.ts:135— opsClips.trimClip has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 4 (7 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.
align.splitScene (cognitive 29) packages/studio-server/src/voice/project/align.ts:94— align.splitScene has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 7 (9 pts), ternaries 3 (6 pts), boolean chains 3 (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.
site.searchThroughWeb (cognitive 29) packages/studio-server/src/research/sources/connectors/site.ts:19— site.searchThroughWeb has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (nesting depth added 13). 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 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.
ResearchService.inspectUrl (cognitive 29) packages/studio-server/src/research/service.ts:554— ResearchService.inspectUrl has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 13 (21 pts), if/else 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). Of this number, 28 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.
useTimelineDeleteOps.useTimelineDeleteOps.handleTimelineElementsDelete (cognitive 29) packages/studio/src/hooks/useTimelineDeleteOps.ts:83— useTimelineDeleteOps.useTimelineDeleteOps.handleTimelineElementsDelete has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4 (6 pts), boolean chains 5, error handling 3 (4 pts), loops 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 11 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.
useMotionPathData.useMotionPathData (cognitive 29) packages/studio/src/components/editor/useMotionPathData.ts:97— useMotionPathData.useMotionPathData has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (19 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 12). None of this is in the body itself: all 29 points belong to 8 function literals inside it that branch (lines 125, 137, 149, …). 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.
VoiceGenerate.VoiceGenerate (cognitive 29) packages/studio/src/voice/panel/VoiceGenerate.tsx:41— VoiceGenerate.VoiceGenerate has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 11, if/else 3 (nesting depth added 7). Of this number, 19 points are the body's own statements and 10 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.
BufferGeometryUtils.mergeAttributes (cognitive 29) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:303— BufferGeometryUtils.mergeAttributes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (9 pts) (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.
check-rail-climax.main (cognitive 29) skills/embedded-captions/scripts/check-rail-climax.cjs:151— check-rail-climax.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, loops 3 (4 pts), error handling 1, ternaries 1 (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.
make-theme.paradigmChalkrail (cognitive 29) skills/embedded-captions/scripts/make-theme.cjs:4198— make-theme.paradigmChalkrail has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 23, ternaries 4 (5 pts), loops 1 (nesting depth added 1). Of this number, 26 points are the body's own statements and 3 belong 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.
animation-map.markCollisions (cognitive 29) skills/hyperframes-animation/scripts/animation-map.mjs:376— animation-map.markCollisions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 3 (6 pts), boolean chains 2 (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.
sfx.resolveSfx (cognitive 29) skills/media-use/audio/scripts/lib/sfx.mjs:30— sfx.resolveSfx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (4 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). 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 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.
analyze-beatgrid.detect_rolls (cognitive 29) skills/music-to-video/scripts/analyze-beatgrid.py:240— analyze-beatgrid.detect_rolls has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (8 pts), ternaries 2 (8 pts), boolean chains 3 (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.
iframe.imageAlphaOpaqueAt (cognitive 28) packages/sdk/src/adapters/iframe.ts:389— iframe.imageAlphaOpaqueAt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 12, error handling 2 (3 pts) (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.
takes.detectTakeIssues.detectFalseStarts (cognitive 28) packages/studio-server/src/analysis/takes.ts:575— takes.detectTakeIssues.detectFalseStarts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, loops 3 (5 pts), ternaries 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.
files.foldAtomicCutFile (cognitive 28) REDACTED:2163— files.foldAtomicCutFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 9). Of this number, 20 points are the body's own statements and 8 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.
RenderQueue.survey (cognitive 28) packages/studio-server/src/render/renderQueue.ts:363— RenderQueue.survey has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, 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.
manifest.readDesignManifest (cognitive 28) packages/studio-server/src/design/manifest.ts:74— manifest.readDesignManifest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, loops 2 (3 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.
cssScan.readBlock (cognitive 28) packages/studio-server/src/design/cssScan.ts:94— cssScan.readBlock has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 24 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.
DomEditCropHandles.DomEditCropHandles (cognitive 28) packages/studio/src/components/editor/DomEditCropHandles.tsx:100— DomEditCropHandles.DomEditCropHandles has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 11, ternaries 5. Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 156, finishCropGesture, updateCropGesture, …). 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.
propertyPanelFill.GradientField (cognitive 28) packages/studio/src/components/editor/propertyPanelFill.tsx:215— propertyPanelFill.GradientField has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 8, ternaries 7 (8 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 281, a function literal at line 302, addStop, …). 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.
SlideshowPanel.SlideshowPanel (cognitive 28) packages/studio/src/components/panels/SlideshowPanel.tsx:168— SlideshowPanel.SlideshowPanel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 9, ternaries 2 (3 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 414, 224, 292, …). 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.
AgentsMenu.AgentsMenu (cognitive 28) packages/studio/src/components/chat/AgentsMenu.tsx:66— AgentsMenu.AgentsMenu has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 9, if/else 4 (nesting depth added 5). Of this number, 22 points are the body's own statements and 6 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.
useProjectMentions.useProjectMentions (cognitive 28) packages/studio/src/components/chat/useProjectMentions.tsx:54— useProjectMentions.useProjectMentions has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 9, ternaries 8. Of this number, 21 points are the body's own statements and 7 belong to 5 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.
RenderQaCard.PassRow (cognitive 28) packages/studio/src/components/chat/RenderQaCard.tsx:81— RenderQaCard.PassRow has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 18, ternaries 8, if/else 2. Of this number, 25 points are the body's own statements and 3 belong 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.
StoryCanvas.StoryCanvas (cognitive 28) packages/studio/src/story/StoryCanvas.tsx:50— StoryCanvas.StoryCanvas has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 10 (11 pts), ternaries 5, loops 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 80, 143, 123, …). 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.
htmlCompiler.collectExternalAssets (cognitive 27) packages/producer/src/services/htmlCompiler.ts:1283— htmlCompiler.collectExternalAssets has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 9). Of this number, 24 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.
htmlCompiler.resolveCompositionDurations (cognitive 27) packages/producer/src/services/htmlCompiler.ts:2673— htmlCompiler.resolveCompositionDurations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (8 pts), boolean chains 4, loops 2 (nesting depth added 13). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 2681). 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.
probeStage.hasRuntimeMediaChanges (cognitive 27) packages/producer/src/services/render/stages/probeStage.ts:198— probeStage.hasRuntimeMediaChanges has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 3 (5 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 14). Of this number, 23 points are the body's own statements and 4 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.
play.registerCompositionRoute (cognitive 27) packages/cli/src/commands/play.ts:211— play.registerCompositionRoute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 10). None of this is in the body itself: all 27 points belong to one function literal inside it that branches (line 218). 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.
inspectSite.watchResponse (cognitive 27) packages/cli/src/siteInspect/inspectSite.ts:84— inspectSite.watchResponse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9 (nesting depth added 8). Of this number, 17 points are the body's own statements and 10 belong to 3 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.
contrast-audit.browser.__contrastAuditFinish (cognitive 27) REDACTED:330— contrast-audit.browser.__contrastAuditFinish has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), ternaries 4 (5 pts), boolean chains 3 (nesting depth added 10). Of this number, 24 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.
compositionScoping.replaceAuthoredRootIdSelectors (cognitive 27) packages/core/src/compiler/compositionScoping.ts:30— compositionScoping.replaceAuthoredRootIdSelectors 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.
htmlCompiler.compileHtml (cognitive 27) packages/core/src/compiler/htmlCompiler.ts:33— htmlCompiler.compileHtml has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). Of this number, 26 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.
colorGrading.drawEntry (cognitive 27) packages/core/src/runtime/colorGrading.ts:3047— colorGrading.drawEntry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, ternaries 4 (5 pts), error handling 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.
pickerDrawn.createDrawnProbe (cognitive 27) packages/core/src/runtime/pickerDrawn.ts:106— pickerDrawn.createDrawnProbe has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, loops 2, ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 27 points belong to 7 function items inside it that branch (glyphsUnder, shownText, glyphsNear, …). 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.
threeDProjection.initThreeDProjectionInPage.inlineCloneStyles (cognitive 27) packages/engine/src/services/threeDProjection.ts:232— threeDProjection.initThreeDProjectionInPage.inlineCloneStyles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (7 pts), loops 4 (7 pts), boolean chains 3 (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.
frameCapture.captureFramesBatchPipelined (cognitive 27) packages/engine/src/services/frameCapture.ts:4417— frameCapture.captureFramesBatchPipelined has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (7 pts), ternaries 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.
urlDownloader.fetchToPartial (cognitive 27) packages/engine/src/utils/urlDownloader.ts:791— urlDownloader.fetchToPartial has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 5 (6 pts), error handling 2 (3 pts) (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.
composition.variablesDeclarationFindings (cognitive 27) packages/lint/src/rules/composition.ts:387— composition.variablesDeclarationFindings has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 2, ternaries 1 (2 pts), error handling 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.
project.lintMissingLocalAsset (cognitive 27) REDACTED:438— project.lintMissingLocalAsset has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 2 (5 pts), loops 3 (4 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.
HyperframesSlideshow.buildNavCluster (cognitive 27) packages/player/src/slideshow/hyperframes-slideshow.ts:1012— HyperframesSlideshow.buildNavCluster has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 18 (25 pts), boolean chains 1, if/else 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.
transcript.dropLoops (cognitive 27) packages/studio-server/src/analysis/transcript.ts:173— transcript.dropLoops has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (9 pts), boolean chains 4, ternaries 1 (nesting depth added 10). Of this number, 26 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.
opsClips.setClip (cognitive 27) packages/studio-server/src/editing/opsClips.ts:262— opsClips.setClip has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 4). Of this number, 26 points are the body's own statements and 1 belongs 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.
normalize.planNormalization (cognitive 27) REDACTED:209— normalize.planNormalization has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, ternaries 2 (6 pts), match/switch 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.
voice.registerVoiceRoutes (cognitive 27) packages/studio-server/src/routes/voice.ts:49— voice.registerVoiceRoutes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 8, error handling 1, loops 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 27 points belong to 8 function items inside it that branch (answer, presetBody, a function literal at line 149, …). 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.
dockWorkspace.restoreEdit (cognitive 27) packages/studio/src/components/dock/dockWorkspace.ts:300— dockWorkspace.restoreEdit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6, boolean chains 4 (nesting depth added 6). Of this number, 23 points are the body's own statements and 4 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.
timelineClipDragCommit.commitDraggedClipMove (cognitive 27) packages/studio/src/player/components/timelineClipDragCommit.ts:221— timelineClipDragCommit.commitDraggedClipMove has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 8). Of this number, 23 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.
useAnimatedPropertyCommit.commitKeyframeProps (cognitive 27) packages/studio/src/hooks/useAnimatedPropertyCommit.ts:305— useAnimatedPropertyCommit.commitKeyframeProps has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, loops 3 (4 pts), ternaries 4 (nesting depth added 7). Of this number, 21 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.
GestureTrailOverlay.GestureTrailOverlay (cognitive 27) packages/studio/src/components/editor/GestureTrailOverlay.tsx:15— GestureTrailOverlay.GestureTrailOverlay has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (11 pts), loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 39, 52, 26, …). 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.
MotionPathOverlay.MotionPathOverlay (cognitive 27) packages/studio/src/components/editor/MotionPathOverlay.tsx:81— MotionPathOverlay.MotionPathOverlay has cognitive complexity 27 (threshold 15). Drivers by points: if/else 32 (37 pts), boolean chains 24, ternaries 13 (17 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, 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 (MotionPathOverlay.MotionPathOverlay::onUp) 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.
make-theme.paradigmRail (cognitive 27) skills/embedded-captions/scripts/make-theme.cjs:647— make-theme.paradigmRail has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 10 (nesting depth added 5). Of this number, 26 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.
safe-zones.sceneLighting (cognitive 27) skills/embedded-captions/scripts/safe-zones.cjs:473— safe-zones.sceneLighting has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 6 (9 pts), loops 3 (4 pts) (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.
ingest.parseDiff (cognitive 27) skills/pr-to-video/scripts/ingest.mjs:313— ingest.parseDiff has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 2, loops 1 (nesting depth added 13). Of this number, 26 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.
assemble-index.guardFrame (cognitive 27) REDACTED:287— assemble-index.guardFrame has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (5 pts), boolean chains 3, ternaries 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.
cancellableProcess.runCancellableProcess (cognitive 26) packages/cli/src/utils/cancellableProcess.ts:50— cancellableProcess.runCancellableProcess has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (18 pts), error handling 3 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 26 points belong to 7 function literals inside it that branch (lines 129, 90, 58, …). 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.
fileServer.createFileServer (cognitive 26) packages/producer/src/services/fileServer.ts:757— fileServer.createFileServer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 6 (7 pts), error handling 2, loops 2, boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 26 points belong to 3 function literals inside it that branch (lines 777, 784, 922). 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.
captureCost.runCaptureCalibration (cognitive 26) packages/producer/src/services/render/captureCost.ts:357— captureCost.runCaptureCalibration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (10 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 14). Of this number, 25 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.
captureHdrHybridLoop.runHybridLayeredFrameLoop::workerTaskOf (cognitive 26) packages/producer/src/services/render/stages/captureHdrHybridLoop.ts:202— captureHdrHybridLoop.runHybridLayeredFrameLoop::workerTaskOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (6 pts), boolean chains 3, loops 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.
preview.handlePreviewKillAll (cognitive 26) REDACTED:760— preview.handlePreviewKillAll has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (8 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 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.
video.runVideoMode (cognitive 26) packages/cli/src/commands/capture/video.ts:187— video.runVideoMode has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 5 (6 pts), error handling 2, loops 1 (2 pts) (nesting depth added 4). 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.
media.findRuntimeMediaSrcMutationFindings (cognitive 26) packages/lint/src/rules/media.ts:361— media.findRuntimeMediaSrcMutationFindings has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2 (6 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). Of this number, 19 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.
gsapParser.parsePercentageKeyframes (cognitive 26) REDACTED:768— gsapParser.parsePercentageKeyframes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (5 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.
gsapParserAcorn.parsePercentageKeyframes (cognitive 26) REDACTED:974— gsapParserAcorn.parsePercentageKeyframes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (5 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.
compilationTester.validateCompilation (cognitive 26) packages/producer/src/services/compilationTester.ts:245— compilationTester.validateCompilation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 10, 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.
sourceStyleMutation.parseStyleDecls (cognitive 26) packages/studio-server/src/helpers/sourceStyleMutation.ts:1— sourceStyleMutation.parseStyleDecls has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, loops 2 (3 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.
presets.matchingPresets (cognitive 26) packages/studio-server/src/editing/presets.ts:40— presets.matchingPresets has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 6 (9 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). Of this number, 25 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.
normalize.ffprobeInspect (cognitive 26) REDACTED:54— normalize.ffprobeInspect has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 5, if/else 2 (3 pts), error handling 2 (nesting depth added 6). Of this number, 24 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.
timelineTimingSync.foldGsapMutationInQueue (cognitive 26) packages/studio/src/hooks/timelineTimingSync.ts:234— timelineTimingSync.foldGsapMutationInQueue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 6 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.
useElementLifecycleOps.useElementLifecycleOps.handleDomZIndexReorderCommit (cognitive 26) packages/studio/src/hooks/useElementLifecycleOps.ts:235— useElementLifecycleOps.useElementLifecycleOps.handleDomZIndexReorderCommit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4, error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 252, 306, 339). 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.
BlocksTab.BlockCard (cognitive 26) packages/studio/src/components/sidebar/BlocksTab.tsx:283— BlocksTab.BlockCard has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 7, if/else 5, error handling 1 (nesting depth added 6). Of this number, 21 points are the body's own statements and 5 belong to 3 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.
useFxCarve.useFxCarve (cognitive 26) packages/studio/src/components/editor/useFxCarve.ts:120— useFxCarve.useFxCarve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, boolean chains 10, ternaries 2. None of this is in the body itself: all 26 points belong to 8 function literals inside it that branch (lines 440, 400, 207, …). 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.
propertyPanelColorCurves.ColorCurves (cognitive 26) packages/studio/src/components/editor/propertyPanelColorCurves.tsx:22— propertyPanelColorCurves.ColorCurves has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 8, if/else 5 (nesting depth added 3). Of this number, 13 points are the body's own statements and 13 belong to 4 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.
ChatHeader.ChatHeader (cognitive 26) packages/studio/src/components/chat/ChatHeader.tsx:161— ChatHeader.ChatHeader has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 9, ternaries 3. Of this number, 21 points are the body's own statements and 5 belong to 3 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.
VoiceoverPanel.VoiceoverPanel (cognitive 26) packages/studio/src/voice/panel/VoiceoverPanel.tsx:24— VoiceoverPanel.VoiceoverPanel has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 10, if/else 4 (nesting depth added 3). Of this number, 14 points are the body's own statements and 12 belong to 6 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.
AssetRangeStrip.AssetRangeStrip (cognitive 26) packages/studio/src/media/AssetRangeStrip.tsx:54— AssetRangeStrip.AssetRangeStrip has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 7 function items inside it that branch (keyDown, end, move, …). 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.
useKeyframeKeyboard.useKeyframeKeyboard (cognitive 26) packages/studio/src/hooks/useKeyframeKeyboard.ts:22— useKeyframeKeyboard.useKeyframeKeyboard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). None of this is in the body itself: all 26 points belong to 2 function literals inside it that branch (lines 33, 93). 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.
assetDownloader.deriveAssetName (cognitive 25) packages/cli/src/capture/assetDownloader.ts:711— assetDownloader.deriveAssetName has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 2 (3 pts), loops 2 (nesting depth added 5). 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, 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.
htmlCompiler.collectFontFaceUrls (cognitive 25) packages/producer/src/services/htmlCompiler.ts:1723— htmlCompiler.collectFontFaceUrls has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (9 pts), boolean chains 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.
captureHdrResources.extractHdrVideoFrames (cognitive 25) packages/producer/src/services/render/stages/captureHdrResources.ts:397— captureHdrResources.extractHdrVideoFrames has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (6 pts), boolean chains 1, error handling 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.
htmlBundler.rebaseEntryAuthoredAssetPaths (cognitive 25) packages/core/src/compiler/htmlBundler.ts:194— htmlBundler.rebaseEntryAuthoredAssetPaths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (7 pts), boolean chains 5 (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.
htmlBundler.autoHealMissingCompositionIds (cognitive 25) packages/core/src/compiler/htmlBundler.ts:634— htmlBundler.autoHealMissingCompositionIds has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (7 pts), boolean chains 5 (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.
validateVariables.checkType (cognitive 25) packages/core/src/runtime/validateVariables.ts:39— validateVariables.checkType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, 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.
colorGrading.resolveTarget (cognitive 25) packages/core/src/runtime/colorGrading.ts:2410— colorGrading.resolveTarget has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 2 (3 pts), ternaries 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.
threeDProjection.initThreeDProjectionInPage.update (cognitive 25) packages/engine/src/services/threeDProjection.ts:775— threeDProjection.initThreeDProjectionInPage.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 pts), boolean chains 3 (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.
frameCapture.closeCaptureSession (cognitive 25) packages/engine/src/services/frameCapture.ts:4569— frameCapture.closeCaptureSession has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, ternaries 2 (4 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.
composition.collectHeavyOverlayHooks (cognitive 25) packages/lint/src/rules/composition.ts:173— composition.collectHeavyOverlayHooks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (10 pts), boolean chains 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.
sync.planSync.decide (cognitive 25) packages/studio-server/src/story/sync.ts:578— sync.planSync.decide has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 6 (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.
usePreviewInteraction.usePreviewInteraction.handlePreviewCanvasMouseDown (cognitive 25) packages/studio/src/hooks/usePreviewInteraction.ts:87— usePreviewInteraction.usePreviewInteraction.handlePreviewCanvasMouseDown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, ternaries 2 (nesting depth added 3). Of this number, 24 points are the body's own statements and 1 belongs 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.
snapEngine.collectCandidates (cognitive 25) packages/studio/src/components/editor/snapEngine.ts:200— snapEngine.collectCandidates has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (9 pts), ternaries 1 (5 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.
designSaved.savedDesignsOfTurn (cognitive 25) packages/studio/src/design/designSaved.ts:16— designSaved.savedDesignsOfTurn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (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.
ChatView.statusSentence (cognitive 25) packages/studio/src/components/chat/ChatView.tsx:24— ChatView.statusSentence has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 1 (3 pts), 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.
shadows.CodeSliceShadows.draw (cognitive 25) registry/blocks/code-slice-hero/shadows.js:239— shadows.CodeSliceShadows.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (10 pts), boolean chains 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.
make-theme.paradigmLedboard (cognitive 25) skills/embedded-captions/scripts/make-theme.cjs:2076— make-theme.paradigmLedboard has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, ternaries 5, loops 2 (4 pts), if/else 1 (2 pts) (nesting depth added 3). Of this number, 23 points are the body's own statements and 2 belong to 3 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.
error-diffusion.applyErrorDiffusionRgba (cognitive 25) skills/media-use/scripts/lib/error-diffusion.mjs:118— error-diffusion.applyErrorDiffusionRgba has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 5 (8 pts), boolean chains 4 (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.
CodeSliceShadows.draw (cognitive 25) registry/blocks/code-slice-hero/shadows.js:239— CodeSliceShadows.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (10 pts), boolean chains 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.
mfluxImageGenerate (cognitive 25) packages/cli/src/media-use/lib/mflux-provider.mjs:31— mfluxImageGenerate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (8 pts), boolean chains 6, loops 1, other 1 (nesting depth added 8). Of this number, 23 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.
manager.ensureBrowserInCurrentProcess (cognitive 24) packages/cli/src/browser/manager.ts:682— manager.ensureBrowserInCurrentProcess has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 2 (4 pts) (nesting depth added 11). Of this number, 13 points are the body's own statements and 11 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.
assetDownloader.downloadAndRewriteFonts (cognitive 24) packages/cli/src/capture/assetDownloader.ts:536— assetDownloader.downloadAndRewriteFonts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, ternaries 3, error handling 1 (2 pts), loops 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 5 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.
captureCompositionFrame.seekCompositionTimeline (cognitive 24) packages/cli/src/capture/captureCompositionFrame.ts:238— captureCompositionFrame.seekCompositionTimeline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 249, 250, 256, …). 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.
htmlCompiler.resolveMediaDuration (cognitive 24) packages/producer/src/services/htmlCompiler.ts:435— htmlCompiler.resolveMediaDuration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (7 pts), ternaries 2, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 491, withSrcContext). 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.
htmlCompiler.inlineExternalScripts (cognitive 24) packages/producer/src/services/htmlCompiler.ts:1210— htmlCompiler.inlineExternalScripts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 9). Of this number, 22 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.
extractVideosStage.runExtractVideosStage (cognitive 24) packages/producer/src/services/render/stages/extractVideosStage.ts:372— extractVideosStage.runExtractVideosStage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 406, 462). 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.
checkBrowser.prepareContrast (cognitive 24) packages/cli/src/utils/checkBrowser.ts:882— checkBrowser.prepareContrast has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 6, if/else 4 (5 pts), loops 2 (nesting depth added 3). None of this is in the body itself: all 24 points belong to 4 function literals inside it that branch (lines 916, 894, 884, …). 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.
layout-audit.browser.containerOverflowIssues (cognitive 24) packages/cli/src/commands/layout-audit.browser.js:603— layout-audit.browser.containerOverflowIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). Of this number, 21 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.
layout-audit.browser.panelOutOfCanvasIssues (cognitive 24) packages/cli/src/commands/layout-audit.browser.js:1260— layout-audit.browser.panelOutOfCanvasIssues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, 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.
media.refreshRuntimeMediaCache (cognitive 24) packages/core/src/runtime/media.ts:102— media.refreshRuntimeMediaCache has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (8 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.
screenshotService.syncVideoFrameVisibility (cognitive 24) packages/engine/src/services/screenshotService.ts:846— screenshotService.syncVideoFrameVisibility has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, loops 2 (nesting depth added 10). None of this is in the body itself: all 24 points belong to 2 function literals inside it that branch (lines 851, 856). 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.
parity-harness.emulateProducerVideoSwap (cognitive 24) packages/producer/src/parity-harness.ts:161— parity-harness.emulateProducerVideoSwap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 163). 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.
regression-harness.run (cognitive 24) packages/producer/src/regression-harness.ts:1321— regression-harness.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 21 points are the body's own statements and 3 belong to 4 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.
gateway.createAgentGateway.handle (cognitive 24) packages/studio-server/src/agent/gateway.ts:502— gateway.createAgentGateway.handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, error handling 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.
ffmpegParse.parseSceneChanges (cognitive 24) packages/studio-server/src/analysis/ffmpegParse.ts:42— ffmpegParse.parseSceneChanges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (nesting depth added 10). Of this number, 22 points are the body's own statements and 2 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.
files.applyGsapMutations (cognitive 24) REDACTED:1358— files.applyGsapMutations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (6 pts), loops 2 (4 pts), error handling 1 (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.
opsAdd.addSequence (cognitive 24) packages/studio-server/src/editing/opsAdd.ts:192— opsAdd.addSequence has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 5 (7 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.
sync.planSync.workUnits (cognitive 24) packages/studio-server/src/story/sync.ts:454— sync.planSync.workUnits has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 4, if/else 4 (nesting depth added 6). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 469). 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.
ops.updateNode (cognitive 24) packages/studio-server/src/story/ops.ts:338— ops.updateNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (9 pts), boolean chains 5, loops 1 (nesting depth added 8). 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.
StoryService.execute (cognitive 24) packages/studio-server/src/story/service.ts:648— StoryService.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (8 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 9). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 659). 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.
sourcePatcher.splitInlineStyleDeclarations (cognitive 24) REDACTED:32— sourcePatcher.splitInlineStyleDeclarations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, loops 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.
timelineClipDragPreview.computeResizePreview (cognitive 24) packages/studio/src/player/components/timelineClipDragPreview.ts:259— timelineClipDragPreview.computeResizePreview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 4, ternaries 2 (nesting depth added 11). 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.
useGsapTweenCache.useGsapAnimationsForElement.animations (cognitive 24) packages/studio/src/hooks/useGsapTweenCache.ts:171— useGsapTweenCache.useGsapAnimationsForElement.animations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 14). 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.
useGsapTweenCache.usePopulateKeyframeCacheForFile (cognitive 24) packages/studio/src/hooks/useGsapTweenCache.ts:338— useGsapTweenCache.usePopulateKeyframeCacheForFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (4 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 24 points belong to 5 function literals inside it that branch (lines 420, 404, 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.
useTimelineFocusCoordinator.useTimelineFocusCoordinator (cognitive 24) packages/studio/src/player/components/useTimelineFocusCoordinator.ts:130— useTimelineFocusCoordinator.useTimelineFocusCoordinator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 180, 149). 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.
FileTreeIcons.FileIcon (cognitive 24) packages/studio/src/components/editor/FileTreeIcons.tsx:24— FileTreeIcons.FileIcon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, boolean chains 8. 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.
ProjectMentionMenu.ProjectPartsMenu (cognitive 24) packages/studio/src/components/chat/ProjectMentionMenu.tsx:176— ProjectMentionMenu.ProjectPartsMenu has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 6, if/else 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 239, 250). 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.
VoiceSetupCard.VoiceSetupCard (cognitive 24) packages/studio/src/components/chat/VoiceSetupCard.tsx:92— VoiceSetupCard.VoiceSetupCard has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 6 (7 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 10 belong to 5 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.
StorySectionStrip.StorySectionStrip (cognitive 24) packages/studio/src/story/StorySectionStrip.tsx:22— StorySectionStrip.StorySectionStrip has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13 (19 pts), boolean chains 3, if/else 1, loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 11 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.
AssetSearchPolicyView.AssetSearchPolicyView (cognitive 24) packages/studio/src/research/AssetSearchPolicyView.tsx:275— AssetSearchPolicyView.AssetSearchPolicyView has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 7, if/else 1 (4 pts) (nesting depth added 9). Of this number, 20 points are the body's own statements and 4 belong 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.
matte.main (cognitive 24) skills/embedded-captions/scripts/matte.cjs:119— matte.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, loops 2 (3 pts), ternaries 2, error handling 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.
analyze-beatgrid.analyze (cognitive 24) skills/music-to-video/scripts/analyze-beatgrid.py:408— analyze-beatgrid.analyze has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 8 (10 pts), boolean chains 1, 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.
pipeline.runPipeline (cognitive 23) packages/cli/src/background-removal/pipeline.ts:371— pipeline.runPipeline has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, ternaries 2 (3 pts), error handling 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.
normalize.interpolateZeroDuration (cognitive 23) packages/cli/src/whisper/normalize.ts:101— normalize.interpolateZeroDuration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 4 (8 pts), loops 3 (5 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.
fileServer.parseRangeHeader (cognitive 23) packages/producer/src/services/fileServer.ts:154— fileServer.parseRangeHeader has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3 (nesting depth added 4). 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.
htmlBundler.coalesceHeadStylesAndBodyScripts (cognitive 23) packages/core/src/compiler/htmlBundler.ts:711— htmlBundler.coalesceHeadStylesAndBodyScripts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 20 points are the body's own statements and 3 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.
positionEdits.installPositionEditsSeekReapply (cognitive 23) packages/core/src/runtime/positionEdits.ts:220— positionEdits.installPositionEditsSeekReapply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 5). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 9 function items inside it that branch (observeGlobalContainer, observeSeekProperty, isWrapped, …). 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.
frameCapture.captureFrameToBufferPipelined (cognitive 23) packages/engine/src/services/frameCapture.ts:4253— frameCapture.captureFrameToBufferPipelined has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (2 pts), error handling 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.
urlDownloader.reuseOrInvalidateCachedFile (cognitive 23) packages/engine/src/utils/urlDownloader.ts:1223— urlDownloader.reuseOrInvalidateCachedFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 3 (6 pts), boolean chains 1, loops 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.
gsapParser.unrollDynamicAnimations (cognitive 23) REDACTED:3382— gsapParser.unrollDynamicAnimations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (6 pts), boolean chains 4, loops 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.
HyperframesPlayer.attributeChangedCallback (cognitive 23) REDACTED:249— HyperframesPlayer.attributeChangedCallback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 1 (nesting depth added 8). 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.
audioExtractor.parseAudioElements (cognitive 23) packages/producer/src/services/audioExtractor.ts:35— audioExtractor.parseAudioElements has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (17 pts), boolean chains 3, if/else 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.
CompositionImpl._dispatch (cognitive 23) packages/sdk/src/session.ts:602— CompositionImpl._dispatch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 3 (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.
cutPlan.createCleaner (cognitive 23) packages/studio-server/src/analysis/cutPlan.ts:124— cutPlan.createCleaner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 pts), boolean chains 4, ternaries 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.
files.stripStudioEditsFromTarget (cognitive 23) REDACTED:869— files.stripStudioEditsFromTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 1, 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.
ResearchService.importLocked (cognitive 23) packages/studio-server/src/research/service.ts:719— ResearchService.importLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 1. Of this number, 15 points are the body's own statements and 8 belong to 5 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.
QaService.loadTimeline (cognitive 23) packages/studio-server/src/qa/service.ts:268— QaService.loadTimeline has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, error handling 3 (4 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 7). Of this number, 19 points are the body's own statements and 4 belong to 3 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.
projectDesign.registerProjectDesignRoutes (cognitive 23) packages/studio-server/src/routes/projectDesign.ts:74— projectDesign.registerProjectDesignRoutes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 3, error handling 1 (nesting depth added 1). None of this is in the body itself: all 23 points belong to 5 function literals inside it that branch (lines 88, 177, 159, …). 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.
sourcePatcher.resolveSourceFile (cognitive 23) REDACTED:113— sourcePatcher.resolveSourceFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), boolean chains 3 (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.
timelineIframeHelpers.autoHealMissingCompositionIds (cognitive 23) packages/studio/src/player/lib/timelineIframeHelpers.ts:51— timelineIframeHelpers.autoHealMissingCompositionIds has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (5 pts), boolean chains 4 (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.
Transform3DCube.Transform3DCube (cognitive 23) packages/studio/src/components/editor/Transform3DCube.tsx:30— Transform3DCube.Transform3DCube has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 6 (8 pts), boolean chains 4 (nesting depth added 2). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (onKeyDown, a function literal at line 87, onPointerMove, …). 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.
CreateDesignDialog.CreateDesignDialog (cognitive 23) packages/studio/src/design/CreateDesignDialog.tsx:48— CreateDesignDialog.CreateDesignDialog has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 5, if/else 2 (nesting depth added 4). Of this number, 19 points are the body's own statements and 4 belong to 2 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.
MediaBrowser.MediaBrowser (cognitive 23) packages/studio/src/media/MediaBrowser.tsx:91— MediaBrowser.MediaBrowser has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 104, a function literal at line 123, dropOn, …). 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.
portUtils.findPortAndServe (cognitive 22) packages/cli/src/server/portUtils.ts:446— portUtils.findPortAndServe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 1 (3 pts), boolean chains 1, 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.
init.applyResolutionPreset (cognitive 22) packages/cli/src/commands/init.ts:473— init.applyResolutionPreset has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 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.
checkBrowser.collectTweenBoundaries (cognitive 22) packages/cli/src/utils/checkBrowser.ts:476— checkBrowser.collectTweenBoundaries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 3 (4 pts), error handling 1 (2 pts), ternaries 2 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 4 function literals inside it that branch (lines 478, 479, 489, …). 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.
inspectSite.inspectSite (cognitive 22) packages/cli/src/siteInspect/inspectSite.ts:377— inspectSite.inspectSite has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), boolean chains 2, error handling 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.
resolve.runDoctor (cognitive 22) packages/cli/src/media-use/resolve.mjs:922— resolve.runDoctor has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 3, 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.
compositionLoader.assignRuntimeCompositionIds (cognitive 22) packages/core/src/runtime/compositionLoader.ts:331— compositionLoader.assignRuntimeCompositionIds has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, ternaries 1 (3 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.
ffprobe.extractPngMetadataFromBuffer (cognitive 22) packages/engine/src/utils/ffprobe.ts:503— ffprobe.extractPngMetadataFromBuffer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 1, 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.
chunkEncoder.encodeFramesChunkedConcat (cognitive 22) packages/engine/src/services/chunkEncoder.ts:631— chunkEncoder.encodeFramesChunkedConcat has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (8 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.
urlDownloader.fetchPublicHttpsBytes (cognitive 22) packages/engine/src/utils/urlDownloader.ts:535— urlDownloader.fetchPublicHttpsBytes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 2, 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.
videoFrameInjector.createVideoFrameInjector.<returned closure> (cognitive 22) packages/engine/src/services/videoFrameInjector.ts:207— videoFrameInjector.createVideoFrameInjector.<returned closure> has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts) (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.
utils.stripCssComments (cognitive 22) REDACTED:740— utils.stripCssComments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 pts) (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.
studioMotionRenderScript.studioMotionRenderRuntime::applyManifest (cognitive 22) packages/studio-server/src/helpers/studioMotionRenderScript.ts:208— studioMotionRenderScript.studioMotionRenderRuntime::applyManifest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, loops 1 (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.
RenderQueue.enqueue (cognitive 22) packages/studio-server/src/render/renderQueue.ts:230— RenderQueue.enqueue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, boolean chains 4, error handling 2, loops 1, ternaries 1. Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function items inside it that branch (tick, a function literal at line 279, publish, …). 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.
assets.resolveFont (cognitive 22) packages/studio-server/src/design/assets.ts:147— assets.resolveFont has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 2 (3 pts), loops 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.
policyStore.storedPolicyOf (cognitive 22) packages/studio-server/src/research/sources/policyStore.ts:97— policyStore.storedPolicyOf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 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.
gsapShared.parsePercentageKeyframes (cognitive 22) packages/studio/src/hooks/gsapShared.ts:410— gsapShared.parsePercentageKeyframes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 15 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.
timelineZMirror.resolveRepositionLaneMove (cognitive 22) packages/studio/src/player/components/timelineZMirror.ts:221— timelineZMirror.resolveRepositionLaneMove has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 3). Of this number, 19 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, 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.
manualEdits.isTimelinePlaying (cognitive 22) packages/studio/src/components/editor/manualEdits.ts:143— manualEdits.isTimelinePlaying has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 4 (9 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.
useGsapAnimationOps.useGsapAnimationOps.addGsapAnimation (cognitive 22) packages/studio/src/hooks/useGsapAnimationOps.ts:126— useGsapAnimationOps.useGsapAnimationOps.addGsapAnimation has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5 (8 pts), boolean chains 5 (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.
gsapDragCommit.commitWholePathOffset (cognitive 22) packages/studio/src/hooks/gsapDragCommit.ts:426— gsapDragCommit.commitWholePathOffset has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 3 (4 pts), boolean chains 3 (nesting depth added 9). 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 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.
gsapRuntimeBridge.tryGsapRotationIntercept (cognitive 22) packages/studio/src/hooks/gsapRuntimeBridge.ts:315— gsapRuntimeBridge.tryGsapRotationIntercept has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 6 (7 pts), boolean chains 4 (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.
useAnimatedPropertyCommit.useAnimatedPropertyCommit.commitAnimatedProperties (cognitive 22) packages/studio/src/hooks/useAnimatedPropertyCommit.ts:423— useAnimatedPropertyCommit.useAnimatedPropertyCommit.commitAnimatedProperties has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 4, error handling 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.
storyGraphOps.connectNodes (cognitive 22) packages/studio/src/story/storyGraphOps.ts:261— storyGraphOps.connectNodes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 5). 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 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.
AssetContextMenu.ContextMenu (cognitive 22) packages/studio/src/components/sidebar/AssetContextMenu.tsx:57— AssetContextMenu.ContextMenu has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 98, 130, 84, …). 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.
PermissionCard.PermissionCard (cognitive 22) packages/studio/src/components/chat/PermissionCard.tsx:138— PermissionCard.PermissionCard has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10, boolean chains 9, if/else 3. Of this number, 19 points are the body's own statements and 3 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.
ChapterInspector.ChapterInspector (cognitive 22) packages/studio/src/story/ChapterInspector.tsx:143— ChapterInspector.ChapterInspector has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 6, if/else 3 (nesting depth added 2). Of this number, 13 points are the body's own statements and 9 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.
VoiceLineCard.VoiceLineCard (cognitive 22) packages/studio/src/voice/panel/VoiceLineCard.tsx:46— VoiceLineCard.VoiceLineCard has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, ternaries 7, if/else 2. Of this number, 19 points are the body's own statements and 3 belong 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.
generator.generateJs (cognitive 22) packages/studio/src/captions/generator.ts:262— generator.generateJs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). Of this number, 20 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.
transcript-cut.run (cognitive 22) skills/media-use/scripts/transcript-cut.mjs:59— transcript-cut.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5 (7 pts), boolean chains 4 (nesting depth added 5). Of this number, 17 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.
transcribe.transcribe (cognitive 21) packages/cli/src/whisper/transcribe.ts:540— transcribe.transcribe has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (3 pts), error handling 1, ternaries 1 (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.
preview.runEmbeddedMode (cognitive 21) REDACTED:1548— preview.runEmbeddedMode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (3 pts), error handling 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 2 belong 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, 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.
video.streamToFile (cognitive 21) packages/cli/src/commands/capture/video.ts:11— video.streamToFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (4 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 6). Of this number, 20 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.
layout-audit.browser.imageAlphaAt (cognitive 21) packages/cli/src/commands/layout-audit.browser.js:898— layout-audit.browser.imageAlphaAt has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 5 (6 pts), boolean chains 5, error handling 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.
orphanBrowsers.sweepOrphanBrowsers (cognitive 21) packages/engine/src/services/orphanBrowsers.ts:205— orphanBrowsers.sweepOrphanBrowsers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts), 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.
frameCapture.collectMediaReadinessWarnings (cognitive 21) packages/engine/src/services/frameCapture.ts:1915— frameCapture.collectMediaReadinessWarnings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 4). None of this is in the body itself: all 21 points belong to 2 function items inside it that branch (a function literal at line 1920, append). 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.
frameCapture.captureDeVerificationFrames (cognitive 21) packages/engine/src/services/frameCapture.ts:4703— frameCapture.captureDeVerificationFrames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 19 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.
FrameLookupTable.refreshActiveSet (cognitive 21) packages/engine/src/services/videoFrameExtractor.ts:2474— FrameLookupTable.refreshActiveSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 2 (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.
gsapInline.isSafeDefaultExpression::visit (cognitive 21) packages/parsers/src/gsapInline.ts:258— gsapInline.isSafeDefaultExpression::visit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (4 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.
gsapParser.removeAllKeyframesFromScript (cognitive 21) REDACTED:2748— gsapParser.removeAllKeyframesFromScript has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), loops 1 (2 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.
regression-harness.discoverTestSuites (cognitive 21) packages/producer/src/regression-harness.ts:329— regression-harness.discoverTestSuites has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (tryAddSuite). 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.
CompositionImpl.getVariableUsage (cognitive 21) packages/sdk/src/session.ts:256— CompositionImpl.getVariableUsage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 9). Of this number, 20 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.
shots.realFreezes (cognitive 21) packages/studio-server/src/analysis/shots.ts:27— shots.realFreezes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 6). Of this number, 12 points are the body's own statements and 9 belong to 3 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.
transcript.normalizeWords (cognitive 21) packages/studio-server/src/analysis/transcript.ts:60— transcript.normalizeWords has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (nesting depth added 8). Of this number, 20 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.
JobRegistry.execute (cognitive 21) packages/studio-server/src/analysis/jobs.ts:164— JobRegistry.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 5 belong to 4 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.
mediaMetadata.probeMediaMetadata (cognitive 21) packages/studio-server/src/helpers/mediaMetadata.ts:187— mediaMetadata.probeMediaMetadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 2 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.
opsClips.setSpeed (cognitive 21) packages/studio-server/src/editing/opsClips.ts:350— opsClips.setSpeed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 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.
css.analyseCss::visit (cognitive 21) packages/studio-server/src/design/css.ts:42— css.analyseCss::visit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 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.
UrlGuard.vetUrl (cognitive 21) packages/studio-server/src/research/sources/urlPolicy.ts:88— UrlGuard.vetUrl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 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.
PolicyFetcher.download (cognitive 21) packages/studio-server/src/research/sources/policyFetch.ts:387— PolicyFetcher.download has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, error handling 1, 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.
timelineChecks.cutsInsideWords (cognitive 21) packages/studio-server/src/qa/timelineChecks.ts:279— timelineChecks.cutsInsideWords has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), boolean chains 4, 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.
EaseCurveSection.EaseCurveSection (cognitive 21) packages/studio/src/components/editor/EaseCurveSection.tsx:258— EaseCurveSection.EaseCurveSection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (handlePointerMove, a function literal at line 293, handlePointerUp, …). 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.
useRenderClipContent.useRenderClipContent (cognitive 21) packages/studio/src/hooks/useRenderClipContent.ts:112— useRenderClipContent.useRenderClipContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 126). 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.
studioUrlState.buildStudioHash (cognitive 21) packages/studio/src/utils/studioUrlState.ts:183— studioUrlState.buildStudioHash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 2 (4 pts), boolean chains 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.
FileTreeNodes.InlineInput (cognitive 21) packages/studio/src/components/editor/FileTreeNodes.tsx:199— FileTreeNodes.InlineInput has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3, ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (handleKeyDown, a function literal at line 225, handleBlur, …). 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.
TopologyLens.TopologyLens (cognitive 21) packages/studio/src/components/editor/TopologyLens.tsx:85— TopologyLens.TopologyLens has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 5. Of this number, 12 points are the body's own statements and 9 belong to 4 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.
propertyPanelColorGradingControls.ColorGradingControls (cognitive 21) packages/studio/src/components/editor/propertyPanelColorGradingControls.tsx:116— propertyPanelColorGradingControls.ColorGradingControls has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 9 (10 pts), if/else 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 8 belong to 5 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.
useColorGradingPreviews.useColorGradingPreviews (cognitive 21) packages/studio/src/components/editor/useColorGradingPreviews.ts:132— useColorGradingPreviews.useColorGradingPreviews has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, ternaries 4 (5 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 187, 200, 160, …). 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.
propertyPanelAudioFxGroup.AudioFxGroup (cognitive 21) packages/studio/src/components/editor/propertyPanelAudioFxGroup.tsx:89— propertyPanelAudioFxGroup.AudioFxGroup has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 6, error handling 2, loops 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 155, automateParam, a function literal at line 113, …). 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.
VoiceCatalogPicker.VoiceCatalogPicker (cognitive 21) packages/studio/src/voice/VoiceCatalogPicker.tsx:90— VoiceCatalogPicker.VoiceCatalogPicker has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 4, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 246, a function literal at line 134, a function literal at line 156, …). 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.
check-occlusion.hfResolve (cognitive 21) skills/embedded-captions/scripts/check-occlusion.cjs:12— check-occlusion.hfResolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), error handling 2 (5 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.
check-rail-climax.visibleAt (cognitive 21) skills/embedded-captions/scripts/check-rail-climax.cjs:116— check-rail-climax.visibleAt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). None of this is in the body itself: all 21 points belong to 2 function literals inside it that branch (lines 118, 122). 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.
make-theme.paradigmPoem (cognitive 21) skills/embedded-captions/scripts/make-theme.cjs:870— make-theme.paradigmPoem has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 8, if/else 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 6 belong 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.
make-theme.paradigmLastpage (cognitive 21) skills/embedded-captions/scripts/make-theme.cjs:1768— make-theme.paradigmLastpage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 6, if/else 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 8 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.
safe-zones.scenePalette (cognitive 21) skills/embedded-captions/scripts/safe-zones.cjs:353— safe-zones.scenePalette has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 3, 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.
gemini-tts.synthesizeGemini (cognitive 21) skills/media-use/audio/scripts/lib/gemini-tts.mjs:17— gemini-tts.synthesizeGemini has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 3 (4 pts), error handling 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.
speechSpans (cognitive 21) packages/cli/src/media-use/lib/duck.mjs:4— speechSpans has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (3 pts), ternaries 2, other 1 (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.
cli.executeCli (cognitive 20) packages/cli/src/cli.ts:330— cli.executeCli has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 1 (4 pts), error handling 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.
contrast-audit.browser.__contrastAuditRestoreAll (cognitive 20) REDACTED:295— contrast-audit.browser.__contrastAuditRestoreAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), 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.
layout-audit.browser.arcHubForSvg (cognitive 20) packages/cli/src/commands/layout-audit.browser.js:2017— layout-audit.browser.arcHubForSvg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 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.
media-search.rankMediaRows (cognitive 20) packages/cli/src/media-use/lib/media-search.mjs:35— media-search.rankMediaRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 6). Of this number, 14 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.
heygen-video-provider.heygenVideoGenerate (cognitive 20) packages/cli/src/media-use/lib/heygen-video-provider.mjs:46— heygen-video-provider.heygenVideoGenerate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (6 pts), boolean chains 3 (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.
previewMediaBudget.planPreviewMediaBudget (cognitive 20) packages/core/src/runtime/previewMediaBudget.ts:150— previewMediaBudget.planPreviewMediaBudget has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 6, if/else 3 (6 pts), loops 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 2 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.
systemFontLocator.readSystemProfilerIndex (cognitive 20) packages/core/src/fonts/systemFontLocator.ts:252— systemFontLocator.readSystemProfilerIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 pts), error handling 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.
drawElementService.initDrawElementWorkerEncode (cognitive 20) packages/engine/src/services/drawElementService.ts:614— drawElementService.initDrawElementWorkerEncode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 637, 666). 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.
frameCapture.verifyStaticFramesSafe (cognitive 20) packages/engine/src/services/frameCapture.ts:3290— frameCapture.verifyStaticFramesSafe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 5 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.
frameCapture.armStaticDedup (cognitive 20) packages/engine/src/services/frameCapture.ts:3399— frameCapture.armStaticDedup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 2 (3 pts), error handling 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.
gsap.extractGsapWindows (cognitive 20) REDACTED:127— gsap.extractGsapWindows has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 3 (4 pts), boolean chains 1, 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.
project.lintTextureMaskAssetNotFound (cognitive 20) REDACTED:503— project.lintTextureMaskAssetNotFound has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 12). 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, 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.
variableUsage.scanVariableUsage (cognitive 20) packages/parsers/src/variableUsage.ts:111— variableUsage.scanVariableUsage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 1 (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.
iframe.parseObjectPosition (cognitive 20) packages/sdk/src/adapters/iframe.ts:213— iframe.parseObjectPosition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (resolveToken, isVert, isHoriz). 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.
gateway.createAgentGateway.launchRuntime (cognitive 20) packages/studio-server/src/agent/gateway.ts:298— gateway.createAgentGateway.launchRuntime has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 3, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 3 belong 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, 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.
takes.detectTakeIssues.detectCorrections (cognitive 20) packages/studio-server/src/analysis/takes.ts:669— takes.detectTakeIssues.detectCorrections has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, ternaries 1 (2 pts), 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.
commit.commitWrites (cognitive 20) packages/studio-server/src/editing/commit.ts:35— commit.commitWrites has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), ternaries 2, boolean chains 1, error handling 1 (nesting depth added 6). Of this number, 15 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.
DesignLibrary.commit (cognitive 20) packages/studio-server/src/design/library.ts:233— DesignLibrary.commit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 4). Of this number, 19 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.
sourcesView.readReferences (cognitive 20) packages/studio-server/src/research/sourcesView.ts:48— sourcesView.readReferences has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), error handling 1 (2 pts), boolean chains 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.
cues.readCaptionCues (cognitive 20) packages/studio-server/src/qa/cues.ts:29— cues.readCaptionCues has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, if/else 4 (5 pts), error handling 1, 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.
elevenlabs.entryOf (cognitive 20) packages/studio-server/src/voice/connectors/elevenlabs.ts:133— elevenlabs.entryOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 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.
sourcePatcher.patchInlineStyleInTag (cognitive 20) REDACTED:178— sourcePatcher.patchInlineStyleInTag has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), loops 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.
automationSimplify.simplifyPoints (cognitive 20) packages/studio/src/player/components/automationSimplify.ts:11— automationSimplify.simplifyPoints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 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.
useTimelineKeyboardActor.useTimelineKeyboardActor.onKeyDown (cognitive 20) packages/studio/src/player/components/useTimelineKeyboardActor.ts:97— useTimelineKeyboardActor.useTimelineKeyboardActor.onKeyDown has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts) (nesting depth added 2). 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.
useTimelinePlayerLoop.useTimelinePlayerLoop.startRAFLoop::tick (cognitive 20) packages/studio/src/player/hooks/useTimelinePlayerLoop.ts:45— useTimelinePlayerLoop.useTimelinePlayerLoop.startRAFLoop::tick has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (9 pts), boolean chains 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.
gsapUndoRestore.applyUndoRestoreToPreview (cognitive 20) packages/studio/src/utils/gsapUndoRestore.ts:181— gsapUndoRestore.applyUndoRestoreToPreview has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 2, error handling 1, 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.
velocityEaseFitter.fitEasesFromVelocity (cognitive 20) packages/studio/src/utils/velocityEaseFitter.ts:62— velocityEaseFitter.fitEasesFromVelocity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). 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, 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.
clipboardPayload.insertAsSibling (cognitive 20) REDACTED:80— clipboardPayload.insertAsSibling has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (3 pts) (nesting depth added 11). 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.
DesignCurrent.DesignCurrent (cognitive 20) packages/studio/src/design/DesignCurrent.tsx:30— DesignCurrent.DesignCurrent has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (17 pts), boolean chains 2, if/else 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.
propertyPanelFlatSliderReadout.FlatSliderReadout (cognitive 20) packages/studio/src/components/editor/propertyPanelFlatSliderReadout.tsx:5— propertyPanelFlatSliderReadout.FlatSliderReadout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 6 (7 pts), boolean chains 4 (nesting depth added 2). Of this number, 10 points are the body's own statements and 10 belong to 5 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.
propertyPanelColorSecondary.PropertyPanelColorSecondary (cognitive 20) packages/studio/src/components/editor/propertyPanelColorSecondary.tsx:68— propertyPanelColorSecondary.PropertyPanelColorSecondary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 88, a function literal at line 190, replaceSelected, …). 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.
CaptionAnimationPanel.CaptionAnimationPanel (cognitive 20) packages/studio/src/captions/components/CaptionAnimationPanel.tsx:193— CaptionAnimationPanel.CaptionAnimationPanel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (3 pts), ternaries 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 4 belong to 4 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.
RenderQueueItem.RenderQueueItem (cognitive 20) packages/studio/src/components/renders/RenderQueueItem.tsx:95— RenderQueueItem.RenderQueueItem has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 2, if/else 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.
VoiceKeyControl.VoiceKeyControl (cognitive 20) packages/studio/src/voice/VoiceKeyControl.tsx:19— VoiceKeyControl.VoiceKeyControl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 belong to 6 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.
ChapterTimelineSection.ChapterTimelineSection (cognitive 20) packages/studio/src/story/ChapterTimelineSection.tsx:15— ChapterTimelineSection.ChapterTimelineSection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (7 pts), boolean chains 6 (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.
storyDrop.dropOnStory (cognitive 20) packages/studio/src/story/storyDrop.ts:53— storyDrop.dropOnStory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 18 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.
SourceRecord.SourceRecord (cognitive 20) packages/studio/src/research/SourceRecord.tsx:80— SourceRecord.SourceRecord has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 8, if/else 1 (nesting depth added 3). 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, 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.
make-theme.paradigmFlaprail (cognitive 20) skills/embedded-captions/scripts/make-theme.cjs:1872— make-theme.paradigmFlaprail has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, ternaries 7. 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, 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.
make-theme.paradigmHudrail (cognitive 20) skills/embedded-captions/scripts/make-theme.cjs:2475— make-theme.paradigmHudrail has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 18 points are the body's own statements and 2 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.
make-theme.paradigmPlanktonrail (cognitive 20) skills/embedded-captions/scripts/make-theme.cjs:3286— make-theme.paradigmPlanktonrail has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 7, if/else 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 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.
animation-map.detectStaggers (cognitive 20) skills/hyperframes-animation/scripts/animation-map.mjs:477— animation-map.detectStaggers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), ternaries 1 (3 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.
carve.main (cognitive 20) skills/hyperframes-audio/scripts/carve.mjs:380— carve.main has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 5, boolean chains 2, loops 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 4 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.
contrast-report.restoreTextElements (cognitive 20) skills/hyperframes-creative/scripts/contrast-report.mjs:291— contrast-report.restoreTextElements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (nesting depth added 8). None of this is in the body itself: all 20 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.
duck.speechSpans (cognitive 20) skills/media-use/scripts/lib/duck.mjs:4— duck.speechSpans has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (3 pts), 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.
eval.generateReport (cognitive 20) skills/media-use/scripts/eval.mjs:192— eval.generateReport has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 217, 198, 219, …). 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.
htmlCompiler.compileForRender (cognitive 19) packages/producer/src/services/htmlCompiler.ts:1987— htmlCompiler.compileForRender has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 6, ternaries 4, boolean chains 2 (nesting depth added 3). Of this number, 15 points are the body's own statements and 4 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.
hdrCompositor.blitHdrImageLayer (cognitive 19) packages/producer/src/services/hdrCompositor.ts:334— hdrCompositor.blitHdrImageLayer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 5, error handling 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 4 belong 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, 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.
captureStreamingStage.runWorkerEncodePipelineLoop (cognitive 19) packages/producer/src/services/render/stages/captureStreamingStage.ts:452— captureStreamingStage.runWorkerEncodePipelineLoop has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 4 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 4 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.
renderOrchestrator.probeAdaptersUsed (cognitive 19) REDACTED:1976— renderOrchestrator.probeAdaptersUsed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 5, error handling 1. Of this number, 16 points are the body's own statements and 3 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.
validate.validateInBrowser (cognitive 19) packages/cli/src/commands/validate.ts:386— validate.validateInBrowser has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 490, 456, 477, …). 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.
colorGrading.createColorGradingRuntime::getStatus (cognitive 19) packages/core/src/runtime/colorGrading.ts:3709— colorGrading.createColorGradingRuntime::getStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, ternaries 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.
threeDProjection.initThreeDProjectionInPage.buildFontCss (cognitive 19) packages/engine/src/services/threeDProjection.ts:199— threeDProjection.initThreeDProjectionInPage.buildFontCss has cognitive complexity 19 (threshold 15). Drivers by points: if/else 2 (7 pts), error handling 2 (6 pts), loops 3 (6 pts) (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.
frameCapture.computeTimelineAtRiskFrames (cognitive 19) packages/engine/src/services/frameCapture.ts:3545— frameCapture.computeTimelineAtRiskFrames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 3581, 3549). 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.
ffprobe.probeAudioMetadataUncached (cognitive 19) packages/engine/src/utils/ffprobe.ts:958— ffprobe.probeAudioMetadataUncached has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 5, error handling 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 962). 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.
gsap.objectLiteralHasTopLevelRelativeValue (cognitive 19) REDACTED:684— gsap.objectLiteralHasTopLevelRelativeValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, 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.
assetUrls.rewriteSrcset (cognitive 19) packages/parsers/src/assetUrls.ts:50— assetUrls.rewriteSrcset has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), loops 3 (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.
gsapParser.removeKeyframeFromScript (cognitive 19) REDACTED:2389— gsapParser.removeKeyframeFromScript has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 6). 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.
playback-state.applyRuntimeStateMessage (cognitive 19) packages/player/src/playback-state.ts:57— playback-state.applyRuntimeStateMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, 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.
Engine.confirmUnmoved (cognitive 19) packages/studio-server/src/history/projectHistory.ts:945— Engine.confirmUnmoved has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (look, a function literal at line 978, a function literal at line 966, …). 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.
segmentation.semanticSegments (cognitive 19) packages/studio-server/src/analysis/segmentation.ts:336— segmentation.semanticSegments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 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.
AnalysisStore.adopt (cognitive 19) packages/studio-server/src/analysis/store.ts:518— AnalysisStore.adopt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 520). 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.
takes.detectTakeIssues.detectPrefixRestarts (cognitive 19) packages/studio-server/src/analysis/takes.ts:538— takes.detectTakeIssues.detectPrefixRestarts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 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.
takes.detectTakeIssues.detectStutters (cognitive 19) packages/studio-server/src/analysis/takes.ts:708— takes.detectTakeIssues.detectStutters has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (7 pts), boolean chains 6, if/else 3 (6 pts) (nesting depth added 7). Of this number, 18 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.
sourceMutation.wrapElementsInHtml (cognitive 19) packages/studio-server/src/helpers/sourceMutation.ts:533— sourceMutation.wrapElementsInHtml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 3, 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.
preview.registerPreviewRoutes::buildPreview (cognitive 19) packages/studio-server/src/routes/preview.ts:375— preview.registerPreviewRoutes::buildPreview has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 1, error handling 1 (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.
story.registerStoryRoutes (cognitive 19) REDACTED:58— story.registerStoryRoutes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 5). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 69, 133). 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.
gsapShared.resolveSelectorElementIds (cognitive 19) packages/studio/src/hooks/gsapShared.ts:138— gsapShared.resolveSelectorElementIds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), error handling 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.
gsapShared.structuralSelector (cognitive 19) packages/studio/src/hooks/gsapShared.ts:210— gsapShared.structuralSelector has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), 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.
domEditingLayers.collectDomEditTextFields (cognitive 19) packages/studio/src/components/editor/domEditingLayers.ts:89— domEditingLayers.collectDomEditTextFields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). 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, 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.
timelineClipDragCommit.buildTrackInsertEdits (cognitive 19) packages/studio/src/player/components/timelineClipDragCommit.ts:333— timelineClipDragCommit.buildTrackInsertEdits 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). 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.
useProjectFileWriter.useProjectFileWriter (cognitive 19) packages/studio/src/hooks/useProjectFileWriter.ts:19— useProjectFileWriter.useProjectFileWriter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 90, 65, 34, …). 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.
useMusicBeatAnalysis.useMusicBeatAnalysis (cognitive 19) packages/studio/src/hooks/useMusicBeatAnalysis.ts:106— useMusicBeatAnalysis.useMusicBeatAnalysis has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 159, 135, 194, …). 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.
canvasContextMenuZOrder.renumberScoped (cognitive 19) packages/studio/src/components/editor/canvasContextMenuZOrder.ts:314— canvasContextMenuZOrder.renumberScoped has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 9). Of this number, 14 points are the body's own statements and 5 belong to 3 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.
gestureSmoother.smoothGestureKeyframes (cognitive 19) packages/studio/src/utils/gestureSmoother.ts:15— gestureSmoother.smoothGestureKeyframes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 26). 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.
PreviewOverlays.PreviewOverlays (cognitive 19) packages/studio/src/components/nle/PreviewOverlays.tsx:129— PreviewOverlays.PreviewOverlays has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, if/else 4, loops 1 (2 pts) (nesting depth added 4). Of this number, 15 points are the body's own statements and 4 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.
useTimelineSelectionPreviewSync.useTimelineSelectionPreviewSync (cognitive 19) packages/studio/src/hooks/useTimelineSelectionPreviewSync.ts:103— useTimelineSelectionPreviewSync.useTimelineSelectionPreviewSync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 5). None of this is in the body itself: all 19 points belong to 3 function literals inside it that branch (lines 128, 178, 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.
propertyPanelHelpers.buildElementInfoText (cognitive 19) packages/studio/src/components/editor/propertyPanelHelpers.ts:547— propertyPanelHelpers.buildElementInfoText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (5 pts), boolean chains 3, error handling 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.
propertyPanelGradingNumberField.GradingNumberField (cognitive 19) packages/studio/src/components/editor/propertyPanelGradingNumberField.tsx:4— propertyPanelGradingNumberField.GradingNumberField has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3 (nesting depth added 3). None of this is in the body itself: all 19 points belong to 4 function items inside it that branch (settle, a function literal at line 85, a function literal at line 99, …). 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.
propertyPanelFlatColorGradingSection.FlatColorGradingSection (cognitive 19) packages/studio/src/components/editor/propertyPanelFlatColorGradingSection.tsx:101— propertyPanelFlatColorGradingSection.FlatColorGradingSection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11, boolean chains 7, if/else 1. Of this number, 11 points are the body's own statements and 8 belong to 8 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.
layersPanelSort.sortLayersByZIndex (cognitive 19) packages/studio/src/components/editor/layersPanelSort.ts:10— layersPanelSort.sortLayersByZIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 6). 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.
SlideshowSubPanels.BranchItem (cognitive 19) packages/studio/src/components/panels/SlideshowSubPanels.tsx:326— SlideshowSubPanels.BranchItem has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 3 (4 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 419, 341, 357, …). 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.
useEnableKeyframes.useEnableKeyframes (cognitive 19) packages/studio/src/hooks/useEnableKeyframes.ts:471— useEnableKeyframes.useEnableKeyframes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3 (nesting depth added 4). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 474, 497, 498, …). 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.
shadows.CodeSliceShadows.prepare (cognitive 19) registry/blocks/code-slice-hero/shadows.js:122— shadows.CodeSliceShadows.prepare has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (8 pts), ternaries 1 (2 pts) (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.
orbit-scene.createOrbitScene (cognitive 19) registry/blocks/orbit-card/assets/orbit-scene.js:6— orbit-scene.createOrbitScene has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), loops 4, boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (channelAt, paintCopy, cameraAt, …). 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.
preview-frames.shotAt (cognitive 19) skills/embedded-captions/scripts/preview-frames.cjs:92— preview-frames.shotAt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 2, loops 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 105, 132, 137). 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.
animation-map.enumerateTweens (cognitive 19) skills/hyperframes-animation/scripts/animation-map.mjs:186— animation-map.enumerateTweens has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 4, loops 2 (3 pts) (nesting depth added 1). None of this is in the body itself: all 19 points belong to 3 function literals inside it that branch (lines 198, 191, 187). 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.
design-picker.html.renderMoodBoards (cognitive 19) skills/hyperframes-creative/templates/design-picker.html:873— design-picker.html.renderMoodBoards has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 16, ternaries 3. None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 876). 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.
design-picker.html.renderPreview (cognitive 19) skills/hyperframes-creative/templates/design-picker.html:1230— design-picker.html.renderPreview has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, ternaries 8, if/else 3. 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.
bake-basemap.resolveChrome (cognitive 19) skills/motion-graphics/categories/maps/bake-basemap.mjs:30— bake-basemap.resolveChrome has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1, ternaries 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.
CodeSliceShadows.prepare (cognitive 19) registry/blocks/code-slice-hero/shadows.js:122— CodeSliceShadows.prepare has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (8 pts), ternaries 1 (2 pts) (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.
collectGeometryCandidates (cognitive 19) packages/cli/src/commands/layout-audit.browser.js:1720— collectGeometryCandidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1, ternaries 1 (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.
ingest (cognitive 19) packages/cli/src/media-use/resolve.mjs:809— ingest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 2 (3 pts), ternaries 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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.
skillsManifest.resolveBundledManifest (cognitive 18) packages/cli/src/utils/skillsManifest.ts:491— skillsManifest.resolveBundledManifest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 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.
agentPromptGenerator.buildPrompt (cognitive 18) packages/cli/src/capture/agentPromptGenerator.ts:60— agentPromptGenerator.buildPrompt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 1). 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, 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.
contactSheet.createSvgContactSheet (cognitive 18) packages/cli/src/capture/contactSheet.ts:281— contactSheet.createSvgContactSheet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (5 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 17 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.
transcribe.detectSpeechOnset (cognitive 18) packages/cli/src/whisper/transcribe.ts:205— transcribe.detectSpeechOnset has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), ternaries 1 (4 pts), error handling 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.
fileWatcher.watchProjectTree (cognitive 18) packages/cli/src/server/fileWatcher.ts:66— fileWatcher.watchProjectTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 2, loops 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 5 function items inside it that branch (watchDirectory, unwatch, a function literal at line 72, …). 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.
deterministicFonts.parseFontFamilyValue (cognitive 18) packages/producer/src/services/deterministicFonts.ts:71— deterministicFonts.parseFontFamilyValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 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.
htmlCompiler.assertSubCompositionsUsable (cognitive 18) packages/producer/src/services/htmlCompiler.ts:198— htmlCompiler.assertSubCompositionsUsable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (2 pts), 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.
observability.summarizeBrowserDiagnostics (cognitive 18) packages/producer/src/services/render/observability.ts:397— observability.summarizeBrowserDiagnostics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, 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.
captureStage.runCaptureStage (cognitive 18) packages/producer/src/services/render/stages/captureStage.ts:284— captureStage.runCaptureStage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, ternaries 1 (nesting depth added 7). Of this number, 13 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.
layout-audit.browser.__hyperframesGeometryCandidates (cognitive 18) packages/cli/src/commands/layout-audit.browser.js:1720— layout-audit.browser.__hyperframesGeometryCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1, ternaries 1 (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.
picker.createPickerModule.getPickCandidatesFromPoint (cognitive 18) packages/core/src/runtime/picker.ts:217— picker.createPickerModule.getPickCandidatesFromPoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2, 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.
ffprobe.hasCompletePngStructure (cognitive 18) packages/engine/src/utils/ffprobe.ts:420— ffprobe.hasCompletePngStructure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 1, loops 1 (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.
audioMixer.extractAudioFromVideo (cognitive 18) packages/engine/src/services/audioMixer.ts:684— audioMixer.extractAudioFromVideo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (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.
media.srcKind (cognitive 18) packages/lint/src/rules/media.ts:82— media.srcKind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 1 (nesting depth added 4). 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.
gsap.collectMeasuringFunctionNames (cognitive 18) REDACTED:827— gsap.collectMeasuringFunctionNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 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.
gsap.resolveScriptElementTokens (cognitive 18) REDACTED:861— gsap.resolveScriptElementTokens has cognitive complexity 18 (threshold 15). Drivers by points: loops 9 (13 pts), if/else 2 (5 pts) (nesting depth added 7). 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.
project.lintAudioSrcNotFound (cognitive 18) REDACTED:396— project.lintAudioSrcNotFound has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (5 pts), loops 3 (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.
gsapParser.parseObjectArrayKeyframes (cognitive 18) REDACTED:832— gsapParser.parseObjectArrayKeyframes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 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.
gsapParser.syncPositionHoldsBeforeKeyframes (cognitive 18) REDACTED:1842— gsapParser.syncPositionHoldsBeforeKeyframes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), error handling 2, boolean chains 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.
gsapParserAcorn.collectTargetBindings (cognitive 18) REDACTED:446— gsapParserAcorn.collectTargetBindings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8 (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.
gsapParserAcorn.extractTimelineDefaults (cognitive 18) REDACTED:770— gsapParserAcorn.extractTimelineDefaults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 5). Of this number, 17 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.
gsapParserAcorn.gsapScriptMotionPathFirstUseIndex (cognitive 18) REDACTED:1963— gsapParserAcorn.gsapScriptMotionPathFirstUseIndex has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 2, error handling 1, loops 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.
controls.createControls (cognitive 18) packages/player/src/controls.ts:53— controls.createControls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, loops 1, 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 5 function literals inside it that branch (lines 238, 178, 218, …). 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.
ShaderLoaderState.update (cognitive 18) packages/player/src/shader-loader-state.ts:80— ShaderLoaderState.update has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (7 pts), if/else 3 (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.
benchmark.discoverFixtures (cognitive 18) packages/producer/src/benchmark.ts:116— benchmark.discoverFixtures has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (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.
iframe.mapPointToImagePixel (cognitive 18) packages/sdk/src/adapters/iframe.ts:135— iframe.mapPointToImagePixel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, 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.
appliedCuts.readAppliedCuts (cognitive 18) packages/studio-server/src/analysis/appliedCuts.ts:26— appliedCuts.readAppliedCuts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 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.
levels.detectSilences (cognitive 18) packages/studio-server/src/analysis/levels.ts:70— levels.detectSilences has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 2 (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.
speakers.absorbMicroSpeakers (cognitive 18) packages/studio-server/src/analysis/speakers.ts:40— speakers.absorbMicroSpeakers has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 3, ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 54, isMicro). 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.
takes.detectTakeIssues (cognitive 18) packages/studio-server/src/analysis/takes.ts:144— takes.detectTakeIssues has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 2 (5 pts), boolean chains 4 (nesting depth added 6). Of this number, 17 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.
takes.detectTakeIssues.detectCorrectionSentences (cognitive 18) packages/studio-server/src/analysis/takes.ts:427— takes.detectTakeIssues.detectCorrectionSentences has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (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.
preferences.normalize (cognitive 18) packages/studio-server/src/app/preferences.ts:237— preferences.normalize has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 18. 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.
StoryService.plan (cognitive 18) packages/studio-server/src/story/service.ts:314— StoryService.plan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 1, 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.
importFiles.presentFiles (cognitive 18) packages/studio-server/src/crossProject/importFiles.ts:138— importFiles.presentFiles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, error handling 1 (2 pts), 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.
renderChecks.withoutStaticSources (cognitive 18) packages/studio-server/src/qa/renderChecks.ts:102— renderChecks.withoutStaticSources has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (6 pts), boolean chains 2, error handling 1 (2 pts), 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.
gemini.fail (cognitive 18) packages/studio-server/src/voice/connectors/gemini.ts:75— gemini.fail has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 3 (5 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.
engine.sanitizeSettings (cognitive 18) packages/studio-server/src/voice/engine.ts:109— engine.sanitizeSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 3 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.
domEditingDom.escapeCssIdentifier (cognitive 18) packages/studio/src/components/editor/domEditingDom.ts:222— domEditingDom.escapeCssIdentifier has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), loops 1 (nesting depth added 3). 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.
gsapRuntimeKeyframes.hasNonHoldTweenForElement (cognitive 18) packages/studio/src/hooks/gsapRuntimeKeyframes.ts:383— gsapRuntimeKeyframes.hasNonHoldTweenForElement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, 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.
snapEngine.resolveEquidistanceGuides (cognitive 18) packages/studio/src/components/editor/snapEngine.ts:452— snapEngine.resolveEquidistanceGuides has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 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.
agentStore.createAgentStore.store.send (cognitive 18) packages/studio/src/agent/agentStore.ts:493— agentStore.createAgentStore.store.send has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 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.
useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.keepStudioFile (cognitive 18) packages/studio/src/hooks/useExternalFileChangeCoordinator.ts:494— useExternalFileChangeCoordinator.useExternalFileChangeCoordinator.keepStudioFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 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.
useSdkSession.useSdkSession (cognitive 18) packages/studio/src/hooks/useSdkSession.ts:315— useSdkSession.useSdkSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 2. Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 412, 380, 409, …). 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.
rdpSimplify.simplifyGestureSamples (cognitive 18) packages/studio/src/utils/rdpSimplify.ts:97— rdpSimplify.simplifyGestureSamples has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 7). 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.
clipboardPayload.deserializeClipboardPayload (cognitive 18) REDACTED:33— clipboardPayload.deserializeClipboardPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 5). Of this number, 17 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.
clipboardPayload.findClosingTagPosition (cognitive 18) REDACTED:130— clipboardPayload.findClosingTagPosition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (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.
ProjectTabStrip.ProjectTabStripView (cognitive 18) packages/studio/src/components/shell/ProjectTabStrip.tsx:74— ProjectTabStrip.ProjectTabStripView has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 5, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 161, onTabKeyDown, switchable, …). 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.
voiceClient.failureOf (cognitive 18) packages/studio/src/voice/voiceClient.ts:158— voiceClient.failureOf has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts), if/else 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 3 belong 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.
propertyPanelFlatEffectsSection.FlatEffectsSection (cognitive 18) packages/studio/src/components/editor/propertyPanelFlatEffectsSection.tsx:60— propertyPanelFlatEffectsSection.FlatEffectsSection has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 3. Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 90, renderPalette, a function literal at line 150, …). 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.
QuestionCard.QuestionCard (cognitive 18) packages/studio/src/components/chat/QuestionCard.tsx:21— QuestionCard.QuestionCard has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 6, if/else 3 (nesting depth added 2). 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: 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.
MaterialInspector.KindFields (cognitive 18) packages/studio/src/story/MaterialInspector.tsx:124— MaterialInspector.KindFields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), boolean chains 5, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 216, 151, 152, …). 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.
make-theme.paradigmVhsrail (cognitive 18) skills/embedded-captions/scripts/make-theme.cjs:2238— make-theme.paradigmVhsrail has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 4, if/else 2. Of this number, 14 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.
make-theme.paradigmMarkerrail (cognitive 18) skills/embedded-captions/scripts/make-theme.cjs:4385— make-theme.paradigmMarkerrail has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 12 points are the body's own statements and 6 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.
make-theme.setpieceHoloboot (cognitive 18) skills/embedded-captions/scripts/make-theme.cjs:6372— make-theme.setpieceHoloboot has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 4, loops 2. 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.
analyze-beatgrid.energy_structure (cognitive 18) skills/music-to-video/scripts/analyze-beatgrid.py:183— analyze-beatgrid.energy_structure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), loops 3, boolean chains 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.
lint_source._find_matching_paren (cognitive 18) skills/remotion-to-hyperframes/scripts/lint_source.py:244— lint_source._find_matching_paren has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, 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.
visibleTextClientRects (cognitive 18) packages/cli/src/commands/layout-audit.browser.js:281— visibleTextClientRects has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 5, if/else 2 (4 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 296). 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.
thesvgMatch (cognitive 18) packages/cli/src/media-use/lib/logo-provider.mjs:93— thesvgMatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 1 belongs 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.
skillsManifest.bundledSkillsRoot (cognitive 17) packages/cli/src/utils/skillsManifest.ts:445— skillsManifest.bundledSkillsRoot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 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.
mediaCapture.downloadVideoBody (cognitive 17) packages/cli/src/capture/mediaCapture.ts:245— mediaCapture.downloadVideoBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, error handling 2, loops 1, 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.
local.localRegistryRoot (cognitive 17) packages/cli/src/registry/local.ts:27— local.localRegistryRoot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 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.
htmlCompiler.discoverMediaFromBrowser (cognitive 17) packages/producer/src/services/htmlCompiler.ts:2256— htmlCompiler.discoverMediaFromBrowser has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 4 (5 pts) (nesting depth added 1). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 2290, 2348, 2277, …). 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.
audioPadTrim.enforceAacTruePeak (cognitive 17) packages/producer/src/services/render/audioPadTrim.ts:427— audioPadTrim.enforceAacTruePeak has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, error handling 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.
renderOrchestrator.scanElementTags (cognitive 17) REDACTED:1694— renderOrchestrator.scanElementTags has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (6 pts), error handling 1 (2 pts), boolean chains 1 (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.
layout.getCompositionDuration (cognitive 17) packages/cli/src/commands/layout.ts:79— layout.getCompositionDuration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 5). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 81). 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.
validate.auditClipDurations (cognitive 17) packages/cli/src/commands/validate.ts:149— validate.auditClipDurations 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). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 154, 171). 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.
motionShot.timelineDuration (cognitive 17) packages/cli/src/commands/motionShot.ts:435— motionShot.timelineDuration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4, ternaries 4, boolean chains 3, error handling 2 (3 pts), loops 3 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 7 function literals inside it that branch (lines 437, 441, 451, …). 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.
browser.runEnsure (cognitive 17) packages/cli/src/commands/browser.ts:77— browser.runEnsure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 7). Of this number, 11 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.
layout-audit.browser.objectPositionOffsets (cognitive 17) packages/cli/src/commands/layout-audit.browser.js:874— layout-audit.browser.objectPositionOffsets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 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.
chunkEncoder.packageHls (cognitive 17) packages/engine/src/services/chunkEncoder.ts:876— chunkEncoder.packageHls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 4). 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.
urlDownloader.classifyRangeDisposition (cognitive 17) packages/engine/src/utils/urlDownloader.ts:680— urlDownloader.classifyRangeDisposition has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 2 (3 pts) (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.
urlDownloader.runDownloadAttempt (cognitive 17) packages/engine/src/utils/urlDownloader.ts:1014— urlDownloader.runDownloadAttempt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 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.
videoFrameExtractor.resolveTimelineExtractionWindow (cognitive 17) packages/engine/src/services/videoFrameExtractor.ts:1212— videoFrameExtractor.resolveTimelineExtractionWindow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, ternaries 2 (nesting depth added 5). Of this number, 16 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.
audioMixer.simplifyVolumeKeyframes (cognitive 17) packages/engine/src/services/audioMixer.ts:248— audioMixer.simplifyVolumeKeyframes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 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.
media.findMediaSrcKindMismatchFindings (cognitive 17) packages/lint/src/rules/media.ts:115— media.findMediaSrcKindMismatchFindings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 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.
media.findNestedMediaStartBasisFindings (cognitive 17) packages/lint/src/rules/media.ts:141— media.findNestedMediaStartBasisFindings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 2 (4 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.
gsapParser.buildMotionPathObjectCode (cognitive 17) REDACTED:2871— gsapParser.buildMotionPathObjectCode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (2 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.
htmlParser.normalizeKeyframes (cognitive 17) REDACTED:505— htmlParser.normalizeKeyframes has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), loops 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 3 function items inside it that branch (a function literal at line 531, a function literal at line 519, hasBaseCheck). 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.
htmlParser.addElementToHtml (cognitive 17) REDACTED:636— htmlParser.addElementToHtml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, match/switch 1 (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, 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.
htmlParser.removeElementWithGsapCascade (cognitive 17) REDACTED:739— htmlParser.removeElementWithGsapCascade has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 2 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.
model.setOwnText (cognitive 17) packages/sdk/src/engine/model.ts:388— model.setOwnText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 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.
shots.buildShotMap (cognitive 17) packages/studio-server/src/analysis/shots.ts:74— shots.buildShotMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 6). 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.
takes.detectTakeIssues.bestRetake (cognitive 17) packages/studio-server/src/analysis/takes.ts:392— takes.detectTakeIssues.bestRetake has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 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.
takes.detectTakeIssues.detectFillers (cognitive 17) packages/studio-server/src/analysis/takes.ts:781— takes.detectTakeIssues.detectFillers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, 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.
thumbnail.pruneThumbnailCache (cognitive 17) REDACTED:35— thumbnail.pruneThumbnailCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 5). Of this number, 15 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.
opsCaptions.retimeCaptions (cognitive 17) packages/studio-server/src/editing/opsCaptions.ts:150— opsCaptions.retimeCaptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 2 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.
requests.parsePolicyUpdate (cognitive 17) packages/studio-server/src/research/requests.ts:67— requests.parsePolicyUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6 (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.
snapshot.stageFrom (cognitive 17) packages/studio-server/src/design/snapshot.ts:316— snapshot.stageFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1, 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.
policyFetch.readText (cognitive 17) packages/studio-server/src/research/sources/policyFetch.ts:532— policyFetch.readText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (3 pts), loops 1 (2 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.
DuckDuckGoSearch.search (cognitive 17) packages/studio-server/src/research/sources/webSearch.ts:56— DuckDuckGoSearch.search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1, loops 1 (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.
issues.mergeSameSubject (cognitive 17) packages/studio-server/src/qa/issues.ts:34— issues.mergeSameSubject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 7). 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.
samples.candidates (cognitive 17) packages/studio-server/src/qa/samples.ts:97— samples.candidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4, boolean chains 2 (nesting depth added 6). 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.
design.registerDesignRoutes (cognitive 17) packages/studio-server/src/routes/design.ts:95— design.registerDesignRoutes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3, ternaries 3, boolean chains 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 7 function items inside it that branch (a function literal at line 110, a function literal at line 152, resolveProjectFile, …). 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.
extract.customProperties (cognitive 17) packages/studio-server/src/design/extract.ts:229— extract.customProperties has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 5 (8 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.
pricing.parseRate (cognitive 17) packages/studio-server/src/voice/pricing.ts:41— pricing.parseRate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2, 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.
VoiceSynthesizer.place (cognitive 17) packages/studio-server/src/voice/project/synthesize.ts:513— VoiceSynthesizer.place has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 16 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.
voiceClips.voiceClipsByLine (cognitive 17) packages/studio-server/src/voice/project/voiceClips.ts:11— voiceClips.voiceClipsByLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 2 (3 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.
gsapTweenSynth.synthesizeFlatTweenKeyframes (cognitive 17) packages/studio/src/hooks/gsapTweenSynth.ts:87— gsapTweenSynth.synthesizeFlatTweenKeyframes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, boolean chains 5, loops 2 (4 pts), ternaries 2 (nesting depth added 2). 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: 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.
Player.hasUnloadedAssets (cognitive 17) packages/studio/src/player/components/Player.tsx:104— Player.hasUnloadedAssets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2 (3 pts), error handling 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.
timelineKeyboardNavigation.resolveTimelineFocusFallback (cognitive 17) packages/studio/src/player/components/timelineKeyboardNavigation.ts:427— timelineKeyboardNavigation.resolveTimelineFocusFallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 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.
useDomSelection.useDomSelection.applyMarqueeSelection (cognitive 17) packages/studio/src/hooks/useDomSelection.ts:480— useDomSelection.useDomSelection.applyMarqueeSelection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1, 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.
useDomEditTextCommits.useDomEditTextCommits.handleDomStyleCommitForSelection (cognitive 17) packages/studio/src/hooks/useDomEditTextCommits.ts:138— useDomEditTextCommits.useDomEditTextCommits.handleDomStyleCommitForSelection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 176, 198, 169, …). 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.
gsapKeyframeCacheHelpers.updateKeyframeCacheFromParsed (cognitive 17) packages/studio/src/hooks/gsapKeyframeCacheHelpers.ts:55— gsapKeyframeCacheHelpers.updateKeyframeCacheFromParsed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 pts), ternaries 3 (4 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 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.
manualOffsetDrag.createManualOffsetDragMember (cognitive 17) packages/studio/src/components/editor/manualOffsetDrag.ts:329— manualOffsetDrag.createManualOffsetDragMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, error handling 1 (3 pts), loops 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.
DomEditOverlay.DomEditOverlay::handleOverlayPointerDown (cognitive 17) packages/studio/src/components/editor/DomEditOverlay.tsx:324— DomEditOverlay.DomEditOverlay::handleOverlayPointerDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 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.
EditModal.EditPopover (cognitive 17) packages/studio/src/player/components/EditModal.tsx:38— EditModal.EditPopover has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 4. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 165, 76, 109, …). 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.
useTimelinePlayer.useTimelinePlayer (cognitive 17) packages/studio/src/player/hooks/useTimelinePlayer.ts:49— useTimelinePlayer.useTimelinePlayer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 332, 505, 407, …). 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.
FileTreeNodes.ContextMenu (cognitive 17) packages/studio/src/components/editor/FileTreeNodes.tsx:35— FileTreeNodes.ContextMenu has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (handleMenuKeyDown, a function literal at line 62, a function literal at line 57, …). 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.
propertyPanelColorGradingSlider.ColorGradingSliderControl (cognitive 17) packages/studio/src/components/editor/propertyPanelColorGradingSlider.tsx:30— propertyPanelColorGradingSlider.ColorGradingSliderControl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 4. Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 95, 242, 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.
useColorGradingController.useColorGradingController (cognitive 17) packages/studio/src/components/editor/useColorGradingController.ts:186— useColorGradingController.useColorGradingController has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1. Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 442, 253, 284, …). 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.
voiceStore.createVoiceStore (cognitive 17) packages/studio/src/voice/voiceStore.ts:46— voiceStore.createVoiceStore has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (12 pts), error handling 5 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 6 function literals inside it that branch (lines 47, 49, 51, …). 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.
BlockParamsPanel.BlockParamsPanel (cognitive 17) packages/studio/src/components/editor/BlockParamsPanel.tsx:35— BlockParamsPanel.BlockParamsPanel has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5, error handling 1, loops 1, ternaries 1. Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 62, 44, 107, …). 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.
RenderQueue.RenderQueue (cognitive 17) packages/studio/src/components/renders/RenderQueue.tsx:147— RenderQueue.RenderQueue has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 7 (8 pts), if/else 1 (nesting depth added 1). 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, 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.
ExecutionQualityMenu.ExecutionQualityMenu (cognitive 17) packages/studio/src/components/chat/ExecutionQualityMenu.tsx:171— ExecutionQualityMenu.ExecutionQualityMenu has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 4. Of this number, 9 points are the body's own statements and 8 belong to 5 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.
VoicePilotCard.VoicePilotCard (cognitive 17) packages/studio/src/components/chat/VoicePilotCard.tsx:38— VoicePilotCard.VoicePilotCard has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 4. Of this number, 13 points are the body's own statements and 4 belong to 3 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.
VoiceSetupDialog.VoiceSetupDialog (cognitive 17) packages/studio/src/voice/VoiceSetupDialog.tsx:28— VoiceSetupDialog.VoiceSetupDialog has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 5, if/else 1 (nesting depth added 6). Of this number, 16 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.
useServerConnection.useServerConnection (cognitive 17) packages/studio/src/hooks/useServerConnection.ts:76— useServerConnection.useServerConnection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). None of this is in the body itself: all 17 points belong to 6 function literals inside it that branch (lines 97, 147, 141, …). 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.
BufferGeometryUtils.computeMikkTSpaceTangents (cognitive 17) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:38— BufferGeometryUtils.computeMikkTSpaceTangents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 4). Of this number, 9 points are the body's own statements and 8 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.
BufferGeometryUtils.toCreasedNormals (cognitive 17) registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:1141— BufferGeometryUtils.toCreasedNormals has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (7 pts), ternaries 1 (nesting depth added 9). 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.
engine.html.GROUPS.forEach() (cognitive 17) skills/embedded-captions/modes/cinematic/engine.html:177— engine.html.GROUPS.forEach() has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. 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.
make-theme.paradigmLaserrail (cognitive 17) skills/embedded-captions/scripts/make-theme.cjs:2833— make-theme.paradigmLaserrail has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8 (nesting depth added 1). Of this number, 13 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.
lint_source.main (cognitive 17) skills/remotion-to-hyperframes/scripts/lint_source.py:314— lint_source.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), boolean chains 1, ternaries 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.
freezeRecipe (cognitive 17) packages/cli/src/media-use/lib/recipe-store.mjs:205— freezeRecipe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5, ternaries 4 (5 pts), boolean chains 3, other 3, error handling 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.
preflight.chromeSharedLibOutcome (cognitive 16) packages/cli/src/browser/preflight.ts:196— preflight.chromeSharedLibOutcome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, ternaries 1 (3 pts), error handling 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.
lazyScrollForCapture.lazyScrollForCapture (cognitive 16) packages/cli/src/capture/lazyScrollForCapture.ts:66— lazyScrollForCapture.lazyScrollForCapture has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), loops 1 (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.
scaffolding.loadEnvFile (cognitive 16) packages/cli/src/capture/scaffolding.ts:18— scaffolding.loadEnvFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (3 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.
htmlExtractor.extractHtml (cognitive 16) packages/cli/src/capture/htmlExtractor.ts:16— htmlExtractor.extractHtml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 6). Of this number, 11 points are the body's own statements and 5 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.
htmlCompiler.inlineExternalFontStylesheets (cognitive 16) packages/producer/src/services/htmlCompiler.ts:1663— htmlCompiler.inlineExternalFontStylesheets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 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.
encodeStage.runEncodeStage (cognitive 16) packages/producer/src/services/render/stages/encodeStage.ts:244— encodeStage.runEncodeStage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2, 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.
audioPadTrim.padOrTrimAudioToVideoFrameCount (cognitive 16) packages/producer/src/services/render/audioPadTrim.ts:284— audioPadTrim.padOrTrimAudioToVideoFrameCount has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), loops 2, boolean chains 1, 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.
staticProjectServer.serveStaticProjectHtml.server (cognitive 16) packages/cli/src/utils/staticProjectServer.ts:187— staticProjectServer.serveStaticProjectHtml.server has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 3, 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.
layout-audit.browser.textOverflowFixHint (cognitive 16) packages/cli/src/commands/layout-audit.browser.js:418— layout-audit.browser.textOverflowFixHint has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 7 (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.
layout-audit.browser.escapedContainerIssues (cognitive 16) packages/cli/src/commands/layout-audit.browser.js:1192— layout-audit.browser.escapedContainerIssues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (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.
layout-audit.browser.__hyperframesLayoutAudit (cognitive 16) packages/cli/src/commands/layout-audit.browser.js:1754— layout-audit.browser.__hyperframesLayoutAudit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 3, 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.
audioLeveller.analyseLevelling (cognitive 16) packages/core/src/audioLeveller.ts:97— audioLeveller.analyseLevelling has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2, loops 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 152, 136). 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.
startResolver.createRuntimeStartTimeResolver.resolveStartForElementInternal (cognitive 16) packages/core/src/runtime/startResolver.ts:113— startResolver.createRuntimeStartTimeResolver.resolveStartForElementInternal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, 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.
timeline.isRuntimeElementVisibleAt (cognitive 16) packages/core/src/runtime/timeline.ts:37— timeline.isRuntimeElementVisibleAt has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (5 pts), if/else 3 (4 pts) (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.
hyperframes.generateInitialPositionSets (cognitive 16) packages/core/src/generators/hyperframes.ts:684— hyperframes.generateInitialPositionSets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 14 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.
video-texture-compat.patchWebGLVideoTextureCompat (cognitive 16) packages/core/src/runtime/adapters/video-texture-compat.ts:82— video-texture-compat.patchWebGLVideoTextureCompat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Of this number, 9 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.
captionOverrides.getCaptionWordElements (cognitive 16) packages/core/src/runtime/captionOverrides.ts:83— captionOverrides.getCaptionWordElements has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 2 (6 pts), loops 2 (3 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.
frameCapture.getDrawElementVerificationDetails (cognitive 16) packages/engine/src/services/frameCapture.ts:352— frameCapture.getDrawElementVerificationDetails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 1 (3 pts), boolean chains 1, 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.
frameCapture.constructCaptureSession (cognitive 16) packages/engine/src/services/frameCapture.ts:1349— frameCapture.constructCaptureSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 2). Of this number, 13 points are the body's own statements and 3 belong to 2 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.
frameCapture.applyVideoMetadataHints (cognitive 16) packages/engine/src/services/frameCapture.ts:2102— frameCapture.applyVideoMetadataHints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 2109). 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.
gpuEncoder.getGpuEncoderName (cognitive 16) packages/engine/src/utils/gpuEncoder.ts:91— gpuEncoder.getGpuEncoderName has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 1, match/switch 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.
videoFrameExtractor.extractionFrameCountForDuration (cognitive 16) packages/engine/src/services/videoFrameExtractor.ts:125— videoFrameExtractor.extractionFrameCountForDuration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 3 (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.
gsapParser.findAllTweenCalls (cognitive 16) REDACTED:608— gsapParser.findAllTweenCalls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 1 (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.
gsapParser.resolvePositionString (cognitive 16) REDACTED:1141— gsapParser.resolvePositionString has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7 (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.
gsapParser.buildTweenStatementCode (cognitive 16) REDACTED:1473— gsapParser.buildTweenStatementCode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 3). 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.
gsapParserAcorn.resolvePositionString (cognitive 16) REDACTED:1472— gsapParserAcorn.resolvePositionString has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7 (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.
gsapParserAcorn.resolveTimelinePositions (cognitive 16) REDACTED:1664— gsapParserAcorn.resolveTimelinePositions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, loops 2, ternaries 2. 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 1689, defineLabel). 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.
gsapWriterAcorn.removeAllKeyframesFromScript (cognitive 16) packages/parsers/src/gsapWriterAcorn.ts:1458— gsapWriterAcorn.removeAllKeyframesFromScript has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, loops 1 (2 pts), 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.
apply-patches.applyOverrideSet (cognitive 16) packages/sdk/src/engine/apply-patches.ts:126— apply-patches.applyOverrideSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 4 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.
mediaCodecMap.collectLocalVideoAssets (cognitive 16) packages/studio-server/src/helpers/mediaCodecMap.ts:317— mediaCodecMap.collectLocalVideoAssets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (3 pts), ternaries 1 (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.
takesStore.takeOf (cognitive 16) packages/studio-server/src/voice/project/takesStore.ts:112— takesStore.takeOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, 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.
sync.unitReasons (cognitive 16) packages/studio-server/src/story/sync.ts:165— sync.unitReasons has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1, 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.
requests.parseRecordWebsiteRequest (cognitive 16) packages/studio-server/src/research/requests.ts:359— requests.parseRecordWebsiteRequest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 4. Of this number, 13 points are the body's own statements and 3 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.
assetReferences.referencedPaths (cognitive 16) packages/studio-server/src/research/assetReferences.ts:47— assetReferences.referencedPaths has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). 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.
smk.pictureFile (cognitive 16) packages/studio-server/src/research/sources/connectors/smk.ts:69— smk.pictureFile has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 4, if/else 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.
PolicyFetcher.follow (cognitive 16) packages/studio-server/src/research/sources/policyFetch.ts:252— PolicyFetcher.follow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 2 (5 pts), ternaries 1 (2 pts), 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.
renderChecks.blackIssues (cognitive 16) packages/studio-server/src/qa/renderChecks.ts:172— renderChecks.blackIssues has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 174, 181). 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.
renderChecks.withoutSilentSources (cognitive 16) packages/studio-server/src/qa/renderChecks.ts:332— renderChecks.withoutSilentSources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). 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 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.
extract.compositionFiles (cognitive 16) packages/studio-server/src/design/extract.ts:106— extract.compositionFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 5). 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 (walk, a function literal at line 115). 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.
palette.quantizePalette (cognitive 16) packages/studio-server/src/design/palette.ts:160— palette.quantizePalette has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 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.
dockLayoutStore.useDockLayoutStore (cognitive 16) packages/studio/src/components/dock/dockLayoutStore.ts:64— dockLayoutStore.useDockLayoutStore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2, boolean chains 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 6 function literals inside it that branch (lines 76, 105, 124, …). 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.
serverError.readServerError (cognitive 16) packages/studio/src/components/renders/serverError.ts:11— serverError.readServerError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (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.
timelineKeyboardNavigation.buildTimelineLogicalRows (cognitive 16) packages/studio/src/player/components/timelineKeyboardNavigation.ts:247— timelineKeyboardNavigation.buildTimelineLogicalRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (emitTrack, emitGroup). 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.
useFileManager.useFileManager.uploadProjectFiles (cognitive 16) packages/studio/src/hooks/useFileManager.ts:200— useFileManager.useFileManager.uploadProjectFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (3 pts), boolean chains 1, error handling 1, 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.
domEditTextFieldCommitOps.buildTextFieldChildOperations (cognitive 16) packages/studio/src/hooks/domEditTextFieldCommitOps.ts:27— domEditTextFieldCommitOps.buildTextFieldChildOperations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (3 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.
useDomEditCommits.useDomEditCommits.commitDomEditPatchBatches (cognitive 16) packages/studio/src/hooks/useDomEditCommits.ts:282— useDomEditCommits.useDomEditCommits.commitDomEditPatchBatches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 1 (2 pts) (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 3 function literals inside it that branch (lines 288, 348, 309). 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.
gsapRuntimeBridge.resolveGroupTween (cognitive 16) packages/studio/src/hooks/gsapRuntimeBridge.ts:76— gsapRuntimeBridge.resolveGroupTween has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 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.
CanvasContextMenu.CanvasContextMenu (cognitive 16) packages/studio/src/components/editor/CanvasContextMenu.tsx:147— CanvasContextMenu.CanvasContextMenu has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2. Of this number, 10 points are the body's own statements and 6 belong to 7 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.
useTimelineProviderState.useTimelineProviderState (cognitive 16) packages/studio/src/player/components/useTimelineProviderState.tsx:46— useTimelineProviderState.useTimelineProviderState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 5, if/else 3. Of this number, 11 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.
TimelineCanvas.TimelineCanvas (cognitive 16) packages/studio/src/player/components/TimelineCanvas.tsx:23— TimelineCanvas.TimelineCanvas has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 7, if/else 1. Of this number, 12 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.
TimelineOverlays.TimelineKeyframeMenuOverlay (cognitive 16) packages/studio/src/player/components/TimelineOverlays.tsx:57— TimelineOverlays.TimelineKeyframeMenuOverlay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 72, 109, 89, …). 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.
agentComposerSlice.createAgentComposerSlice.startFromIntake (cognitive 16) packages/studio/src/agent/agentComposerSlice.ts:191— agentComposerSlice.createAgentComposerSlice.startFromIntake has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, 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.
useTimelineAssetDropOps.useTimelineAssetDropOps.dropAssetAt (cognitive 16) packages/studio/src/hooks/useTimelineAssetDropOps.ts:98— useTimelineAssetDropOps.useTimelineAssetDropOps.dropAssetAt has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 4 (5 pts), if/else 4, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to 2 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.
DesignPanel.DesignPanel (cognitive 16) packages/studio/src/design/DesignPanel.tsx:14— DesignPanel.DesignPanel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 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.
useProjectTabs.useProjectTabs (cognitive 16) packages/studio/src/hooks/useProjectTabs.ts:58— useProjectTabs.useProjectTabs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 82, 67, 75, …). 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.
MotionPathOverlay.MotionPathOverlay::onUp (cognitive 16) packages/studio/src/components/editor/MotionPathOverlay.tsx:328— MotionPathOverlay.MotionPathOverlay::onUp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 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. This shape REPEATS in the file: one other method here (MotionPathOverlay.MotionPathOverlay) 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.
timelineDurationRipple.resolveDurationRipple (cognitive 16) packages/studio/src/player/components/timelineDurationRipple.ts:46— timelineDurationRipple.resolveDurationRipple has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). 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 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.
propertyPanelColor.ColorSlider (cognitive 16) packages/studio/src/components/editor/propertyPanelColor.tsx:23— propertyPanelColor.ColorSlider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 2. 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 items inside it that branch (a function literal at line 101, previewFromClientX, a function literal at line 97, …). 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.
VoiceInlineText.VoiceInlineText (cognitive 16) packages/studio/src/voice/panel/VoiceInlineText.tsx:32— VoiceInlineText.VoiceInlineText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (finish, a function literal at line 104, a function literal at line 69). 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.
markdownParse.parseInline (cognitive 16) REDACTED:48— markdownParse.parseInline has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). 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.
QaReportView.ReportBody (cognitive 16) packages/studio/src/components/chat/QaReportView.tsx:67— QaReportView.ReportBody has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 3, ternaries 2. Of this number, 10 points are the body's own statements and 6 belong to 3 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.
fill-timings.main (cognitive 16) skills/embedded-captions/scripts/fill-timings.cjs:63— fill-timings.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, error handling 2, loops 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 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.
make-theme.paradigmRansomrail (cognitive 16) skills/embedded-captions/scripts/make-theme.cjs:4861— make-theme.paradigmRansomrail has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 6, if/else 1 (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to 2 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.
safe-zones.largestRect (cognitive 16) skills/embedded-captions/scripts/safe-zones.cjs:51— safe-zones.largestRect has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 1 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 9). 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.
animation-map.findDeadZones (cognitive 16) skills/hyperframes-animation/scripts/animation-map.mjs:439— animation-map.findDeadZones has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, 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.
carve.parseArgs (cognitive 16) skills/hyperframes-audio/scripts/carve.mjs:49— carve.parseArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 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: 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.
design-picker.html.showOutput (cognitive 16) skills/hyperframes-creative/templates/design-picker.html:1308— design-picker.html.showOutput has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3. 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.
audio.runGenerate (cognitive 16) skills/product-launch-video/scripts/audio.mjs:122— audio.runGenerate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 3. 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.
auditLayout (cognitive 16) packages/cli/src/commands/layout-audit.browser.js:1754— auditLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 3, 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.
Off the main sequence: @hyperframes/parsers — @hyperframes/parsers: abstractness 0.18, instability 0.00, distance 0.82 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to packages/engine/src/utils/alphaBlit.ts:745— The guard above `return 0.5;` also returns `0.5`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
Hollow method — returns a constant without doing the work packages/studio/src/player/components/timelineTheme.ts:89— `getTimelineTrackStyle` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Forked directory tree (13 identical files, ~1564 lines × 2 trees) packages/cli/src/media-use/lib/recipe-store.mjs:1— packages/cli/src/media-use/ and skills/media-use/scripts/ are near-verbatim copies of each other: 13 files are byte-identical under the same relative paths (~1564 lines; the trees hold 92 and 26 files). That is one structural fact, not 13 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
Duplication concentrated across 13 sibling directories (184 clone groups) packages/cli/src/media-use/lib/grade-analyzer.mjs:19— 184 duplicated blocks under packages/ have copies in at least two of the sibling directories agent-protocol, agent-runtime, cli, core, engine, lint (+7 more sibling(s) not listed) — 105 of them are reported below, and 79 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 184 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 184 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 184 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.
Duplication concentrated across 14 sibling directories (112 clone groups) packages/studio/src/research/SourceApiKeyControl.tsx:23— 112 duplicated blocks under packages/studio/src/ have copies in at least two of the sibling directories agent, captions, components, contexts, design, hooks (+8 more sibling(s) not listed) — 34 of them are reported below, and 78 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 112 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 112 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 112 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.
Duplication concentrated across 14 sibling directories (54 clone groups) packages/agent-runtime/src/research/transport.ts:21— 54 duplicated blocks under packages/agent-runtime/src/ have copies in at least two of the sibling directories agents, analysis, crossProject, design, editing, omp (+8 more sibling(s) not listed) — 36 of them are reported below, and 18 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 54 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 54 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 54 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.
Duplication concentrated across 5 sibling directories (53 clone groups) packages/cli/src/media-use/lib/recipe-store.mjs:10— 53 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, packages, registry, scripts, skills — 45 of them are reported below, and 8 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 53 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 53 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 53 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.
Duplication concentrated across 10 sibling directories (32 clone groups) packages/studio/src/components/chat/ChatDialog.tsx:65— 32 duplicated blocks under packages/studio/src/components/ have copies in at least two of the sibling directories chat, dock, editor, nle, panels, renders (+4 more sibling(s) not listed) — 6 of them are reported below, and 26 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 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 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 32 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.
Duplication concentrated across 10 sibling directories (30 clone groups) REDACTED:29— 30 duplicated blocks under skills/ have copies in at least two of the sibling directories embedded-captions, faceless-explainer, general-video, hyperframes, hyperframes-animation, hyperframes-creative (+4 more sibling(s) not listed) — 29 of them are reported below, and 1 is 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 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 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 30 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.
Duplication concentrated across 9 sibling directories (21 clone groups) packages/studio-server/src/research/sources/apiKeys.ts:6— 21 duplicated blocks under packages/studio-server/src/ have copies in at least two of the sibling directories analysis, crossProject, design, editing, helpers, qa (+3 more sibling(s) not listed) — 17 of them are reported below, and 4 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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.
Duplication concentrated across 9 sibling directories (20 clone groups) packages/cli/src/commands/layout-audit.browser.js:1977— 20 duplicated blocks under packages/cli/src/ have copies in at least two of the sibling directories browser, capture, commands, media-use, registry, server (+3 more sibling(s) not listed) — 19 of them are reported below, and 1 is 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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.
Wholesale file copy (338 identical lines × 3 files) REDACTED:29— REDACTED:29 · REDACTED:29 · REDACTED:29 — these 3 files are line-for-line copies of one another — 338 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.
Wholesale file copy (289 identical lines × 2 files) skills/faceless-explainer/scripts/assemble-index.mjs:53— skills/faceless-explainer/scripts/assemble-index.mjs:53 · skills/pr-to-video/scripts/assemble-index.mjs:53 — these 2 files are line-for-line copies of one another — 289 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.
Wholesale file copy (250 identical lines × 3 files) REDACTED:26— REDACTED:26 · REDACTED:26 · REDACTED:26 — these 3 files are line-for-line copies of one another — 250 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.
Wholesale file copy (229 identical lines × 3 files) skills/faceless-explainer/scripts/captions.mjs:2— skills/faceless-explainer/scripts/captions.mjs:2 · skills/pr-to-video/scripts/captions.mjs:2 · skills/product-launch-video/scripts/captions.mjs:2 — these 3 files are line-for-line copies of one another — 229 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.
Wholesale file copy (224 identical lines × 2 files) skills/hyperframes-animation/scripts/package-loader.mjs:11— skills/hyperframes-animation/scripts/package-loader.mjs:11 · skills/hyperframes-creative/scripts/package-loader.mjs:11 — these 2 files are line-for-line copies of one another — 224 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.
Duplicated block (213 lines × 2 locations) REDACTED:1444— REDACTED:1444 · REDACTED:1811 — 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.
Wholesale file copy (201 identical lines × 2 files) packages/cli/src/media-use/lib/recipe-store.mjs:10— packages/cli/src/media-use/lib/recipe-store.mjs:10 · skills/media-use/scripts/lib/recipe-store.mjs:10 — these 2 files are line-for-line copies of one another — 201 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 (184 matched lines × 2 locations) · ×1
Duplicated block with local edits (184 matched lines × 2 locations) packages/cli/src/media-use/lib/grade-analyzer.mjs:19— packages/cli/src/media-use/lib/grade-analyzer.mjs:19 · packages/core/src/mediaGradeAnalyzer.ts:88 — the two spans are one implementation copied and then locally edited — 1382 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.
Wholesale file copy (173 identical lines × 2 files) packages/cli/src/media-use/lib/error-diffusion.mjs:1— packages/cli/src/media-use/lib/error-diffusion.mjs:1 · skills/media-use/scripts/lib/error-diffusion.mjs:1 — these 2 files are line-for-line copies of one another — 173 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.
Wholesale file copy (166 identical lines × 3 files) skills/faceless-explainer/scripts/audio.mjs:25— skills/faceless-explainer/scripts/audio.mjs:25 · skills/pr-to-video/scripts/audio.mjs:25 · skills/product-launch-video/scripts/audio.mjs:23 — these 3 files are line-for-line copies of one another — 166 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.
Wholesale file copy (161 identical lines × 4 files) skills/faceless-explainer/scripts/lib/storyboard.mjs:13— skills/faceless-explainer/scripts/lib/storyboard.mjs:13 · skills/music-to-video/scripts/lib/storyboard.mjs:13 · skills/pr-to-video/scripts/lib/storyboard.mjs:13 · skills/product-launch-video/scripts/lib/storyboard.mjs:13 — these 4 files are line-for-line copies of one another — 161 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 (143 matched lines × 2 locations) · ×1
Duplicated block with local edits (143 matched lines × 2 locations) apps/desktop/src-tauri/src/home_page/settings-assets.js:95— apps/desktop/src-tauri/src/home_page/settings-assets.js:95 · apps/desktop/src-tauri/src/home_page/settings-voice.js:163 — the two spans are one implementation copied and then locally edited — 976 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 with local edits (141 matched lines × 2 locations) · ×1
Duplicated block with local edits (141 matched lines × 2 locations) REDACTED:110— REDACTED:110 · REDACTED:172 — the two spans are one implementation copied and then locally edited — 1001 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 with local edits (136 matched lines × 2 locations) · ×1
Duplicated block with local edits (136 matched lines × 2 locations) packages/agent-runtime/src/research/transport.ts:21— packages/agent-runtime/src/research/transport.ts:21 · packages/agent-runtime/src/voice/transport.ts:18 — the two spans are one implementation copied and then locally edited — 948 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.
Wholesale file copy (132 identical lines × 2 files) REDACTED:12— REDACTED:12 · REDACTED:12 — these 2 files are line-for-line copies of one another — 132 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 (132 matched lines × 2 locations) · ×1
Duplicated block with local edits (132 matched lines × 2 locations) packages/studio/src/research/SourceApiKeyControl.tsx:23— packages/studio/src/research/SourceApiKeyControl.tsx:23 · packages/studio/src/voice/VoiceKeyControl.tsx:31 — the two spans are one implementation copied and then locally edited — 815 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 with local edits (131 matched lines × 2 locations) · ×1
Duplicated block with local edits (131 matched lines × 2 locations) packages/agent-runtime/src/processLock.ts:26— packages/agent-runtime/src/processLock.ts:26 · packages/studio-server/src/history/ownerLock.ts:21 — the two spans are one implementation copied and then locally edited — 1068 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 with local edits (130 matched lines × 2 locations) · ×1
Duplicated block with local edits (130 matched lines × 2 locations) packages/engine/src/services/chunkEncoder.ts:251— packages/engine/src/services/chunkEncoder.ts:251 · packages/engine/src/services/streamingEncoder.ts:271 — the two spans are one implementation copied and then locally edited — 836 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.
Wholesale file copy (129 identical lines × 2 files) packages/cli/src/media-use/lib/cutlist.mjs:1— packages/cli/src/media-use/lib/cutlist.mjs:1 · skills/media-use/scripts/lib/cutlist.mjs:1 — 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.
Wholesale file copy (127 identical lines × 3 files) REDACTED:7— REDACTED:7 · REDACTED:7 · REDACTED:7 — these 3 files are line-for-line copies of one another — 127 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 (126 matched lines × 2 locations) · ×1
Duplicated block with local edits (126 matched lines × 2 locations) packages/studio/src/components/editor/propertyPanelFlatTextSection.tsx:84— packages/studio/src/components/editor/propertyPanelFlatTextSection.tsx:84 · packages/studio/src/components/editor/propertyPanelSections.tsx:341 — the two spans are one implementation copied and then locally edited — 750 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 with local edits (119 matched lines × 2 locations) · ×1
Duplicated block with local edits (119 matched lines × 2 locations) packages/cli/src/media-use/lib/cube-validate.mjs:24— packages/cli/src/media-use/lib/cube-validate.mjs:24 · packages/core/src/colorLuts.ts:35 — the two spans are one implementation copied and then locally edited — 754 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.
Wholesale file copy (117 identical lines × 5 files) REDACTED:12— REDACTED:12 · REDACTED:12 · REDACTED:12 · REDACTED:12 · +1 more site(s) not listed — these 5 files are line-for-line copies of one another — 117 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 (113 matched lines × 2 locations) · ×1
Duplicated block with local edits (113 matched lines × 2 locations) packages/studio-server/src/research/sources/connectors/pexels.ts:18— packages/studio-server/src/research/sources/connectors/pexels.ts:18 · packages/studio-server/src/research/sources/connectors/pixabay.ts:23 — the two spans are one implementation copied and then locally edited — 772 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 with local edits (94 matched lines × 2 locations) · ×1
Duplicated block with local edits (94 matched lines × 2 locations) packages/studio/src/components/chat/VoicePilotCard.tsx:42— packages/studio/src/components/chat/VoicePilotCard.tsx:42 · packages/studio/src/components/chat/VoiceSetupCard.tsx:97 — the two spans are one implementation copied and then locally edited — 549 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 with local edits (89 matched lines × 2 locations) · ×1
Duplicated block with local edits (89 matched lines × 2 locations) packages/cli/src/commands/play.ts:82— packages/cli/src/commands/play.ts:82 · REDACTED:46 — the two spans are one implementation copied and then locally edited — 635 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.
Wholesale file copy (84 identical lines × 2 files) packages/cli/src/media-use/lib/prefs-store.mjs:1— packages/cli/src/media-use/lib/prefs-store.mjs:1 · skills/media-use/scripts/lib/prefs-store.mjs:1 — these 2 files are line-for-line copies of one another — 84 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 (83 matched lines × 2 locations) · ×1
Duplicated block with local edits (83 matched lines × 2 locations) packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:70— packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:70 · packages/studio/src/components/editor/propertyPanelMediaSection.tsx:41 — the two spans are one implementation copied and then locally edited — 567 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 with local edits (81 matched lines × 2 locations) · ×1
Duplicated block with local edits (81 matched lines × 2 locations) packages/core/src/audioFx.ts:784— packages/core/src/audioFx.ts:784 · packages/core/src/vfx.ts:470 — the two spans are one implementation copied and then locally edited — 506 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.
Duplicated block (76 lines × 2 locations) REDACTED:1666— REDACTED:1666 · REDACTED:2037 — 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.
Wholesale file copy (68 identical lines × 2 files) packages/cli/src/media-use/lib/duck.mjs:1— packages/cli/src/media-use/lib/duck.mjs:1 · skills/media-use/scripts/lib/duck.mjs:1 — these 2 files are line-for-line copies of one another — 68 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.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 347, cognitive 577) · ×1
Complex function main (cyclomatic 347, cognitive 577) skills/embedded-captions/scripts/make-cinematic.cjs:69— main has cyclomatic complexity 347 and cognitive complexity 577; 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.
Complex function planSync (cyclomatic 286, cognitive 453) packages/studio-server/src/story/sync.ts:292— planSync has cyclomatic complexity 286 and cognitive complexity 453; 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.
Complex function executeRenderPipeline (cyclomatic 231, cognitive 384) REDACTED:2908— executeRenderPipeline has cyclomatic complexity 231 and cognitive complexity 384; 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.
Complex function collectRuntimeTimelinePayload (cyclomatic 130, cognitive 212) packages/core/src/runtime/timeline.ts:241— collectRuntimeTimelinePayload has cyclomatic complexity 130 and cognitive complexity 212; 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.
Complex function readOperation (cyclomatic 120, cognitive 141) packages/agent-protocol/src/editingParse.ts:85— readOperation has cyclomatic complexity 120 and cognitive complexity 141; 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.
Complex function planCut (cyclomatic 112, cognitive 170) packages/studio-server/src/analysis/cutPlan.ts:441— planCut has cyclomatic complexity 112 and cognitive complexity 170; 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.
Complex function syncRuntimeMedia (cyclomatic 105, cognitive 148) packages/core/src/runtime/media.ts:277— syncRuntimeMedia has cyclomatic complexity 105 and cognitive complexity 148; 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.
Complex function readMoreOperation (cyclomatic 94, cognitive 116) packages/agent-protocol/src/editingParseMore.ts:90— readMoreOperation has cyclomatic complexity 94 and cognitive complexity 116; 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.
Complex function createRenderPlan (cyclomatic 94, cognitive 99) packages/cli/src/commands/render/plan.ts:222— createRenderPlan has cyclomatic complexity 94 and cognitive complexity 99; 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.
Complex function bundleProject (cyclomatic 93, cognitive 171) packages/core/src/compiler/htmlBundler.ts:954— bundleProject has cyclomatic complexity 93 and cognitive complexity 171; 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.
Complex function executeGsapMutationAcorn (cyclomatic 93, cognitive 74) REDACTED:1439— executeGsapMutationAcorn has cyclomatic complexity 93 and cognitive complexity 74; 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.
Complex function executeGsapMutationRecast (cyclomatic 93, cognitive 74) REDACTED:1779— executeGsapMutationRecast has cyclomatic complexity 93 and cognitive complexity 74; 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.
Complex function runProbeStage (cyclomatic 92, cognitive 278) packages/producer/src/services/render/stages/probeStage.ts:266— runProbeStage has cyclomatic complexity 92 and cognitive complexity 278; 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.
Complex function compileIntent (cyclomatic 91, cognitive 171) packages/studio-server/src/story/compile.ts:239— compileIntent has cyclomatic complexity 91 and cognitive complexity 171; 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.
Complex function inlineSubCompositions (cyclomatic 81, cognitive 150) packages/core/src/compiler/inlineSubCompositions.ts:272— inlineSubCompositions has cyclomatic complexity 81 and cognitive complexity 150; 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.
Complex function validateOp (cyclomatic 78, cognitive 65) packages/sdk/src/engine/mutate.ts:1606— validateOp has cyclomatic complexity 78 and cognitive complexity 65; 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.
Complex function frontFx (cyclomatic 77, cognitive 75) skills/embedded-captions/scripts/make-theme.cjs:1348— frontFx has cyclomatic complexity 77 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 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.
Complex function inspectHtml (cyclomatic 73, cognitive 89) packages/studio-server/src/research/sources/pageInspector.ts:142— inspectHtml has cyclomatic complexity 73 and cognitive complexity 89; 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.
Complex function tryGsapResizeIntercept (cyclomatic 72, cognitive 117) packages/studio/src/hooks/gsapResizeIntercept.ts:97— tryGsapResizeIntercept has cyclomatic complexity 72 and cognitive complexity 117; 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 run (cyclomatic 70, cognitive 107) · ×1
Complex function run (cyclomatic 70, cognitive 107) packages/cli/src/commands/catalog.ts:204— run has cyclomatic complexity 70 and cognitive complexity 107; 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.
Complex function applyOne (cyclomatic 68, cognitive 123) packages/sdk/src/engine/apply-patches.ts:181— applyOne has cyclomatic complexity 68 and cognitive complexity 123; 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 run (cyclomatic 68, cognitive 109) · ×1
Complex function run (cyclomatic 68, cognitive 109) packages/cli/src/commands/init.ts:723— run has cyclomatic complexity 68 and cognitive complexity 109; 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.
Complex function initThreeDProjectionInPage (cyclomatic 66, cognitive 118) packages/engine/src/services/threeDProjection.ts:53— initThreeDProjectionInPage has cyclomatic complexity 66 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.
Complex function tweenCallToAnimation (cyclomatic 63, cognitive 98) REDACTED:1223— tweenCallToAnimation has cyclomatic complexity 63 and cognitive complexity 98; 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 run (cyclomatic 60, cognitive 106) · ×1
Complex function run (cyclomatic 60, cognitive 106) REDACTED:249— run has cyclomatic complexity 60 and cognitive complexity 106; 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.
Complex function transportTick (cyclomatic 60, cognitive 89) packages/core/src/runtime/init.ts:4315— transportTick has cyclomatic complexity 60 and cognitive complexity 89; 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.
Complex function recordSite (cyclomatic 59, cognitive 80) packages/cli/src/siteInspect/recordSite.ts:316— recordSite has cyclomatic complexity 59 and cognitive complexity 80; 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.
Complex function toolRow (cyclomatic 59, cognitive 76) apps/desktop/src-tauri/src/home_page/onboarding-system.js:185— toolRow has cyclomatic complexity 59 and cognitive complexity 76; 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.
Complex function FlatMediaSection (cyclomatic 59, cognitive 52) packages/studio/src/components/editor/propertyPanelFlatMediaSection.tsx:42— FlatMediaSection has cyclomatic complexity 59 and cognitive complexity 52; 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.
Complex function parseStartTurn (cyclomatic 58, cognitive 75) packages/agent-protocol/src/validate.ts:786— parseStartTurn has cyclomatic complexity 58 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 run (cyclomatic 58, cognitive 70) · ×1
Complex function run (cyclomatic 58, cognitive 70) packages/cli/src/media-use/resolve.mjs:308— run has cyclomatic complexity 58 and cognitive complexity 70; 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.
Complex function runTestSuite (cyclomatic 57, cognitive 97) packages/producer/src/regression-harness.ts:849— runTestSuite has cyclomatic complexity 57 and cognitive complexity 97; 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 main (cyclomatic 57, cognitive 75) · ×1
Complex function main (cyclomatic 57, cognitive 75) skills/embedded-captions/scripts/transcribe.cjs:97— main has cyclomatic complexity 57 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.
Complex function PropertyPanel (cyclomatic 57, cognitive 47) packages/studio/src/components/editor/PropertyPanel.tsx:56— PropertyPanel has cyclomatic complexity 57 and cognitive complexity 47; 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.
Complex function captureSnapshots (cyclomatic 56, cognitive 95) packages/cli/src/commands/snapshot.ts:281— captureSnapshots has cyclomatic complexity 56 and cognitive complexity 95; 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.
Complex function extractAllVideoFrames (cyclomatic 56, cognitive 93) packages/engine/src/services/videoFrameExtractor.ts:1658— extractAllVideoFrames has cyclomatic complexity 56 and cognitive complexity 93; 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.
Complex function validateMetadata (cyclomatic 55, cognitive 51) packages/producer/src/regression-harness.ts:196— validateMetadata has cyclomatic complexity 55 and cognitive complexity 51; 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 main (cyclomatic 54, cognitive 55) · ×1
Complex function main (cyclomatic 54, cognitive 55) skills/embedded-captions/scripts/make-composition.cjs:236— main has cyclomatic complexity 54 and cognitive complexity 55; 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.
Complex function StyleSections (cyclomatic 54, cognitive 39) packages/studio/src/components/editor/propertyPanelStyleSections.tsx:42— StyleSections has cyclomatic complexity 54 and cognitive complexity 39; 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.
Complex function isChatEvent (cyclomatic 54, cognitive 26) packages/agent-runtime/src/store/index.ts:327— isChatEvent has cyclomatic complexity 54 and cognitive complexity 26; 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: 5206 lines of code REDACTED:1— REDACTED has 5206 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/core/src/runtime/init.ts · ×1
packages/core/src/runtime/init.ts: 4740 lines of code packages/core/src/runtime/init.ts:1— packages/core/src/runtime/init.ts has 4740 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/engine/src/services/frameCapture.ts · ×1
packages/engine/src/services/frameCapture.ts: 4637 lines of code packages/engine/src/services/frameCapture.ts:1— packages/engine/src/services/frameCapture.ts has 4637 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/core/src/runtime/colorGrading.ts · ×1
packages/core/src/runtime/colorGrading.ts: 3673 lines of code packages/core/src/runtime/colorGrading.ts:1— packages/core/src/runtime/colorGrading.ts has 3673 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: 3296 lines of code REDACTED:1— REDACTED has 3296 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: 3154 lines of code REDACTED:1— REDACTED has 3154 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· apps/desktop/src-tauri/src/home_page/home.js · ×1
apps/desktop/src-tauri/src/home_page/home.js: 2756 lines of code apps/desktop/src-tauri/src/home_page/home.js:1— apps/desktop/src-tauri/src/home_page/home.js has 2756 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/parsers/src/gsapWriterAcorn.ts · ×1
packages/parsers/src/gsapWriterAcorn.ts: 2623 lines of code packages/parsers/src/gsapWriterAcorn.ts:1— packages/parsers/src/gsapWriterAcorn.ts has 2623 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/producer/src/services/htmlCompiler.ts · ×1
packages/producer/src/services/htmlCompiler.ts: 2540 lines of code packages/producer/src/services/htmlCompiler.ts:1— packages/producer/src/services/htmlCompiler.ts has 2540 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/engine/src/services/videoFrameExtractor.ts · ×1
packages/engine/src/services/videoFrameExtractor.ts: 2417 lines of code packages/engine/src/services/videoFrameExtractor.ts:1— packages/engine/src/services/videoFrameExtractor.ts has 2417 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: 2379 lines of code REDACTED:1— REDACTED has 2379 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: 2339 lines of code REDACTED:1— REDACTED has 2339 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/cli/src/commands/layout-audit.browser.js · ×1
packages/cli/src/commands/layout-audit.browser.js: 1986 lines of code packages/cli/src/commands/layout-audit.browser.js:1— packages/cli/src/commands/layout-audit.browser.js has 1986 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: 1928 lines of code REDACTED:1— REDACTED has 1928 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/agent-protocol/src/story.ts · ×1
packages/agent-protocol/src/story.ts: 1813 lines of code packages/agent-protocol/src/story.ts:1— packages/agent-protocol/src/story.ts has 1813 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/sdk/src/engine/mutate.ts · ×1
packages/sdk/src/engine/mutate.ts: 1695 lines of code packages/sdk/src/engine/mutate.ts:1— packages/sdk/src/engine/mutate.ts has 1695 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/engine/src/services/audioMixer.ts · ×1
packages/engine/src/services/audioMixer.ts: 1646 lines of code packages/engine/src/services/audioMixer.ts:1— packages/engine/src/services/audioMixer.ts has 1646 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: 1622 lines of code REDACTED:1— REDACTED has 1622 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/producer/src/services/deterministicFonts.ts · ×1
packages/producer/src/services/deterministicFonts.ts: 1538 lines of code packages/producer/src/services/deterministicFonts.ts:1— packages/producer/src/services/deterministicFonts.ts has 1538 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/lint/src/rules/composition.ts · ×1
packages/lint/src/rules/composition.ts: 1522 lines of code packages/lint/src/rules/composition.ts:1— packages/lint/src/rules/composition.ts has 1522 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/cli/src/utils/checkPipeline.ts · ×1
packages/cli/src/utils/checkPipeline.ts: 1499 lines of code packages/cli/src/utils/checkPipeline.ts:1— packages/cli/src/utils/checkPipeline.ts has 1499 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/core/src/colorGrading.ts · ×1
packages/core/src/colorGrading.ts: 1452 lines of code packages/core/src/colorGrading.ts:1— packages/core/src/colorGrading.ts has 1452 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/core/src/compiler/htmlBundler.ts · ×1
packages/core/src/compiler/htmlBundler.ts: 1447 lines of code packages/core/src/compiler/htmlBundler.ts:1— packages/core/src/compiler/htmlBundler.ts has 1447 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/player/src/slideshow/hyperframes-slideshow.ts · ×1
packages/player/src/slideshow/hyperframes-slideshow.ts: 1392 lines of code packages/player/src/slideshow/hyperframes-slideshow.ts:1— packages/player/src/slideshow/hyperframes-slideshow.ts has 1392 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/studio-server/src/story/sync.ts · ×1
packages/studio-server/src/story/sync.ts: 1387 lines of code packages/studio-server/src/story/sync.ts:1— packages/studio-server/src/story/sync.ts has 1387 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/producer/src/regression-harness.ts · ×1
packages/producer/src/regression-harness.ts: 1349 lines of code packages/producer/src/regression-harness.ts:1— packages/producer/src/regression-harness.ts has 1349 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/core/src/runtime/vfx.ts · ×1
packages/core/src/runtime/vfx.ts: 1298 lines of code packages/core/src/runtime/vfx.ts:1— packages/core/src/runtime/vfx.ts has 1298 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/engine/src/utils/urlDownloader.ts · ×1
packages/engine/src/utils/urlDownloader.ts: 1277 lines of code packages/engine/src/utils/urlDownloader.ts:1— packages/engine/src/utils/urlDownloader.ts has 1277 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: 1258 lines of code REDACTED:1— REDACTED has 1258 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/cli/src/utils/checkBrowser.ts · ×1
packages/cli/src/utils/checkBrowser.ts: 1220 lines of code packages/cli/src/utils/checkBrowser.ts:1— packages/cli/src/utils/checkBrowser.ts has 1220 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/cli/src/commands/render.ts · ×1
packages/cli/src/commands/render.ts: 1215 lines of code packages/cli/src/commands/render.ts:1— packages/cli/src/commands/render.ts has 1215 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/engine/src/services/drawElementService.ts · ×1
packages/engine/src/services/drawElementService.ts: 1178 lines of code packages/engine/src/services/drawElementService.ts:1— packages/engine/src/services/drawElementService.ts 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/studio-server/src/history/projectHistory.ts · ×1
packages/studio-server/src/history/projectHistory.ts: 1151 lines of code packages/studio-server/src/history/projectHistory.ts:1— packages/studio-server/src/history/projectHistory.ts has 1151 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/engine/src/services/parallelCoordinator.ts · ×1
packages/engine/src/services/parallelCoordinator.ts: 1148 lines of code packages/engine/src/services/parallelCoordinator.ts:1— packages/engine/src/services/parallelCoordinator.ts has 1148 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/studio-server/src/research/service.ts · ×1
packages/studio-server/src/research/service.ts: 1135 lines of code packages/studio-server/src/research/service.ts:1— packages/studio-server/src/research/service.ts has 1135 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/cli/src/media-use/resolve.mjs · ×1
packages/cli/src/media-use/resolve.mjs: 1133 lines of code packages/cli/src/media-use/resolve.mjs:1— packages/cli/src/media-use/resolve.mjs has 1133 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/agent-protocol/src/validate.ts · ×1
packages/agent-protocol/src/validate.ts: 1091 lines of code packages/agent-protocol/src/validate.ts:1— packages/agent-protocol/src/validate.ts has 1091 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/agent-protocol/src/qa.ts · ×1
packages/agent-protocol/src/qa.ts: 1089 lines of code packages/agent-protocol/src/qa.ts:1— packages/agent-protocol/src/qa.ts has 1089 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/engine/src/config.ts · ×1
packages/engine/src/config.ts: 1076 lines of code packages/engine/src/config.ts:1— packages/engine/src/config.ts has 1076 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/cli/src/server/studioServer.ts · ×1
packages/cli/src/server/studioServer.ts: 1070 lines of code packages/cli/src/server/studioServer.ts:1— packages/cli/src/server/studioServer.ts has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~54 LoC) packages/producer/src/verifyStaticPage.ts— no import path from any entry point (721 application, 115 tooling, 1805 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 (~32 LoC) packages/studio/src/player/components/TimelineDropInsertionLine.tsx— no import path from any entry point (721 application, 115 tooling, 1805 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/producer/src/parity-fixtures.ts— no import path from any entry point (721 application, 115 tooling, 1805 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 (~20 LoC) packages/studio/src/utils/safeStorage.ts— no import path from any entry point (721 application, 115 tooling, 1805 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 (~18 LoC) packages/studio/src/components/icons/InspectorIcon.tsx— no import path from any entry point (721 application, 115 tooling, 1805 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 (~13 LoC) scripts/generate-captured-font-copies.mjs— no import path from any entry point (721 application, 115 tooling, 1805 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 (~10 LoC) packages/studio/src/captions/index.ts— no import path from any entry point (721 application, 115 tooling, 1805 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
Unused dependency 'debug' REDACTED:31— Declared in 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.
Unused dependency 'ignore' REDACTED:35— Declared in 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.
Unused dependency '@fontsource/archivo-black' packages/producer/REDACTED:39— Declared in packages/producer/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.
Unused dependency '@fontsource/eb-garamond' packages/producer/REDACTED:40— Declared in packages/producer/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.
Unused dependency '@fontsource/ibm-plex-mono' packages/producer/REDACTED:41— Declared in packages/producer/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.
Unused dependency '@fontsource/inter' packages/producer/REDACTED:42— Declared in packages/producer/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.
Unused dependency '@fontsource/jetbrains-mono' packages/producer/REDACTED:43— Declared in packages/producer/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.
Unused dependency '@fontsource/lato' packages/producer/REDACTED:64— Declared in packages/producer/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.
Unused dependency '@fontsource/league-gothic' packages/producer/REDACTED:44— Declared in packages/producer/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.
Unused dependency '@fontsource/montserrat' packages/producer/REDACTED:45— Declared in packages/producer/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.
Unused dependency '@fontsource/noto-sans-jp' packages/producer/REDACTED:65— Declared in packages/producer/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.
Unused dependency '@fontsource/nunito' packages/producer/REDACTED:46— Declared in packages/producer/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.
Unused dependency '@fontsource/open-sans' packages/producer/REDACTED:66— Declared in packages/producer/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.
Unused dependency '@fontsource/oswald' packages/producer/REDACTED:47— Declared in packages/producer/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.
Unused dependency '@fontsource/outfit' packages/producer/REDACTED:48— Declared in packages/producer/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.
Unused dependency '@fontsource/playfair-display' packages/producer/REDACTED:67— Declared in packages/producer/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.
Unused dependency '@fontsource/poppins' packages/producer/REDACTED:68— Declared in packages/producer/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.
Unused dependency '@fontsource/roboto' packages/producer/REDACTED:69— Declared in packages/producer/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.
Unused dependency '@fontsource/source-code-pro' packages/producer/REDACTED:70— Declared in packages/producer/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.
Unused dependency '@fontsource/space-mono' packages/producer/REDACTED:49— Declared in packages/producer/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.
Third-party script without Subresource Integrity packages/cli/src/templates/blank/index.html:6— `https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 447 such include(s) across the repository's markup.
Mock-dominated test: passes the live handle selection to transform and every animation actor packages/studio/src/webmcp/tools/targetedWriteTools.test.ts:67— This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: calls apply then persist on success, never rollback packages/studio/src/utils/optimisticUpdate.test.ts:5— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: calls rollback with snapshot on persist failure packages/studio/src/utils/optimisticUpdate.test.ts:17— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: preserves complex snapshot objects through rollback packages/studio/src/utils/optimisticUpdate.test.ts:29— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: handles undefined snapshot for rollback packages/studio/src/utils/optimisticUpdate.test.ts:44— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records the on-disk content as the undo before, not serialize() REDACTED:1094— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records one history entry, then selects and refreshes once packages/studio/src/utils/timelineCompositionInsert.test.ts:14— This test sets up 7 test doubles (for example `vi
.fn`) against 0 real object(s) of its own, and its only verification is 8 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: suspends new rich work while scrolling but lets posters proceed packages/studio/src/player/lib/thumbnailScheduler.test.ts:139— This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: keeps failed requests quiet until the TTL expires packages/studio/src/player/lib/thumbnailScheduler.test.ts:385— This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: borrows the element from the runtime for the audition and returns it on stop packages/studio/src/player/lib/timelineIframeHelpers.test.ts:196— This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: paints a baseline and peak bar for every mapped waveform bin packages/studio/src/player/components/AudioWaveform.test.tsx:24— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: puts the live value back and writes nothing when the gesture is cancelled packages/studio/src/player/components/TimelineClipFades.test.tsx:161— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: borrows a muted target's mute for the audition and returns it packages/studio/src/player/components/TimelineFxButton.test.tsx:75— This test sets up 4 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: leaves an unmuted target's mute alone packages/studio/src/player/components/TimelineFxButton.test.tsx:97— This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: collapses a selected expanded child onto its authored composition host packages/studio/src/player/components/timelineClipDragCommit.test.ts:313— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: +2s on its own lane → single onMoveElement, zero stacking patches packages/studio/src/player/components/timelineClipDragCommit.test.ts:817— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: writes only the dragged clip's start; no other clip, no z packages/studio/src/player/components/timelineClipDragCommit.test.ts:870— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: a lane change that produces ZERO move edits fires no z-sync (no orphaned z entry, ITEM 5) packages/studio/src/player/components/timelineClipDragCommit.test.ts:1028— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: rolls back the move and skips the z-sync when the persist fails packages/studio/src/player/components/timelineClipDragCommit.test.ts:1087— This test sets up 5 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: a plain move that issues no z patch persists once and records no second entry (unchanged) packages/studio/src/player/components/timelineClipDragCommit.test.ts:1173— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: the z-sync candidate reflects the snapped start, not the raw previewStart packages/studio/src/player/components/timelineClipDragCommit.test.ts:1210— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: the z-sync candidate of a plain lane change carries the snapped start packages/studio/src/player/components/timelineClipDragCommit.test.ts:1243— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: reads the element rect twice for the pixel assertion packages/studio/src/hooks/gestureTransaction.test.ts:213— This test sets up 3 test doubles (for example `vi
.spyOn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: skips the pixel assertion for live position tweens packages/studio/src/hooks/gestureTransaction.test.ts:231— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: reloads when the mutation endpoint fails after dispatch packages/studio/src/hooks/timelineTimingSync.test.ts:107— This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Duplicated predicate packages/cli/src/media-use/lib/error-diffusion.mjs:139— `!(errors instanceof Float32Array) || errors.length !== errorLength` appears character-identically in 2 files — packages/cli/src/media-use/lib/error-diffusion.mjs, skills/media-use/scripts/lib/error-diffusion.mjs. 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/cli/src/media-use/lib/error-diffusion.mjs:205— `!Array.isArray(colors) || colors.length < 2 || colors.length > 6` appears character-identically in 2 files — packages/cli/src/media-use/lib/error-diffusion.mjs, skills/media-use/scripts/lib/error-diffusion.mjs. 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 skills/faceless-explainer/scripts/lib/transition-registry.mjs:25— `!Array.isArray(data.transitions) || data.transitions.length === 0` appears character-identically in 3 files — skills/faceless-explainer/scripts/lib/transition-registry.mjs, skills/pr-to-video/scripts/lib/transition-registry.mjs, skills/product-launch-video/scripts/lib/transition-registry.mjs. 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 skills/faceless-explainer/scripts/captions.mjs:88— `!Array.isArray(meta.voices) || meta.voices.length === 0` appears character-identically in 3 files — skills/faceless-explainer/scripts/captions.mjs, skills/pr-to-video/scripts/captions.mjs, skills/product-launch-video/scripts/captions.mjs. 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/core/src/colorGrading.ts:1079— `!Array.isArray(value) || value.length < 2 || value.length > 6` appears character-identically in 2 files — packages/core/src/colorGrading.ts, packages/parsers/src/colorGradingContract.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/core/src/colorGrading.ts:1239— `!Array.isArray(value) || value.length < 3 || value.length > COLOR_GRADING_MAX_CURVE_POINTS` appears character-identically in 2 files — packages/core/src/colorGrading.ts, packages/parsers/src/colorGradingContract.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/agent-protocol/src/editingRead.ts:183— `!Array.isArray(value) || value.length === 0` appears character-identically in 2 files — packages/agent-protocol/src/editingRead.ts, packages/studio-server/src/research/sources/policyStore.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/cli/src/commands/layout-audit.browser.js:1898— `!Number.isFinite(a) || !Number.isFinite(b)` appears character-identically in 2 files — packages/cli/src/commands/layout-audit.browser.js, packages/core/src/clipFacts.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/cli/src/commands/layout.ts:73— `!Number.isFinite(duration) || duration <= 0` appears character-identically in 7 files — packages/cli/src/commands/layout.ts, packages/cli/src/utils/checkPipeline.ts, packages/cli/src/utils/layoutAudit.ts, packages/core/src/audioFade.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/engine/src/services/videoFrameExtractor.ts:130— `!Number.isFinite(durationSeconds) || durationSeconds <= 0` appears character-identically in 2 files — packages/engine/src/services/videoFrameExtractor.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/cli/src/media-use/lib/transcriptCutFade.mjs:12— `!Number.isFinite(durationSeconds) || durationSeconds <= 0.01` appears character-identically in 2 files — packages/cli/src/media-use/lib/transcriptCutFade.mjs, skills/media-use/scripts/lib/transcriptCutFade.mjs. 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/studio/src/player/lib/timelineClipIndex.ts:35— `!Number.isFinite(element.start) || !Number.isFinite(element.duration)` appears character-identically in 2 files — packages/studio/src/player/lib/timelineClipIndex.ts, packages/studio/src/utils/studioHelpers.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 skills/faceless-explainer/scripts/assemble-index.mjs:274— `!Number.isFinite(f.durationSeconds) || f.durationSeconds <= 0` appears character-identically in 4 files — skills/faceless-explainer/scripts/assemble-index.mjs, skills/music-to-video/scripts/assemble-index.mjs, skills/music-to-video/scripts/validate-plan.mjs, skills/pr-to-video/scripts/assemble-index.mjs. 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/studio/src/components/editor/propertyPanelFlatTimingDerivation.ts:39— `!Number.isFinite(lo) || !Number.isFinite(hi) || hi <= lo` appears character-identically in 2 files — packages/studio/src/components/editor/propertyPanelFlatTimingDerivation.ts, packages/studio/src/components/editor/propertyPanelTimingSection.tsx. 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/cli/src/media-use/lib/error-diffusion.mjs:218— `!Number.isFinite(number) || number < min || number > max` appears character-identically in 2 files — packages/cli/src/media-use/lib/error-diffusion.mjs, skills/media-use/scripts/lib/error-diffusion.mjs. 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/lint/src/rules/composition.ts:1148— `!Number.isFinite(rootDuration) || rootDuration <= 0` appears character-identically in 2 files — packages/lint/src/rules/composition.ts, packages/studio/src/player/lib/timelineIframeHelpers.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/player/src/controls.ts:44— `!Number.isFinite(seconds) || seconds < 0` appears character-identically in 3 files — packages/player/src/controls.ts, packages/studio/src/components/editor/propertyPanelHelpers.ts, packages/studio/src/components/nle/AssetPreviewOverlay.tsx. 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/cli/src/media-use/lib/cutlist.mjs:70— `!Number.isFinite(start) || !Number.isFinite(end)` appears character-identically in 3 files — packages/cli/src/media-use/lib/cutlist.mjs, packages/producer/src/services/deterministicFonts.ts, skills/media-use/scripts/lib/cutlist.mjs. 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/core/src/runtime/init.ts:938— `!Number.isFinite(start) || duration == null || duration <= 0` appears character-identically in 2 files — packages/core/src/runtime/init.ts, packages/core/src/runtime/timeline.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/cli/src/media-use/lib/cutlist.mjs:124— `!Number.isFinite(threshold) || threshold <= 0` appears character-identically in 2 files — packages/cli/src/media-use/lib/cutlist.mjs, skills/media-use/scripts/lib/cutlist.mjs. 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/engine/src/config.ts:573— `!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0` appears character-identically in 2 files — packages/engine/src/config.ts, packages/studio/src/components/editor/domEditOverlayGeometry.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/cli/src/media-use/lib/error-diffusion.mjs:226— `!Number.isInteger(number) || number < min || number > max` appears character-identically in 2 files — packages/cli/src/media-use/lib/error-diffusion.mjs, skills/media-use/scripts/lib/error-diffusion.mjs. 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/cli/src/capture/captureWatchdog.ts:69— `!Number.isInteger(parsed) || parsed <= 0` appears character-identically in 2 files — packages/cli/src/capture/captureWatchdog.ts, packages/cli/src/commands/capture.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/cli/src/media-use/lib/cutlist.mjs:89— `!Number.isInteger(startIndex) || !Number.isInteger(endIndex)` appears character-identically in 2 files — packages/cli/src/media-use/lib/cutlist.mjs, skills/media-use/scripts/lib/cutlist.mjs. 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/cli/src/media-use/lib/error-diffusion.mjs:119— `!Number.isInteger(width) || width < 1 || !Number.isInteger(height) || height < 1` appears character-identically in 2 files — packages/cli/src/media-use/lib/error-diffusion.mjs, skills/media-use/scripts/lib/error-diffusion.mjs. 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.
Silent fallback default in catch packages/agent-runtime/src/qa/pass.ts:436— `loadAccepted` 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/agent-runtime/src/turn/reverts.ts:72— `checkpointFiles` 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/agent-runtime/src/omp/path-guard.ts:210— `guardToolCallPaths` swallows every exception into `return "That path pattern is too broad to check against the project boundary, so it was blocked. Use one explicit path per call."` — 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/agent-runtime/src/omp/path-guard.ts:262— `resolveProjectFileTargets` 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/cli/src/utils/skillsManifest.ts:232— `listSubdirs` 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/cli/src/utils/processTree.ts:95— `getDescendants` 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/cli/src/capture/assetCataloger.ts:378— `getWidthParam` 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.
Silent fallback default in catch packages/cli/src/registry/installer.ts:81— `readInstallRecord` 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/cli/src/utils/orphanCleanup.ts:160— `processAncestorSnapshot` 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/cli/src/utils/orphanCleanup.ts:230— `killOrphansMatching` 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.
Silent fallback default in catch packages/cli/src/commands/previewLifecycle.ts:347— `listBackgroundPreviewStatuses` 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/cli/src/server/renderResidue.ts:28— `sweepRenderResidue` 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/producer/src/services/authoredGoogleFonts.ts:12— `googleStylesheetFamilies` 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/producer/src/services/authoredGoogleFonts.ts:27— `importUrls` 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/producer/src/services/render/directoryOwner.ts:107— `sweepStaleRenderScratch` 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/cli/src/server/studioServer.ts:173— `readStudioManualEditManifestContent` 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/cli/src/utils/modelConsent.ts:32— `readConsentFile` 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/cli/src/registry/localSemantic.ts:267— `localVectorNames` 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/cli/src/commands/layout.ts:152— `timelineBoundaries` (in `collectTweenBoundaries`) 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/cli/src/commands/layout.ts:340— `findAmbiguousSelectors` 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/cli/src/utils/checkBrowser.ts:656— `collectGeometryCandidates` 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/cli/src/utils/checkBrowser.ts:670— `findAmbiguousSelectors` 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/cli/src/commands/motionShot.ts:524— `resolveScopeInBrowser` 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:494— `animatedAncestors` 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/cli/src/utils/historyOwner.ts:82— `readLastTurns` 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.
redundant comment packages/agent-runtime/src/analysis/tools.test.ts:51— "The Editor is off: the Director plans and builds the cut itself." repeats the code it sits on: 4 of its 5 words (director, plans, builds, cut) are already in `expect(analysisToolsOf("director", ["vision", "motion"])).toEqual([`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/capture/coreExtractionPhase.ts:223— "Extract design tokens" repeats the code it sits on: 3 of its 3 words (extract, design, tokens) are already in `progress("tokens", "Extracting design tokens...");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/commands/capture/video.test.ts:147— ""hero%20clip.mp4" and "hero clip.mp4" both → "hero_clip.mp4"" repeats the code it sits on: 4 of its 4 words (hero, 20, clip, mp) are already in `const manifest = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/commands/play.ts:96— "Validation: --remote-debugging-port deps" repeats the code it sits on: 4 of its 5 words (remote, debugging, port, deps) are already in `const depsError = validateRemoteDebuggingPortDeps({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/cli/src/commands/play.ts:128— "Resolve player path" repeats the code it sits on: 3 of its 3 words (resolve, player, path) are already in `const playerPath = resolvePlayerPath();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:436— "Validation: --remote-debugging-port deps" repeats the code it sits on: 4 of its 5 words (remote, debugging, port, deps) are already in `const depsError = validateRemoteDebuggingPortDeps({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/src/compiler/timingResolver.ts:150— "exitAt = enterAt + enterDuration + hold + exitDuration" repeats the code it sits on: 4 of its 4 words (exit, enter, duration, hold) are already in `const exitAt = enterAt + anchor.enterDuration + holdDuration + anchor.exitDuration;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/src/generators/hyperframes.ts:182— "Text outline using -webkit-text-stroke" repeats the code it sits on: 4 of its 5 words (text, outline, webkit, stroke) are already in `const textOutline = element.textOutline`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/core/src/generators/hyperframes.ts:264— "Generate zoom keyframes GSAP animations" repeats the code it sits on: 5 of its 5 words (generate, zoom, keyframes, gsap, animations) are already in `const zoomAnimations = generateZoomGsapAnimations(stageZoomKeyframes || [], width, height);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:458— "Parse stage zoom keyframes from zoom container" repeats the code it sits on: 4 of its 5 words (parse, stage, zoom, keyframes) are already in `const stageZoomKeyframes = parseStageZoomKeyframes(doc);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/parsers/src/types.ts:198— "Composition Variable Types" repeats the code it sits on: 3 of its 3 words (composition, variable, types) are already in `export type CompositionVariableType =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/producer/src/services/compilationRunner.ts:120— "Compile the input HTML" repeats the code it sits on: 3 of its 3 words (compile, input, html) are already in `const compiled = await compileForRender(suite.srcDir, inputHtmlPath, tempDir);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/producer/src/services/fileServer-seededRandom.test.ts:86— "toString() of native Math.random is `function random() { [native code] }`" repeats the code it sits on: 5 of its 6 words (string, native, math, random, code) are already in `const isNative = run<boolean>(`/\\[native code\\]/.test(Math.random.toString())`);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/sdk/src/session.timings.test.ts:152— "hf-intro: enterAt=1, exitAt=4" repeats the code it sits on: 4 of its 4 words (hf, intro, enter, exit) are already in `expect(timings["hf-intro"]).toMatchObject({ enterAt: 1, exitAt: 4 });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:3323— "Update references to the old path across all project files" repeats the code it sits on: 5 of its 6 words (update, references, path, project, files) are already in `const updatedFiles = updateReferences(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/captions/generator.ts:201— "Container: border radius" repeats the code it sits on: 3 of its 3 words (container, border, radius) are already in `if (containerStyle.borderRadius > 0)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/captions/generator.ts:213— "Container: box shadow" repeats the code it sits on: 3 of its 3 words (container, box, shadow) are already in `if (containerStyle.boxShadow && containerStyle.boxShadow !== "none")`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/captions/parser.ts:47— "Chunk the transcript into groups of wordsPerGroup" repeats the code it sits on: 4 of its 5 words (transcript, groups, words, group) are already in `for (let groupIdx = 0; groupIdx < transcript.length; groupIdx += wordsPerGroup)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/propertyPanelFill.tsx:78— "ImageFillField" repeats the code it sits on: 3 of its 3 words (image, fill, field) are already in `export function ImageFillField({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/propertyPanelFlatStyleSections.tsx:289— "Flat Shadow + Blend rows" repeats the code it sits on: 4 of its 4 words (flat, shadow, blend, rows) are already in `function FlatShadowBlendRows({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/propertyPanelFlatStyleSections.tsx:438— "Flat Opacity slider" repeats the code it sits on: 3 of its 3 words (flat, opacity, slider) are already in `function FlatOpacitySlider({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/propertyPanelFont.tsx:135— "FontFamilyField" repeats the code it sits on: 3 of its 3 words (font, family, field) are already in `export function FontFamilyField({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/snapEngine.ts:479— "Gap between A and B = B.left - A.right" repeats the code it sits on: 3 of its 3 words (gap, left, right) are already in `const gapAB = b.left - a.right;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/studioMotionOps.test.ts:23— "── readStudioMotionFromElement semantics ──" repeats the code it sits on: 4 of its 5 words (read, studio, motion, element) are already in `describe("readStudioMotionFromElement", () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment packages/studio/src/components/editor/studioMotionOps.test.ts:277— "── clearStudioMotionFromElement ──" repeats the code it sits on: 4 of its 4 words (clear, studio, motion, element) are already in `describe("clearStudioMotionFromElement", () =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
+ 5 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×18
Console output used as the logging channel packages/producer/src/parity-fixtures.ts:21— `packages/producer/src/parity-fixtures.ts` reports through `console.*` at line 21 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/producer/src/perf-gate.ts:26— `packages/producer/src/perf-gate.ts` reports through `console.*` at line 26 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/producer/src/runtime-conformance.ts:38— `packages/producer/src/runtime-conformance.ts` reports through `console.*` at line 38 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/producer/src/services/audioExtractor.ts:155— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 155 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/producer/src/services/audioExtractor.ts:267— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 267 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/producer/src/services/audioExtractor.ts:271— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 271 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/producer/src/services/audioExtractor.ts:287— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 287 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/producer/src/services/audioExtractor.ts:311— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 311 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/producer/src/services/audioExtractor.ts:321— `packages/producer/src/services/audioExtractor.ts` reports through `console.*` at line 321 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/producer/src/services/compilationRunner.ts:109— `packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 109 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/producer/src/services/compilationRunner.ts:131— `packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 131 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/producer/src/services/compilationRunner.ts:136— `packages/producer/src/services/compilationRunner.ts` reports through `console.*` at line 136 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/producer/src/services/fontCompression.ts:110— `packages/producer/src/services/fontCompression.ts` reports through `console.*` at line 110 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/producer/src/services/healthWorker.ts:169— `packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 169 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/producer/src/services/healthWorker.ts:170— `packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 170 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/producer/src/services/healthWorker.ts:171— `packages/producer/src/services/healthWorker.ts` reports through `console.*` at line 171 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/producer/src/services/shaderTransitionWorker.ts:94— `packages/producer/src/services/shaderTransitionWorker.ts` reports through `console.*` at line 94 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/producer/src/services/render/shared.ts:172— `packages/producer/src/services/render/shared.ts` reports through `console.*` at line 172 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Disabled test packages/engine/src/services/drawElementService.integration.test.ts:42— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/engine/src/services/drawElementService.integration.test.ts:43— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/engine/src/services/drawElementService.integration.test.ts:44— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/engine/src/services/drawElementService.integration.test.ts:45— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/parsers/src/gsapParserAcorn.full.test.ts:599— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/parsers/src/gsapParserAcorn.full.test.ts:747— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/parsers/src/gsapParserAcorn.full.test.ts:769— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/parsers/src/gsapParserAcorn.full.test.ts:773— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/studio-server/src/history/projectHistory.test.ts:1088— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test packages/studio-server/src/routes/files.pathSafety.test.ts:58— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Fat interface: CheckAuditDriver (17 required operations) packages/cli/src/utils/checkTypes.ts:180— `CheckAuditDriver` declares 17 required operations: `initialize`, `getDuration`, `hasNoTimelineDeclaration`, `getTransitionBoundaries`, `getCanvas`, `findAmbiguousSelectors`, `seek`, `seekGeometry`, `collectLayout`, `collectOverlap`, `collectLayoutGeometry`, `collectRotationSample`, `collectOffPivotRotationSample`, `collectGeometryCandidates`, `collectMotionFrame`, `anchorMotionIssues`, `collectContrast`. 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: PlayerAPI (43 required operations) packages/parsers/src/types.ts:367— `PlayerAPI` declares 43 required operations: `play`, `pause`, `seek`, `getTime`, `getDuration`, `isPlaying`, `getMainTimeline`, `getElementBounds`, `getElementsAtPoint`, `setElementPosition`, `previewElementPosition`, `setElementKeyframes`, `setElementScale`, `setElementFontSize`, `setElementTextContent`, `setElementTextColor`, `setElementTextShadow`, `setElementTextFontWeight`, `setElementTextFontFamily`, `setElementTextOutline`, `setElementTextHighlight`, `setElementVolume`, `setStageZoom`, `getStageZoom`, `setStageZoomKeyframes`, `getStageZoomKeyframes`, `addElement`, `removeElement`, `updateElementTiming`, `setElementTiming`, `updateElementSrc`, `updateElementLayer`, `updateElementBasePosition`, `markTimelineDirty`, `isTimelineDirty`, `rebuildTimeline`, `ensureTimeline`, `enableRenderMode`, `disableRenderMode`, `renderSeek`, and 3 more. 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: Composition (51 required operations) packages/sdk/src/types.ts:419— `Composition` declares 51 required operations: `setStyle`, `setText`, `setAttribute`, `setTiming`, `removeElement`, `addElement`, `setVariableValue`, `getVariableValue`, `listVariables`, `removeVariable`, `declareVariable`, `updateVariableDeclaration`, `removeVariableDeclaration`, `getVariableDeclarations`, `getVariableValues`, `validateVariableValues`, `getVariableUsage`, `setPreviewVariables`, `getElementTimings`, `setElementTiming`, `setHold`, `addGsapTween`, `setGsapTween`, `removeGsapTween`, `addWithKeyframes`, `replaceWithKeyframes`, `undo`, `redo`, `canUndo`, `canRedo`, `getElements`, `getRootElements`, `getElement`, `find`, `getAllAnimationIds`, `selection`, `element`, `getSelection`, `setSelection`, `dispatch`, and 11 more. 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. Those 51 declarations carry 48 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 48 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: ProjectHistory (16 required operations) packages/studio-server/src/history/projectHistory.ts:135— `ProjectHistory` declares 16 required operations: `beginWindow`, `claim`, `noteChange`, `list`, `step`, `next`, `undo`, `restore`, `peek`, `checkout`, `readBlob`, `pin`, `onEntry`, `flush`, `replacedAtPath`, `close`. 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: AgentClient (39 required operations) packages/studio/src/agent/agentClient.ts:110— `AgentClient` declares 39 required operations: `listChats`, `listModels`, `createChat`, `getChat`, `updateChat`, `startTurn`, `steerTurn`, `abortTurn`, `revertTurn`, `unrevertTurn`, `answerPermission`, `answerStoryOffer`, `answerVoiceSetup`, `answerVoicePilot`, `answerQuestion`, `cancelRun`, `deleteChat`, `chatEventsUrl`, `projectEventsUrl`, `getSettings`, `updateSettings`, `setJevApiKey`, `testJev`, `listProviders`, `refreshProviders`, `setProviderApiKey`, `startOAuthLogin`, `getOAuthLogin`, `submitOAuthLoginInput`, `cancelOAuthLogin`, `logoutProvider`, `listProviderModels`, `getQaReport`, `acceptQaIssue`, `listQaAccepted`, `removeQaAccepted`, `getUsage`, `renderFileUrl`, `claimIntake`. 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: UseDomEditWiringParams (25 required operations) packages/studio/src/hooks/useDomEditWiring.ts:21— `UseDomEditWiringParams` declares 25 required operations: `refreshDomEditGroupSelectionsFromPreview`, `bumpGsapCache`, `showToast`, `refreshPreviewDocumentVersion`, `syncPreviewHotkeys`, `applyDomSelection`, `buildDomSelectionFromTarget`, `updateGsapProperty`, `updateGsapMeta`, `deleteGsapAnimation`, `deleteAllForSelector`, `addGsapAnimation`, `addGsapProperty`, `removeGsapProperty`, `updateGsapFromProperty`, `addGsapFromProperty`, `removeGsapFromProperty`, `addKeyframe`, `addKeyframeBatch`, `removeKeyframe`, `moveKeyframe`, `resizeKeyframedTween`, `convertToKeyframes`, `removeAllKeyframes`, `handleDomManualEditsReset`. 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: AgentSettingsSlice (20 required operations) packages/studio/src/agent/agentSettingsSlice.ts:37— `AgentSettingsSlice` declares 20 required operations: `loadSettings`, `updateSettings`, `setJevApiKey`, `testJev`, `loadProviders`, `reloadProviders`, `refreshProviders`, `setProviderApiKey`, `startOAuthLogin`, `pollOAuthLogin`, `submitOAuthInput`, `cancelOAuthLogin`, `reloadAfterSignIn`, `signOutProvider`, `loadProviderModels`, `selectThread`, `setEnabledAgents`, `setAgentOverride`, `setDirectorConfig`, `setExecutionQuality`. 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: FxRackChainProps (17 required operations) packages/studio/src/components/editor/propertyPanelFxRackChain.tsx:22— `FxRackChainProps` declares 17 required operations: `onToggleCarveOpen`, `onCarveChange`, `onCarvePreview`, `onToggleEq`, `onPreviewEqBand`, `onCommitEqBand`, `onRemoveEq`, `onToggleOpenNode`, `onUpdateNode`, `onMoveNode`, `onRemoveNode`, `onPreviewNode`, `onToggleCollapse`, `onSetRunAmount`, `onRemoveRun`, `presetAutomateHandler`, `presetRemoveAutomationHandler`. 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: VoiceClient (23 required operations) packages/studio/src/voice/voiceClient.ts:106— `VoiceClient` declares 23 required operations: `providers`, `updateProvider`, `setApiKey`, `removeApiKey`, `checkProvider`, `controls`, `voices`, `designVoice`, `presets`, `createPreset`, `updatePreset`, `deletePreset`, `sample`, `audioUrl`, `dialects`, `script`, `saveScript`, `setProjectVoice`, `check`, `synthesize`, `progress`, `cancel`, `selectTake`. 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.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×8
Projects may be oversized for their cohesion REDACTED:1— `(repository root)` (52876 LoC, 585 module-visible types across 357 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `packages/studio` (184386 LoC, 2007 module-visible types across 40 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion REDACTED:1— `packages/cli` (63582 LoC, 632 module-visible types across 22 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/studio-server/REDACTED:1— `packages/studio-server` (55957 LoC, 572 module-visible types across 20 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/core/REDACTED:1— `packages/core` (43485 LoC, 423 module-visible types across 24 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/producer/REDACTED:1— `packages/producer` (30519 LoC, 262 module-visible types across 9 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/engine/REDACTED:1— `packages/engine` (28403 LoC, 215 module-visible types across 4 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion packages/parsers/REDACTED:1— `packages/parsers` (14331 LoC, 133 module-visible types across 3 directories) overshoots its size bounds. 8 of 16 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Hand-rolled JSON/XML parsing via regex packages/studio-server/src/routes/preview.ts:154— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/studio-server/src/helpers/subComposition.ts:324— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/studio/src/utils/studioFontHelpers.ts:71— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/studio/src/utils/studioFontHelpers.ts:79— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/lint/src/rules/media.ts:882— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/lint/src/rules/media.ts:922— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/cli/src/whisper/normalize.ts:562— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex packages/cli/src/commands/init.ts:310— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
IC1 · Incompleteness & stubs· Empty method body · ×6
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:14— `onAddAnimation` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:15— `onUpdateProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:16— `onUpdateMeta` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:17— `onDeleteAnimation` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:18— `onAddProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body packages/studio/src/components/editor/propertyPanelFlatDescriptors.ts:19— `onRemoveProperty` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Silent fallback default on Err apps/desktop/src-tauri/src/design_library.rs:395— `list` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err apps/desktop/src-tauri/src/lib.rs:231— `studio_origins` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err apps/desktop/src-tauri/src/lib.rs:243— `trusted_origins` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err apps/desktop/src-tauri/src/lib.rs:1095— `open_project_scopes` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err apps/desktop/src-tauri/src/logfile.rs:189— `read_tail` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
No app-layer HTTPS enforcement detected packages/cli/src/utils/compositionServer.ts:179— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected packages/engine/src/services/fileServer.ts:149— `serve(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected packages/producer/src/server.ts:947— `serve(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected packages/producer/src/services/healthWorkerThread.ts:70— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
Subsumed condition operand packages/parsers/src/assetUrls.ts:80— `val.startsWith("//")` can never decide this `||` — every value satisfying `val.startsWith("//")` also satisfies `val.startsWith("/")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand apps/desktop/src-tauri/src/ffmpeg_install.rs:1286— `path_line.contains("/bin:")` can never decide this `&&` — every value satisfying `path_line.contains(":/usr/bin:/bin")` also satisfies `path_line.contains("/bin:")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
No ADRs found REDACTED:7— 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/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 7).
D21 · Naming Consistency· `toDataURL` spells `URL` where 18 names in the project spell it `Url` · ×1
`toDataURL` spells `URL` where 18 names in the project spell it `Url` packages/studio/src/shims/canvasBrowserStub.js:37— 18 of 19 names in project hyperframes-monorepo spell the token `Url` (18 of 19; unit: names in project hyperframes-monorepo containing `Url`). Peers: design.fileUrl (apps/desktop/src-tauri/src/home_page/design.js:65); settings-assets.sourcesUrl (apps/desktop/src-tauri/src/home_page/settings-assets.js:29); settings-signin.httpsUrl (apps/desktop/src-tauri/src/home_page/settings-signin.js:43); settings-voice.providerUrl (apps/desktop/src-tauri/src/home_page/settings-voice.js:32); settings-voice.presetUrl (apps/desktop/src-tauri/src/home_page/settings-voice.js:33). Rename to `toDataUrl`. [rule N6]
D21 · Naming Consistency· `heygenJSON` spells `JSON` where 13 names in the project spell it `Json` · ×1
`heygenJSON` spells `JSON` where 13 names in the project spell it `Json` skills/media-use/audio/scripts/lib/heygen.mjs:111— 13 of 14 names in project hyperframes-monorepo spell the token `Json` (13 of 14; unit: names in project hyperframes-monorepo containing `Json`). Peers: licenses.readJson (apps/desktop/scripts/licenses.mjs:28); i18n.defaultFetchJson (apps/desktop/src-tauri/src/home_page/i18n.js:305); heygen-cli.runHeygenJson (packages/cli/src/media-use/lib/heygen-cli.mjs:116); logo-provider.fetchJson (packages/cli/src/media-use/lib/logo-provider.mjs:127); recipe-store.readRecipeJson (packages/cli/src/media-use/lib/recipe-store.mjs:184). Rename to `heygenJson`. [rule N6]
D21 · Naming Consistency· `ensureDOMParser` spells `DOM` where 245 names in the project spell it `Dom` · ×1
`ensureDOMParser` spells `DOM` where 245 names in the project spell it `Dom` packages/cli/src/utils/dom.ts:7— 245 of 247 names in project hyperframes-monorepo spell the token `Dom` (245 of 247; unit: names in project hyperframes-monorepo containing `Dom`). Peers: mediaCapture.scanVideoDom (packages/cli/src/capture/mediaCapture.ts:351); mediaCapture.sampleVideoDom (packages/cli/src/capture/mediaCapture.ts:363); mediaVolumeEnvelope.isDomNode (packages/core/src/runtime/mediaVolumeEnvelope.ts:229); screenshotService.applyDomLayerMask (packages/engine/src/services/screenshotService.ts:399); screenshotService.removeDomLayerMask (packages/engine/src/services/screenshotService.ts:557). Rename to `ensureDomParser`. [rule N6]
D21 · Naming Consistency· `CreateGSAPFrameAdapterOptions` spells `GSAP` where 261 names in the project spell it `Gsap` · ×1
`CreateGSAPFrameAdapterOptions` spells `GSAP` where 261 names in the project spell it `Gsap` packages/core/src/adapters/gsap.ts:12— 261 of 263 names in project hyperframes-monorepo spell the token `Gsap` (261 of 263; unit: names in project hyperframes-monorepo containing `Gsap`). Peers: test-hyperframe-linter.testDetectsOverlappingGsapTweens (packages/core/scripts/test-hyperframe-linter.ts:57); test-hyperframe-runtime-seek.testSeekUsesDeterministicGsapPath (packages/core/scripts/test-hyperframe-runtime-seek.ts:66); test-hyperframe-runtime-seek.testGsapAdapterPreservesTotalTime (packages/core/scripts/test-hyperframe-runtime-seek.ts:92); test-hyperframe-runtime-seek.testGsapAdapterFallsBackToSeek (packages/core/scripts/test-hyperframe-runtime-seek.ts:111); motionToGsap.motionToGsap (packages/core/src/figma/motionToGsap.ts:89). Rename to `CreateGsapFrameAdapterOptions`. [rule N6]
D21 · Naming Consistency· `createGSAPFrameAdapter` spells `GSAP` where 261 names in the project spell it `Gsap` · ×1
`createGSAPFrameAdapter` spells `GSAP` where 261 names in the project spell it `Gsap` packages/core/src/adapters/gsap.ts:18— 261 of 263 names in project hyperframes-monorepo spell the token `Gsap` (261 of 263; unit: names in project hyperframes-monorepo containing `Gsap`). Peers: test-hyperframe-linter.testDetectsOverlappingGsapTweens (packages/core/scripts/test-hyperframe-linter.ts:57); test-hyperframe-runtime-seek.testSeekUsesDeterministicGsapPath (packages/core/scripts/test-hyperframe-runtime-seek.ts:66); test-hyperframe-runtime-seek.testGsapAdapterPreservesTotalTime (packages/core/scripts/test-hyperframe-runtime-seek.ts:92); test-hyperframe-runtime-seek.testGsapAdapterFallsBackToSeek (packages/core/scripts/test-hyperframe-runtime-seek.ts:111); motionToGsap.motionToGsap (packages/core/src/figma/motionToGsap.ts:89). Rename to `createGsapFrameAdapter`. [rule N6]
D21 · Naming Consistency· `CompositionAPI` spells `API` where 44 names in the project spell it `Api` · ×1
`CompositionAPI` spells `API` where 44 names in the project spell it `Api` packages/parsers/src/types.ts:357— 44 of 46 names in project hyperframes-monorepo spell the token `Api` (44 of 46; unit: names in project hyperframes-monorepo containing `Api`). Peers: packages.agent-protocol.src.api.SetJevApiKeyRequest (packages/agent-protocol/src/api.ts:348); packages.agent-protocol.src.api.SetProviderApiKeyRequest (packages/agent-protocol/src/api.ts:356); packages.agent-protocol.src.research.SourceApiKey (packages/agent-protocol/src/research.ts:64); packages.agent-protocol.src.research.SetSourceApiKeyRequest (packages/agent-protocol/src/research.ts:151); validate.parseApiKeyBody (packages/agent-protocol/src/validate.ts:656). Rename to `CompositionApi`. [rule N6]
D21 · Naming Consistency· `PlayerAPI` spells `API` where 44 names in the project spell it `Api` · ×1
`PlayerAPI` spells `API` where 44 names in the project spell it `Api` packages/parsers/src/types.ts:367— 44 of 46 names in project hyperframes-monorepo spell the token `Api` (44 of 46; unit: names in project hyperframes-monorepo containing `Api`). Peers: packages.agent-protocol.src.api.SetJevApiKeyRequest (packages/agent-protocol/src/api.ts:348); packages.agent-protocol.src.api.SetProviderApiKeyRequest (packages/agent-protocol/src/api.ts:356); packages.agent-protocol.src.research.SourceApiKey (packages/agent-protocol/src/research.ts:64); packages.agent-protocol.src.research.SetSourceApiKeyRequest (packages/agent-protocol/src/research.ts:151); validate.parseApiKeyBody (packages/agent-protocol/src/validate.ts:656). Rename to `PlayerApi`. [rule N6]
D21 · Naming Consistency· `parseTimelineFromDOM` spells `DOM` where 245 names in the project spell it `Dom` · ×1
`parseTimelineFromDOM` spells `DOM` where 245 names in the project spell it `Dom` packages/studio/src/player/lib/timelineDOM.ts:223— 245 of 247 names in project hyperframes-monorepo spell the token `Dom` (245 of 247; unit: names in project hyperframes-monorepo containing `Dom`). Peers: mediaCapture.scanVideoDom (packages/cli/src/capture/mediaCapture.ts:351); mediaCapture.sampleVideoDom (packages/cli/src/capture/mediaCapture.ts:363); mediaVolumeEnvelope.isDomNode (packages/core/src/runtime/mediaVolumeEnvelope.ts:229); screenshotService.applyDomLayerMask (packages/engine/src/services/screenshotService.ts:399); screenshotService.removeDomLayerMask (packages/engine/src/services/screenshotService.ts:557). Rename to `parseTimelineFromDom`. [rule N6]
Blanket warning suppression REDACTED:48— A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
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.
README/code drift packages/studio/README.md:31— packages/studio/README.md names Zustand 4, but the manifest declares `zustand` ^5.0.0. 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.
Logging is not universal — Only 2/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `apps/desktop/src-tauri`, `packages/agent-runtime`, `packages/engine`, `packages/studio-server`.
No SAST REDACTED:6— 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 3 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.
No dependency-update automation REDACTED:45— `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Changelog looks stale/thin — The changelog this check read carries 1 versioned entry, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
R7 · Dead Code· Unused export 'ROOT_LICENSE_FILES' · ×1
Unused export 'ROOT_LICENSE_FILES' apps/desktop/scripts/licenses.mjs:26— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'VOICE_SETTLE_MS' · ×1
Unused export 'VOICE_SETTLE_MS' packages/agent-runtime/src/voice/transport.ts:18— Nothing imports this binding — it is safe to review for removal.
Unused export 'resolveMusic' packages/cli/src/audio/providers.ts:100— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export '__resetHostInfoForTests' · ×1
Unused export '__resetHostInfoForTests' packages/cli/src/utils/hostInfo.ts:51— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'FALLBACK_CORE_SKILLS' · ×1
Unused export 'FALLBACK_CORE_SKILLS' packages/cli/src/utils/skillsManifest.ts:132— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'DENSE_SAMPLES' · ×1
Unused export 'DENSE_SAMPLES' packages/studio-server/src/analysis/fingerprint.ts:9— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'StageArtifacts' · ×1
Unused export 'StageArtifacts' packages/studio-server/src/analysis/store.ts:66— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'MAX_VIDEO_SECONDS' · ×1
Unused export 'MAX_VIDEO_SECONDS' REDACTED:13— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'directorConfig' · ×1
Unused export 'directorConfig' packages/studio/src/agent/agentSelectors.ts:132— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'specialistConfig' · ×1
Unused export 'specialistConfig' packages/studio/src/agent/agentSelectors.ts:146— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'isBetaFeatureEnabled' · ×1
Unused export 'isBetaFeatureEnabled' packages/studio/src/betaFeatures.ts:22— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'describeModelConfig' · ×1
Unused export 'describeModelConfig' packages/studio/src/components/chat/agentLabels.ts:70— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'gsapAnimatesTransform' · ×1
Unused export 'gsapAnimatesTransform' packages/studio/src/components/editor/gsapAnimatesProperty.ts:26— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'INSP_CARD_BODY' · ×1
Unused export 'INSP_CARD_BODY' packages/studio/src/components/editor/inspectorStyles.ts:45— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'FLAT_PREVIEW_GRID' · ×1
Unused export 'FLAT_PREVIEW_GRID' packages/studio/src/components/editor/propertyPanelFlatPrimitives.tsx:15— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'installStudioMotionSeekReapply' · ×1
Unused export 'installStudioMotionSeekReapply' packages/studio/src/components/editor/studioMotion.ts:319— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'STUDIO_GSAP_EASE_OPTIONS' · ×1
Unused export 'STUDIO_GSAP_EASE_OPTIONS' packages/studio/src/components/editor/studioMotionTypes.ts:54— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/components/editor/studioMotion.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/components/editor/studioMotion.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'StatusFrame' packages/studio/src/components/ui/BrandLoader.tsx:49— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/components/ui/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/components/ui/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'formatDateTime' · ×1
Unused export 'formatDateTime' packages/studio/src/i18n/format.ts:44— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/i18n/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/i18n/index.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'formatTime' packages/studio/src/i18n/format.ts:50— Nothing ultimately consumes this binding: its only referrer is the re-export in packages/studio/src/i18n/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/studio/src/i18n/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'getTimelineLayerGroupHeaderTotalHeight' · ×1
Unused export 'getTimelineLayerGroupHeaderTotalHeight' packages/studio/src/player/components/TimelineLayerGroupHeader.tsx:14— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'TimelineLayerGroupHeader' · ×1
Unused export 'TimelineLayerGroupHeader' packages/studio/src/player/components/TimelineLayerGroupHeader.tsx:38— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'selectTimelineElementsInMarquee' · ×1
Unused export 'selectTimelineElementsInMarquee' packages/studio/src/player/components/timelineEditing.ts:331— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'SYNC_CHANGE_KEYS' · ×1
Unused export 'SYNC_CHANGE_KEYS' packages/studio/src/story/storySync.ts:54— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'isResolverDisagreement' · ×1
Unused export 'isResolverDisagreement' packages/studio/src/utils/sdkCutoverEligibility.ts:118— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'toProjectAbsolutePath' · ×1
Unused export 'toProjectAbsolutePath' packages/studio/src/utils/studioHelpers.ts:67— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'draftFromPreset' · ×1
Unused export 'draftFromPreset' packages/studio/src/voice/voiceDraft.ts:65— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'parseVersionOptionArgument' · ×1
Unused export 'parseVersionOptionArgument' scripts/cli-options.ts:90— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'validateCliDate' · ×1
Unused export 'validateCliDate' scripts/cli-options.ts:162— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'optionalFlagArg' · ×1
Unused export 'optionalFlagArg' scripts/cli-options.ts:168— Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 111/161 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×1
Diagnostic log message is built whether or not it is wanted packages/producer/src/services/render/captureCost.ts:316— `debug` at line 316 is called with an argument built by `samples.map((sample) => sample.frameIndex)` (line 318), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Null assertions (`!`) override strict null checking — ~1.1 `!` null assertions per 1k TypeScript source lines — 582 assertion(s) across the 512452 source line(s) of the 2329 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/core/src/audioCarve.ts (33), REDACTED (29), packages/core/src/speedRamp.ts (22). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Skipped (documented): (unnamed test) packages/studio-server/src/routes/appPreferences.test.ts:327— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.deleteRename.test.ts:100— 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) packages/studio-server/src/routes/files.deleteRename.test.ts:117— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.patchRace.test.ts:169— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.patchRace.test.ts:192— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.patchRace.test.ts:219— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.patchRace.test.ts:251— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.pathSafety.test.ts:78— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/files.pathSafety.test.ts:223— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/media.test.ts:128— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1679— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1698— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1715— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1739— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1758— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) REDACTED:1774— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/projectDesign.test.ts:226— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/routes/render.test.ts:598— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/research/normalize.test.ts:131— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/history/projectHistory.test.ts:367— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/history/projectHistory.test.ts:384— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/history/projectHistory.test.ts:404— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/history/projectHistory.test.ts:466— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) packages/studio-server/src/history/projectHistory.test.ts:500— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): takes over the lock of an owner whose pid now belongs to another process packages/studio-server/src/history/projectHistory.test.ts:1087— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: objc2 — `objc2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p objc2` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: tauri — `tauri` is locked at 2.12.0 but 2.12.6 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri` and commit the updated REDACTED.
Outdated: tauri-build — `tauri-build` is locked at 2.7.0 but 2.7.5 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-build` and commit the updated REDACTED.
Outdated: tauri-plugin-updater — `tauri-plugin-updater` is locked at 2.13.1 but 2.14.1 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-updater` and commit the updated REDACTED.
Outdated: trash — `trash` is locked at 5.2.9 but 5.3.0 is the current stable release on crates.io, and it already satisfies the `"5"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p trash` and commit the updated REDACTED.
Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in apps/desktop/src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
doc comments repeat the names packages/agent-runtime/src/orchestration.test.ts:25— 0 of 0 documented parameters and 1 of 1584 summaries in `@hyperframes/agent-runtime` only repeat the member or parameter name (e.g. "The analysis tools the Editor gets." for `ANALYSIS_TOOLS_EDITOR`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names packages/producer/src/services/deterministicFonts.ts:1401— 0 of 13 documented parameters and 2 of 764 summaries in `@hyperframes/producer` only repeat the member or parameter name (e.g. "Options for ." for `InjectDeterministicFontFacesOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names registry/blocks/cuboid-carousel/assets/addons/utils/BufferGeometryUtils.js:535— 3 of 19 documented parameters and 0 of 83 summaries in `hyperframes-monorepo` only repeat the member or parameter name (e.g. "The geometry." for `geometry`). Delete the restating tags, or add what the name does not say.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 115 file(s) — `packages/agent-protocol/src/analysis.ts`, `packages/agent-protocol/src/editing.ts`, `packages/agent-protocol/src/editingParseMore.ts`, `packages/agent-protocol/src/qa.ts`, `packages/agent-protocol/src/story.ts`, … (+110 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
Run 01a1e8be-f682-7051-af4a-f269fc703d5d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 116 · Warnings: 2821 · Recommendations: 408 · Info: 122 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 09:03 UTC.
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.