Public report of raojiacui/prompt-lens, published 16 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, 16 November 2026, 15:49 UTC · Survey ID cd_8ce8243e836246e596ec45e257efc9c1
raojiacui/prompt-lens
Measured 16 November 2026, 15:45 UTC, at code version 3ef7b85
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).
Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.
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 medium codebase: 37,671 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 27.8
Findings by how serious they are
72 critical759 serious101 minor
8 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
16 November 2026, 15:45 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 ▸
77of 77 dimensions measured by tools.
897of 932 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
77dimensions across 7 lenses, read from 37,671 lines of product code in 2 projects.
raojiacui/prompt-lens is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because three passwords or keys sit in the current code and it has packages under a licence on your banned list. It scores 42.4 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 27.8, is the weakest lens and counts most in the score. The best first step is replacing the three exposed passwords or keys and switching the old ones off, worth about 12.4 points. Replacing the six deprecated dependencies comes next, worth about 7.7 points. Raising Production Readiness to 70 would lift the score to about 54.5.
Twenty-seven known security holes in the packages the code depends on can be used by attackers. Twenty packages carry licence risk, and six sets of files in separate parts keep changing together, which points to hidden dependencies. Updating the vulnerable packages, replacing or clearing the banned-licence packages and making the hidden dependencies explicit would close these risks. Loading the key from a secret store instead of the code would fix the encryption key written into the code, and the three passwords or keys in the code and the password or key in the code's history need replacing, with the old ones switched off. The five form fields without a label need a label.
The product code is 37,671 lines, about €43,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 27.8 to 70, the lowest score rated Strong, the score would rise from 42.4 to about 54.5.
Code composition: what the lines of code are
Product code 75%Tests 25%
Rebuild cost: about €43,000 · Estimate
Cost to rebuild
€14,000 to €72,000, for 240 to 763 hours of work, about 0.3 person-years for one engineer
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 42. 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
Medium: 37,671 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
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
Raises the score by about 12.4 points · Low effort · REDACTED Scanning
2
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6).
Resolve the 20 Banned license finding(s) in License Compliance — start with REDACTED (20).
Raises the score by about 12.4 points · Medium effort · License Compliance
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €43,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 27.8 (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
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 12.4 points for low effort, because it clears the 3 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 98,007 lines over the last 90 days, which is about 397,473 lines a year. At that pace, the extra work comes to an estimated 50.6 to 303.8 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: 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.
192 modules, with 70 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 152 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.
app.agent.[id] uses app.agent.[id].page, so a change to app.agent.[id].page can break app.agent.[id], while a change to app.agent.[id] can't break app.agent.[id].page.
Position
Below the diagonal: app.agent.[id] uses a module listed above it, which is the healthy direction.
app.api.upload uses app.api.upload.route, so a change to app.api.upload.route can break app.api.upload, while a change to app.api.upload can't break app.api.upload.route.
Position
Below the diagonal: app.api.upload uses a module listed above it, which is the healthy direction.
app.api.video-edit uses app.api.video-edit.route, so a change to app.api.video-edit.route can break app.api.video-edit, while a change to app.api.video-edit can't break app.api.video-edit.route.
Position
Below the diagonal: app.api.video-edit uses a module listed above it, which is the healthy direction.
components.agent.agent-artifact-panel uses lib.agent.types, so a change to lib.agent.types can break components.agent.agent-artifact-panel, while a change to components.agent.agent-artifact-panel can't break lib.agent.types.
Position
Below the diagonal: components.agent.agent-artifact-panel uses a module listed above it, which is the healthy direction.
components.agent.agent-next-actions uses lib.agent.types, so a change to lib.agent.types can break components.agent.agent-next-actions, while a change to components.agent.agent-next-actions can't break lib.agent.types.
Position
Below the diagonal: components.agent.agent-next-actions uses a module listed above it, which is the healthy direction.
components.agent.agent-run-panel uses lib.agent.types, so a change to lib.agent.types can break components.agent.agent-run-panel, while a change to components.agent.agent-run-panel can't break lib.agent.types.
Position
Below the diagonal: components.agent.agent-run-panel uses a module listed above it, which is the healthy direction.
components.agent.agent-step-card uses lib.agent.types, so a change to lib.agent.types can break components.agent.agent-step-card, while a change to components.agent.agent-step-card can't break lib.agent.types.
Position
Below the diagonal: components.agent.agent-step-card uses a module listed above it, which is the healthy direction.
components.audio-analyze-tab uses app.dashboard.page, so a change to app.dashboard.page can break components.audio-analyze-tab, while a change to components.audio-analyze-tab can't break app.dashboard.page.
Position
Below the diagonal: components.audio-analyze-tab uses a module listed above it, which is the healthy direction.
components.landing uses components.landing.animation-placeholder, so a change to components.landing.animation-placeholder can break components.landing, while a change to components.landing can't break components.landing.animation-placeholder.
Position
Below the diagonal: components.landing uses a module listed above it, which is the healthy direction.
components.ui uses components.ui.spinner, so a change to components.ui.spinner can break components.ui, while a change to components.ui can't break components.ui.spinner.
Position
Below the diagonal: components.ui uses a module listed above it, which is the healthy direction.
lib.agent.storage uses lib.agent.types, so a change to lib.agent.types can break lib.agent.storage, while a change to lib.agent.storage can't break lib.agent.types.
Position
Below the diagonal: lib.agent.storage uses a module listed above it, which is the healthy direction.
lib.agent.tools uses lib.agent.types, so a change to lib.agent.types can break lib.agent.tools, while a change to lib.agent.tools can't break lib.agent.types.
Position
Below the diagonal: lib.agent.tools uses a module listed above it, which is the healthy direction.
lib.ai.model-registry uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.ai.model-registry, while a change to lib.ai.model-registry can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.ai.model-registry uses a module listed above it, which is the healthy direction.
lib.media-resolver.source-platform uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.media-resolver.source-platform, while a change to lib.media-resolver.source-platform can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.media-resolver.source-platform uses a module listed above it, which is the healthy direction.
lib.video-processor uses app.api.video-edit.route, so a change to app.api.video-edit.route can break lib.video-processor, while a change to lib.video-processor can't break app.api.video-edit.route.
Position
Below the diagonal: lib.video-processor uses a module listed above it, which is the healthy direction.
components uses components.history-list, so a change to components.history-list can break components, while a change to components can't break components.history-list.
Position
Below the diagonal: components uses a module listed above it, which is the healthy direction.
components uses components.video-edit-tab, so a change to components.video-edit-tab can break components, while a change to components can't break components.video-edit-tab.
Position
Below the diagonal: components uses a module listed above it, which is the healthy direction.
components uses components.audio-analyze-tab, so a change to components.audio-analyze-tab can break components, while a change to components can't break components.audio-analyze-tab.
Position
Below the diagonal: components uses a module listed above it, which is the healthy direction.
components.agent uses lib.agent.types, so a change to lib.agent.types can break components.agent, while a change to components.agent can't break lib.agent.types.
Position
Below the diagonal: components.agent uses a module listed above it, which is the healthy direction.
components.agent uses components.agent.agent-artifact-panel, so a change to components.agent.agent-artifact-panel can break components.agent, while a change to components.agent can't break components.agent.agent-artifact-panel.
Position
Below the diagonal: components.agent uses a module listed above it, which is the healthy direction.
components.reference-video uses lib.ai.model-registry, so a change to lib.ai.model-registry can break components.reference-video, while a change to components.reference-video can't break lib.ai.model-registry.
Position
Below the diagonal: components.reference-video uses a module listed above it, which is the healthy direction.
lib.media-resolver uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.media-resolver, while a change to lib.media-resolver can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.media-resolver uses a module listed above it, which is the healthy direction.
lib.media-resolver uses lib.media-resolver.source-platform, so a change to lib.media-resolver.source-platform can break lib.media-resolver, while a change to lib.media-resolver can't break lib.media-resolver.source-platform.
Position
Below the diagonal: lib.media-resolver uses a module listed above it, which is the healthy direction.
lib.workflow.model-selection uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.workflow.model-selection, while a change to lib.workflow.model-selection can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.workflow.model-selection uses a module listed above it, which is the healthy direction.
lib.workflow.model-selection uses lib.ai.model-registry, so a change to lib.ai.model-registry can break lib.workflow.model-selection, while a change to lib.workflow.model-selection can't break lib.ai.model-registry.
Position
Below the diagonal: lib.workflow.model-selection uses a module listed above it, which is the healthy direction.
lib.workflow.transcription uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.workflow.transcription, while a change to lib.workflow.transcription can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.workflow.transcription uses a module listed above it, which is the healthy direction.
lib.workflow.transcription uses lib.ai.model-registry, so a change to lib.ai.model-registry can break lib.workflow.transcription, while a change to lib.workflow.transcription can't break lib.ai.model-registry.
Position
Below the diagonal: lib.workflow.transcription uses a module listed above it, which is the healthy direction.
lib.workflow.video-editing uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.workflow.video-editing, while a change to lib.workflow.video-editing can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.workflow.video-editing uses a module listed above it, which is the healthy direction.
lib.workflow.video-editing uses lib.ai.model-registry, so a change to lib.ai.model-registry can break lib.workflow.video-editing, while a change to lib.workflow.video-editing can't break lib.ai.model-registry.
Position
Below the diagonal: lib.workflow.video-editing uses a module listed above it, which is the healthy direction.
lib.ai uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.ai, while a change to lib.ai can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.ai uses a module listed above it, which is the healthy direction.
lib.ai uses lib.workflow.transcription, so a change to lib.workflow.transcription can break lib.ai, while a change to lib.ai can't break lib.workflow.transcription.
Position
Below the diagonal: lib.ai uses a module listed above it, which is the healthy direction.
lib.workflow.local-standard-edit uses lib.workflow.video-editing, so a change to lib.workflow.video-editing can break lib.workflow.local-standard-edit, while a change to lib.workflow.local-standard-edit can't break lib.workflow.video-editing.
Position
Below the diagonal: lib.workflow.local-standard-edit uses a module listed above it, which is the healthy direction.
lib.workflow.scene-analysis uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.workflow.scene-analysis, while a change to lib.workflow.scene-analysis can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.workflow.scene-analysis uses a module listed above it, which is the healthy direction.
lib.workflow.scene-analysis uses lib.ai.model-registry, so a change to lib.ai.model-registry can break lib.workflow.scene-analysis, while a change to lib.workflow.scene-analysis can't break lib.ai.model-registry.
Position
Below the diagonal: lib.workflow.scene-analysis uses a module listed above it, which is the healthy direction.
lib.workflow.scene-analysis uses lib.workflow.transcription, so a change to lib.workflow.transcription can break lib.workflow.scene-analysis, while a change to lib.workflow.scene-analysis can't break lib.workflow.transcription.
Position
Below the diagonal: lib.workflow.scene-analysis uses a module listed above it, which is the healthy direction.
lib.workflow.audio-production uses components.workflow.video-workflow-create, so a change to components.workflow.video-workflow-create can break lib.workflow.audio-production, while a change to lib.workflow.audio-production can't break components.workflow.video-workflow-create.
Position
Below the diagonal: lib.workflow.audio-production uses a module listed above it, which is the healthy direction.
lib.workflow.audio-production uses lib.ai.model-registry, so a change to lib.ai.model-registry can break lib.workflow.audio-production, while a change to lib.workflow.audio-production can't break lib.ai.model-registry.
Position
Below the diagonal: lib.workflow.audio-production uses a module listed above it, which is the healthy direction.
lib.workflow.audio-production uses lib.workflow.scene-analysis, so a change to lib.workflow.scene-analysis can break lib.workflow.audio-production, while a change to lib.workflow.audio-production can't break lib.workflow.scene-analysis.
Position
Below the diagonal: lib.workflow.audio-production uses a module listed above it, which is the healthy direction.
lib.workflow uses app.api.video-edit.route, so a change to app.api.video-edit.route can break lib.workflow, while a change to lib.workflow can't break app.api.video-edit.route.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.ffmpeg-worker.client, so a change to lib.ffmpeg-worker.client can break lib.workflow, while a change to lib.workflow can't break lib.ffmpeg-worker.client.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses components.audio-analyze-tab, so a change to components.audio-analyze-tab can break lib.workflow, while a change to lib.workflow can't break components.audio-analyze-tab.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.model-selection, so a change to lib.workflow.model-selection can break lib.workflow, while a change to lib.workflow can't break lib.workflow.model-selection.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.transcription, so a change to lib.workflow.transcription can break lib.workflow, while a change to lib.workflow can't break lib.workflow.transcription.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.video-editing, so a change to lib.workflow.video-editing can break lib.workflow, while a change to lib.workflow can't break lib.workflow.video-editing.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.local-standard-edit, so a change to lib.workflow.local-standard-edit can break lib.workflow, while a change to lib.workflow can't break lib.workflow.local-standard-edit.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.scene-analysis, so a change to lib.workflow.scene-analysis can break lib.workflow, while a change to lib.workflow can't break lib.workflow.scene-analysis.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
lib.workflow uses lib.workflow.audio-production, so a change to lib.workflow.audio-production can break lib.workflow, while a change to lib.workflow can't break lib.workflow.audio-production.
Position
Below the diagonal: lib.workflow uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 54.3 · Adequate · gated by D1, D2, R2 ·
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
A03:2025 — Software Supply Chain Failures
41
High / Critical
A05:2025 — Injection
27
High / Critical
A07:2025 — Authentication Failures
5
High / Critical
A02:2025 — Security Misconfiguration
3
High / Critical
Roadmap
Top priorities: Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED; Resolve the 20 Banned license finding(s) in License Compliance — start with REDACTED (20); Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
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.
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 — 72
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 — 759
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 — 101
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 8
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 77 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 — 77 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, 897 of 932 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.
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 (2 contributor(s) across 586 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 1 hold 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.
D20 ADR Quality — 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 ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
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.
D28 Secrets (history) — 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `workers/ffmpeg-worker/package.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
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. `drizzle.config.ts`, `lib/ai/infistar-models.ts`, `next.config.ts` 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.
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 kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "GET / 200 in 158ms / GET / 200 in 170ms / GET / 200 in 177ms / GET / 200 in 143ms / GET / 200 in 155ms / GET / 200 in 155ms / GET / 200 in 169ms / GET / 200 in 167ms / GET / 200 in 165ms / GET / 200 in 150ms / GET / 200 in 157ms / GET / 200 in 165ms / GET / 200 in 155ms / GET / 200 in 149ms / GET / 200 in 140ms / GET / 200 in 168ms / GET / 200 in 167ms / GET / 200 in 145ms / GET / 200 in 123ms / GET / 200 in 114ms / GET / 200 in 123ms / GET / 200 in 117ms / GET / 200 in 188ms / GET / 200 in 117ms / GET / 200 in 105ms / GET / 200 in 114ms / GET / 200 in 148ms / GET / 200 in 129ms" 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`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "GET / 200 in 158ms / GET / 200 in 170ms / GET / 200 in 177ms / GET / 200 in 143ms / GET / 200 in 155ms / GET / 200 in 155ms / GET / 200 in 169ms / GET / 200 in 167ms / GET / 200 in 165ms / GET / 200 in 150ms / GET / 200 in 157ms / GET / 200 in 165ms / GET / 200 in 155ms / GET / 200 in 149ms / GET / 200 in 140ms / GET / 200 in 168ms / GET / 200 in 167ms / GET / 200 in 145ms / GET / 200 in 123ms / GET / 200 in 114ms / GET / 200 in 123ms / GET / 200 in 117ms / GET / 200 in 188ms / GET / 200 in 117ms / GET / 200 in 105ms / GET / 200 in 114ms / GET / 200 in 148ms / GET / 200 in 129ms" No runtime evidence was gathered.
C2 Access Controls — 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. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
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.
P1 CI/CD gates — 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
P8 Schema migrations — 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 schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
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. 113 further occurrence(s) are not listed individually; the score already reflects all 153.
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. 192 further occurrence(s) are not listed individually; the score already reflects all 232.
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. 82 further occurrence(s) are not listed individually; the score already reflects all 122.
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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
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. 4 further occurrence(s) are not listed individually; the score already reflects all 44.
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.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
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.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
138 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was alipay-checkout-dialog.AlipayCheckoutDialog at 169. A further 4 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 kie-veo.parseResultUrls at 23 — they are counted neither in the figure above nor in this dimension's score.
+ 121 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with alipay-checkout-dialog.AlipayCheckoutDialog (cyclomatic 169), video-workflow-create.VideoWorkflowCreate (cyclomatic 103), page.DashboardPage (cyclomatic 94). — 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 10 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; 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.
+ 131 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 16 bodies over 60 down to 60 or less in Cognitive Complexity — start with ReferenceVideoComposer.ReferenceVideoComposer (cognitive 132), alipay-checkout-dialog.AlipayCheckoutDialog (cognitive 130), video-workflow-create.VideoWorkflowCreate (cognitive 114). — 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 16 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; 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 Classes6.2 / 10Adequate✓ 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 29 FunctionTooLong finding(s) in God Classes — start with page.tsx (2), globe.tsx (2), ReferenceVideoComposer.tsx. — One of this dimension's main actionable groups (29 warning-level).
Resolve the 6 FileTooLong finding(s) in God Classes — start with ReferenceVideoComposer.tsx, video-workflow-create.tsx, schema.ts. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 ClassTooLong finding(s) in God Classes — start with ReferenceVideoComposer.tsx. — One of this dimension's main actionable groups (1 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.
3 duplicated block group(s) detected. 0.4 % of the production lines (143 of 37,671) are in a reported copy. One further row reports members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .ts, .tsx (96% 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.
Edited copy of a member (21 corresponding lines)skills/prompt-lens-video-remix/scripts/detect_scenes.py:23
Resolve the 1 Edited copy of a member (21 corresponding lines) finding(s) in Code Duplication — start with detect_scenes.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (26 lines × 2) finding(s) in Code Duplication — start with check_environment.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (4–15 lines × 3) finding(s) in Code Duplication — start with detect_scenes.py. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
2 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.
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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 4 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.
4 skipped (1 with a documented reason), 1 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 881 tests.
Resolve the 3 Skipped test finding(s) in Test Quality — start with commercial-checkout.spec.ts, commercial-order-cancel.spec.ts, payment-handoff.spec.ts. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 No assertions finding(s) in Test Quality — start with app.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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.
27 outdated direct production npm dependency(ies) of 35 graded, 0 pinning defect(s), across 2 package.json (2 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 4 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6). — One of this dimension's main actionable groups (6 recommendation-level).
Resolve the 4 Deprecated finding(s) in Dependency Hygiene — start with package.json (4). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 Outdated (npm) finding(s) in Dependency Hygiene — start with package.json (2). — One of this dimension's main actionable groups (2 recommendation-level).
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.
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
20 of 666 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 666 package(s) this repository's committed lockfile installs for a consumer — its 35 production, optional and peer dependency(ies), across 2 product package.json manifest(s), and everything those install in turn. Its 21 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 5 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules).
Resolve the 20 Banned license finding(s) in License Compliance — start with REDACTED (20). — One of this dimension's main actionable groups (20 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 65 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (18), page.tsx (4), video-workflow-create.tsx. — One of this dimension's main actionable groups (65 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.
0 deducted task-comment markers across 35887 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.
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.
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.
1 naming inconsistencies among 54 declarations measured against a convention their peers follow.
`getBaseURL` spells `URL` where 53 names in the project spell it `Url`lib/auth/index.ts:31
What to do
Resolve the 1 `getBaseURL` spells `URL` where 53 names in the project spell it `Url` finding(s) in Naming Consistency — start with index.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 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.
1 of 2 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionpackage.json:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
0 % of calls cross a namespace and 0 % go through an interface, but 71 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
27 finding(s): 0 critical, 1 high, 26 medium, 0 low. semgrep hit a parse error in 5 file(s) — `components/reference-video/ReferenceVideoComposer.tsx`, `drizzle.config.ts` (line 10), `lib/ai/infistar-models.ts` (line 8), `lib/db/schema.ts`, `next.config.ts` (line 19) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 24 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (24). — One of this dimension's main actionable groups (24 warning-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 24 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (24). — One of this dimension's main actionable groups (24 issue-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 192 of the 349 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 6 Boundary-crossing change coupling finding(s) in Change Coupling — start with video-workflow-create.tsx (3), analysis-quote-panel.tsx, commercial-analysis.ts. — One of this dimension's main actionable groups (6 issue-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 35 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives3.8 / 10Weak✓ 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.
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). (×11) — app/billing/tasks/[id]/page.tsx:59, components/audio-analyze-tab.tsx:625, components/landing/brand-video-button.tsx:49, …
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.7 / 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.
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. (×2) — components/agent/agent-chat-page.tsx:211, components/agent/agent-composer.tsx:142
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — components/audio-analyze-tab.tsx:411, components/reference-video/ReferenceVideoComposer.tsx:1325, components/workflow/video-workflow-create.tsx:855
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — components/audio-analyze-tab.tsx:457, components/history-list.tsx:352, components/workflow/video-workflow-create.tsx:1146
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. — components/ui/dialog.tsx:29
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). — components/ui/dialog.tsx:56
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. — components/workflow/video-workflow-create.tsx:1125
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.
Do you agree with this assessment?
AC3 · Page structure7.5 / 10Strong✓ Tool-verified
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.
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — components/sample-project-detail.tsx:216
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 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. — app/login/login-client.tsx:179
This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — components/landing/testimonials-section.tsx:121
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — components/ui/dialog.tsx:29
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.
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.
<textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — components/agent/agent-chat-page.tsx:211
<select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×7) — components/audio-analyze-tab.tsx:351, components/audio-analyze-tab.tsx:468, components/reference-video/ReferenceVideoComposer.tsx:1527, …
<div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — components/reference-video/ReferenceVideoComposer.tsx:1440
<input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — components/reference-video/ReferenceVideoComposer.tsx:1615, components/samples-gallery.tsx:100
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.
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.
Do you agree with this assessment?
C1 · Data Protection3.5 / 10Weak✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, Azure Key Vault, GCP KMS / REDACTED Manager, HashiCorp Vault) and encrypt the most sensitive columns (typeorm-encrypted, prisma-field-encryption, mongoose-field-encryption or MongoDB CSFLE) — partial coverage still leaves gaps.
Enforce HTTPS (serve through https.createServer / NestJS httpsOptions, or redirect plain HTTP with express-sslify behind your TLS terminator) so data in transit is always encrypted.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
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.
Here who is asking is taken from the 'packageId' request header (const balance = await grantCreditsToUser({targetUserId:targetUser.id, actorUserId:admin…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:38
Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. (×24) — app/api/admin/me/route.ts:6, REDACTED:154, app/api/audio-clip/route.ts:277, …
Here who is asking is taken from the 'userId' form field (const{userId, action, banReason} = body) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/admin/users/route.ts:47
Here who may pass is decided by the 'projectId' request header (if(!source.projectId||!Array.isArray(source.preview?.scenes))) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:20
Here who is asking is taken from the 'user' request header (const payer = input.keySource==="user"||(input.pricing?.payer&&input.pricing.payer!=="p…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:86
Here who is asking is taken from the 'nextTaskId' request header (const retryAvailable = task.kind==="analysis"&&["completed", "failed"].includes(task.st…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:90
Here who is asking is taken from the 'user' request header (const history = await db.execute(sql`
select * from (
select 'commercial:…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/generation-history/route.ts:16
Here who is asking is taken from the 'user' request header (const keyAccess = await resolveApiKeyForFeature(auth.user.id, {allowPaidPlatformKey:fal…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:150
Here who is asking is taken from the 'user' request header (const project = await db.query.projects.findFirst({where:and(eq(projects.id, projectId)…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:162
Here who is asking is taken from the 'user' request header (const job = await db.query.videoGeneration.findFirst({where:and(eq(videoGeneration.id, …) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:259
Here who is asking is taken from the 'user' request header (const job = await db.query.videoGeneration.findFirst({where:and(eq(videoGeneration.task…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:266
Here who may pass is decided by the 'user' request header (if(!existing||existing.userId!==session.user.id)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. (×2) — app/api/history/route.ts:83, app/api/history/route.ts:126
Here who is asking is taken from the 'user' request header (const rate = await checkRateLimit(`project-assets:${auth.user.id}`, 10, 60_000)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/project-assets/route.ts:33
Here who is asking is taken from the 'user' request header (const key = `users/${auth.user.id}/assets/${randomUUID()}.${ext}`) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/project-assets/route.ts:56
Here who is asking is taken from the 'user' request header (const allowed = result?.response?.user&&(!isAccessRestricted()||isAccessEmailAllowed(re…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/session-refresh/route.ts:23
Here who may pass is decided by the 'user' request header (if(!result?.response?.user||!isAccessEmailAllowed(result.response.user.email))) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — app/api/session-refresh/route.ts:56
What to do
Keep who is signed in on the server: give the browser only a long random session id (express-session, iron-session, a sessions table), or sign the cookie (cookie-parser with a secret and req.signedCookies, a verified JWT), and look the user up from that — never from an id, role or token claim the browser sends unchecked.
Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
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.
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. — components/agent/agent-composer.tsx:109
`onCopyPrompt` 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. — components/agent/agent-run-panel.tsx:254
`isAdminUserId` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — lib/auth/index.ts:168
`cleanupOldLogs` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — lib/middleware/logger.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. (×3) — tests/e2e/commercial-checkout.spec.ts:34, tests/e2e/commercial-order-cancel.spec.ts:6, tests/e2e/payment-handoff.spec.ts:42
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
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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 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.
Do you agree with this assessment?
P1 · CI/CD gates6.5 / 10Adequate✓ Tool-verified
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.
A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
What to do
Run the test suite in CI via an explicit runner step (`npm test` for the toolchain this pipeline already uses) and gate merges on it.
Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
Do you agree with this assessment?
P2 · Observability6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`.
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 291 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:291
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 371 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:371
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 412 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:412
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 438 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:438
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 499 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:499
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 501 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:501
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 549 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:549
`workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 556 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — workers/ffmpeg-worker/server.mjs:556
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 1 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.
`package.json` 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`. — package.json:26
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.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
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.
`existsSync` in `deleteRun` 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. — lib/agent/storage.ts:276
`rmSync` in `deleteRun` 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. — lib/agent/storage.ts:277
`existsSync` in `iterAllRuns` 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) — lib/agent/storage.ts:364, lib/agent/storage.ts:367
`readdirSync` in `iterAllRuns` 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) — lib/agent/storage.ts:365, lib/agent/storage.ts:368
`existsSync` in `findRunFileById` 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) — lib/agent/storage.ts:378, lib/agent/storage.ts:381
`readdirSync` in `findRunFileById` 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. — lib/agent/storage.ts:379
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.4 / 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.
61 duplicated blocks under app/api/ have copies in at least two of the sibling directories admin, audio-analyze, audio-clip, commercial, credits, cron (+14 more sibling(s) not listed) — 46 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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. — app/api/admin/users/route.ts:94
19 duplicated blocks under the repository root have copies in at least two of the sibling directories app, components, lib, workers — 13 of them are reported below, and 6 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 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 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 19 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. — app/billing/payment/return/payment-return-client.tsx:9
9 duplicated blocks under components/ have copies in at least two of the sibling directories agent, payments, reference-video, workflow — 5 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 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 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 9 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. — components/reference-video/ReferenceVideoComposer.tsx:163
6 duplicated blocks under app/api/commercial/ have copies in at least two of the sibling directories analysis, confirm, generation, tasks — 5 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:5
components/landing/site-header.tsx:25 · components/language-switcher.tsx:18 — the two spans are one implementation copied and then locally edited — 333 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. — components/landing/site-header.tsx:25
lib/workflow/service.ts:256 · lib/workflow/service.ts:342 — the two spans are one implementation copied and then locally edited — 350 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — lib/workflow/service.ts:256
components/sample-project-detail.tsx:17 · components/workflow/video-workflow-create.tsx:32 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — components/sample-project-detail.tsx:17
components/sample-project-detail.tsx:197 · components/workflow/video-workflow-create.tsx:1044 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — components/sample-project-detail.tsx:197
lib/email/otp-email.ts:45 · lib/email/welcome-email.ts:56 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/email/otp-email.ts:45
components/sample-project-detail.tsx:247 · components/workflow/video-workflow-create.tsx:1175 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — components/sample-project-detail.tsx:247
components/sample-project-detail.tsx:282 · components/workflow/video-workflow-create.tsx:1211 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — components/sample-project-detail.tsx:282
app/dashboard/page.tsx:294 · app/dashboard/page.tsx:313 — 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. — app/dashboard/page.tsx:294
lib/ai/adapters/kie-video.ts:255 · lib/ai/adapters/kie-video.ts:289 — 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. — lib/ai/adapters/kie-video.ts:255
components/admin-overview-panel.tsx:126 · components/admin-user-directory.tsx:36 — the two spans are one implementation copied and then locally edited — 129 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. — components/admin-overview-panel.tsx:126
lib/ai/adapters/kie-video.ts:335 · lib/ai/adapters/kie-video.ts:414 — 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. — lib/ai/adapters/kie-video.ts:335
lib/ai/kie-client.ts:99 · lib/ai/kie-responses.ts:79 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/ai/kie-client.ts:99
lib/video-processor/editor.ts:67 · lib/video-processor/index.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/video-processor/editor.ts:67
components/reference-video/ReferenceVideoComposer.tsx:1589 · components/reference-video/ReferenceVideoComposer.tsx:1677 — 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. — components/reference-video/ReferenceVideoComposer.tsx:1589
app/api/audio-clip/route.ts:231 · app/api/audio-clip/route.ts:255 — 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. — app/api/audio-clip/route.ts:231
app/dashboard/page.tsx:354 · app/dashboard/page.tsx:397 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — app/dashboard/page.tsx:354
lib/utils/file-validation.ts:83 · lib/utils/file-validation.ts:114 — 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. — lib/utils/file-validation.ts:83
lib/ai/kie-client.ts:81 · lib/ai/kie-responses.ts:58 — the two spans are one implementation copied and then locally edited — 147 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. — lib/ai/kie-client.ts:81
remotion/prompt-lens-core-workflow-demo.tsx:71 · remotion/prompt-lens-product-demo.tsx:60 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — remotion/prompt-lens-core-workflow-demo.tsx:71
app/login/login-client.tsx:85 · app/login/login-client.tsx:137 — 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. — app/login/login-client.tsx:85
app/login/login-client.tsx:227 · components/landing/site-footer.tsx:41 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/login/login-client.tsx:227
components/reference-video/ReferenceVideoComposer.tsx:389 · lib/billing/use-wallet-balance.ts:40 — the two spans are one implementation copied and then locally edited — 79 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. — components/reference-video/ReferenceVideoComposer.tsx:389
lib/agent/storage.ts:656 · lib/agent/storage.ts:674 — 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. — lib/agent/storage.ts:656
lib/db/schema.ts:241 · lib/db/schema.ts:279 · lib/db/schema.ts:383 · lib/db/schema.ts:414 · +1 more site(s) not listed — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Check what actually differs between the copies before collapsing them: every one of them is an argument to a `pgTable(…)` call, so where these calls are a MATRIX of cases — one per input, differing precisely in the case each one pins — the repetition is the enumeration and extracting the shared part would delete cases rather than de-duplicate anything. — lib/db/schema.ts:241
app/api/admin/logs/route.ts:65 · app/api/admin/users/route.ts:32 · app/api/admin/users/route.ts:96 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — app/api/admin/logs/route.ts:65
app/api/admin/overview/route.ts:42 · lib/admin/usage.ts:12 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/api/admin/overview/route.ts:42
app/api/agent/runs/[id]/cancel/route.ts:7 · app/api/agent/runs/[id]/retry/route.ts:7 · app/api/agent/runs/[id]/route.ts:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — app/api/agent/runs/[id]/cancel/route.ts:7
app/api/history/route.ts:72 · app/api/history/route.ts:115 — 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. — app/api/history/route.ts:72
app/api/history/route.ts:108 · app/api/settings/api-key/route.ts:169 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — app/api/history/route.ts:108
app/api/settings/api-key/route.ts:57 · app/api/settings/api-key/route.ts:162 — 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. — app/api/settings/api-key/route.ts:57
REDACTED:83 · app/api/video-generate/route.ts:44 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:83
components/reference-video/ReferenceVideoComposer.tsx:369 · lib/billing/use-wallet-balance.ts:21 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — components/reference-video/ReferenceVideoComposer.tsx:369
app/api/video-edit/route.ts:93 · app/api/video-generate/route.ts:57 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — app/api/video-edit/route.ts:93
components/agent/agent-run-panel.tsx:77 · components/agent/agent-run-panel.tsx:91 — 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. — components/agent/agent-run-panel.tsx:77
components/workflow/video-workflow-create.tsx:856 · components/workflow/video-workflow-create.tsx:866 — 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. — components/workflow/video-workflow-create.tsx:856
lib/db/schema.ts:380 · lib/db/schema.ts:411 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — lib/db/schema.ts:380
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 · 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.
VideoWorkflowCreate has cyclomatic complexity 105 and cognitive complexity 90; 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. — components/workflow/video-workflow-create.tsx:308
ReferenceVideoComposer has cyclomatic complexity 94 and cognitive complexity 91; 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. — components/reference-video/ReferenceVideoComposer.tsx:279
AlipayCheckoutDialog has cyclomatic complexity 88 and cognitive complexity 78; 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. — components/payments/alipay-checkout-dialog.tsx:17
estimateGeneration has cyclomatic complexity 85 and cognitive complexity 103; 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. — lib/billing/pricing-v6.ts:102
startBreakdown has cyclomatic complexity 72 and cognitive complexity 71; 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. — components/workflow/video-workflow-create.tsx:617
BillingAccount has cyclomatic complexity 70 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. — components/payments/billing-account.tsx:20
GET has cyclomatic complexity 62 and cognitive complexity 64; 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:38
DashboardPage has cyclomatic complexity 62 and cognitive complexity 58; 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. — app/dashboard/page.tsx:26
AnalysisQuotePanel has cyclomatic complexity 60 and cognitive complexity 54; 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. — components/payments/analysis-quote-panel.tsx:23
post has cyclomatic complexity 59 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 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. — components/payments/analysis-quote-panel.tsx:70
POST has cyclomatic complexity 55 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. — REDACTED:15
buildMarketGenerationPayload has cyclomatic complexity 54 and cognitive complexity 73; 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. — lib/ai/generation-payload.ts:10
(anonymous) has cyclomatic complexity 52 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — components/workflow/video-workflow-create.tsx:1049
POST has cyclomatic complexity 47 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:127
buildCommercialGenerationPayload has cyclomatic complexity 45 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — lib/billing/commercial-generation.ts:22
getKieVeoGenerationStatus has cyclomatic complexity 44 and cognitive complexity 48; 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. — lib/reference-video/kie-veo.ts:346
(anonymous) has cyclomatic complexity 44 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — app/billing/review/page.tsx:69
runAnalysisTaskStep has cyclomatic complexity 43 and cognitive complexity 60; 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. — lib/workflow/analysis-tasks.ts:157
(anonymous) has cyclomatic complexity 43 and cognitive complexity 46; 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. — lib/billing/independent-scene-analysis.ts:59
(anonymous) has cyclomatic complexity 42 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — tests/e2e/commercial-analysis.spec.ts:18
loadOverview has cyclomatic complexity 41 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — app/api/admin/overview/route.ts:18
read has cyclomatic complexity 40 and cognitive complexity 40; 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. — workers/ffmpeg-worker/remote-video-codec.mjs:100
POST has cyclomatic complexity 37 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 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. — app/api/admin/payments/commercial/route.ts:36
(anonymous) has cyclomatic complexity 37 and cognitive complexity 32; 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. — app/billing/review/page.tsx:94
generationCreditPreview has cyclomatic complexity 35 and cognitive complexity 36; 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. — lib/billing/generation-credit-preview.ts:5
SceneVideoPlayer has cyclomatic complexity 34 and cognitive complexity 32; 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. — components/workflow/scene-video-preview.tsx:43
AnalysisTaskDetails has cyclomatic complexity 34 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — components/payments/analysis-task-details.tsx:14
executeRun has cyclomatic complexity 33 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 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. — lib/agent/executor.ts:93
retryFailedScene has cyclomatic complexity 32 and cognitive complexity 35; 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. — components/workflow/video-workflow-create.tsx:788
AdminFinancialRecords has cyclomatic complexity 32 and cognitive complexity 29; 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. — components/admin-financial-records.tsx:9
AnalysisTaskProgress has cyclomatic complexity 32 and cognitive complexity 29; 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. — components/payments/analysis-task-progress.tsx:43
AudioAnalyzeTab has cyclomatic complexity 31 and cognitive complexity 30; 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. — components/audio-analyze-tab.tsx:73
BillingTaskPage has cyclomatic complexity 30 and cognitive complexity 28; 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. — app/billing/tasks/[id]/page.tsx:12
buildInfistarVideoPayload has cyclomatic complexity 30 and cognitive complexity 23; 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. — lib/ai/adapters/infistar-video.ts:10
PromptLensRewriteDemo has cyclomatic complexity 29 and cognitive complexity 27; 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. — remotion/prompt-lens-rewrite-demo.tsx:23
callAnalysisChatJson has cyclomatic complexity 28 and cognitive complexity 43; 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. — lib/workflow/scene-analysis.ts:191
submitGenerationJob has cyclomatic complexity 28 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — components/reference-video/ReferenceVideoComposer.tsx:1076
creditRuleTopics has cyclomatic complexity 28 and cognitive complexity 27; 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. — app/guide/credit-rules.ts:9
AdminUserDirectory has cyclomatic complexity 28 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — components/admin-user-directory.tsx:11
runMockSearch has cyclomatic complexity 28 and cognitive complexity 14; 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. — lib/agent/mock-data.ts:35
Do you agree with this assessment?
R3 · Large Files8.3 / 10Strong✓ 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.
components/reference-video/ReferenceVideoComposer.tsx has 1696 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — components/reference-video/ReferenceVideoComposer.tsx:1
components/workflow/video-workflow-create.tsx has 1222 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — components/workflow/video-workflow-create.tsx:1
lib/db/schema.ts has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/db/schema.ts:1
lib/agent/storage.ts has 670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/agent/storage.ts:1
components/video-edit-tab.tsx has 655 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — components/video-edit-tab.tsx:1
components/audio-analyze-tab.tsx has 585 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — components/audio-analyze-tab.tsx:1
app/dashboard/page.tsx has 538 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — app/dashboard/page.tsx:1
lib/workflow/scene-analysis.ts has 529 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/workflow/scene-analysis.ts:1
workers/ffmpeg-worker/server.mjs has 527 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — workers/ffmpeg-worker/server.mjs:1
lib/ai/model-registry.ts has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/ai/model-registry.ts:1
lib/reference-video/kie-veo.ts has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/reference-video/kie-veo.ts:1
lib/agent/planner.ts has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/agent/planner.ts:1
lib/workflow/service.ts has 404 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/workflow/service.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 Coverage6.3 / 10Adequate✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — components/reference-video/ReferenceVideoComposer.tsx:1, components/workflow/video-workflow-create.tsx:1, components/video-edit-tab.tsx:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling6.7 / 10Adequate✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json 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: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
The root package declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner). — package.json:13
What to do
Add `tsc --noEmit` as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code5.2 / 10Adequate✓ 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.
Unreachable from the 137 application, 11 tooling and 159 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (137 application, 11 tooling, 159 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 (×20) — components/video-edit-tab.tsx, components/audio-analyze-tab.tsx, components/globe.tsx, …
no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/create-with-agent.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) — components/agent/agent-run-panel.tsx, components/agent/agent-composer.tsx, components/agent/agent-run-history.tsx
no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-plan-timeline.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — components/agent/agent-step-card.tsx
no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-run-panel.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — components/agent/agent-next-actions.tsx, components/agent/agent-plan-timeline.tsx
no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-composer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — components/agent/agent-attachment-preview.tsx, components/agent/agent-suggestion-chips.tsx
no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/audio-analyze-tab.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — components/ui/checkbox.tsx
Nothing imports this binding — it is safe to review for removal. (×10) — lib/agent/storage.ts:749, lib/agent/tools/shared.ts:31, lib/agent/tools/shared.ts:32, …
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 package.json — installs work only by hoisting accident. — tests/credits-byok-integration.test.ts:3
Declared in the root package.json 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. (×10) — package.json:30, package.json:32, package.json:33, …
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. 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.
The value is the key-derivation salt and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — REDACTED:15
This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — REDACTED:15
`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.) — workers/ffmpeg-worker/server.mjs:555
`response.cookies.set(…)` carries who is signed in, and it is set without Secure. Without Secure the browser also sends it over plain http://, where anyone on the same network can read it. (−1.5 on this card.) — app/api/dev-auth/login/route.ts:40
What to do
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code.
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`.
Lock down every session and sign-in cookie: set `HttpOnly` (page scripts cannot read it), `Secure` (only sent over HTTPS) and `SameSite=Lax` or `Strict` (not sent along with other sites' requests) — `res.cookie(name, value, { httpOnly: true, secure: true, sameSite: 'lax' })` in Express, the same keys in Fastify, Hono, Next.js and `cookie.serialize`, `cookie: { secure: true, sameSite: 'lax' }` in express-session, or `; HttpOnly; Secure; SameSite=Lax` at the end of a raw `Set-Cookie` header.
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 stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
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 document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
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 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 30/60 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.
`uploadMediaToR2` 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 })`. — lib/r2-upload-client.ts:29
`createKieDialogueTask` 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 })`. — lib/workflow/kie-audio.ts:40
`downloadVideo` 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 })`. — lib/workflow/local-standard-edit.ts:62
`recognizeBackgroundMusic` 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 })`. — lib/workflow/music-recognition.ts:63
`fetchProjectList` 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 })`. — lib/workflow/project-list-client.ts:1
`downloadMusic` 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 })`. — lib/video-processor/editor.ts:95
`createCreemCreditCheckout` 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 })`. — lib/payments/credit-checkout.ts:37
`submitVeoTask` 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 })`. — lib/ai/adapters/kie-video.ts:248
`submitJobTask` 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 })`. — lib/ai/adapters/kie-video.ts:277
`fetchKIEVeoTaskResult` 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 })`. — lib/ai/adapters/kie-video.ts:331
`fetchKIETaskResult` 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 })`. — lib/ai/adapters/kie-video.ts:403
`createRun` 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 })`. — lib/agent/client.ts:41
`listRuns` 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 })`. — lib/agent/client.ts:50
`getRun` 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 })`. — lib/agent/client.ts:55
`executeRun` 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 })`. — lib/agent/client.ts:60
`cancelRun` 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 })`. — lib/agent/client.ts:69
`retryRun` 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 })`. — lib/agent/client.ts:74
`deleteRun` 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 })`. — lib/agent/client.ts:79
`setArtifactFavorite` 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 })`. — lib/agent/client.ts:84
`refresh` 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 })`. — components/api-key-settings.tsx:25
`loadAudioModels` 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 })`. — components/audio-analyze-tab.tsx:97
`loadSample` 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 })`. — components/sample-project-detail.tsx:105
`loadSamples` 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 })`. — components/samples-gallery.tsx:39
`loadEditModels` 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 })`. — components/video-edit-tab.tsx:77
`pollGenerationStatus` 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 })`. — components/reference-video/ReferenceVideoComposer.tsx:858
`submitGenerationJob` 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 })`. — components/reference-video/ReferenceVideoComposer.tsx:1076
`poll` 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 })`. — app/billing/payment/return/payment-return-client.tsx:19
`deferredPOST` holds an AbortSignal but calls `axios.post(…)` 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: `axios.post(…, { signal })`. (×2) — app/api/workflow/projects/[id]/edit/route.ts:35, app/api/video-edit/route.ts:81
`deferredPOST` holds an AbortSignal but calls `fetch(…)` 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: `fetch(…, { signal })`. — app/api/audio-clip/route.ts:35
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
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.
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.
`.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. (×10) — workers/ffmpeg-worker/remote-video-codec.mjs:156, workers/ffmpeg-worker/storage-media-download.mjs:32, lib/billing/reconciliation-worker.ts:29, …
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. (×28) — lib/workflow/local-standard-edit.ts:84, lib/video-processor/editor.ts:197, lib/video-processor/editor.ts:333, …
`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. (×2) — lib/billing/commercial-generation.ts:162, lib/billing/local-analysis-scheduler.ts:12
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.
~2.0 `!` null assertions per 1k TypeScript source lines — 76 assertion(s) across the 37451 source line(s) of the 320 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: lib/workflow/analysis-tasks.ts (14), lib/billing/commercial-generation.ts (7), REDACTED (5). 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 — 3 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.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.
C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model, an ORM write hook that records changes — a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware — or a change-history plugin such as mongoose-history or sequelize-paper-trail) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 45 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 applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
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. 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
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "GET / 200 in 158ms / GET / 200 in 170ms / GET / 200 in 177ms / GET / 200 in 143ms / GET / 200 in 155ms / GET / 200 in 155ms / GET / 200 in 169ms / GET / 200 in 167ms / GET / 200 in 165ms / GET / 200 in 150ms / GET / 200 in 157ms / GET / 200 in 165ms / GET / 200 in 155ms / GET / 200 in 149ms / GET / 200 in 140ms / GET / 200 in 168ms / GET / 200 in 167ms / GET / 200 in 145ms / GET / 200 in 123ms / GET / 200 in 114ms / GET / 200 in 123ms / GET / 200 in 117ms / GET / 200 in 188ms / GET / 200 in 117ms / GET / 200 in 105ms / GET / 200 in 114ms / GET / 200 in 148ms / GET / 200 in 129ms" 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.
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.
D20 ADR Quality — 67 ADR(s) are written in a language our ADR lexicon does not cover, or are too short to tell (undetermined); their sections and statuses were not judged.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — 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'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — Drizzle is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
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 package.json, 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.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X19 Unrestored process-global state — 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.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Banned license: @ffmpeg-installer/linux-arm REDACTED:1176— `@ffmpeg-installer/linux-arm` 4.1.3 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @ffmpeg-installer/linux-arm64 REDACTED:1171— `@ffmpeg-installer/linux-arm64` 4.1.4 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @ffmpeg-installer/linux-ia32 REDACTED:1181— `@ffmpeg-installer/linux-ia32` 4.1.0 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @ffmpeg-installer/linux-x64 REDACTED:1186— `@ffmpeg-installer/linux-x64` 4.1.0 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @ffmpeg-installer/win32-ia32 REDACTED:1191— `@ffmpeg-installer/win32-ia32` 4.1.0 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @ffmpeg-installer/win32-x64 REDACTED:1196— `@ffmpeg-installer/win32-x64` 4.1.0 is published on registry.npmjs.org under `GPL-3.0` (spelled `GPLv3` there, which npm's own validator reads as that id), which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:1270— `@img/sharp-libvips-darwin-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-darwin-x64 REDACTED:1275— `@img/sharp-libvips-darwin-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm REDACTED:1286— `@img/sharp-libvips-linux-arm` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-arm64 REDACTED:1280— `@img/sharp-libvips-linux-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:1292— `@img/sharp-libvips-linux-ppc64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:1298— `@img/sharp-libvips-linux-riscv64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-s390x REDACTED:1304— `@img/sharp-libvips-linux-s390x` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linux-x64 REDACTED:1310— `@img/sharp-libvips-linux-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:1316— `@img/sharp-libvips-linuxmusl-arm64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:1322— `@img/sharp-libvips-linuxmusl-x64` 1.3.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-wasm32 REDACTED:1384— `@img/sharp-wasm32` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-arm64 REDACTED:1393— `@img/sharp-win32-arm64` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-ia32 REDACTED:1399— `@img/sharp-win32-ia32` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Banned license: @img/sharp-win32-x64 REDACTED:1405— `@img/sharp-win32-x64` 0.35.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Boundary-crossing change coupling: analysis-quote-panel.tsx ↔ commercial-media.ts components/payments/analysis-quote-panel.tsx:1— `components/payments/analysis-quote-panel.tsx` (context components) and `lib/billing/commercial-media.ts` (context billing) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `38084f3d` Exclude blank transitions and refine continuous video shots; `e1413eaf` Clarify analysis preparation failures and validate worker storage URLs; `5d40d556` Verify imported video decoding before shot analysis — run `git show` on any of them.
Boundary-crossing change coupling: video-workflow-create.tsx ↔ service.ts components/workflow/video-workflow-create.tsx:1— `components/workflow/video-workflow-create.tsx` (context components) and `lib/workflow/service.ts` (context workflow) sit in DIFFERENT parts of the tree yet change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `fc13c909` Bound AI rewrites and recover expired allowances; `d769c1fb` Allow retrying individual failed analysis shots; `69e64c36` Add seven-day project media and prompt cleanup — run `git show` on any of them.
Boundary-crossing change coupling: video-workflow-create.tsx ↔ analysis-tasks.ts components/workflow/video-workflow-create.tsx:1— `components/workflow/video-workflow-create.tsx` (context components) and `lib/workflow/analysis-tasks.ts` (context workflow) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `036d0c2c` Use DeepSeek for free trials and label whole-video progress; `fb16b50f` Show confirmed analysis progress and finalize saved checkpoints; `f3ece859` Allow uploaded videos to use paid shot splitting — run `git show` on any of them.
Boundary-crossing change coupling: commercial-analysis.ts ↔ analysis-tasks.ts lib/billing/commercial-analysis.ts:1— `lib/billing/commercial-analysis.ts` (context billing) and `lib/workflow/analysis-tasks.ts` (context workflow) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `fa76193f` Record uncertain KIE outcomes across interrupted analysis; `40410c2f` Rotate analysis dispatch to prevent queue starvation; `afe8e2d8` Bound analysis recovery work per scheduler run — run `git show` on any of them.
Boundary-crossing change coupling: commercial-media.ts ↔ server.mjs lib/billing/commercial-media.ts:1— `lib/billing/commercial-media.ts` (context billing) and `workers/ffmpeg-worker/server.mjs` (context workers) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `38084f3d` Exclude blank transitions and refine continuous video shots; `81eda360` Recover transient video downloads before shot analysis; `e1413eaf` Clarify analysis preparation failures and validate worker storage URLs — run `git show` on any of them.
Boundary-crossing change coupling: video-workflow-create.tsx ↔ commercial-media.ts components/workflow/video-workflow-create.tsx:1— `components/workflow/video-workflow-create.tsx` (context components) and `lib/billing/commercial-media.ts` (context billing) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `81eda360` Recover transient video downloads before shot analysis; `94cb12ae` Limit uploaded analysis videos to ten-second single shots; `ab71c55a` Verify completed R2 uploads before analysis — run `git show` on any of them.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label components/audio-analyze-tab.tsx:411— 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 components/reference-video/ReferenceVideoComposer.tsx:1325— 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 components/workflow/video-workflow-create.tsx:855— 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· <textarea> without a programmatic label · ×2
<textarea> without a programmatic label components/agent/agent-chat-page.tsx:211— 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 components/agent/agent-composer.tsx:142— 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.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×1
Custom control with no accessible name on <div> components/ui/dialog.tsx:29— 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.
AC2 · Forms & labels· <button> with no accessible text · ×1
<button> with no accessible text components/ui/dialog.tsx:56— 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· <label> that labels no control · ×1
<label> that labels no control components/workflow/video-workflow-create.tsx:1125— 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.
AC4 · Keyboard semantics· Hover-only interaction on <div> · ×1
Hover-only interaction on <div> components/landing/testimonials-section.tsx:121— This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×1
Click handler on a non-interactive <div> components/ui/dialog.tsx:29— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Unlisted import 'esbuild' tests/credits-byok-integration.test.ts:3— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
S1 · Web-Security Posture· Cryptographic key material is a compile-time constant · ×1
Cryptographic key material is a compile-time constant REDACTED:15— The value is the key-derivation salt and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Hotspot: components/workflow/video-workflow-create.tsx components/workflow/video-workflow-create.tsx:308— components/workflow/video-workflow-create.tsx changed 75 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 383 in video-workflow-create.VideoWorkflowCreate at line 308. 2 of those changes were fix/bug commits, and the other 73 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/workflow/video-workflow-create.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: components/reference-video/ReferenceVideoComposer.tsx components/reference-video/ReferenceVideoComposer.tsx:279— components/reference-video/ReferenceVideoComposer.tsx changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 329 in ReferenceVideoComposer.ReferenceVideoComposer at line 279. 2 of those changes were fix/bug commits, and the other 34 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/reference-video/ReferenceVideoComposer.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: components/payments/analysis-quote-panel.tsx components/payments/analysis-quote-panel.tsx:23— components/payments/analysis-quote-panel.tsx changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 216 in analysis-quote-panel.AnalysisQuotePanel at line 23. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/payments/analysis-quote-panel.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: components/payments/alipay-checkout-dialog.tsx components/payments/alipay-checkout-dialog.tsx:17— components/payments/alipay-checkout-dialog.tsx changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 169 in alipay-checkout-dialog.AlipayCheckoutDialog at line 17. 3 of those changes were fix/bug commits, and the other 12 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/payments/alipay-checkout-dialog.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: app/dashboard/page.tsx app/dashboard/page.tsx:26— app/dashboard/page.tsx changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in page.DashboardPage at line 26. 3 of those changes were fix/bug commits, and the other 19 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- app/dashboard/page.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: REDACTED REDACTED:38— REDACTED changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in route.GET at line 38. 1 of those changes was a fix/bug commit, and the other 21 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08: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: lib/billing/commercial-analysis.ts lib/billing/commercial-analysis.ts:132— lib/billing/commercial-analysis.ts changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in commercial-analysis.executeCommercialAnalysis at line 132. 1 of those changes was a fix/bug commit, and the other 36 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/billing/commercial-analysis.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: app/billing/review/page.tsx app/billing/review/page.tsx:9— app/billing/review/page.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 126 in page.CommercialReviewPage at line 9. 1 of those changes was a fix/bug commit, 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- app/billing/review/page.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: lib/billing/pricing-v6.ts lib/billing/pricing-v6.ts:102— lib/billing/pricing-v6.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in pricing-v6.estimateGeneration at line 102. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/billing/pricing-v6.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: lib/workflow/analysis-tasks.ts lib/workflow/analysis-tasks.ts:157— lib/workflow/analysis-tasks.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in analysis-tasks.runAnalysisTaskStep at line 157. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/workflow/analysis-tasks.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: components/audio-analyze-tab.tsx components/audio-analyze-tab.tsx:73— components/audio-analyze-tab.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in audio-analyze-tab.AudioAnalyzeTab at line 73. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/audio-analyze-tab.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: lib/workflow/scene-analysis.ts lib/workflow/scene-analysis.ts:447— lib/workflow/scene-analysis.ts changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in scene-analysis.rewriteSceneBlueprint at line 447. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/workflow/scene-analysis.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: lib/billing/independent-scene-analysis.ts lib/billing/independent-scene-analysis.ts:55— lib/billing/independent-scene-analysis.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in independent-scene-analysis.saveSceneCheckpoint at line 55. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/billing/independent-scene-analysis.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: components/payments/billing-account.tsx components/payments/billing-account.tsx:20— components/payments/billing-account.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in billing-account.BillingAccount at line 20. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/payments/billing-account.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: components/video-edit-tab.tsx components/video-edit-tab.tsx:46— components/video-edit-tab.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in video-edit-tab.VideoEditTab at line 46. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/video-edit-tab.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: components/landing/pricing-section.tsx components/landing/pricing-section.tsx:11— components/landing/pricing-section.tsx changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in pricing-section.PricingSection at line 11. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/landing/pricing-section.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: REDACTED REDACTED:127— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in route.POST at line 127. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08: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: REDACTED REDACTED:15— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in route.POST at line 15. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08: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: components/api-key-settings.tsx components/api-key-settings.tsx:16— components/api-key-settings.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in api-key-settings.ApiKeySettings at line 16. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/api-key-settings.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: app/guide/credit-rules.ts app/guide/credit-rules.ts:9— app/guide/credit-rules.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in credit-rules.creditRuleTopics at line 9. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- app/guide/credit-rules.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: workers/ffmpeg-worker/server.mjs workers/ffmpeg-worker/server.mjs:486— workers/ffmpeg-worker/server.mjs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in server.handleCommercialMedia at line 486. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- workers/ffmpeg-worker/server.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.
Hotspot: app/api/admin/payments/commercial/route.ts app/api/admin/payments/commercial/route.ts:36— app/api/admin/payments/commercial/route.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in route.POST at line 36. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- app/api/admin/payments/commercial/route.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: components/admin-overview-panel.tsx components/admin-overview-panel.tsx:110— components/admin-overview-panel.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in admin-overview-panel.AdminOverviewPanel at line 110. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- components/admin-overview-panel.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: lib/billing/commercial-generation.ts lib/billing/commercial-generation.ts:22— lib/billing/commercial-generation.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in commercial-generation.buildCommercialGenerationPayload at line 22. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- lib/billing/commercial-generation.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: app/api/admin/overview/route.ts app/api/admin/overview/route.ts:18— app/api/admin/overview/route.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in route.loadOverview at line 18. 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-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 16:05:01 +08:00' --until='2026-11-15 16:05:01 +08:00' --full-history --no-merges -- app/api/admin/overview/route.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
+ 40 more in this group — see findings.md.
C2 · Access Controls· Anyone can act as another user by changing what their browser sends · ×40
Anyone can act as another user by changing what their browser sends REDACTED:38— Here who is asking is taken from the 'packageId' request header (const balance = await grantCreditsToUser({targetUserId:targetUser.id, actorUserId:admin…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/admin/me/route.ts:6— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/admin/users/route.ts:47— Here who is asking is taken from the 'userId' form field (const{userId, action, banReason} = body) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:154— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/audio-clip/route.ts:277— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:14— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:20— Here who may pass is decided by the 'projectId' request header (if(!source.projectId||!Array.isArray(source.preview?.scenes))) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:14— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:11— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:8— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:18— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:40— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:86— Here who is asking is taken from the 'user' request header (const payer = input.keySource==="user"||(input.pricing?.payer&&input.pricing.payer!=="p…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:90— Here who is asking is taken from the 'nextTaskId' request header (const retryAvailable = task.kind==="analysis"&&["completed", "failed"].includes(task.st…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/credits/me/route.ts:10— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/generation-history/route.ts:16— Here who is asking is taken from the 'user' request header (const history = await db.execute(sql`
select * from (
select 'commercial:…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:150— Here who is asking is taken from the 'user' request header (const keyAccess = await resolveApiKeyForFeature(auth.user.id, {allowPaidPlatformKey:fal…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:162— Here who is asking is taken from the 'user' request header (const project = await db.query.projects.findFirst({where:and(eq(projects.id, projectId)…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:259— Here who is asking is taken from the 'user' request header (const job = await db.query.videoGeneration.findFirst({where:and(eq(videoGeneration.id, …) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends REDACTED:266— Here who is asking is taken from the 'user' request header (const job = await db.query.videoGeneration.findFirst({where:and(eq(videoGeneration.task…) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/history/route.ts:12— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/history/route.ts:29— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/history/route.ts:67— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/history/route.ts:83— Here who may pass is decided by the 'user' request header (if(!existing||existing.userId!==session.user.id)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
Anyone can act as another user by changing what their browser sends app/api/history/route.ts:110— Here who may pass is decided by the 'user' request header (if(!session?.user)) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file components/reference-video/ReferenceVideoComposer.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/workflow/video-workflow-create.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/video-edit-tab.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/audio-analyze-tab.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file app/dashboard/page.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file workers/ffmpeg-worker/server.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 components/history-list.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file remotion/prompt-lens-landing-ad.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/globe.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/agent/agent-artifact-panel.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/sample-project-detail.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/agent/agent-run-panel.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/agent/create-with-agent.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/payments/analysis-quote-panel.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file remotion/prompt-lens-core-workflow-demo.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file remotion/feature-demo.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file remotion/prompt-lens-product-demo.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/agent/agent-chat-page.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/admin-overview-panel.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file lib/agent/types.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 lib/legal-content.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 components/agent/agent-composer.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file components/landing/site-header.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file remotion/prompt-lens-remix-comparison-demo.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Swallowed exception (empty catch) workers/ffmpeg-worker/remote-video-codec.mjs:156— `.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) workers/ffmpeg-worker/storage-media-download.mjs:32— `.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) lib/workflow/local-standard-edit.ts:84— 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) lib/video-processor/editor.ts:197— 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) lib/video-processor/editor.ts:333— 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) lib/payments/alipay.ts:141— 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) lib/billing/commercial-media.ts:35— 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) lib/billing/commercial-readiness.ts:6— 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) lib/billing/reconciliation-worker.ts:29— `.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) lib/ai/infistar-media.ts:29— `.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) lib/ai/kie-client.ts:90— `.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) lib/ai/kie-responses.ts:64— `.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) lib/ai/reference-media-access.ts:9— 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) lib/ai/adapters/infistar-video.ts:59— 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) lib/ai/adapters/infistar-video.ts:70— `.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) lib/agent/ai-provider.ts:49— 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) lib/agent/ai-provider.ts:57— 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) lib/agent/ai-provider.ts:66— 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) lib/agent/storage.ts:180— 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) components/audio-analyze-tab.tsx:209— 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) components/visit-tracker.tsx:16— `.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) components/workflow/video-workflow-create.tsx:107— 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) components/workflow/video-workflow-create.tsx:180— 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) components/workflow/video-workflow-create.tsx:758— 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) components/workflow/video-workflow-create.tsx:760— 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.
+ 13 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×30
Async function without AbortSignal: uploadMediaToR2 lib/r2-upload-client.ts:29— `uploadMediaToR2` 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: createKieDialogueTask lib/workflow/kie-audio.ts:40— `createKieDialogueTask` 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: downloadVideo lib/workflow/local-standard-edit.ts:62— `downloadVideo` 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: recognizeBackgroundMusic lib/workflow/music-recognition.ts:63— `recognizeBackgroundMusic` 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: fetchProjectList lib/workflow/project-list-client.ts:1— `fetchProjectList` 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: downloadMusic lib/video-processor/editor.ts:95— `downloadMusic` 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: createCreemCreditCheckout lib/payments/credit-checkout.ts:37— `createCreemCreditCheckout` 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: submitVeoTask lib/ai/adapters/kie-video.ts:248— `submitVeoTask` 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: submitJobTask lib/ai/adapters/kie-video.ts:277— `submitJobTask` 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: fetchKIEVeoTaskResult lib/ai/adapters/kie-video.ts:331— `fetchKIEVeoTaskResult` 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: fetchKIETaskResult lib/ai/adapters/kie-video.ts:403— `fetchKIETaskResult` 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: createRun lib/agent/client.ts:41— `createRun` 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: listRuns lib/agent/client.ts:50— `listRuns` 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: getRun lib/agent/client.ts:55— `getRun` 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: executeRun lib/agent/client.ts:60— `executeRun` 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: cancelRun lib/agent/client.ts:69— `cancelRun` 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: retryRun lib/agent/client.ts:74— `retryRun` 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: deleteRun lib/agent/client.ts:79— `deleteRun` 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: setArtifactFavorite lib/agent/client.ts:84— `setArtifactFavorite` 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: refresh components/api-key-settings.tsx:25— `refresh` 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: loadAudioModels components/audio-analyze-tab.tsx:97— `loadAudioModels` 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: loadSample components/sample-project-detail.tsx:105— `loadSample` 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: loadSamples components/samples-gallery.tsx:39— `loadSamples` 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: loadEditModels components/video-edit-tab.tsx:77— `loadEditModels` 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: pollGenerationStatus components/reference-video/ReferenceVideoComposer.tsx:858— `pollGenerationStatus` 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 })`.
FunctionTooLong: ReferenceVideoComposer.ReferenceVideoComposer components/reference-video/ReferenceVideoComposer.tsx:279— FunctionTooLong — ReferenceVideoComposer runs 1266 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1166 over it, 12.66× 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: video-workflow-create.VideoWorkflowCreate components/workflow/video-workflow-create.tsx:308— FunctionTooLong — VideoWorkflowCreate runs 779 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 679 over it, 7.79× 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: video-edit-tab.VideoEditTab components/video-edit-tab.tsx:46— FunctionTooLong — VideoEditTab runs 509 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 409 over it, 5.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: audio-analyze-tab.AudioAnalyzeTab components/audio-analyze-tab.tsx:73— FunctionTooLong — AudioAnalyzeTab runs 468 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 368 over it, 4.68× 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: page.DashboardPage app/dashboard/page.tsx:26— FunctionTooLong — DashboardPage runs 424 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 324 over it, 4.24× 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: history-list.AnalysisHistory components/history-list.tsx:53— FunctionTooLong — AnalysisHistory runs 317 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 217 over it, 3.17× 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: login-client.LoginClient app/login/login-client.tsx:22— FunctionTooLong — LoginClient runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× 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: analysis-quote-panel.AnalysisQuotePanel components/payments/analysis-quote-panel.tsx:23— FunctionTooLong — AnalysisQuotePanel runs 259 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: agent-run-panel.AgentRunPanel components/agent/agent-run-panel.tsx:34— FunctionTooLong — AgentRunPanel runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× 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: create-with-agent.CreateWithAgent components/agent/create-with-agent.tsx:53— FunctionTooLong — CreateWithAgent runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: alipay-checkout-dialog.AlipayCheckoutDialog components/payments/alipay-checkout-dialog.tsx:17— FunctionTooLong — AlipayCheckoutDialog runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.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: agent-chat-page.AgentChatPage components/agent/agent-chat-page.tsx:18— FunctionTooLong — AgentChatPage runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.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: executor.executeRun lib/agent/executor.ts:93— FunctionTooLong — executeRun runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: globe.Globe components/globe.tsx:6— FunctionTooLong — Globe runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: login-globe-background.LoginGlobeBackground components/login-globe-background.tsx:9— FunctionTooLong — LoginGlobeBackground runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: agent-composer.AgentComposer components/agent/agent-composer.tsx:25— FunctionTooLong — AgentComposer runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: scene-video-preview.SceneVideoPlayer components/workflow/scene-video-preview.tsx:43— FunctionTooLong — SceneVideoPlayer runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: globe.WorldMapBackground components/globe.tsx:249— FunctionTooLong — WorldMapBackground runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.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: mock-data.runMockSearch lib/agent/mock-data.ts:35— FunctionTooLong — runMockSearch runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: reconciliation-scheduler.startReconciliationScheduler workers/ffmpeg-worker/reconciliation-scheduler.mjs:11— FunctionTooLong — startReconciliationScheduler runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: testimonials-section.TestimonialsSection components/landing/testimonials-section.tsx:48— FunctionTooLong — TestimonialsSection runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: credit-rules.creditRuleTopics app/guide/credit-rules.ts:9— FunctionTooLong — creditRuleTopics runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: page.CommercialReviewPage app/billing/review/page.tsx:9— FunctionTooLong — CommercialReviewPage runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× 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: admin-user-directory.AdminUserDirectory components/admin-user-directory.tsx:11— FunctionTooLong — AdminUserDirectory runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: agent-artifact-panel.AgentArtifactPanel components/agent/agent-artifact-panel.tsx:102— FunctionTooLong — AgentArtifactPanel runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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.
AC1 · Text alternatives· <video> without a captions track · ×11
<video> without a captions track app/billing/tasks/[id]/page.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 components/audio-analyze-tab.tsx:625— 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 components/landing/brand-video-button.tsx:49— 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 components/reference-video/ReferenceVideoComposer.tsx:1767— 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 components/reference-video/generation-history.tsx:75— 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 components/sample-project-detail.tsx:195— 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 components/sample-project-detail.tsx:230— 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 components/video-edit-tab.tsx:533— 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 components/video-edit-tab.tsx:549— 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 components/workflow/analyzed-shot-preview.tsx:20— 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 components/workflow/video-workflow-create.tsx:886— 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).
Focus outline removed inline components/agent/agent-chat-page.tsx:211— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/audio-analyze-tab.tsx:351— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/audio-analyze-tab.tsx:468— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/reference-video/ReferenceVideoComposer.tsx:1440— <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/reference-video/ReferenceVideoComposer.tsx:1527— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/reference-video/ReferenceVideoComposer.tsx:1615— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/samples-gallery.tsx:100— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/video-edit-tab.tsx:483— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/video-edit-tab.tsx:492— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/workflow/video-workflow-create.tsx:1126— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline components/workflow/video-workflow-create.tsx:1245— <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D30 · Dependency Vulnerabilities· Medium CVE · ×11
Sync-over-async blocking lib/agent/storage.ts:276— `existsSync` in `deleteRun` 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 lib/agent/storage.ts:277— `rmSync` in `deleteRun` 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 lib/agent/storage.ts:364— `existsSync` in `iterAllRuns` 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 lib/agent/storage.ts:365— `readdirSync` in `iterAllRuns` 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 lib/agent/storage.ts:367— `existsSync` in `iterAllRuns` 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 lib/agent/storage.ts:368— `readdirSync` in `iterAllRuns` 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 lib/agent/storage.ts:378— `existsSync` in `findRunFileById` 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 lib/agent/storage.ts:379— `readdirSync` in `findRunFileById` 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 lib/agent/storage.ts:381— `existsSync` in `findRunFileById` 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.
FileTooLong: reference-video/ReferenceVideoComposer.tsx components/reference-video/ReferenceVideoComposer.tsx— FileTooLong — 1477 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: ReferenceVideoComposer (279-1792). The bar is 500 significant lines; this is 977 over it, 2.95× 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: workflow/video-workflow-create.tsx components/workflow/video-workflow-create.tsx— FileTooLong — 1094 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: VideoWorkflowCreate (308-1212). The bar is 500 significant lines; this is 594 over it, 2.19× 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: db/schema.ts lib/db/schema.ts— FileTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 348 over it, 1.70× 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: components/video-edit-tab.tsx components/video-edit-tab.tsx— FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: VideoEditTab (46-686). The bar is 500 significant lines; this is 71 over it, 1.14× 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: agent/storage.ts lib/agent/storage.ts— FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08× 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: components/audio-analyze-tab.tsx components/audio-analyze-tab.tsx— FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: AudioAnalyzeTab (73-637). The bar is 500 significant lines; this is 23 over it, 1.05× 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.
Duplicated block (11 lines × 2 locations) app/api/admin/overview/route.ts:42— app/api/admin/overview/route.ts:42 · lib/admin/usage.ts:12 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (11 lines × 2 locations) app/api/history/route.ts:72— app/api/history/route.ts:72 · app/api/history/route.ts:115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2 locations) app/api/history/route.ts:108— app/api/history/route.ts:108 · app/api/settings/api-key/route.ts:169 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (11 lines × 2 locations) app/api/settings/api-key/route.ts:57— app/api/settings/api-key/route.ts:57 · app/api/settings/api-key/route.ts:162 — 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.
Duplicated block (11 lines × 2 locations) REDACTED:83— REDACTED:83 · app/api/video-generate/route.ts:44 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) components/reference-video/ReferenceVideoComposer.tsx:369— components/reference-video/ReferenceVideoComposer.tsx:369 · lib/billing/use-wallet-balance.ts:21 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
video-workflow-create.VideoWorkflowCreate::startBreakdown (cyclomatic 69) components/workflow/video-workflow-create.tsx:617— video-workflow-create.VideoWorkflowCreate::startBreakdown has cyclomatic complexity 69 (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: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::retryFailedScene (cyclomatic 31) components/workflow/video-workflow-create.tsx:788— video-workflow-create.VideoWorkflowCreate::retryFailedScene 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. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::rewriteScene (cyclomatic 20) components/workflow/video-workflow-create.tsx:747— video-workflow-create.VideoWorkflowCreate::rewriteScene has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::handleFile (cyclomatic 17) components/workflow/video-workflow-create.tsx:528— video-workflow-create.VideoWorkflowCreate::handleFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::startBreakdown, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
Deprecated: @mux/mux-node package.json:33— @mux/mux-node 12.8.1, declared in package.json, is marked deprecated by its publisher: "@mux/mux-node was renamed to @mux/ts. 15.5.0 is the final release under this name; install @mux/ts for all future releases. Migration guide: https://github.com/muxinc/mux-ts/blob/main/MIGRATION.md". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: fluent-ffmpeg package.json:45— fluent-ffmpeg 2.1.3, declared in package.json, is marked deprecated by its publisher: "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: recharts package.json:54— recharts 2.15.4, declared in package.json, is marked deprecated by its publisher: "1.x and 2.x branches are no longer active. Bump to Recharts v3 to receive latest features and bugfixes. See https://github.com/recharts/recharts/wiki/3.0-migration-guide". Replace it with the package or version that message names, or record why this one must stay.
Deprecated: eslint package.json:77— eslint 9.39.4, declared in package.json, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
video-workflow-create.VideoWorkflowCreate::startBreakdown (cognitive 73) components/workflow/video-workflow-create.tsx:617— video-workflow-create.VideoWorkflowCreate::startBreakdown has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 26 (39 pts), boolean chains 23, if/else 10, error handling 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. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::retryFailedScene (cognitive 35) components/workflow/video-workflow-create.tsx:788— video-workflow-create.VideoWorkflowCreate::retryFailedScene has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 8 (11 pts), boolean chains 6, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::handleFile (cognitive 24) components/workflow/video-workflow-create.tsx:528— video-workflow-create.VideoWorkflowCreate::handleFile has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (6 pts), boolean chains 3, 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. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::startBreakdown, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
video-workflow-create.VideoWorkflowCreate::rewriteScene (cognitive 23) components/workflow/video-workflow-create.tsx:747— video-workflow-create.VideoWorkflowCreate::rewriteScene has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 5 (7 pts), boolean chains 5, ternaries 2 (3 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. This shape REPEATS in the file: 4 other methods here (video-workflow-create.VideoWorkflowCreate, video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
route.POST (cognitive 17) REDACTED:13— route.POST has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (5 pts), if/else 4, 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.
route.POST (cognitive 17) app/api/internal/analysis-run/route.ts:14— route.POST has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3, error handling 1. Of this number, 9 points are the body's own statements and 8 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.
route.POST (cognitive 17) app/api/settings/api-key/route.ts:61— route.POST has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, error handling 2 (nesting depth added 1). 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: 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.
route.POST (cognitive 17) REDACTED:8— route.POST has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 5, boolean chains 4, 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.
Duplicated block (10 lines × 2 locations) app/api/video-edit/route.ts:93— app/api/video-edit/route.ts:93 · app/api/video-generate/route.ts:57 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) components/agent/agent-run-panel.tsx:77— components/agent/agent-run-panel.tsx:77 · components/agent/agent-run-panel.tsx:91 — 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.
Duplicated block (10 lines × 2 locations) components/workflow/video-workflow-create.tsx:856— components/workflow/video-workflow-create.tsx:856 · components/workflow/video-workflow-create.tsx:866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2 locations) lib/db/schema.ts:380— lib/db/schema.ts:380 · lib/db/schema.ts:411 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
AC2 · Forms & labels· <Textarea> field component without a label · ×3
<Textarea> field component without a label components/audio-analyze-tab.tsx:457— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label components/history-list.tsx:352— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label components/workflow/video-workflow-create.tsx:1146— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
Duplicated block (17 lines × 2 locations) lib/ai/adapters/kie-video.ts:335— lib/ai/adapters/kie-video.ts:335 · lib/ai/adapters/kie-video.ts:414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2 locations) lib/ai/kie-client.ts:99— lib/ai/kie-client.ts:99 · lib/ai/kie-responses.ts:79 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (17 lines × 2 locations) lib/video-processor/editor.ts:67— lib/video-processor/editor.ts:67 · lib/video-processor/index.ts:37 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) app/api/audio-clip/route.ts:231— app/api/audio-clip/route.ts:231 · app/api/audio-clip/route.ts:255 — 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.
Duplicated block (14 lines × 2 locations) app/dashboard/page.tsx:354— app/dashboard/page.tsx:354 · app/dashboard/page.tsx:397 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (14 lines × 2 locations) lib/utils/file-validation.ts:83— lib/utils/file-validation.ts:83 · lib/utils/file-validation.ts:114 — 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.
Duplicated block (12 lines × 2 locations) app/login/login-client.tsx:85— app/login/login-client.tsx:85 · app/login/login-client.tsx:137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2 locations) app/login/login-client.tsx:227— app/login/login-client.tsx:227 · components/landing/site-footer.tsx:41 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (12 lines × 2 locations) lib/agent/storage.ts:656— lib/agent/storage.ts:656 · lib/agent/storage.ts:674 — 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.
route.POST (cyclomatic 22) REDACTED:8— route.POST 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.
route.POST (cyclomatic 22) app/api/video-generate/route.ts:47— route.POST 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.
route.POST (cyclomatic 20) app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:11— route.POST 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.
route.POST (cyclomatic 20) app/api/internal/analysis-run/route.ts:14— route.POST has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 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.
route.GET (cyclomatic 17) app/api/cron/analysis-dispatch/route.ts:13— route.GET has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong 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.
route.GET (cyclomatic 17) app/api/cron/commercial-reconciliation/route.ts:18— route.GET has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
route.POST (cyclomatic 16) app/api/payments/webhooks/creem/route.ts:12— route.POST 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.
route.POST (cyclomatic 16) app/api/project-assets/route.ts:25— route.POST 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.
analysis-quote-panel.AnalysisQuotePanel::post (cognitive 84) components/payments/analysis-quote-panel.tsx:70— analysis-quote-panel.AnalysisQuotePanel::post has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 18 (48 pts), boolean chains 18, if/else 17, error handling 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (analysis-quote-panel.AnalysisQuotePanel, analysis-quote-panel.AnalysisQuotePanel::confirmAnalysis) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
analysis-quote-panel.AnalysisQuotePanel::confirmAnalysis (cognitive 17) components/payments/analysis-quote-panel.tsx:188— analysis-quote-panel.AnalysisQuotePanel::confirmAnalysis has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (2 pts), 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. This shape REPEATS in the file: 2 other methods here (analysis-quote-panel.AnalysisQuotePanel, analysis-quote-panel.AnalysisQuotePanel::post) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob (cognitive 35) components/reference-video/ReferenceVideoComposer.tsx:1076— ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 7 (9 pts), boolean chains 8, error handling 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. This shape REPEATS in the file: 2 other methods here (ReferenceVideoComposer.ReferenceVideoComposer, ReferenceVideoComposer.ReferenceVideoComposer::createVideo) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ReferenceVideoComposer.ReferenceVideoComposer::createVideo (cognitive 19) components/reference-video/ReferenceVideoComposer.tsx:1244— ReferenceVideoComposer.ReferenceVideoComposer::createVideo has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 1, error handling 1, if/else 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: 2 other methods here (ReferenceVideoComposer.ReferenceVideoComposer, ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
route.GET (cognitive 19) app/api/cron/commercial-reconciliation/route.ts:18— route.GET has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 5, error handling 2 (5 pts), if/else 4, loops 2 (3 pts), 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.
route.GET (cognitive 19) app/api/models/route.ts:13— route.GET has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (4 pts), boolean chains 3, error handling 1 (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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×2
Duplicated block (21 lines × 2 locations) components/sample-project-detail.tsx:197— components/sample-project-detail.tsx:197 · components/workflow/video-workflow-create.tsx:1044 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (21 lines × 2 locations) lib/email/otp-email.ts:45— lib/email/otp-email.ts:45 · lib/email/welcome-email.ts:56 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (19 lines × 2 locations) components/sample-project-detail.tsx:247— components/sample-project-detail.tsx:247 · components/workflow/video-workflow-create.tsx:1175 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (19 lines × 2 locations) components/sample-project-detail.tsx:282— components/sample-project-detail.tsx:282 · components/workflow/video-workflow-create.tsx:1211 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (18 lines × 2 locations) app/dashboard/page.tsx:294— app/dashboard/page.tsx:294 · app/dashboard/page.tsx:313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2 locations) lib/ai/adapters/kie-video.ts:255— lib/ai/adapters/kie-video.ts:255 · lib/ai/adapters/kie-video.ts:289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 3 locations) app/api/admin/logs/route.ts:65— app/api/admin/logs/route.ts:65 · app/api/admin/users/route.ts:32 · app/api/admin/users/route.ts:96 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 3 locations) app/api/agent/runs/[id]/cancel/route.ts:7— app/api/agent/runs/[id]/cancel/route.ts:7 · app/api/agent/runs/[id]/retry/route.ts:7 · app/api/agent/runs/[id]/route.ts:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Dead file (~38 LoC) components/agent/agent-suggestion-chips.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-composer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~38 LoC) components/landing/animation-placeholder.tsx— no import path from any entry point (137 application, 11 tooling, 159 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
Swallowed exception (caught, then discarded) lib/billing/commercial-generation.ts:162— `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) lib/billing/local-analysis-scheduler.ts:12— `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.
AC3 · Page structure· Heading level jumps from h1 to h3 · ×1
Heading level jumps from h1 to h3 components/sample-project-detail.tsx:216— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×1
Modal dialog does not manage focus app/login/login-client.tsx:179— 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.
alipay-checkout-dialog.AlipayCheckoutDialog (cyclomatic 169) components/payments/alipay-checkout-dialog.tsx:17— alipay-checkout-dialog.AlipayCheckoutDialog has cyclomatic complexity 169 (threshold 15). Of this number, 88 points are the body's own statements and 81 belong to 20 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.
video-workflow-create.VideoWorkflowCreate (cyclomatic 103) components/workflow/video-workflow-create.tsx:308— video-workflow-create.VideoWorkflowCreate has cyclomatic complexity 103 (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: 4 other methods here (video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
page.DashboardPage (cyclomatic 94) app/dashboard/page.tsx:26— page.DashboardPage has cyclomatic complexity 94 (threshold 15). Of this number, 63 points are the body's own statements and 31 belong to 11 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.
ReferenceVideoComposer.ReferenceVideoComposer (cyclomatic 93) components/reference-video/ReferenceVideoComposer.tsx:279— ReferenceVideoComposer.ReferenceVideoComposer has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob) 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.
pricing-v6.estimateGeneration (cyclomatic 84) lib/billing/pricing-v6.ts:102— pricing-v6.estimateGeneration has cyclomatic complexity 84 (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.
billing-account.BillingAccount (cyclomatic 73) components/payments/billing-account.tsx:20— billing-account.BillingAccount 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. This shape REPEATS in the file: one other method here (billing-account.BillingAccount::refund) 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.
route.GET (cyclomatic 66) REDACTED:38— route.GET has cyclomatic complexity 66 (threshold 15). Of this number, 59 points are the body's own statements and 7 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.
generation-history.GenerationHistory (cyclomatic 63) components/reference-video/generation-history.tsx:12— generation-history.GenerationHistory has cyclomatic complexity 63 (threshold 15). Of this number, 23 points are the body's own statements and 40 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.
admin-financial-records.AdminFinancialRecords (cyclomatic 61) components/admin-financial-records.tsx:9— admin-financial-records.AdminFinancialRecords has cyclomatic complexity 61 (threshold 15). Of this number, 31 points are the body's own statements and 30 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.
analysis-quote-panel.AnalysisQuotePanel (cyclomatic 60) components/payments/analysis-quote-panel.tsx:23— analysis-quote-panel.AnalysisQuotePanel 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: one other method here (analysis-quote-panel.AnalysisQuotePanel::post) 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.
analysis-quote-panel.AnalysisQuotePanel::post (cyclomatic 59) components/payments/analysis-quote-panel.tsx:70— analysis-quote-panel.AnalysisQuotePanel::post has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (analysis-quote-panel.AnalysisQuotePanel) 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.
history-list.AnalysisHistory (cyclomatic 57) components/history-list.tsx:53— history-list.AnalysisHistory has cyclomatic complexity 57 (threshold 15). Of this number, 19 points are the body's own statements and 38 belong to 10 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.
admin-user-directory.AdminUserDirectory (cyclomatic 55) components/admin-user-directory.tsx:11— admin-user-directory.AdminUserDirectory has cyclomatic complexity 55 (threshold 15). Of this number, 28 points are the body's own statements and 27 belong to 11 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.
analysis-tasks.runAnalysisTaskStep (cyclomatic 54) lib/workflow/analysis-tasks.ts:157— analysis-tasks.runAnalysisTaskStep has cyclomatic complexity 54 (threshold 15). Of this number, 43 points are the body's own statements and 11 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.
generation-payload.buildMarketGenerationPayload (cyclomatic 53) lib/ai/generation-payload.ts:10— generation-payload.buildMarketGenerationPayload has cyclomatic complexity 53 (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.
route.POST (cyclomatic 50) REDACTED:15— route.POST 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.
route.POST (cyclomatic 49) REDACTED:127— route.POST has cyclomatic complexity 49 (threshold 15). Of this number, 46 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.
commercial-generation.buildCommercialGenerationPayload (cyclomatic 49) lib/billing/commercial-generation.ts:22— commercial-generation.buildCommercialGenerationPayload has cyclomatic complexity 49 (threshold 15). Of this number, 47 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.
agent-composer.AgentComposer (cyclomatic 46) components/agent/agent-composer.tsx:25— agent-composer.AgentComposer has cyclomatic complexity 46 (threshold 15). Of this number, 25 points are the body's own statements and 21 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.
page.BillingTaskPage (cyclomatic 45) app/billing/tasks/[id]/page.tsx:12— page.BillingTaskPage has cyclomatic complexity 45 (threshold 15). Of this number, 29 points are the body's own statements and 16 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.
independent-scene-analysis.saveSceneCheckpoint (cyclomatic 44) lib/billing/independent-scene-analysis.ts:55— independent-scene-analysis.saveSceneCheckpoint has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 5 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). 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.
page.CommercialReviewPage (cyclomatic 43) app/billing/review/page.tsx:9— page.CommercialReviewPage 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. This shape REPEATS in the file: one other method here (page.CommercialReviewPage::act) 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.
kie-veo.getKieVeoGenerationStatus (cyclomatic 42) lib/reference-video/kie-veo.ts:346— kie-veo.getKieVeoGenerationStatus has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
route.loadOverview (cyclomatic 41) app/api/admin/overview/route.ts:18— route.loadOverview has cyclomatic complexity 41 (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.
analysis-task-details.AnalysisTaskDetails (cyclomatic 41) components/payments/analysis-task-details.tsx:14— analysis-task-details.AnalysisTaskDetails has cyclomatic complexity 41 (threshold 15). Of this number, 34 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.
probeRemoteVideoCodec::read (cyclomatic 40) workers/ffmpeg-worker/remote-video-codec.mjs:100— probeRemoteVideoCodec::read has cyclomatic complexity 40 (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.
credit-rules.creditRuleTopics (cyclomatic 38) app/guide/credit-rules.ts:9— credit-rules.creditRuleTopics has cyclomatic complexity 38 (threshold 15). Of this number, 28 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.
admin-overview-panel.AdminOverviewPanel (cyclomatic 37) components/admin-overview-panel.tsx:110— admin-overview-panel.AdminOverviewPanel has cyclomatic complexity 37 (threshold 15). Of this number, 18 points are the body's own statements and 19 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.
agent-chat-page.AgentChatPage (cyclomatic 37) components/agent/agent-chat-page.tsx:18— agent-chat-page.AgentChatPage has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 55, submitFollowUp, a function literal at line 87, …). 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.
route.POST (cyclomatic 36) app/api/admin/payments/commercial/route.ts:36— route.POST 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.
login-client.LoginClient (cyclomatic 36) app/login/login-client.tsx:22— login-client.LoginClient has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSendCode, handleVerifyCode, a function literal at line 32, …). 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.
pricing-section.PricingSection (cyclomatic 36) components/landing/pricing-section.tsx:11— pricing-section.PricingSection has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 28, 42, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
commercial-analysis.executeCommercialAnalysis (cyclomatic 36) lib/billing/commercial-analysis.ts:132— commercial-analysis.executeCommercialAnalysis has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 159, 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.
scene-video-preview.SceneVideoPlayer (cyclomatic 35) components/workflow/scene-video-preview.tsx:43— scene-video-preview.SceneVideoPlayer has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (scene-video-preview.SceneVideoPlayer::togglePlayback) 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.
analysis-task-progress.AnalysisTaskProgress (cyclomatic 34) components/payments/analysis-task-progress.tsx:43— analysis-task-progress.AnalysisTaskProgress has cyclomatic complexity 34 (threshold 15). Of this number, 32 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.
independent-scene-analysis.runIndependentSceneJob (cyclomatic 34) lib/billing/independent-scene-analysis.ts:173— independent-scene-analysis.runIndependentSceneJob has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 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.
agent-run-panel.AgentRunPanel (cyclomatic 33) components/agent/agent-run-panel.tsx:34— agent-run-panel.AgentRunPanel has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 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.
generation-credit-preview.generationCreditPreview (cyclomatic 33) lib/billing/generation-credit-preview.ts:5— generation-credit-preview.generationCreditPreview has cyclomatic complexity 33 (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.
project-history-details.ProjectHistoryDetails (cyclomatic 32) components/workflow/project-history-details.tsx:14— project-history-details.ProjectHistoryDetails has cyclomatic complexity 32 (threshold 15). Of this number, 20 points are the body's own statements and 12 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.
audio-analyze-tab.AudioAnalyzeTab (cyclomatic 31) components/audio-analyze-tab.tsx:73— audio-analyze-tab.AudioAnalyzeTab 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. This shape REPEATS in the file: one other method here (audio-analyze-tab.AudioAnalyzeTab::handleAnalyze) 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.
commercial-generation.quoteCommercialGeneration (cyclomatic 31) lib/billing/commercial-generation.ts:50— commercial-generation.quoteCommercialGeneration has cyclomatic complexity 31 (threshold 15). Of this number, 27 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.
prompt-lens-rewrite-demo.PromptLensRewriteDemo (cyclomatic 30) remotion/prompt-lens-rewrite-demo.tsx:23— prompt-lens-rewrite-demo.PromptLensRewriteDemo has cyclomatic complexity 30 (threshold 15). 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: 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.
page.GuidePage (cyclomatic 29) app/guide/page.tsx:10— page.GuidePage has cyclomatic complexity 29 (threshold 15). Of this number, 18 points are the body's own statements and 11 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.
video-workflow-create.AnalysisProgressPanel (cyclomatic 29) components/workflow/video-workflow-create.tsx:238— video-workflow-create.AnalysisProgressPanel has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 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.
mock-data.runMockSearch (cyclomatic 28) lib/agent/mock-data.ts:35— mock-data.runMockSearch has cyclomatic complexity 28 (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.
infistar-video.buildInfistarVideoPayload (cyclomatic 28) lib/ai/adapters/infistar-video.ts:10— infistar-video.buildInfistarVideoPayload has cyclomatic complexity 28 (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.
scene-analysis.rewriteSceneBlueprint (cyclomatic 28) lib/workflow/scene-analysis.ts:447— scene-analysis.rewriteSceneBlueprint has cyclomatic complexity 28 (threshold 15). Of this number, 25 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.
route.POST (cyclomatic 27) REDACTED:8— route.POST 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
route.GET (cyclomatic 27) REDACTED:249— route.GET 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.
ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob (cyclomatic 27) components/reference-video/ReferenceVideoComposer.tsx:1076— ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ReferenceVideoComposer.ReferenceVideoComposer) 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.
video-edit-tab.VideoEditTab (cyclomatic 26) components/video-edit-tab.tsx:46— video-edit-tab.VideoEditTab 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. This shape REPEATS in the file: one other method here (video-edit-tab.VideoEditTab::handleEdit) 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.
kie-client.readChatResponse (cyclomatic 26) lib/ai/kie-client.ts:68— kie-client.readChatResponse has cyclomatic complexity 26 (threshold 15). Of this number, 23 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.
kie-client.requestKieChat (cyclomatic 26) lib/ai/kie-client.ts:123— kie-client.requestKieChat has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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.
easydown.selectEasyDownMedia (cyclomatic 26) lib/media-resolver/easydown.ts:100— easydown.selectEasyDownMedia has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 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.
route.handleImport (cyclomatic 25) REDACTED:54— route.handleImport 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.
samples-gallery.SamplesGallery (cyclomatic 25) components/samples-gallery.tsx:29— samples-gallery.SamplesGallery has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 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.
commercial-analysis.prepareCommercialAnalysis (cyclomatic 25) lib/billing/commercial-analysis.ts:50— commercial-analysis.prepareCommercialAnalysis has cyclomatic complexity 25 (threshold 15). Of this number, 20 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.
executor.executeRun (cyclomatic 25) lib/agent/executor.ts:93— executor.executeRun has cyclomatic complexity 25 (threshold 15). Of this number, 23 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.
task-failure-message.taskFailureMessage (cyclomatic 25) lib/billing/task-failure-message.ts:17— task-failure-message.taskFailureMessage 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.
credit-checkout.settlePaidCreditOrder (cyclomatic 25) lib/payments/credit-checkout.ts:153— credit-checkout.settlePaidCreditOrder 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 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.
alipay-reconciliation.reconcileAlipayOrder (cyclomatic 25) lib/payments/alipay-reconciliation.ts:24— alipay-reconciliation.reconcileAlipayOrder 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.
prepare_video.main (cyclomatic 25) skills/prompt-lens-video-remix/scripts/prepare_video.py:358— prepare_video.main 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.
payment-return-client.PaymentReturnClient (cyclomatic 24) app/billing/payment/return/payment-return-client.tsx:9— payment-return-client.PaymentReturnClient has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
create-with-agent.CreateWithAgent (cyclomatic 24) components/agent/create-with-agent.tsx:53— create-with-agent.CreateWithAgent has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (handleSubmit, a function literal at line 85, a function literal at line 165, …). 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.
commercial-analysis.recoverCommercialAnalysisTasks (cyclomatic 24) lib/billing/commercial-analysis.ts:225— commercial-analysis.recoverCommercialAnalysisTasks has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 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.
kie-responses.readKieResponses (cyclomatic 24) lib/ai/kie-responses.ts:53— kie-responses.readKieResponses has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
commercial-refunds.reviewCommercialRefund (cyclomatic 24) lib/payments/commercial-refunds.ts:45— commercial-refunds.reviewCommercialRefund has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 47). 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.
commercial-generation-submit.submitCommercialGeneration (cyclomatic 24) lib/reference-video/commercial-generation-submit.ts:38— commercial-generation-submit.submitCommercialGeneration 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.
scene-analysis.callAnalysisChatJson (cyclomatic 24) lib/workflow/scene-analysis.ts:191— scene-analysis.callAnalysisChatJson 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.
analysis-tasks.recoverAnalysisTasks (cyclomatic 24) lib/workflow/analysis-tasks.ts:256— analysis-tasks.recoverAnalysisTasks has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 267). 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.
route.GET (cyclomatic 23) app/api/admin/payments/commercial/route.ts:10— route.GET 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 one function literal inside it that branches (line 23). 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.
infistar-video.getInfistarVideoStatus (cyclomatic 23) lib/ai/adapters/infistar-video.ts:51— infistar-video.getInfistarVideoStatus 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.
analysis-tasks.settleAnalysisTask (cyclomatic 23) lib/workflow/analysis-tasks.ts:91— analysis-tasks.settleAnalysisTask 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 one function literal inside it that branches (line 93). 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.
agent-artifact-panel.ArtifactContent (cyclomatic 22) components/agent/agent-artifact-panel.tsx:234— agent-artifact-panel.ArtifactContent has cyclomatic complexity 22 (threshold 15). Of this number, 18 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.
commercial-wallet.reserveCommercialTaskInTransaction (cyclomatic 22) lib/billing/commercial-wallet.ts:72— commercial-wallet.reserveCommercialTaskInTransaction has cyclomatic complexity 22 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
scene-assets.prepareIndependentSceneAsset (cyclomatic 22) lib/billing/scene-assets.ts:38— scene-assets.prepareIndependentSceneAsset has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 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.
recreation-prompt.buildRecreationPrompt (cyclomatic 22) lib/workflow/recreation-prompt.ts:15— recreation-prompt.buildRecreationPrompt has cyclomatic complexity 22 (threshold 15). Of this number, 17 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.
scene-refine.refine_video (cyclomatic 22) workers/ffmpeg-worker/scene-refine.py:101— scene-refine.refine_video 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.
route.POST (cyclomatic 21) REDACTED:9— route.POST has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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.
agent-step-card.AgentStepCard (cyclomatic 21) components/agent/agent-step-card.tsx:31— agent-step-card.AgentStepCard 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.
site-header.SiteHeader (cyclomatic 21) components/landing/site-header.tsx:101— site-header.SiteHeader has cyclomatic complexity 21 (threshold 15). 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: 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.
video-edit-tab.VideoEditTab::handleEdit (cyclomatic 21) components/video-edit-tab.tsx:345— video-edit-tab.VideoEditTab::handleEdit 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. This shape REPEATS in the file: one other method here (video-edit-tab.VideoEditTab) 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.
credit-balance-link.CreditBalanceLink (cyclomatic 21) components/workflow/credit-balance-link.tsx:13— credit-balance-link.CreditBalanceLink 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.
commercial-task-runner.runCommercialTask (cyclomatic 21) lib/billing/commercial-task-runner.ts:44— commercial-task-runner.runCommercialTask 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.
route.deferredPOST (cyclomatic 20) app/api/video-edit/route.ts:81— route.deferredPOST 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.
pricing-v6.validateAnalysis (cyclomatic 20) lib/billing/pricing-v6.ts:34— pricing-v6.validateAnalysis 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.
commercial-analysis.quoteCommercialAnalysisRetry (cyclomatic 20) lib/billing/commercial-analysis.ts:276— commercial-analysis.quoteCommercialAnalysisRetry 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, 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.
kie-video.buildKIEJobPayload (cyclomatic 20) lib/ai/adapters/kie-video.ts:146— kie-video.buildKIEJobPayload 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.
analysis-tasks.enqueueAnalysis (cyclomatic 20) lib/workflow/analysis-tasks.ts:46— analysis-tasks.enqueueAnalysis has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
remote-video-codec.probeRemoteVideoCodec (cyclomatic 20) workers/ffmpeg-worker/remote-video-codec.mjs:91— remote-video-codec.probeRemoteVideoCodec 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.
video-inspection.inspectVideoProbe (cyclomatic 20) workers/ffmpeg-worker/video-inspection.mjs:7— video-inspection.inspectVideoProbe has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 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.
handleCommercialMedia (cyclomatic 20) workers/ffmpeg-worker/server.mjs:486— handleCommercialMedia has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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.
route.POST (cyclomatic 19) REDACTED:13— route.POST 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.
api-key-settings.ApiKeySettings::action (cyclomatic 19) components/api-key-settings.tsx:35— api-key-settings.ApiKeySettings::action 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.
samples-gallery.SampleCard (cyclomatic 19) components/samples-gallery.tsx:145— samples-gallery.SampleCard 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.
commercial-review.releaseUnfulfilledCommercialAnalysis (cyclomatic 19) lib/billing/commercial-review.ts:72— commercial-review.releaseUnfulfilledCommercialAnalysis has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 76). 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.
middleware.middleware (cyclomatic 19) middleware.ts:37— middleware.middleware 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.
billing-account.BillingAccount::refund (cyclomatic 18) components/payments/billing-account.tsx:53— billing-account.BillingAccount::refund has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (billing-account.BillingAccount) 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.
analyzed-shot-preview.ShotPreview (cyclomatic 18) components/workflow/analyzed-shot-preview.tsx:14— analyzed-shot-preview.ShotPreview 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.
service.validateAttachments (cyclomatic 18) lib/agent/service.ts:29— service.validateAttachments 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 one function literal inside it that branches (line 34). 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.
import-progress.readLinkImportResponse (cyclomatic 18) lib/media-resolver/import-progress.ts:9— import-progress.readLinkImportResponse 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.
route.POST (cyclomatic 17) app/api/settings/api-key/route.ts:61— route.POST 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.
page.CommercialReviewPage::act (cyclomatic 17) app/billing/review/page.tsx:32— page.CommercialReviewPage::act has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (page.CommercialReviewPage) 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.
agent-artifact-panel.artifactToText (cyclomatic 17) components/agent/agent-artifact-panel.tsx:41— agent-artifact-panel.artifactToText has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 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.
audio-analyze-tab.AudioAnalyzeTab::handleAnalyze (cyclomatic 17) components/audio-analyze-tab.tsx:166— audio-analyze-tab.AudioAnalyzeTab::handleAnalyze 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. This shape REPEATS in the file: one other method here (audio-analyze-tab.AudioAnalyzeTab) 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.
sample-project-detail.ProjectBundleView (cyclomatic 17) components/sample-project-detail.tsx:162— sample-project-detail.ProjectBundleView has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 202). 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.
scene-video-preview.SceneVideoPlayer::togglePlayback (cyclomatic 17) components/workflow/scene-video-preview.tsx:104— scene-video-preview.SceneVideoPlayer::togglePlayback has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (scene-video-preview.SceneVideoPlayer) 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.
task-diagnostics.taskErrorDetails (cyclomatic 17) lib/billing/task-diagnostics.ts:10— task-diagnostics.taskErrorDetails 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.
analysis-diagnostics.buildAnalysisDiagnostics (cyclomatic 17) lib/billing/analysis-diagnostics.ts:25— analysis-diagnostics.buildAnalysisDiagnostics 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.
source-platform.sourcePlatform (cyclomatic 17) lib/media-resolver/source-platform.ts:19— source-platform.sourcePlatform 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.
commercial-refunds.requestCommercialRefund (cyclomatic 17) lib/payments/commercial-refunds.ts:6— commercial-refunds.requestCommercialRefund 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 one function literal inside it that branches (line 8). 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.
downloadStorageMedia (cyclomatic 17) workers/ffmpeg-worker/storage-media-download.mjs:20— downloadStorageMedia has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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.
route.deferredPOST (cyclomatic 16) app/api/workflow/projects/[id]/edit/route.ts:35— route.deferredPOST 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.
agent-artifact-panel.AgentArtifactPanel (cyclomatic 16) components/agent/agent-artifact-panel.tsx:102— agent-artifact-panel.AgentArtifactPanel 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 3 function items inside it that branch (a function literal at line 173, toggleFavorite, copy). 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.
commercial-wallet.getIncludedLinkImportUsage (cyclomatic 16) lib/billing/commercial-wallet.ts:43— commercial-wallet.getIncludedLinkImportUsage has cyclomatic complexity 16 (threshold 15). 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.
commercial-wallet.settleCommercialTaskInTransaction (cyclomatic 16) lib/billing/commercial-wallet.ts:129— commercial-wallet.settleCommercialTaskInTransaction 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.
user-directory.queryUserDirectory (cyclomatic 16) lib/admin/user-directory.ts:7— user-directory.queryUserDirectory 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.
infistar-media.readInfistarMedia (cyclomatic 16) lib/ai/infistar-media.ts:5— infistar-media.readInfistarMedia 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.
generation-models.resolveGenerationModel (cyclomatic 16) lib/ai/generation-models.ts:19— generation-models.resolveGenerationModel 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.
commercial-task-runner.confirmCommercialTaskInTransaction (cyclomatic 16) lib/billing/commercial-task-runner.ts:16— commercial-task-runner.confirmCommercialTaskInTransaction 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.
easydown.douyinVideoCodecs (cyclomatic 16) lib/media-resolver/easydown.ts:46— easydown.douyinVideoCodecs 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 one function item inside it that branches (add). 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.
No assertions: should navigate to dashboard from primary CTA tests/e2e/app.spec.ts:14— 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.
ReferenceVideoComposer.ReferenceVideoComposer (cognitive 132) components/reference-video/ReferenceVideoComposer.tsx:279— ReferenceVideoComposer.ReferenceVideoComposer has cognitive complexity 132 (threshold 15). Drivers by points: ternaries 123 (235 pts), if/else 87 (107 pts), boolean chains 87, error handling 9 (13 pts), loops 2 (nesting depth added 136). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (ReferenceVideoComposer.ReferenceVideoComposer::submitGenerationJob, ReferenceVideoComposer.ReferenceVideoComposer::createVideo) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
alipay-checkout-dialog.AlipayCheckoutDialog (cognitive 130) components/payments/alipay-checkout-dialog.tsx:17— alipay-checkout-dialog.AlipayCheckoutDialog has cognitive complexity 130 (threshold 15). Drivers by points: ternaries 28 (50 pts), boolean chains 44, if/else 30 (33 pts), error handling 3 (nesting depth added 25). Of this number, 36 points are the body's own statements and 94 belong to 20 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.
video-workflow-create.VideoWorkflowCreate (cognitive 114) components/workflow/video-workflow-create.tsx:308— video-workflow-create.VideoWorkflowCreate has cognitive complexity 114 (threshold 15). Drivers by points: ternaries 127 (240 pts), boolean chains 106, if/else 64 (74 pts), error handling 14 (17 pts) (nesting depth added 126). To reduce it, split the body into named stages: move each independent 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: 4 other methods here (video-workflow-create.VideoWorkflowCreate::handleFile, video-workflow-create.VideoWorkflowCreate::startBreakdown, video-workflow-create.VideoWorkflowCreate::rewriteScene, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
analysis-task-progress.AnalysisTaskProgress (cognitive 98) components/payments/analysis-task-progress.tsx:43— analysis-task-progress.AnalysisTaskProgress has cognitive complexity 98 (threshold 15). Drivers by points: ternaries 20 (92 pts), boolean chains 5, if/else 1 (nesting depth added 72). Of this number, 96 points are the body's own statements and 2 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.
route.GET (cognitive 93) REDACTED:38— route.GET has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 23 (48 pts), boolean chains 19, error handling 7 (14 pts), if/else 11 (12 pts) (nesting depth added 33). Of this number, 76 points are the body's own statements and 17 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.
route.POST (cognitive 90) REDACTED:15— route.POST has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 26 (64 pts), if/else 9 (12 pts), boolean chains 11, error handling 2 (3 pts) (nesting depth added 42). 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.
admin-user-directory.AdminUserDirectory (cognitive 82) components/admin-user-directory.tsx:11— admin-user-directory.AdminUserDirectory has cognitive complexity 82 (threshold 15). Drivers by points: ternaries 27 (60 pts), boolean chains 16, if/else 4 (5 pts), error handling 1 (nesting depth added 34). Of this number, 37 points are the body's own statements and 45 belong to 11 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.
page.DashboardPage (cognitive 79) app/dashboard/page.tsx:26— page.DashboardPage has cognitive complexity 79 (threshold 15). Drivers by points: boolean chains 30, ternaries 27 (30 pts), if/else 17 (19 pts) (nesting depth added 5). Of this number, 47 points are the body's own statements and 32 belong to 11 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
history-list.AnalysisHistory (cognitive 78) components/history-list.tsx:53— history-list.AnalysisHistory has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 16 (36 pts), if/else 17 (20 pts), boolean chains 18, error handling 4 (nesting depth added 23). Of this number, 22 points are the body's own statements and 56 belong to 10 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.
independent-scene-analysis.saveSceneCheckpoint (cognitive 69) lib/billing/independent-scene-analysis.ts:55— independent-scene-analysis.saveSceneCheckpoint has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 14 (29 pts), if/else 11 (24 pts), boolean chains 13, error handling 1 (2 pts), loops 1 (nesting depth added 29). Most of this is not in the body itself: 7 of the 69 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). 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.
analysis-tasks.runAnalysisTaskStep (cognitive 69) lib/workflow/analysis-tasks.ts:157— analysis-tasks.runAnalysisTaskStep has cognitive complexity 69 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 17, ternaries 5 (11 pts), error handling 3 (5 pts), loops 1 (2 pts) (nesting depth added 23). Of this number, 50 points are the body's own statements and 19 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.
admin-financial-records.AdminFinancialRecords (cognitive 64) components/admin-financial-records.tsx:9— admin-financial-records.AdminFinancialRecords has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 25 (42 pts), boolean chains 17, if/else 5 (nesting depth added 17). Of this number, 34 points are the body's own statements and 30 belong to 6 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.
generation-payload.buildMarketGenerationPayload (cognitive 64) lib/ai/generation-payload.ts:10— generation-payload.buildMarketGenerationPayload has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 14 (27 pts), if/else 14 (19 pts), boolean chains 18 (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.
generation-history.GenerationHistory (cognitive 63) components/reference-video/generation-history.tsx:12— generation-history.GenerationHistory has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 24 (38 pts), if/else 11 (12 pts), boolean chains 11, error handling 2 (nesting depth added 15). Most of this is not in the body itself: 12 of the 63 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 66, a function literal at line 22, status, …). 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.
route.POST (cognitive 59) REDACTED:127— route.POST has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 15 (21 pts), if/else 13 (20 pts), boolean chains 17, error handling 1 (nesting depth added 13). Of this number, 58 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.
analysis-task-details.AnalysisTaskDetails (cognitive 50) components/payments/analysis-task-details.tsx:14— analysis-task-details.AnalysisTaskDetails has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 22 (38 pts), boolean chains 12 (nesting depth added 16). Of this number, 44 points are the body's own statements and 6 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.
kie-veo.getKieVeoGenerationStatus (cognitive 47) lib/reference-video/kie-veo.ts:346— kie-veo.getKieVeoGenerationStatus has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 15 (28 pts), boolean chains 14, if/else 5 (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.
agent-chat-page.AgentChatPage (cognitive 46) components/agent/agent-chat-page.tsx:18— agent-chat-page.AgentChatPage has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 14 (25 pts), boolean chains 11, if/else 8, error handling 2 (nesting depth added 11). Most of this is not in the body itself: 7 of the 46 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 55, a function literal at line 87, submitFollowUp, …). 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.
video-workflow-create.AnalysisProgressPanel (cognitive 45) components/workflow/video-workflow-create.tsx:238— video-workflow-create.AnalysisProgressPanel has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 21 (38 pts), boolean chains 6, if/else 1 (nesting depth added 17). Of this number, 26 points are the body's own statements and 19 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.
route.loadOverview (cognitive 44) app/api/admin/overview/route.ts:18— route.loadOverview has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 24, ternaries 11 (13 pts), if/else 3 (5 pts), loops 2 (nesting depth added 4). 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.
pricing-v6.estimateGeneration (cognitive 44) lib/billing/pricing-v6.ts:102— pricing-v6.estimateGeneration has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 17, ternaries 3 (4 pts) (nesting depth added 6). 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.
credit-rules.creditRuleTopics (cognitive 43) app/guide/credit-rules.ts:9— credit-rules.creditRuleTopics has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 37 (43 pts) (nesting depth added 6). Of this number, 27 points are the body's own statements and 16 belong to 6 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.
commercial-analysis.executeCommercialAnalysis (cognitive 43) lib/billing/commercial-analysis.ts:132— commercial-analysis.executeCommercialAnalysis has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 9 (12 pts), boolean chains 9, loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 15 of the 43 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 159, 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.
login-client.LoginClient (cognitive 41) app/login/login-client.tsx:22— login-client.LoginClient has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 9 (12 pts), boolean chains 10, error handling 3 (nesting depth added 5). Most of this is not in the body itself: 14 of the 41 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSendCode, handleOAuthSignIn, handleVerifyCode, …). 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.
executor.executeRun (cognitive 41) lib/agent/executor.ts:93— executor.executeRun has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 2 (7 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (nesting depth added 16). Of this number, 33 points are the body's own statements and 8 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.
samples-gallery.SamplesGallery (cognitive 40) components/samples-gallery.tsx:29— samples-gallery.SamplesGallery has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 15 (30 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 16). Of this number, 24 points are the body's own statements and 16 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.
probeRemoteVideoCodec::read (cognitive 40) workers/ffmpeg-worker/remote-video-codec.mjs:100— probeRemoteVideoCodec::read has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 11, ternaries 4 (6 pts), other 2, error handling 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.
route.POST (cognitive 39) app/api/admin/payments/commercial/route.ts:36— route.POST has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 10, error handling 4 (8 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.
audio-analyze-tab.AudioAnalyzeTab (cognitive 39) components/audio-analyze-tab.tsx:73— audio-analyze-tab.AudioAnalyzeTab has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 31 (45 pts), boolean chains 31, if/else 17, error handling 6 (7 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (audio-analyze-tab.AudioAnalyzeTab::handleAnalyze) 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.
commercial-generation.buildCommercialGenerationPayload (cognitive 39) lib/billing/commercial-generation.ts:22— commercial-generation.buildCommercialGenerationPayload has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 21, if/else 10 (11 pts), ternaries 6 (7 pts) (nesting depth added 2). Of this number, 38 points are the body's own statements and 1 belongs 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.
route.GET (cognitive 38) REDACTED:249— route.GET has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 11 (15 pts), boolean chains 4, error handling 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.
commercial-generation.quoteCommercialGeneration (cognitive 38) lib/billing/commercial-generation.ts:50— commercial-generation.quoteCommercialGeneration has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 13, ternaries 3, error handling 1 (2 pts) (nesting depth added 10). Of this number, 33 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.
scene-analysis.callAnalysisChatJson (cognitive 38) lib/workflow/scene-analysis.ts:191— scene-analysis.callAnalysisChatJson has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 6 (12 pts), boolean chains 5, error handling 2 (4 pts), loops 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.
pricing-section.PricingSection (cognitive 37) components/landing/pricing-section.tsx:11— pricing-section.PricingSection has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 21 (27 pts), boolean chains 7, if/else 2, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 13 of the 37 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 28, 42, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
analysis-diagnostics.buildAnalysisDiagnostics (cognitive 37) lib/billing/analysis-diagnostics.ts:25— analysis-diagnostics.buildAnalysisDiagnostics has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (34 pts), boolean chains 3 (nesting depth added 21). 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.
route.POST (cognitive 36) REDACTED:8— route.POST has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 9 (12 pts), boolean chains 7, error handling 1 (nesting depth added 12). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
payment-return-client.PaymentReturnClient (cognitive 36) app/billing/payment/return/payment-return-client.tsx:9— payment-return-client.PaymentReturnClient has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (25 pts), if/else 6 (7 pts), boolean chains 3, error handling 1 (nesting depth added 13). Of this number, 22 points are the body's own statements and 14 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.
route.handleImport (cognitive 35) REDACTED:54— route.handleImport has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 5 (8 pts), error handling 3, 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.
page.BillingTaskPage (cognitive 35) app/billing/tasks/[id]/page.tsx:12— page.BillingTaskPage has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 12, ternaries 8 (11 pts), if/else 9 (10 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 25, retry, 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.
independent-scene-analysis.runIndependentSceneJob (cognitive 35) lib/billing/independent-scene-analysis.ts:173— independent-scene-analysis.runIndependentSceneJob has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 6 (10 pts), boolean chains 7, error handling 3 (4 pts) (nesting depth added 6). Of this number, 28 points are the body's own statements and 7 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.
remote-video-codec.probeRemoteVideoCodec (cognitive 35) workers/ffmpeg-worker/remote-video-codec.mjs:91— remote-video-codec.probeRemoteVideoCodec has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 15, ternaries 4 (6 pts), loops 2, 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.
page.CommercialReviewPage (cognitive 34) app/billing/review/page.tsx:9— page.CommercialReviewPage has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 32, ternaries 16 (32 pts), if/else 8, error handling 2 (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. This shape REPEATS in the file: one other method here (page.CommercialReviewPage::act) 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.
agent-run-panel.AgentRunPanel (cognitive 34) components/agent/agent-run-panel.tsx:34— agent-run-panel.AgentRunPanel has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, ternaries 6 (10 pts), if/else 4 (5 pts), error handling 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 18 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.
video-edit-tab.VideoEditTab::handleEdit (cognitive 34) components/video-edit-tab.tsx:345— video-edit-tab.VideoEditTab::handleEdit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 6 (12 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (video-edit-tab.VideoEditTab) 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.
kie-client.readChatResponse (cognitive 34) lib/ai/kie-client.ts:68— kie-client.readChatResponse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 4 (11 pts), error handling 3 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). Of this number, 31 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.
billing-account.BillingAccount (cognitive 33) components/payments/billing-account.tsx:20— billing-account.BillingAccount has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 30, if/else 5, error handling 2 (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. This shape REPEATS in the file: one other method here (billing-account.BillingAccount::refund) 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.
commercial-analysis.recoverCommercialAnalysisTasks (cognitive 33) lib/billing/commercial-analysis.ts:225— commercial-analysis.recoverCommercialAnalysisTasks has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 8, error handling 2 (5 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 12). Of this number, 16 points are the body's own statements and 17 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.
downloadStorageMedia (cognitive 33) workers/ffmpeg-worker/storage-media-download.mjs:20— downloadStorageMedia has cognitive complexity 33 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 4 (10 pts), error handling 3 (8 pts), boolean chains 4, loops 1 (nesting depth added 17). Of this number, 31 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.
scene-analysis.rewriteSceneBlueprint (cognitive 32) lib/workflow/scene-analysis.ts:447— scene-analysis.rewriteSceneBlueprint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, ternaries 4 (8 pts), error handling 1, loops 1 (nesting depth added 10). Of this number, 30 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
create-with-agent.CreateWithAgent (cognitive 31) components/agent/create-with-agent.tsx:53— create-with-agent.CreateWithAgent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 7 (8 pts), ternaries 5 (8 pts), boolean chains 6 (nesting depth added 7). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 7 function items inside it that branch (handleSubmit, a function literal at line 165, 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.
commercial-task-runner.runCommercialTask (cognitive 31) lib/billing/commercial-task-runner.ts:44— commercial-task-runner.runCommercialTask has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 7 (9 pts), boolean chains 5, error handling 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.
commercial-generation-submit.submitCommercialGeneration (cognitive 31) lib/reference-video/commercial-generation-submit.ts:38— commercial-generation-submit.submitCommercialGeneration has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (12 pts), boolean chains 4, error handling 1, loops 1 (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.
kie-client.requestKieChat (cognitive 30) lib/ai/kie-client.ts:123— kie-client.requestKieChat has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (9 pts), error handling 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 11). Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 155). 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.
analysis-tasks.recoverAnalysisTasks (cognitive 30) lib/workflow/analysis-tasks.ts:256— analysis-tasks.recoverAnalysisTasks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, error handling 2 (5 pts), loops 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 14 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.
scene-refine.refine_video (cognitive 30) workers/ffmpeg-worker/scene-refine.py:101— scene-refine.refine_video has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, 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.
infistar-video.getInfistarVideoStatus (cognitive 29) lib/ai/adapters/infistar-video.ts:51— infistar-video.getInfistarVideoStatus has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 4 (5 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-progress.readLinkImportResponse (cognitive 29) lib/media-resolver/import-progress.ts:9— import-progress.readLinkImportResponse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, 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.
prompt-lens-rewrite-demo.PromptLensRewriteDemo (cognitive 29) remotion/prompt-lens-rewrite-demo.tsx:23— prompt-lens-rewrite-demo.PromptLensRewriteDemo has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 18 (19 pts), boolean chains 10 (nesting depth added 1). 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: 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.
prepare_video.main (cognitive 29) skills/prompt-lens-video-remix/scripts/prepare_video.py:358— prepare_video.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, loops 2 (3 pts), ternaries 2 (3 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.
billing-account.BillingAccount::refund (cognitive 28) components/payments/billing-account.tsx:53— billing-account.BillingAccount::refund has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (24 pts), if/else 2, boolean chains 1, error handling 1 (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. This shape REPEATS in the file: one other method here (billing-account.BillingAccount) 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.
alipay-reconciliation.reconcileAlipayOrder (cognitive 28) lib/payments/alipay-reconciliation.ts:24— alipay-reconciliation.reconcileAlipayOrder has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 6, error handling 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.
analysis-quote-panel.AnalysisQuotePanel (cognitive 27) components/payments/analysis-quote-panel.tsx:23— analysis-quote-panel.AnalysisQuotePanel has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 42 (97 pts), if/else 52 (68 pts), boolean chains 61, error handling 5 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (analysis-quote-panel.AnalysisQuotePanel::post, analysis-quote-panel.AnalysisQuotePanel::confirmAnalysis) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
video-edit-tab.VideoEditTab (cognitive 27) components/video-edit-tab.tsx:46— video-edit-tab.VideoEditTab has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 24 (35 pts), if/else 29 (34 pts), boolean chains 20, error handling 3 (5 pts), loops 1 (nesting depth added 18). 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 (video-edit-tab.VideoEditTab::handleEdit) 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.
credit-checkout.settlePaidCreditOrder (cognitive 27) lib/payments/credit-checkout.ts:153— credit-checkout.settlePaidCreditOrder has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 12, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 27 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.
page.CommercialReviewPage::act (cognitive 26) app/billing/review/page.tsx:32— page.CommercialReviewPage::act has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 6, 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. This shape REPEATS in the file: one other method here (page.CommercialReviewPage) 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.
page.GuidePage (cognitive 26) app/guide/page.tsx:10— page.GuidePage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 19, boolean chains 7. Of this number, 17 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.
agent-composer.AgentComposer (cognitive 26) components/agent/agent-composer.tsx:25— agent-composer.AgentComposer has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 15 (19 pts), boolean chains 15, if/else 11 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (agent-composer.AgentComposer::handleFiles) 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.
service.rewriteSceneVersion (cognitive 26) lib/workflow/service.ts:334— service.rewriteSceneVersion has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 3 (7 pts), boolean chains 1, error handling 1 (nesting depth added 12). Of this number, 23 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.
analysis-tasks.settleAnalysisTask (cognitive 26) lib/workflow/analysis-tasks.ts:91— analysis-tasks.settleAnalysisTask has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 5 (6 pts) (nesting depth added 3). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 93). 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.
project-list-client.fetchProjectList (cognitive 26) lib/workflow/project-list-client.ts:1— project-list-client.fetchProjectList has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 4 (9 pts), boolean chains 3, error handling 1 (2 pts), 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.
middleware.middleware (cognitive 26) middleware.ts:37— middleware.middleware has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 4 (5 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.
api-key-settings.ApiKeySettings::action (cognitive 25) components/api-key-settings.tsx:35— api-key-settings.ApiKeySettings::action has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 4, boolean chains 3, 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.
user-directory.queryUserDirectory (cognitive 25) lib/admin/user-directory.ts:7— user-directory.queryUserDirectory has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (7 pts), boolean chains 5, 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.
recreation-prompt.buildRecreationPrompt (cognitive 25) lib/workflow/recreation-prompt.ts:15— recreation-prompt.buildRecreationPrompt has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (17 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 5 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.
project-history-details.ProjectHistoryDetails (cognitive 24) components/workflow/project-history-details.tsx:14— project-history-details.ProjectHistoryDetails has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts), if/else 4 (5 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 23, copy, a function literal at line 38, …). 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.
commercial-wallet.reserveCommercialTaskInTransaction (cognitive 24) lib/billing/commercial-wallet.ts:72— commercial-wallet.reserveCommercialTaskInTransaction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, loops 1 (nesting depth added 4). Of this number, 21 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.
commercial-analysis.prepareCommercialAnalysis (cognitive 24) lib/billing/commercial-analysis.ts:50— commercial-analysis.prepareCommercialAnalysis has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 6 (8 pts), boolean chains 3, error handling 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 5 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.
kie-response.getKieResponseText (cognitive 24) lib/ai/kie-response.ts:1— kie-response.getKieResponseText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 11). Of this number, 17 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kie-responses.readKieResponses (cognitive 24) lib/ai/kie-responses.ts:53— kie-responses.readKieResponses has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 10 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.
generation-credit-preview.generationCreditPreview (cognitive 24) lib/billing/generation-credit-preview.ts:5— generation-credit-preview.generationCreditPreview has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts), ternaries 2 (3 pts), error handling 2 (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.
task-failure-message.taskFailureMessage (cognitive 24) lib/billing/task-failure-message.ts:17— task-failure-message.taskFailureMessage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (20 pts), boolean chains 4 (nesting depth added 12). 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.
route.POST (cognitive 23) app/api/video-generate/route.ts:47— route.POST has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 5 (7 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.
agent-step-card.AgentStepCard (cognitive 23) components/agent/agent-step-card.tsx:31— agent-step-card.AgentStepCard has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (10 pts) (nesting depth added 6). 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.
kie-video.buildKIEJobPayload (cognitive 23) lib/ai/adapters/kie-video.ts:146— kie-video.buildKIEJobPayload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 2, 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, 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.
easydown.selectEasyDownMedia (cognitive 23) lib/media-resolver/easydown.ts:100— easydown.selectEasyDownMedia has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 8, if/else 4 (nesting depth added 1). Of this number, 14 points are the body's own statements and 9 belong to 4 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.
route.POST (cognitive 22) app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:11— route.POST has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 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.
admin-overview-panel.AdminOverviewPanel::loadOverview (cognitive 22) components/admin-overview-panel.tsx:122— admin-overview-panel.AdminOverviewPanel::loadOverview has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 6 (8 pts), boolean chains 3, 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. This shape REPEATS in the file: one other method here (admin-overview-panel.AdminOverviewPanel) 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.
scene-video-preview.SceneVideoPlayer (cognitive 22) components/workflow/scene-video-preview.tsx:43— scene-video-preview.SceneVideoPlayer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 14, ternaries 6 (12 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. This shape REPEATS in the file: one other method here (scene-video-preview.SceneVideoPlayer::togglePlayback) 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.
infistar-video.buildInfistarVideoPayload (cognitive 22) lib/ai/adapters/infistar-video.ts:10— infistar-video.buildInfistarVideoPayload has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 7, 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.
easydown.douyinVideoCodecs (cognitive 22) lib/media-resolver/easydown.ts:46— easydown.douyinVideoCodecs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 7). Of this number, 11 points are the body's own statements and 11 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.
ingestVideoCandidates (cognitive 22) workers/ffmpeg-worker/video-inspection.mjs:63— ingestVideoCandidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, error handling 1 (2 pts), loops 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.
route.POST (cognitive 21) REDACTED:9— route.POST has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 6, boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 4). 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: 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.
agent-artifact-panel.ArtifactContent (cognitive 21) components/agent/agent-artifact-panel.tsx:234— agent-artifact-panel.ArtifactContent has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6, ternaries 2 (3 pts) (nesting depth added 1). 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, 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.
commercial-analysis.quoteCommercialAnalysisRetry (cognitive 21) lib/billing/commercial-analysis.ts:276— commercial-analysis.quoteCommercialAnalysisRetry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, ternaries 1 (nesting depth added 2). 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.
analysis-tasks.enqueueAnalysis (cognitive 21) lib/workflow/analysis-tasks.ts:46— analysis-tasks.enqueueAnalysis has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 8, boolean chains 2, error handling 1 (nesting depth added 2). 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, 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.
route.GET (cognitive 20) app/api/admin/payments/commercial/route.ts:10— route.GET has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, ternaries 4, if/else 3. 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 23). 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.
samples-gallery.SampleCard (cognitive 20) components/samples-gallery.tsx:145— samples-gallery.SampleCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 3 (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.
scene-video-preview.SceneVideoPlayer::togglePlayback (cognitive 20) components/workflow/scene-video-preview.tsx:104— scene-video-preview.SceneVideoPlayer::togglePlayback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, 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. This shape REPEATS in the file: one other method here (scene-video-preview.SceneVideoPlayer) 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.
kie-client.nativeGeminiBody.parts (cognitive 20) lib/ai/kie-client.ts:36— kie-client.nativeGeminiBody.parts has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 4, boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commercial-task-runner.confirmCommercialTaskInTransaction (cognitive 20) lib/billing/commercial-task-runner.ts:16— commercial-task-runner.confirmCommercialTaskInTransaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
media-fetch.fetchMedia (cognitive 20) workers/ffmpeg-worker/media-fetch.mjs:5— media-fetch.fetchMedia has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 2 (6 pts), boolean chains 3, error handling 1 (2 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.
sample-project-detail.ProjectBundleView (cognitive 19) components/sample-project-detail.tsx:162— sample-project-detail.ProjectBundleView has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 7 (nesting depth added 3). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 202). 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.
shot-download-button.ShotDownloadButton (cognitive 19) components/workflow/shot-download-button.tsx:6— shot-download-button.ShotDownloadButton has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 4, error handling 1, if/else 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (download). 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.
handleCommercialMedia (cognitive 19) workers/ffmpeg-worker/server.mjs:486— handleCommercialMedia has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 3 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 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.
route.GET (cognitive 18) app/api/cron/analysis-dispatch/route.ts:13— route.GET has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (8 pts), boolean chains 4, if/else 3, ternaries 3 (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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route.deferredPOST (cognitive 18) app/api/video-edit/route.ts:81— route.deferredPOST has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 8, error handling 2. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent-artifact-panel.artifactToText (cognitive 18) components/agent/agent-artifact-panel.tsx:41— agent-artifact-panel.artifactToText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (pushValue, a function literal at line 66, a function literal at line 51). 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.
infistar-video.createInfistarVideo (cognitive 18) lib/ai/adapters/infistar-video.ts:31— infistar-video.createInfistarVideo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 3, 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.
commercial-refunds.reviewCommercialRefund (cognitive 18) lib/payments/commercial-refunds.ts:45— commercial-refunds.reviewCommercialRefund has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, ternaries 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 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.
file-validation.detectFileType (cognitive 18) lib/utils/file-validation.ts:112— file-validation.detectFileType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
extractSceneAssets (cognitive 18) workers/ffmpeg-worker/server.mjs:323— extractSceneAssets has cognitive complexity 18 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 2 (5 pts), ternaries 2 (4 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.
inspectVideoProbe (cognitive 18) workers/ffmpeg-worker/video-inspection.mjs:7— inspectVideoProbe has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 14 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.
audio-analyze-tab.AudioAnalyzeTab::handleAnalyze (cognitive 17) components/audio-analyze-tab.tsx:166— audio-analyze-tab.AudioAnalyzeTab::handleAnalyze has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6, boolean chains 4, error handling 3 (4 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. This shape REPEATS in the file: one other method here (audio-analyze-tab.AudioAnalyzeTab) 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.
pricing-v6.validateAnalysis (cognitive 17) lib/billing/pricing-v6.ts:34— pricing-v6.validateAnalysis has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, 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.
commercial-wallet.settleCommercialTaskInTransaction (cognitive 17) lib/billing/commercial-wallet.ts:129— commercial-wallet.settleCommercialTaskInTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, 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.
scene-assets.prepareIndependentSceneAsset (cognitive 17) lib/billing/scene-assets.ts:38— scene-assets.prepareIndependentSceneAsset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 2). Of this number, 10 points are the body's own statements and 7 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, 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.
client.ingestLinkedMediaWithWorker (cognitive 17) lib/ffmpeg-worker/client.ts:74— client.ingestLinkedMediaWithWorker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (2 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.
remote-video-codec.declaredVideoCodecs (cognitive 17) workers/ffmpeg-worker/remote-video-codec.mjs:42— remote-video-codec.declaredVideoCodecs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.server (cognitive 17) workers/ffmpeg-worker/server.mjs:527— server.server has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 17) workers/ffmpeg-worker/server.mjs:527— (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route.GET (cognitive 16) app/api/video-generate/status/route.ts:10— route.GET has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 2, 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.
admin-overview-panel.AdminOverviewPanel (cognitive 16) components/admin-overview-panel.tsx:110— admin-overview-panel.AdminOverviewPanel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 12 (21 pts), if/else 10 (12 pts), boolean chains 11, 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. This shape REPEATS in the file: one other method here (admin-overview-panel.AdminOverviewPanel::loadOverview) 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.
agent-composer.AgentComposer::handleFiles (cognitive 16) components/agent/agent-composer.tsx:55— agent-composer.AgentComposer::handleFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, 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. This shape REPEATS in the file: one other method here (agent-composer.AgentComposer) 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.
analyzed-shot-preview.ShotPreview (cognitive 16) components/workflow/analyzed-shot-preview.tsx:14— analyzed-shot-preview.ShotPreview has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 3). 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.
credit-balance-link.CreditBalanceLink (cognitive 16) components/workflow/credit-balance-link.tsx:13— credit-balance-link.CreditBalanceLink has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (13 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.
task-diagnostics.taskErrorDetails (cognitive 16) lib/billing/task-diagnostics.ts:10— task-diagnostics.taskErrorDetails has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 4, if/else 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.
service.validateAttachments (cognitive 16) lib/agent/service.ts:29— service.validateAttachments has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, if/else 6, boolean chains 3. 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 34). 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.
infistar-media.readInfistarMedia (cognitive 16) lib/ai/infistar-media.ts:5— infistar-media.readInfistarMedia has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, 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.
commercial-generation.executeCommercialGeneration (cognitive 16) lib/billing/commercial-generation.ts:106— commercial-generation.executeCommercialGeneration has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 4, if/else 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.
commercial-generation.reconcileCommercialGeneration (cognitive 16) lib/billing/commercial-generation.ts:147— commercial-generation.reconcileCommercialGeneration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 1 (2 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.
commercial-review.releaseUnfulfilledCommercialAnalysis (cognitive 16) lib/billing/commercial-review.ts:72— commercial-review.releaseUnfulfilledCommercialAnalysis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 76). 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.
ClassTooLong: ReferenceVideoComposer components/reference-video/ReferenceVideoComposer.tsx:1— ClassTooLong — 1266 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 866 over it, 3.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.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) skills/prompt-lens-video-remix/scripts/detect_scenes.py:23— skills/prompt-lens-video-remix/scripts/detect_scenes.py:23-59 | workers/ffmpeg-worker/scene-detect.py:21-58 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (26 lines × 2) skills/prompt-lens-video-remix/scripts/check_environment.py:29— skills/prompt-lens-video-remix/scripts/check_environment.py:29-54 | skills/prompt-lens-video-remix/scripts/prepare_video.py:95-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (4–15 lines × 3) skills/prompt-lens-video-remix/scripts/detect_scenes.py:30— skills/prompt-lens-video-remix/scripts/detect_scenes.py:30-43 | skills/prompt-lens-video-remix/scripts/prepare_video.py:345-348 | workers/ffmpeg-worker/scene-detect.py:28-42 — before extracting anything, compare `skills/prompt-lens-video-remix/scripts/detect_scenes.py` and `workers/ffmpeg-worker/scene-detect.py` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) skills/prompt-lens-video-remix/scripts/detect_scenes.py:12— skills/prompt-lens-video-remix/scripts/detect_scenes.py:12-19 | workers/ffmpeg-worker/scene-detect.py:10-17 — before extracting anything, compare `skills/prompt-lens-video-remix/scripts/detect_scenes.py` and `workers/ffmpeg-worker/scene-detect.py` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
IC1 · Incompleteness & stubs· Both branches are identical · ×1
Both branches are identical — the condition decides nothing components/agent/agent-composer.tsx:109— 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.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×1
Markup wires an event to an empty handler components/agent/agent-run-panel.tsx:254— `onCopyPrompt` 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.
Hollow method — returns a constant without doing the work lib/auth/index.ts:168— `isAdminUserId` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Fake-async — async method never awaits lib/middleware/logger.ts:42— `cleanupOldLogs` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Duplication concentrated across 20 sibling directories (61 clone groups) app/api/admin/users/route.ts:94— 61 duplicated blocks under app/api/ have copies in at least two of the sibling directories admin, audio-analyze, audio-clip, commercial, credits, cron (+14 more sibling(s) not listed) — 46 of them are reported below, and 15 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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 4 sibling directories (19 clone groups) app/billing/payment/return/payment-return-client.tsx:9— 19 duplicated blocks under the repository root have copies in at least two of the sibling directories app, components, lib, workers — 13 of them are reported below, and 6 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 19 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 19 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 19 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 4 sibling directories (9 clone groups) components/reference-video/ReferenceVideoComposer.tsx:163— 9 duplicated blocks under components/ have copies in at least two of the sibling directories agent, payments, reference-video, workflow — 5 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 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 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 9 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 4 sibling directories (6 clone groups) REDACTED:5— 6 duplicated blocks under app/api/commercial/ have copies in at least two of the sibling directories analysis, confirm, generation, tasks — 5 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (60 matched lines × 2 locations) · ×1
Duplicated block with local edits (60 matched lines × 2 locations) components/landing/site-header.tsx:25— components/landing/site-header.tsx:25 · components/language-switcher.tsx:18 — the two spans are one implementation copied and then locally edited — 333 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 (48 matched lines × 2 locations) · ×1
Duplicated block with local edits (48 matched lines × 2 locations) lib/workflow/service.ts:256— lib/workflow/service.ts:256 · lib/workflow/service.ts:342 — the two spans are one implementation copied and then locally edited — 350 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (25 lines × 2 locations) components/sample-project-detail.tsx:17— components/sample-project-detail.tsx:17 · components/workflow/video-workflow-create.tsx:32 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (17 matched lines × 2 locations) · ×1
Duplicated block with local edits (17 matched lines × 2 locations) components/admin-overview-panel.tsx:126— components/admin-overview-panel.tsx:126 · components/admin-user-directory.tsx:36 — the two spans are one implementation copied and then locally edited — 129 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 (15 lines × 2 locations) components/reference-video/ReferenceVideoComposer.tsx:1589— components/reference-video/ReferenceVideoComposer.tsx:1589 · components/reference-video/ReferenceVideoComposer.tsx:1677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) lib/ai/kie-client.ts:81— lib/ai/kie-client.ts:81 · lib/ai/kie-responses.ts:58 — the two spans are one implementation copied and then locally edited — 147 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 (13 lines × 2 locations) remotion/prompt-lens-core-workflow-demo.tsx:71— remotion/prompt-lens-core-workflow-demo.tsx:71 · remotion/prompt-lens-product-demo.tsx:60 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (12 matched lines × 2 locations) · ×1
Duplicated block with local edits (12 matched lines × 2 locations) components/reference-video/ReferenceVideoComposer.tsx:389— components/reference-video/ReferenceVideoComposer.tsx:389 · lib/billing/use-wallet-balance.ts:40 — the two spans are one implementation copied and then locally edited — 79 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 (12 lines × 5 locations) lib/db/schema.ts:241— lib/db/schema.ts:241 · lib/db/schema.ts:279 · lib/db/schema.ts:383 · lib/db/schema.ts:414 · +1 more site(s) not listed — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Check what actually differs between the copies before collapsing them: every one of them is an argument to a `pgTable(…)` call, so where these calls are a MATRIX of cases — one per input, differing precisely in the case each one pins — the repetition is the enumeration and extracting the shared part would delete cases rather than de-duplicate anything.
Complex function VideoWorkflowCreate (cyclomatic 105, cognitive 90) components/workflow/video-workflow-create.tsx:308— VideoWorkflowCreate has cyclomatic complexity 105 and cognitive complexity 90; 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 ReferenceVideoComposer (cyclomatic 94, cognitive 91) components/reference-video/ReferenceVideoComposer.tsx:279— ReferenceVideoComposer has cyclomatic complexity 94 and cognitive complexity 91; 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 AlipayCheckoutDialog (cyclomatic 88, cognitive 78) components/payments/alipay-checkout-dialog.tsx:17— AlipayCheckoutDialog has cyclomatic complexity 88 and cognitive complexity 78; 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 estimateGeneration (cyclomatic 85, cognitive 103) lib/billing/pricing-v6.ts:102— estimateGeneration has cyclomatic complexity 85 and cognitive complexity 103; 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 startBreakdown (cyclomatic 72, cognitive 71) components/workflow/video-workflow-create.tsx:617— startBreakdown has cyclomatic complexity 72 and cognitive complexity 71; 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 BillingAccount (cyclomatic 70, cognitive 65) components/payments/billing-account.tsx:20— BillingAccount has cyclomatic complexity 70 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.
R2 · Cyclomatic Complexity· Complex function GET (cyclomatic 62, cognitive 64) · ×1
Complex function GET (cyclomatic 62, cognitive 64) REDACTED:38— GET has cyclomatic complexity 62 and cognitive complexity 64; 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 DashboardPage (cyclomatic 62, cognitive 58) app/dashboard/page.tsx:26— DashboardPage has cyclomatic complexity 62 and cognitive complexity 58; 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 AnalysisQuotePanel (cyclomatic 60, cognitive 54) components/payments/analysis-quote-panel.tsx:23— AnalysisQuotePanel has cyclomatic complexity 60 and cognitive complexity 54; 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 post (cyclomatic 59, cognitive 74) · ×1
Complex function post (cyclomatic 59, cognitive 74) components/payments/analysis-quote-panel.tsx:70— post has cyclomatic complexity 59 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 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 POST (cyclomatic 55, cognitive 93) · ×1
Complex function POST (cyclomatic 55, cognitive 93) REDACTED:15— POST has cyclomatic complexity 55 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 buildMarketGenerationPayload (cyclomatic 54, cognitive 73) lib/ai/generation-payload.ts:10— buildMarketGenerationPayload has cyclomatic complexity 54 and cognitive complexity 73; 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 (anonymous) (cyclomatic 52, cognitive 42) components/workflow/video-workflow-create.tsx:1049— (anonymous) has cyclomatic complexity 52 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function POST (cyclomatic 47, cognitive 57) · ×1
Complex function POST (cyclomatic 47, cognitive 57) REDACTED:127— POST has cyclomatic complexity 47 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildCommercialGenerationPayload (cyclomatic 45, cognitive 41) lib/billing/commercial-generation.ts:22— buildCommercialGenerationPayload has cyclomatic complexity 45 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 getKieVeoGenerationStatus (cyclomatic 44, cognitive 48) lib/reference-video/kie-veo.ts:346— getKieVeoGenerationStatus has cyclomatic complexity 44 and cognitive complexity 48; 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 (anonymous) (cyclomatic 44, cognitive 41) app/billing/review/page.tsx:69— (anonymous) has cyclomatic complexity 44 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 runAnalysisTaskStep (cyclomatic 43, cognitive 60) lib/workflow/analysis-tasks.ts:157— runAnalysisTaskStep has cyclomatic complexity 43 and cognitive complexity 60; 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 (anonymous) (cyclomatic 43, cognitive 46) lib/billing/independent-scene-analysis.ts:59— (anonymous) has cyclomatic complexity 43 and cognitive complexity 46; 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 (anonymous) (cyclomatic 42, cognitive 41) tests/e2e/commercial-analysis.spec.ts:18— (anonymous) has cyclomatic complexity 42 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 loadOverview (cyclomatic 41, cognitive 41) app/api/admin/overview/route.ts:18— loadOverview has cyclomatic complexity 41 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function read (cyclomatic 40, cognitive 40) workers/ffmpeg-worker/remote-video-codec.mjs:100— read has cyclomatic complexity 40 and cognitive complexity 40; 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 POST (cyclomatic 37, cognitive 39) · ×1
Complex function POST (cyclomatic 37, cognitive 39) app/api/admin/payments/commercial/route.ts:36— POST has cyclomatic complexity 37 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 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 (anonymous) (cyclomatic 37, cognitive 32) app/billing/review/page.tsx:94— (anonymous) has cyclomatic complexity 37 and cognitive complexity 32; 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 generationCreditPreview (cyclomatic 35, cognitive 36) lib/billing/generation-credit-preview.ts:5— generationCreditPreview has cyclomatic complexity 35 and cognitive complexity 36; 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 SceneVideoPlayer (cyclomatic 34, cognitive 32) components/workflow/scene-video-preview.tsx:43— SceneVideoPlayer has cyclomatic complexity 34 and cognitive complexity 32; 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 AnalysisTaskDetails (cyclomatic 34, cognitive 31) components/payments/analysis-task-details.tsx:14— AnalysisTaskDetails has cyclomatic complexity 34 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function executeRun (cyclomatic 33, cognitive 47) lib/agent/executor.ts:93— executeRun has cyclomatic complexity 33 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 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 retryFailedScene (cyclomatic 32, cognitive 35) components/workflow/video-workflow-create.tsx:788— retryFailedScene has cyclomatic complexity 32 and cognitive complexity 35; 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 AdminFinancialRecords (cyclomatic 32, cognitive 29) components/admin-financial-records.tsx:9— AdminFinancialRecords has cyclomatic complexity 32 and cognitive complexity 29; 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 AnalysisTaskProgress (cyclomatic 32, cognitive 29) components/payments/analysis-task-progress.tsx:43— AnalysisTaskProgress has cyclomatic complexity 32 and cognitive complexity 29; 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 AudioAnalyzeTab (cyclomatic 31, cognitive 30) components/audio-analyze-tab.tsx:73— AudioAnalyzeTab has cyclomatic complexity 31 and cognitive complexity 30; 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 BillingTaskPage (cyclomatic 30, cognitive 28) app/billing/tasks/[id]/page.tsx:12— BillingTaskPage has cyclomatic complexity 30 and cognitive complexity 28; 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 buildInfistarVideoPayload (cyclomatic 30, cognitive 23) lib/ai/adapters/infistar-video.ts:10— buildInfistarVideoPayload has cyclomatic complexity 30 and cognitive complexity 23; 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 PromptLensRewriteDemo (cyclomatic 29, cognitive 27) remotion/prompt-lens-rewrite-demo.tsx:23— PromptLensRewriteDemo has cyclomatic complexity 29 and cognitive complexity 27; 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 callAnalysisChatJson (cyclomatic 28, cognitive 43) lib/workflow/scene-analysis.ts:191— callAnalysisChatJson has cyclomatic complexity 28 and cognitive complexity 43; 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 submitGenerationJob (cyclomatic 28, cognitive 37) components/reference-video/ReferenceVideoComposer.tsx:1076— submitGenerationJob has cyclomatic complexity 28 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 creditRuleTopics (cyclomatic 28, cognitive 27) app/guide/credit-rules.ts:9— creditRuleTopics has cyclomatic complexity 28 and cognitive complexity 27; 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 AdminUserDirectory (cyclomatic 28, cognitive 25) components/admin-user-directory.tsx:11— AdminUserDirectory has cyclomatic complexity 28 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runMockSearch (cyclomatic 28, cognitive 14) lib/agent/mock-data.ts:35— runMockSearch has cyclomatic complexity 28 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· components/reference-video/ReferenceVideoComposer.tsx · ×1
components/reference-video/ReferenceVideoComposer.tsx: 1696 lines of code components/reference-video/ReferenceVideoComposer.tsx:1— components/reference-video/ReferenceVideoComposer.tsx has 1696 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· components/workflow/video-workflow-create.tsx · ×1
components/workflow/video-workflow-create.tsx: 1222 lines of code components/workflow/video-workflow-create.tsx:1— components/workflow/video-workflow-create.tsx has 1222 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
lib/db/schema.ts: 975 lines of code lib/db/schema.ts:1— lib/db/schema.ts has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
lib/agent/storage.ts: 670 lines of code lib/agent/storage.ts:1— lib/agent/storage.ts has 670 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· components/video-edit-tab.tsx · ×1
components/video-edit-tab.tsx: 655 lines of code components/video-edit-tab.tsx:1— components/video-edit-tab.tsx has 655 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· components/audio-analyze-tab.tsx · ×1
components/audio-analyze-tab.tsx: 585 lines of code components/audio-analyze-tab.tsx:1— components/audio-analyze-tab.tsx has 585 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
app/dashboard/page.tsx: 538 lines of code app/dashboard/page.tsx:1— app/dashboard/page.tsx has 538 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· lib/workflow/scene-analysis.ts · ×1
lib/workflow/scene-analysis.ts: 529 lines of code lib/workflow/scene-analysis.ts:1— lib/workflow/scene-analysis.ts has 529 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· workers/ffmpeg-worker/server.mjs · ×1
workers/ffmpeg-worker/server.mjs: 527 lines of code workers/ffmpeg-worker/server.mjs:1— workers/ffmpeg-worker/server.mjs has 527 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
lib/ai/model-registry.ts: 445 lines of code lib/ai/model-registry.ts:1— lib/ai/model-registry.ts has 445 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· lib/reference-video/kie-veo.ts · ×1
lib/reference-video/kie-veo.ts: 435 lines of code lib/reference-video/kie-veo.ts:1— lib/reference-video/kie-veo.ts has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
lib/agent/planner.ts: 407 lines of code lib/agent/planner.ts:1— lib/agent/planner.ts has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
lib/workflow/service.ts: 404 lines of code lib/workflow/service.ts:1— lib/workflow/service.ts has 404 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R6 · Tooling· This package's lint script runs in no CI job · ×1
This package's lint script runs in no CI job package.json:13— The root package declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner).
Dead file (~726 LoC) components/video-edit-tab.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~637 LoC) components/audio-analyze-tab.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~390 LoC) components/globe.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~316 LoC) components/agent/agent-run-panel.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/create-with-agent.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~313 LoC) components/agent/create-with-agent.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~222 LoC) components/agent/agent-composer.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/create-with-agent.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~187 LoC) lib/utils/file-validation.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~160 LoC) components/agent/agent-step-card.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-plan-timeline.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~135 LoC) components/ui/dialog.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~129 LoC) test-audio.cjs— no import path from any entry point (137 application, 11 tooling, 159 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 (~126 LoC) components/agent/agent-run-history.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/create-with-agent.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~115 LoC) components/ui/tabs.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~112 LoC) lib/audio-processor/index.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~106 LoC) components/language-switcher.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~103 LoC) scripts/migrate-encrypt-api-keys.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~99 LoC) lib/utils/frame-extractor.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~84 LoC) components/agent/agent-next-actions.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-run-panel.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~60 LoC) components/agent/agent-attachment-preview.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-composer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~58 LoC) components/landing/blog-section.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~48 LoC) lib/middleware/logger.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~46 LoC) lib/middleware/admin.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~35 LoC) components/agent/agent-plan-timeline.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/agent/agent-run-panel.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~27 LoC) components/ui/select.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~24 LoC) components/ui/label.tsx— no import path from any entry point (137 application, 11 tooling, 159 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 (~23 LoC) components/ui/checkbox.tsx— no import path from any entry point (137 application, 11 tooling, 159 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (components/audio-analyze-tab.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~14 LoC) i18n/routing.ts— no import path from any entry point (137 application, 11 tooling, 159 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 (~12 LoC) scripts/vercel-ignore-build.mjs— no import path from any entry point (137 application, 11 tooling, 159 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 '@aws-sdk/lib-storage' package.json:30— Declared in the root package.json 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 '@ffmpeg-installer/ffmpeg' package.json:32— Declared in the root package.json 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 '@mux/mux-node' package.json:33— Declared in the root package.json 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 '@remotion/google-fonts' package.json:67— Declared in the root package.json 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 'assemblyai' package.json:38— Declared in the root package.json 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 'date-fns' package.json:43— Declared in the root package.json 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 'openai' package.json:50— Declared in the root package.json 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 'recharts' package.json:54— Declared in the root package.json 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 'uuid' package.json:59— Declared in the root package.json 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 'whisper-node' package.json:60— Declared in the root package.json 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.
S1 · Web-Security Posture· Password key derivation is priced too cheaply · ×1
Password key derivation is priced too cheaply REDACTED:15— This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
Secure cookie flags not detected app/api/dev-auth/login/route.ts:40— `response.cookies.set(…)` carries who is signed in, and it is set without Secure. Without Secure the browser also sends it over plain http://, where anyone on the same network can read it. (−1.5 on this card.)
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked workers/ffmpeg-worker/package.json:9— workers/ffmpeg-worker/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock 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.
Duplicated predicate components/audio-analyze-tab.tsx:100— `!cancelled && Array.isArray(data.models)` appears character-identically in 2 files — components/audio-analyze-tab.tsx, components/video-edit-tab.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 app/api/cron/analysis-dispatch/route.ts:16— `!expected || Buffer.byteLength(expected) !== Buffer.byteLength(provided) || !crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(provi…` appears character-identically in 4 files — app/api/cron/analysis-dispatch/route.ts, app/api/cron/commercial-reconciliation/route.ts, app/api/cron/media-retention/route.ts, app/api/internal/analysis-run/route.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 app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts:22— `!project || (project.metadata as Record<string, unknown>)?.retentionExpiredAt` appears character-identically in 2 files — app/api/commercial/analysis/[id]/shots/[sceneId]/route.ts, app/api/workflow/projects/[id]/shots/[sceneId]/download/route.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 components/workflow/scene-video-preview.tsx:121— `!response.ok || !response.headers.get("content-type")?.startsWith("video/")` appears character-identically in 2 files — components/workflow/scene-video-preview.tsx, lib/ai/adapters/infistar-video.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 lib/media-resolver/easydown.ts:91— `!value || typeof value !== "object" || Array.isArray(value)` appears character-identically in 3 files — lib/media-resolver/easydown.ts, lib/workflow/scene-analysis-result.ts, workers/ffmpeg-worker/server.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 lib/ai/adapters/kie-video.ts:366— `Array.isArray(values) && typeof values[0] === "string"` appears character-identically in 2 files — lib/ai/adapters/kie-video.ts, lib/reference-video/kie-veo.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 lib/video-processor/editor.ts:86— `Number(eval(videoStream.r_frame_rate || "30")) || 30` appears character-identically in 2 files — lib/video-processor/editor.ts, lib/video-processor/index.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 lib/workflow/local-standard-edit.ts:23— `Number.isFinite(start) && Number.isFinite(end) && end > start` appears character-identically in 2 files — lib/workflow/local-standard-edit.ts, lib/workflow/video-editing.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 components/agent/agent-chat-page.tsx:216— `e.key === "Enter" && (e.metaKey || e.ctrlKey)` appears character-identically in 2 files — components/agent/agent-chat-page.tsx, components/agent/agent-composer.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 REDACTED:35— `keyAccess.source === "platform_admin" || keyAccess.source === "platform_paid"` appears character-identically in 2 files — REDACTED, 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 app/api/project-assets/route.ts:22— `mimeTypes[ext || ""] || "application/octet-stream"` appears character-identically in 2 files — app/api/project-assets/route.ts, lib/cloudflare/r2.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:20— `modelSelection.modelMode === "manual" && modelSelection.modelId` appears character-identically in 2 files — REDACTED, 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 app/api/settings/api-key/route.ts:94— `process.env.KIE_AI_BASE_URL || process.env.KIE_API_BASE_URL || "https://api.kie.ai"` appears character-identically in 4 files — app/api/settings/api-key/route.ts, lib/ai/kie-client.ts, lib/workflow/kie-audio.ts, lib/workflow/transcription.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 app/layout.tsx:9— `process.env.NEXT_PUBLIC_SITE_URL || "https://prompt-lens.cc.cd"` appears character-identically in 3 files — app/layout.tsx, app/robots.ts, app/sitemap.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 app/api/payments/orders/[id]/pay/route.ts:10— `process.env.NEXT_PUBLIC_SITE_URL || process.env.NEXT_PUBLIC_APP_URL` appears character-identically in 2 files — app/api/payments/orders/[id]/pay/route.ts, lib/payments/credit-checkout.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 components/landing/site-header.tsx:29— `ref.current && !ref.current.contains(e.target as Node)` appears character-identically in 2 files — components/landing/site-header.tsx, components/language-switcher.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 app/api/cron/analysis-dispatch/route.ts:15— `request.headers.get("authorization") || ""` appears character-identically in 4 files — app/api/cron/analysis-dispatch/route.ts, app/api/cron/commercial-reconciliation/route.ts, app/api/cron/media-retention/route.ts, app/api/internal/analysis-run/route.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:21— `selectedModel && selectedModel.provider !== "kie"` appears character-identically in 2 files — REDACTED, 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 components/agent/agent-chat-page.tsx:139— `typeof navigator !== "undefined" && navigator.language.toLowerCase().startsWith("zh")` appears character-identically in 2 files — components/agent/agent-chat-page.tsx, components/agent/create-with-agent.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 lib/media-resolver/easydown.ts:95— `typeof raw === "string" && raw.length <= 2048 && !/[\r\n]/.test(raw)` appears character-identically in 2 files — lib/media-resolver/easydown.ts, workers/ffmpeg-worker/server.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 lib/workflow/kie-audio.ts:30— `typeof record.data === "object" && record.data !== null` appears character-identically in 2 files — lib/workflow/kie-audio.ts, lib/workflow/transcription.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 lib/ai/adapters/kie-video.ts:372— `typeof value !== "object" || value === null` appears character-identically in 2 files — lib/ai/adapters/kie-video.ts, lib/workflow/transcription.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:65— `typeof value === "number" && Number.isFinite(value)` appears character-identically in 2 files — REDACTED, lib/workflow/recreation-prompt.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:76— `typeof value === "string" && value.trim()` appears character-identically in 2 files — REDACTED, lib/reference-video/kie-veo.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:35— `typeof value === "string" && value.trim() && value.trim() !== "auto"` appears character-identically in 2 files — REDACTED, app/api/video-generate/route.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.
+ 3 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×8
Console output used as the logging channel workers/ffmpeg-worker/server.mjs:291— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 291 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 workers/ffmpeg-worker/server.mjs:371— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 371 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 workers/ffmpeg-worker/server.mjs:412— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 412 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 workers/ffmpeg-worker/server.mjs:438— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 438 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 workers/ffmpeg-worker/server.mjs:499— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 499 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 workers/ffmpeg-worker/server.mjs:501— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 501 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 workers/ffmpeg-worker/server.mjs:549— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 549 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 workers/ffmpeg-worker/server.mjs:556— `workers/ffmpeg-worker/server.mjs` reports through `console.*` at line 556 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Deprecated: @esbuild-kit/core-utils REDACTED:506— @esbuild-kit/core-utils 3.3.2 is resolved in REDACTED and is marked deprecated by its publisher: "Merged into tsx: https://tsx.hirok.io". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: @esbuild-kit/esm-loader REDACTED:510— @esbuild-kit/esm-loader 2.6.5 is resolved in REDACTED and is marked deprecated by its publisher: "Merged into tsx: https://tsx.hirok.io". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: crypto-js REDACTED:3017— crypto-js 4.2.0 is resolved in REDACTED and is marked deprecated by its publisher: "Active development of CryptoJS has been discontinued. This library is no longer maintained.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:3877— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: inflight REDACTED:3987— inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: node-domexception REDACTED:4481— node-domexception 1.0.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use your platform's native DOMException instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Disabled test tests/e2e/commercial-checkout.spec.ts:34— 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 tests/e2e/commercial-order-cancel.spec.ts:6— 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 tests/e2e/payment-handoff.spec.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.
Silent fallback default in catch app/guide/credit-rules.ts:6— `price` 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 components/workflow/video-workflow-create.tsx:172— `cachedProjects` 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 lib/agent/storage.ts:596— `findRelevantHistory` 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.
Outdated (npm): @mux/mux-node package.json:33— @mux/mux-node is pinned at 12.8.1; registry.npmjs.org publishes 15.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): uuid package.json:59— uuid is pinned at 11.1.0; registry.npmjs.org publishes 14.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D21 · Naming Consistency· `getBaseURL` spells `URL` where 53 names in the project spell it `Url` · ×1
`getBaseURL` spells `URL` where 53 names in the project spell it `Url` lib/auth/index.ts:31— 53 of 54 names in project prompt-lens spell the token `Url` (53 of 54; unit: names in project prompt-lens containing `Url`). Peers: route.optionalUrl (REDACTED:79); route.getReferenceVideoUrl (REDACTED:85); route.getHiddenReferenceImageUrl (REDACTED:95); route.siteUrl (app/api/payments/orders/[id]/pay/route.ts:9); route.ensureAccessibleUrl (app/api/video-edit/route.ts:10). Rename to `getBaseUrl`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion package.json:1— `(repository root)` (36275 LoC, 433 module-visible types across 117 directories) overshoots its size bounds. 1 of 2 build unit(s) (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.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
P1 · CI/CD gates· CI build step not evidenced · ×1
CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 1 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 package.json:26— `package.json` 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`.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
R7 · Dead Code· Unused export '_resetAgentStorageCache' · ×1
Unused export '_resetAgentStorageCache' lib/agent/storage.ts:749— Nothing imports this binding — it is safe to review for removal.
No app-layer HTTPS enforcement detected workers/ffmpeg-worker/server.mjs:555— `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.)
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 30/60 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.
Null assertions (`!`) override strict null checking — ~2.0 `!` null assertions per 1k TypeScript source lines — 76 assertion(s) across the 37451 source line(s) of the 320 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: lib/workflow/analysis-tasks.ts (14), lib/billing/commercial-generation.ts (7), REDACTED (5). 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.
Outdated (npm): @amcharts/amcharts5 — @amcharts/amcharts5 is pinned at 5.19.1; registry.npmjs.org publishes 5.22.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @amcharts/amcharts5-geodata — @amcharts/amcharts5-geodata is pinned at 5.1.5; registry.npmjs.org publishes 5.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @aws-sdk/client-s3 — @aws-sdk/client-s3 is pinned at 3.1145.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @aws-sdk/lib-storage — @aws-sdk/lib-storage is pinned at 3.1145.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @aws-sdk/s3-request-presigner — @aws-sdk/s3-request-presigner is pinned at 3.1145.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @neondatabase/serverless — @neondatabase/serverless is pinned at 0.10.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): @types/three — @types/three is pinned at 0.183.1; registry.npmjs.org publishes 0.187.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): assemblyai — assemblyai is pinned at 4.29.0; registry.npmjs.org publishes 4.43.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): axios — axios is pinned at 1.20.0; registry.npmjs.org publishes 1.21.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): better-auth — better-auth is pinned at 1.7.7; registry.npmjs.org publishes 1.7.25 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): date-fns — date-fns is pinned at 4.1.0; registry.npmjs.org publishes 4.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): drizzle-orm — drizzle-orm is pinned at 0.45.3; registry.npmjs.org publishes 0.45.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): lucide-react — lucide-react is pinned at 0.469.0; registry.npmjs.org publishes 1.73.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): next — next is pinned at 15.5.27; registry.npmjs.org publishes 16.4.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): next-intl — next-intl is pinned at 3.26.5; registry.npmjs.org publishes 4.15.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): nodemailer — nodemailer is pinned at 8.0.4; registry.npmjs.org publishes 10.6.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): openai — openai is pinned at 6.29.0; registry.npmjs.org publishes 7.57.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): postgres — postgres is pinned at 3.4.8; registry.npmjs.org publishes 4.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): react — react is pinned at 19.2.4; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): react-dom — react-dom is pinned at 19.2.4; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): recharts — recharts is pinned at 2.15.4; registry.npmjs.org publishes 3.10.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): tailwind-merge — tailwind-merge is pinned at 2.6.1; registry.npmjs.org publishes 3.7.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): three — three is pinned at 0.183.2; registry.npmjs.org publishes 0.187.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): undici — undici is pinned at 7.30.0; registry.npmjs.org publishes 8.12.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): zod — zod is pinned at 3.25.76; registry.npmjs.org publishes 4.6.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Skipped (documented): (unnamed test) tests/commercial-wallet.test.ts:770— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
doc comments repeat the names lib/ai/adapters/kie-video.ts:312— 0 of 0 documented parameters and 1 of 21 summaries in `prompt-lens` only repeat the member or parameter name (e.g. "Generate video with KIE." for `generateVideoWithKIE`). 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.
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 3 file(s) — `drizzle.config.ts`, `lib/ai/infistar-models.ts`, `next.config.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1e509-41c0-7a82-b8d1-879ddd10a143 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 72 · Warnings: 759 · Recommendations: 74 · Info: 27 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 15:45 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.