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

codepawl/crucible

Measured 17 November 2026, 18:47 UTC, at code version c312e7e

First survey, so nothing to compare with yet
CAI score 52.9out of 100 Adequate
CriticalWeakAdequateStrongExemplary

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

A large codebase: 180,429 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 1.9 person-years · Weakest lens: Code Health, 45.7

Findings by how serious they are

11 critical 1342 serious 131 minor

6 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 18:47 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.

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.
1475of 1484 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
77dimensions across 7 lenses, read from 180,429 lines of product code in 4 projects.
Chapters

Executive summary

codepawl/crucible falls short of our standard for a preview release, held back most by its Code Health lens, the quality of the code itself. It scores 52.9 out of 100 and is rated Adequate, and four of its 11 critical findings are security problems.

Code Health, at 45.7, is the weakest lens and counts most in the score. The best first step is adding type checking, worth about 4.4 points. Adopting a logging library comes next, worth about 3.7 points. Raising Code Health to 67 would lift the score to about 58.0.

Two places in the code run text as code, which an attacker could use. One automatic update takes new releases before a bad one can be spotted, and one known security hole in a package the code depends on can be used by attackers. Replacing text run as code with direct calls, setting a waiting period for automatic updates and updating the vulnerable packages would close these risks. The four uses of packages that aren't listed need adding to the project's list of dependencies.

The product code is 180,429 lines, about €270,000 to rebuild.

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

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

If Code Health rose from 45.7 to 67, the lowest score rated Strong, the score would rise from 52.9 to about 58.0.

Code composition: what the lines of code are
Product code 65%Tests 35%
Rebuild cost: about €270,000 · Estimate
Cost to rebuild€90,000 to €450,000, for 1,493 to 4,736 hours of work, about 1.9 person-years for 1 to 4 engineers
Difficulty of the problemStandard, 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 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 180,429 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: 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
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 4.4 points · Medium effort · Type Safety
2
Adopt pino (or winston) and log at meaningful points in the services you run.
Raises the score by about 3.7 points · Medium effort · Observability
3
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with hanging-test-file.js (2).
Raises the score by about 1.7 points · Low effort · Test Quality

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.

Files that change often carry extra risk · Combined risk
4 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (119 files) · Code Coverage (26 files under half tested) · The files: agent-runtime.mjs, render-media.mjs and run.mjs
What to do: Add tests to these files and have a second person review every change to them, starting with agent-runtime.mjs, render-media.mjs and run.mjs.
Where the investment is most exposed · Value at risk
This code would cost about €270,000 to build again, about 1.9 person-years of work. Its weakest lens is Code Health, at 45.7 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 4.4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.1 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 406,752 lines over the last 90 days, which is about 1,649,605 lines a year. At that pace, the extra work comes to an estimated 195.6 to 1173.6 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.

At a glance — Code Health · 45.7 · Weak · gated by D1, D2, R1 ·

At a glance — Architecture · 88.0 · Exemplary ·

At a glance — Maturity · 90.8 · Exemplary ·

At a glance — Readiness · 48.0 · Adequate · gated by R8, P2 ·

At a glance — Security · 81.8 · Adequate · gated by D29, D36 ·

At a glance — Accessibility · 67.5 · Strong ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection17High / Critical
A03:2025 — Software Supply Chain Failures4High / Critical

Roadmap

Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Adopt pino (or winston) and log at meaningful points in the services you run; Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.

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

Do thisHelpsEffortDimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+4.4 ptsMediumType Safety
Adopt pino (or winston) and log at meaningful points in the services you run.+3.7 ptsMediumObservability
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with hanging-test-file.js (2).+1.7 ptsLowTest Quality
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.2 ptsMediumDependency Hygiene
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.6 ptsMediumAsync & latency hygiene
Bring the 34 bodies over 60 down to 60 or less in Cognitive Complexity — start with validateDocument (cognitive 289), normalizeMeshEdits (cognitive 237), agent-scene.createAgentScene (cognitive 190).+1.5 ptsHighCognitive Complexity
Resolve the 50 FunctionTooLong finding(s) in God Classes — start with gltf.js (2), path-tracer.js (2), audio.js (2).+1.2 ptsHighGod Classes
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.+1.2 ptsMediumCancellation propagation

File quality

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

FileScoreBandWorst signal
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
src/path-tracer.js5.5MixedCyclomatic Complexity: describeIgnoredFeatures (cyclomatic 45)
src/local-volume-resolve.js6.3MixedCyclomatic Complexity: local-volume-resolve.resolveLocalVolume (cyclomatic 27)
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
src/gltf.js7.0Near-cleanCyclomatic Complexity: validateDocument (cyclomatic 193)
src/physics.js7.0Near-cleanCyclomatic Complexity: prepare (cyclomatic 140)
src/agent-asset.js7.0Near-cleanCyclomatic Complexity: agent-asset.createAgentAssetScene (cyclomatic 106)
src/agent-motion.js7.0Near-cleanCyclomatic Complexity: agent-motion.compileAgentMotion (cyclomatic 90)
src/renderer.js7.0Near-cleanCyclomatic Complexity: constructor (cyclomatic 87)
src/node-constraints.js7.0Near-cleanCyclomatic Complexity: normalizeExtraConstraint (cyclomatic 49)
src/cloth.js7.0Near-cleanCyclomatic Complexity: createCloth (cyclomatic 40)
src/agent-physics.js7.0Near-cleanCyclomatic Complexity: normalizeBody (cyclomatic 38)
src/scene-query.js7.0Near-cleanCyclomatic Complexity: scene-query.createSceneQuery (cyclomatic 37)
src/player.js7.0Near-cleanCyclomatic Complexity: createCameraRig (cyclomatic 34)
src/animation.js7.0Near-cleanCyclomatic Complexity: createAnimationClip (cyclomatic 30)
src/light-bake.js7.0Near-cleanCyclomatic Complexity: normalizeLights (cyclomatic 29)
src/netcode.js7.0Near-cleanCyclomatic Complexity: createAuthority.receiveMessage (cyclomatic 25)
src/mesh-query.js7.0Near-cleanCyclomatic Complexity: mesh-query.topology (cyclomatic 24)

How the grades work

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

Critical — 11

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 — 1342

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 — 131

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

Could not be resolved — 6

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 1.0, 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
D1D2D3D4D5D6D7D8D10D11D12D13D14D15D17D19D20D21D24D26D27D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC5AC6AX10AX3AX4GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X16X18X2X21X24X25X28X29X3X30

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1ead6-0cfb-763c-9d2b-3d762100a618.

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

Run transparency — what happened this run

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

  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 5,280 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 12 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • 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-contributor repository — bus factor is not applicable (1 contributor(s) across 4432 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D20 ADR Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 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.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • 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.
  • 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. `bin/crucible-mcp.mjs`, `scripts/agent-runtime.mjs`, `scripts/build-pack-index.mjs`, `scripts/mcp-server.mjs`, `scripts/pack-check.mjs`, … (+4 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • 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: "> @codepawlhq/crucible@0.21.0 dev / > vite --host 127.0.0.1 / VITE v8.3.7 ready in 97 ms / ➜ Local: http://127.0.0.1:5173/" 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: "> @codepawlhq/crucible@0.21.0 dev / > vite --host 127.0.0.1 / VITE v8.3.7 ready in 97 ms / ➜ Local: http://127.0.0.1:5173/" No runtime evidence was gathered.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • 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. 456 further occurrence(s) are not listed individually; the score already reflects all 496.
  • 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. 630 further occurrence(s) are not listed individually; the score already reflects all 670.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 27 further occurrence(s) are not listed individually; the score already reflects all 67.
  • 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. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 81 further occurrence(s) are not listed individually; the score already reflects all 121.
  • 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 make no call through a named logger, 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.
  • X5 Nullable reference types — 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 MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • 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 Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.6 / 10Weak✓ Tool-verified

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

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

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

501 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was validateDocument at 193. 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 MaterialSnapshot.matches at 34 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/material-snapshot.js (MaterialSnapshot.matches at 34), src/mesh-modifiers.js (mesh-modifiers.normalizeModifierEdit at 18), src/input-sources.js (validateRecording at 16), src/input-sources.js (input-sources.validateRecording at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

createAgentScene::apply (cyclomatic 66) · ×3REDACTED:2145
createAgentAssetScene::publish (cyclomatic 55) · ×3src/agent-asset.js:713
parseGltf::visitNode (cyclomatic 40) · ×2src/gltf.js:1298
decodeGltf::loadMaterial (cyclomatic 17) · ×2src/gltf-decode.js:258
validateDocument (cyclomatic 193)src/gltf.js:339

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

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with validateDocument (cyclomatic 193), normalizeMeshEdits (cyclomatic 185), prepare (cyclomatic 140). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 2.6 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

736 method(s) exceeded the cognitive complexity threshold of 15; the worst was validateDocument at 289.

createAgentScene::apply (cognitive 133) · ×3REDACTED:2145
createAgentAssetScene::apply (cognitive 97) · ×3src/agent-asset.js:952
decodeGltf::buildNode (cognitive 22) · ×3src/gltf-decode.js:451
parseGltf::visitNode (cognitive 88) · ×2src/gltf.js:1298
copiedJson::copy (cognitive 37) · ×2REDACTED:133

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

What to do

  1. Bring the 34 bodies over 60 down to 60 or less in Cognitive Complexity — start with validateDocument (cognitive 289), normalizeMeshEdits (cognitive 237), agent-scene.createAgentScene (cognitive 190). — 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 34 together lifts Cognitive Complexity from 2.0 to about 3.7/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.

D3 · God Classes8.1 / 10Strong✓ Tool-verified

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

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

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

80 god class(es) detected.

FunctionTooLong: agent-asset.createAgentAssetScene · ×50src/agent-asset.js:280
FileTooLong: src/renderer.js · ×25src/renderer.js
MethodTooLong: CrucibleRenderer.constructor · ×3src/renderer.js:709
ClassTooLong: CrucibleRenderersrc/renderer.js:708
TooManyMethods: CrucibleRenderersrc/renderer.js:708

What to do

  1. Resolve the 50 FunctionTooLong finding(s) in God Classes — start with gltf.js (2), path-tracer.js (2), audio.js (2). — One of this dimension's main actionable groups (50 warning-level).
  2. Resolve the 25 FileTooLong finding(s) in God Classes — start with renderer.js, REDACTED, gltf.js. — One of this dimension's main actionable groups (25 warning-level).
  3. Resolve the 3 MethodTooLong finding(s) in God Classes — start with renderer.js (3). — One of this dimension's main actionable groups (3 warning-level).

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

D4 · Code Duplication9.8 / 10Stronggated by 47 serious findings✓ Tool-verified

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.

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

18 duplicated block group(s) detected. 0.4 % of the production lines (805 of 180,429) are in a reported copy. A further 29 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 45 of the 47 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .js, .mjs (93% 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.

Duplicated block (6 lines × 2) · ×5bench/cycles-parity/render-cycles.py:190
Edited copy of a member (13 corresponding lines) · ×4bench/cycles-parity/render-cycles.py:337
Duplicated block (7 lines × 2) · ×4bench/cycles-parity/render-cycles.py:234
Edited copies of one member (3 members, 2+ corresponding lines) · ×3bench/cycles-parity/make-denoised-comparison-figure.py:43
Edited copy of a member (7 corresponding lines) · ×3bench/cycles-parity/summarize-denoised-comparison.py:62

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

What to do

  1. Resolve the 5 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with render-cycles.py (3), score.py, blender-golden.py. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 4 Edited copy of a member (13 corresponding lines) finding(s) in Code Duplication — start with render-cycles.py (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 4 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with render-cycles.py (2), render-blender.py, run-m0-suite.py. — One of this dimension's main actionable groups (4 warning-level).

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

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.

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

4 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, with abstractness counted on 1 of the 4 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

0 of 27 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

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.

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

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.

D8 · Code Coverage10.0 / 10Stronggated by 26 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 92.3% — 26 file(s) below 50%. Measured from the JavaScript/TypeScript suite (node:test via `npm ci --ignore-scripts` in the repository root; node:test in templates/addon-starter/: not run).

Low coverage: bench/agent-modeling/default-judge.mjs · ×26bench/agent-modeling/default-judge.mjs:1

What to do

  1. Resolve the 26 Low coverage finding(s) in Code Coverage — start with default-judge.mjs, native-instance-scene.mjs, image-compare.mjs. — One of this dimension's main actionable groups (26 warning-level).

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

D10 · Test Quality10.0 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

16 skipped (16 with a documented reason), 11 zero-assertion, 1 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 5280 tests. Measured on the JavaScript/TypeScript suite only — at least 12 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.

No assertions (empty test): a quick test before the hang passes · ×2tests/fixtures/hanging-test-file.js:14
No assertions: a well formed GLB with an unknown chunk after the binary chunk is still read · ×9tests/agent-draco.test.js:209
Fixed-sleep synchronisation: a look that arrives while a render job waits on a first-come queue joins the job once it is granted, with one granttests/agent-gpu-queue.test.js:199
Skipped (documented): a texture folder that links out of the catalog folder is refused · ×16tests/agent-asset-catalog.test.js:207

What to do

  1. Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with hanging-test-file.js (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 9 No assertions finding(s) in Test Quality — start with skill-examples.test.js (2), agent-draco.test.js, community-showcase.test.js. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 1 Fixed-sleep synchronisation finding(s) in Test Quality — start with agent-gpu-queue.test.js. — 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.

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.

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in the repository root; node:test via `npm ci --ignore-scripts` in templates/addon-starter/ (1 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

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

1 outdated direct production npm dependency(ies) of 1 graded, 0 pinning defect(s), across 2 package.json (1 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 0 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.

Outdated (npm): playwright-core

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 6 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 7 package(s) this repository's committed lockfile installs for a consumer — its 7 production, optional and peer dependency(ies), across 1 product package.json manifest(s), and everything those install in turn. Its 22 `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. A further 1 package(s) the lockfile resolves are not published on the public registry at all — a private scope, a workspace-internal name or a git install — and are outside this verdict. 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). This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.8 / 10Strong✓ Tool-verified

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

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

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

Top hotspots: scripts/agent-runtime.mjs (141×390=54990); REDACTED (151×257=38807); src/renderer.js (196×83=16268) Repeated repair below the complexity floor: packages/blender-addon/cook_blender/engine.py (4 of 7 changes were fixes); packages/blender-addon/cook_blender/material_export.py (4 of 5 changes were fixes); src/game-rules.js (3 of 5 changes were fixes)

Hotspot: scripts/agent-runtime.mjs · ×118scripts/agent-runtime.mjs:131
Repeated repair: packages/blender-addon/cook_blender/engine.py · ×3packages/blender-addon/cook_blender/engine.py:75

What to do

  1. Resolve the 118 Hotspot finding(s) in Churn × Complexity Hotspots — start with run.mjs (2), harness.js (2), agent-runtime.mjs. — One of this dimension's main actionable groups (118 warning-level).
  2. Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with engine.py, material_export.py, game-rules.js. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

0 deducted task-comment markers across 12878 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

2 of 2 documentation facets pass in full. 126 document(s) read across 5 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

0 of 4 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D21 · Naming Consistency7.1 / 10Strong✓ Tool-verified

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.

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

1 naming inconsistencies among 34 declarations measured against a convention their peers follow.

`releaseURL` spells `URL` where 33 names in the project spell it `Url`src/home.js:22

What to do

  1. Resolve the 1 `releaseURL` spells `URL` where 33 names in the project spell it `Url` finding(s) in Naming Consistency — start with home.js. — 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.

D24 · Comment Value10.0 9.9 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 99% · ceiling Documented

2 of 4319 judged comments only repeat the code they sit on (0.0 %). 33 comment(s) in another language or script were not judged.

redundant comment · ×2src/path-tracer-gpu-shader.js:22
doc comments repeat the namessrc/rig.js:135

✓ On the Gold path — maintain.

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

D26 · Project Cohesion5.0 / 10Adequate✓ Tool-verified

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

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

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

1 of 4 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionpackage.json:1

What to do

  1. 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.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

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.

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

1 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)2.9 / 10Weak✓ Tool-verified

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

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

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

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

17 finding(s): 0 critical, 3 high, 14 medium, 0 low. semgrep hit a parse error in 11 file(s) — `bin/crucible-mcp.mjs` (line 4), `scripts/agent-runtime.mjs`, `scripts/build-pack-index.mjs` (line 11), `scripts/mcp-server.mjs`, `scripts/pack-check.mjs` (line 5), … (+6 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 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
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 High CVE 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.

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

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

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

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

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 638 of the 758 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.2 / 10Stronggated by 13 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: check.mjs↔references.mjs 92%; agent-mesh.js↔REDACTED 86%; blender-golden.py↔mesh-operations.js 82%

Change coupling: blender-golden.py ↔ mesh-operations.js · ×8scripts/blender-golden.py:1
Change-coupling hub: references.mjs → check.mjs, measure.mjs, run.mjs · ×5bench/agent-modeling/references.mjs

What to do

  1. Resolve the 8 Change coupling finding(s) in Change Coupling — start with blender-golden.py, measure.mjs, environment.js. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 5 Change-coupling hub finding(s) in Change Coupling — start with references.mjs, REDACTED, shaders.js. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. 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.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives4.1 / 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.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×3) — src/path-tracer-gpu.js:17, src/path-tracer-scene.js:164, src/splat.js:178

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.
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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.

AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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.

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety4.6 / 10Adequate✓ Tool-verified

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.

  • `.documentation #doc-article:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/documentation.css:27
  • `.live-editor textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/documentation.css:168
  • `.hero-loop .stage:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/hero-lab/loop/loop.css:87
  • `.hero-loop .copy .rename-note` moves (`animation: rise 700ms var(--ease-out) 330ms backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/hero-lab/loop/loop.css:47
  • `.hero-loop .copy .lede` moves (`animation: rise 700ms var(--ease-out) backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/hero-lab/loop/loop.css:51

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.
AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

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.

  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×17) — tests/agent-asset-catalog.test.js:216, tests/agent-runtime-jobs-root.test.js:51, tests/agent-runtime-jobs-root.test.js:63, …

What to do

  • 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.
M1 · Documentation (README)10.0 / 10Exemplary✓ Tool-verified

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.

M2 · Architecture documentation8.0 / 10Strong✓ Tool-verified

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

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

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability0.0 / 10Critical✓ Tool-verified

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

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

  • No logging call was found in the 478 Python, JavaScript/TypeScript production file(s) this check read across 6 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt pino (or winston) and log at meaningful points in the services you run.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:2

What to do

  • Dependabot is configured but does not watch `cargo` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

  • 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.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from 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 `withLookPage` 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. — bench/agent-modeling/look.mjs:73
  • `existsSync` in `callback to CHECKOUT_PACKAGE_URLS.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/agent-path-trace-denoise.mjs:13
  • `readFileSync` in `releaseLockOnExit` 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. — scripts/agent-render-jobs.mjs:640
  • `unlinkSync` in `releaseLockOnExit` 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. — scripts/agent-render-jobs.mjs:640
  • `mkdtempSync` in `launchWithShaderCache` 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. — scripts/agent-shader-cache.mjs:139
  • `rmSync` in `launchWithShaderCache` 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. — scripts/agent-shader-cache.mjs:145
  • `rmSync` in `close` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/agent-shader-cache.mjs:162
  • `existsSync` in `startDevServer` 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. — scripts/drive.mjs:82
  • `appendFileSync` in `logCall` 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. — scripts/mcp-call-log.mjs:43
  • `existsSync` in `callback to createServer` 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. — scripts/measure-hero-load.mjs:72
  • `statSync` in `callback to createServer` 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. — scripts/measure-hero-load.mjs:72
  • `readFileSync` in `callback to createServer` 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. — scripts/measure-hero-load.mjs:76
  • `brotliCompressSync` in `callback to createServer` 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. — scripts/measure-hero-load.mjs:78
  • `mkdirSync` in `runMatrix` 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. — scripts/measure-hero-load.mjs:262
  • `writeFileSync` in `runMatrix` 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. — scripts/measure-hero-load.mjs:263
  • `writeFileSync` in `captureStage` 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. — scripts/measure-hero-load.mjs:272
  • `mkdirSync` in `captureStills` 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. — scripts/measure-hero-load.mjs:287
  • `writeFileSync` in `captureStills` 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. — scripts/measure-hero-load.mjs:307
  • `rmSync` in `recordVideo` 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) — scripts/measure-hero-load.mjs:313, scripts/measure-hero-load.mjs:337
  • `mkdirSync` in `recordVideo` 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. — scripts/measure-hero-load.mjs:314
  • `writeFileSync` in `callback to frames.forEach` 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. — scripts/measure-hero-load.mjs:329
  • `writeFileSync` in `recordVideo` 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. — scripts/measure-hero-load.mjs:334
  • `spawnSync` in `recordVideo` 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. — scripts/measure-hero-load.mjs:335
  • `statSync` in `recordVideo` 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. — scripts/measure-hero-load.mjs:338
  • `spawnSync` in `writeLoop` 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. — scripts/render-doc-media.mjs:61
  • `existsSync` in `renderMedia` 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. (×3) — scripts/render-media.mjs:205, scripts/render-media.mjs:335, scripts/render-media.mjs:338
  • `mkdtempSync` in `measureCheckout` 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. — scripts/size-base.mjs:75
  • `mkdirSync` in `measureCheckout` 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. — scripts/size-base.mjs:78
  • `spawnSync` in `measureCheckout` 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) — scripts/size-base.mjs:81, scripts/size-base.mjs:83
  • `existsSync` in `measureCheckout` 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. — scripts/size-base.mjs:85
  • `symlinkSync` in `measureCheckout` 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. — scripts/size-base.mjs:85
  • `rmSync` in `measureCheckout` 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) — scripts/size-base.mjs:89, scripts/size-base.mjs:90
  • `existsSync` in `measureBase` 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. — scripts/size-base.mjs:98
  • `readFileSync` in `measureBase` 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. — scripts/size-base.mjs:98
  • `mkdirSync` in `measureBase` 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. — scripts/size-base.mjs:100

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety0.0 / 10Critical✓ 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.

  • 0 typed · 1462 plain JS — the untyped files are packages/denoise-oidn/fetch-oidn.mjs, packages/denoise-oidn/index.mjs, packages/three-bridge/index.mjs, packages/three-compat/index.mjs, scripts/addon-job-paths.mjs, scripts/agent-asset-catalog.mjs (+1456 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication7.6 / 10Strong✓ Tool-verified

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.

  • 24 duplicated blocks under the repository root have copies in at least two of the sibling directories bin, packages, scripts, src — 20 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 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 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 24 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. — scripts/hero-first-view-crop.mjs:43
  • scripts/smoke-agent-character.mjs:29 · scripts/smoke-agent-motion.mjs:23 — the two spans are one implementation copied and then locally edited — 1226 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. — scripts/smoke-agent-character.mjs:29
  • scripts/smoke-agent-texture-sequence-streamed.mjs:26 · scripts/smoke-agent-texture-sequence.mjs:21 — the two spans are one implementation copied and then locally edited — 1111 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. — scripts/smoke-agent-texture-sequence-streamed.mjs:26
  • scripts/draw-water-sheet.mjs:16 · scripts/measure-water-roughness.mjs:10 — the two spans are one implementation copied and then locally edited — 464 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. — scripts/draw-water-sheet.mjs:16
  • src/geometry-simplify.js:15 · src/mesh-decimate.js:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/geometry-simplify.js:15
  • src/player.js:652 · src/player.js:766 — the two spans are one implementation copied and then locally edited — 238 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. — src/player.js:652
  • scripts/check-tool-cost.mjs:26 · scripts/measure-size.mjs:175 — the two spans are one implementation copied and then locally edited — 269 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. — scripts/check-tool-cost.mjs:26
  • scripts/smoke-character.mjs:13 · scripts/smoke-glb-export.mjs:11 — the two spans are one implementation copied and then locally edited — 346 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. — scripts/smoke-character.mjs:13
  • scripts/smoke-agent-cloth.mjs:59 · scripts/smoke-agent-physics.mjs:63 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/smoke-agent-cloth.mjs:59
  • scripts/smoke-object-motion-blur.mjs:77 · scripts/smoke-wireframe-pass.mjs:36 — 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. — scripts/smoke-object-motion-blur.mjs:77
  • src/main.js:182 · src/view2d.js:138 — the two spans are one implementation copied and then locally edited — 299 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. — src/main.js:182
  • scripts/agent-draco.mjs:143 · REDACTED:134 — the two spans are one implementation copied and then locally edited — 283 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. — scripts/agent-draco.mjs:143
  • src/particle-sparks.js:79 · src/spume.js:207 — the two spans are one implementation copied and then locally edited — 312 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. — src/particle-sparks.js:79
  • src/mesh-edit.js:168 · src/mesh-edit.js:271 — 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. — src/mesh-edit.js:168
  • src/mesh-edit.js:214 · src/mesh-edit.js: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. — src/mesh-edit.js:214
  • scripts/smoke-object-motion-blur.mjs:28 · scripts/smoke-render-passes.mjs:26 — 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. — scripts/smoke-object-motion-blur.mjs:28
  • src/closed-room.js:133 · src/fitted-closed-room.js:60 — the two spans are one implementation copied and then locally edited — 151 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. — src/closed-room.js:133
  • scripts/downsample-hdr.mjs:12 · scripts/split-showcase-glb.mjs:424 — the two spans are one implementation copied and then locally edited — 261 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. — scripts/downsample-hdr.mjs:12
  • src/line-art.js:12 · src/mesh-blend.js:181 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/line-art.js:12
  • src/modeling.js:364 · src/text-geometry.js:161 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/modeling.js:364
  • src/path-tracer.js:453 · src/path-tracer.js:476 — the two spans are one implementation copied and then locally edited — 161 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. — src/path-tracer.js:453
  • src/physics-jolt.js:349 · src/physics-runtime.js:105 — the two spans are one implementation copied and then locally edited — 124 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. — src/physics-jolt.js:349
  • src/lighting-setups.js:78 · src/physical-sky.js:211 — the two spans are one implementation copied and then locally edited — 220 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. — src/lighting-setups.js:78
  • src/marketplace.js:139 · src/marketplace.js:204 — the two spans are one implementation copied and then locally edited — 185 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. — src/marketplace.js:139
  • src/agent-explosion.js:34 · src/vehicle-damage.js:244 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/agent-explosion.js:34
  • scripts/smoke-gltf-morph.mjs:8 · scripts/smoke-primitive-seams.mjs:20 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/smoke-gltf-morph.mjs:8
  • src/agent-asset.js:99 · src/agent-look.js:118 — 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. — src/agent-asset.js:99
  • src/agent-cloth.js:197 · src/path-tracer-scene.js:823 — 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. — src/agent-cloth.js:197
  • src/closed-room.js:164 · src/closed-room.js:204 — the two spans are one implementation copied and then locally edited — 134 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. — src/closed-room.js:164
  • src/line-art.js:373 · src/mesh-blend.js:204 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/line-art.js:373
  • scripts/hero-clip-loop.mjs:41 · scripts/recode-glb-textures.mjs:45 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/hero-clip-loop.mjs:41
  • scripts/measure-render-budget.mjs:54 · scripts/measure-render-estimate.mjs:64 — 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. — scripts/measure-render-budget.mjs:54
  • scripts/prepare-hero-glb.mjs:44 · scripts/split-showcase-glb.mjs:56 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/prepare-hero-glb.mjs:44
  • scripts/smoke-gltf-skin-morph.mjs:7 · scripts/smoke-morph-composition.mjs:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/smoke-gltf-skin-morph.mjs:7
  • src/geometry.js:118 · src/geometry.js:291 — 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. — src/geometry.js:118
  • scripts/smoke-agent-drive.mjs:18 · scripts/smoke-agent-scene-assets.mjs: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. — scripts/smoke-agent-drive.mjs:18
  • scripts/smoke-glb-fidelity.mjs:10 · scripts/smoke-gltf-morph.mjs:8 · scripts/smoke-primitive-seams.mjs:20 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. 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. — scripts/smoke-glb-fidelity.mjs:10
  • src/file-scene.js:52 · src/showcase.js:314 — the two spans are one implementation copied and then locally edited — 152 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. — src/file-scene.js:52
  • src/input-sources.js:6 · src/input.js:14 — 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. — src/input-sources.js:6
  • src/mesh-uv.js:149 · src/navmesh.js:91 — the two spans are one implementation copied and then locally edited — 76 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. — src/mesh-uv.js:149

What to do

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

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

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

  • scripts/agent-asset-fixture.mjs:2 imports tests/fixtures/skinned-strip.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/agent-asset-fixture.mjs:2
  • scripts/agent-character-fixture.mjs:3 imports tests/fixtures/skinned-strip.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/agent-character-fixture.mjs:3
  • scripts/render-file-native.mjs:82 reaches into another package with a relative path (../packages/denoise-oidn/index.mjs) — import the package by name instead. — scripts/render-file-native.mjs:82
  • scripts/smoke-agent-drive.mjs:10 imports tests/fixtures/car-glb.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/smoke-agent-drive.mjs:10
  • scripts/soft-body-film.mjs:4 imports tests/support/load-agent-scene-modules.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/soft-body-film.mjs:4
  • src/code-highlight.js:1 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/code-highlight.js:1
  • src/code-highlight.js:2 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/code-highlight.js:2
  • src/code-highlight.js:3 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/code-highlight.js:3

What to do

  • Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (4 rows); move the shared test helper into a source directory production code may depend on (4 rows).
R2 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

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

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

  • validateDocument has cyclomatic complexity 185 and cognitive complexity 285; 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. — src/gltf.js:339
  • (anonymous) has cyclomatic complexity 183 and cognitive complexity 235; 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. — src/mesh-recipe.js:122
  • runJob has cyclomatic complexity 127 and cognitive complexity 279; 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. — scripts/agent-runtime.mjs:802
  • constructor has cyclomatic complexity 86 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. — src/renderer.js:709
  • updateParts has cyclomatic complexity 82 and cognitive complexity 117; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/renderer.js:1582
  • evaluate has cyclomatic complexity 75 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/mesh-select.js:64
  • geometryEstimate has cyclomatic complexity 73 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:552
  • bevelEdges has cyclomatic complexity 71 and cognitive complexity 128; 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. — src/mesh-bevel.js:171
  • settingsFrom has cyclomatic complexity 68 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/agent-render-jobs.mjs:111
  • render has cyclomatic complexity 67 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/renderer.js:2720
  • apply has cyclomatic complexity 66 and cognitive complexity 133; 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:2145
  • runEdit has cyclomatic complexity 63 and cognitive complexity 86; 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. — src/mesh-recipe.js:418
  • renderMedia has cyclomatic complexity 61 and cognitive complexity 85; 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. — scripts/render-media.mjs:160
  • update has cyclomatic complexity 56 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/surface-attachment.js:164
  • publish has cyclomatic complexity 55 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 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. — src/agent-asset.js:713
  • parseRenderOptions has cyclomatic complexity 53 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/render-media.mjs:68
  • stage has cyclomatic complexity 51 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1640
  • shrinkwrapGeometry has cyclomatic complexity 48 and cognitive complexity 63; 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. — src/shrinkwrap.js:89
  • compileAgentMotion has cyclomatic complexity 47 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/agent-motion.js:895
  • normalizeExtraConstraint has cyclomatic complexity 46 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 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. — src/node-constraints.js:181
  • maskJavaScript has cyclomatic complexity 45 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 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. — scripts/check-names.mjs:51
  • describeIgnoredFeatures has cyclomatic complexity 45 and cognitive complexity 53; 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. — src/path-tracer.js:1043
  • nodeFrom has cyclomatic complexity 44 and cognitive complexity 53; 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:357
  • selectEdges has cyclomatic complexity 42 and cognitive complexity 63; 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. — src/mesh-bevel.js:29
  • inspect has cyclomatic complexity 42 and cognitive complexity 49; 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. — src/agent-asset.js:1053
  • apply has cyclomatic complexity 41 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/agent-asset.js:952
  • recover has cyclomatic complexity 41 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. — scripts/agent-render-jobs.mjs:795
  • createSolver has cyclomatic complexity 41 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/skeleton-pose.js:333
  • fitPerspectiveDistance has cyclomatic complexity 41 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. — src/camera.js:169
  • visitNode has cyclomatic complexity 40 and cognitive complexity 88; 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. — src/gltf.js:1298
  • createModel has cyclomatic complexity 40 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. — src/model.js:24
  • resolveLocalVolume has cyclomatic complexity 40 and cognitive complexity 49; 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. — src/local-volume-resolve.js:38
  • environmentFrom has cyclomatic complexity 40 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. — src/agent-look.js:269
  • evaluate has cyclomatic complexity 40 and cognitive complexity 44; 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. — tests/agent-runtime.test.js:150
  • createCloth has cyclomatic complexity 39 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. — src/cloth.js:567
  • replaceParts has cyclomatic complexity 38 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/renderer.js:1408
  • normalizeBody has cyclomatic complexity 38 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. — src/agent-physics.js:82
  • resolveFrame has cyclomatic complexity 38 and cognitive complexity 34; 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. — src/renderer.js:2340
  • drawBatch has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/renderer.js:2622
  • createSurfaceAttachment has cyclomatic complexity 37 and cognitive complexity 45; 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. — src/surface-attachment.js:89
R3 · Large Files6.2 / 10Adequate✓ Tool-verified

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

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

  • src/renderer.js has 2809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer.js:1
  • REDACTED has 2321 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • src/gltf.js has 1755 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/gltf.js:1
  • src/path-tracer-webgpu-kernel.js has 1555 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/path-tracer-webgpu-kernel.js:1
  • src/path-tracer-gpu-shader.js has 1229 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/path-tracer-gpu-shader.js:1
  • src/path-tracer.js has 1219 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/path-tracer.js:1
  • src/physics.js has 1195 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/physics.js:1
  • src/agent-asset.js has 1161 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/agent-asset.js:1
  • src/netcode.js has 1121 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/netcode.js:1
  • src/agent-motion.js has 1115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/agent-motion.js:1
  • src/shaders.js has 1028 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/shaders.js:1
  • src/vehicle.js has 1009 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/vehicle.js:1
  • src/film.js has 1004 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/film.js:1
  • src/light-bake.js has 1001 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/light-bake.js:1
  • src/fog-shader.js has 998 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/fog-shader.js:1
  • src/skeleton-pose.js has 978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/skeleton-pose.js:1
  • src/player.js has 890 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/player.js:1
  • src/node-constraints.js has 861 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/node-constraints.js:1
  • src/path-tracer-scene.js has 857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/path-tracer-scene.js:1
  • src/cloth.js has 782 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/cloth.js:1
  • src/vegetation.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/vegetation.js:1
  • packages/three-compat/index.mjs has 761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/three-compat/index.mjs:1
  • src/agent-physics.js has 749 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/agent-physics.js:1
  • src/audio.js has 717 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/audio.js:1
  • src/mesh-recipe.js has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mesh-recipe.js:1
  • src/material-graph.js has 706 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/material-graph.js:1
  • src/mesh-uv.js has 685 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mesh-uv.js:1
  • src/line-art.js has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/line-art.js:1
  • src/animation-graph.js has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/animation-graph.js:1
  • src/mesh-ops.js has 617 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mesh-ops.js:1
  • src/mesh-query.js has 604 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mesh-query.js:1
  • src/vehicle-damage.js has 594 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/vehicle-damage.js:1
  • src/game-rules.js has 552 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/game-rules.js:1
  • src/mesh-edit.js has 547 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mesh-edit.js:1
  • src/gas-sim.js has 531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/gas-sim.js:1
  • src/modeling.js has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/modeling.js:1
  • src/agent-particles.js has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/agent-particles.js:1
  • src/coplanar-overlap.js has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/coplanar-overlap.js:1
  • src/path-tracer-webgpu-local-volumes.js has 498 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/path-tracer-webgpu-local-volumes.js:1
  • src/agent-cloth.js has 492 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/agent-cloth.js:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×11) — REDACTED:1, src/hero-lab/hero-loop.js:1, src/docs-live.js:1, …

What to do

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

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

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

R6 · Tooling6.7 / 10Strong✓ 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.

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code8.0 / 10Strong✓ Tool-verified

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

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

  • 1696 file(s) (~282755 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: bin/crucible-mcp.mjs imports '../build/mcp/server.mjs', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here.
  • Nothing imports this binding — it is safe to review for removal. (×38) — bench/agent-modeling/silhouette.mjs:7, bench/flicker/ground-truth.js:19, bench/tiers/tiers.mjs:63, …
  • Nothing imports THIS copy of 'MAX_CURVE_POINTS' — but src/curve-operations.js:6 in the same directory exports that same name, and it is the copy every import site resolves to. Grepping the name therefore finds live callers that do not reach this binding: it is the dead half of a duplicated pair, left behind when the API moved. Delete it here and keep src/curve-operations.js's, or, if this one is meant to be the survivor, repoint the importers before removing the other. — src/mesh-deform-modifiers.js:12

What to do

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

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

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

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×4) — scripts/build-hero-first-view.mjs:16, scripts/build-hero-first-view.mjs:17, scripts/build-hero-first-view.mjs:18, …
  • 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. — package.json:306

What to do

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

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

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

  • src/agent-bake.js → src/agent-motion.js → src/agent-scene-modules.js → src/agent-bake.js (one verified cycle inside a mutually-dependent group of 6 files) — src/agent-bake.js:4

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture9.0 / 10Exemplary✓ Tool-verified

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.

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.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X2 · Cancellation propagation5.3 / 10Adequate✓ Tool-verified

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 4/18 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.
  • `defaultFetchJson` 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 })`. — src/community-showcase.js:107
  • `loadStagedParts` 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 })`. — src/file-scene.js:16
  • `readJson` 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 })`. — src/file-scene.js:39
  • `start` 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 })`. — src/file-scene.js:45
  • `defaultFetchBytes` 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 })`. — src/game-assets.js:49
  • `loadRelease` 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 })`. — src/home.js:73
  • `loadPacks` 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 })`. — src/marketplace.js:119
  • `fetchLatestRange` 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 })`. — src/marketplace.js:159
  • `loadAddons` 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 })`. — src/marketplace.js:186
  • `loadFirstPartyPackages` 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 })`. — src/marketplace.js:224
  • `readDescription` 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 })`. — src/showcase.js:219
  • `fetchBlob` 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 })`. (×2) — src/texture-set.js:8, src/hero-lab/loop/world.js:35
  • `fetchOidn` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/denoise-oidn/fetch-oidn.mjs:27

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

X24 · Document value interpolated into markup unescaped4.3 / 10Weak✓ Tool-verified

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

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

  • `highlightCode(element.textContent,language)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/code-highlight.js:36
  • `escapeHtml(entry.image)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/community-showcase.js:84
  • `escapeHtml(entry.authorUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/community-showcase.js:85
  • `escapeHtml(entry.discussion)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/community-showcase.js:86
  • `target` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — src/community-showcase.js:87
  • `entry.kind` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-api.js:19
  • `highlightCode(entry.signature,'javascript')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-api.js:20
  • `aspect` is text this program did not author, and it is written into a script or style context through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — src/docs-live.js:227
  • `poster` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-live.js:228
  • `file` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-live.js:233
  • `title` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-live.js:241
  • ``${highlightCode(editor.value,'javascript')}\n`` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/docs-live.js:258
  • `language?highlightCode(source,language):escapeHtml(source)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:126
  • `manager.name` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:168
  • `escapeHtml(picture)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:191
  • `source` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. (×2) — REDACTED:233, REDACTED:235
  • `step[1]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:270
  • `direction` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:391

What to do

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

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

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

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

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

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

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

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

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

X3 · Exception handling5.4 / 10Adequate✓ Tool-verified

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. (×14) — src/audio.js:223, src/game-physics.js:92, src/game.js:349, …
  • 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. (×9) — src/audio.js:342, src/audio.js:704, src/docs-live.js:208, …
  • `.then(…, () => {})` 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. — src/showcase.js:303

What to do

  • Swallowed exception (empty catch)
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.

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health45.7Weak — gated by D1, D2, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture88.0ExemplarySolid.
Maturity90.8ExemplaryStrongest area.
Readiness48.0Adequate — gated by R8, P2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security81.8Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility67.5StrongSolid.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 4 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 — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 4 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 — 1 control(s) we could not find positive evidence for

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

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

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

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • 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; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no interface, protocol or abstract type declares an operation an implementer must write
  • 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: "> @codepawlhq/crucible@0.21.0 dev / > vite --host 127.0.0.1 / VITE v8.3.7 ready in 97 ms / ➜ Local: http://127.0.0.1:5173/" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D16 Bus Factor — single-contributor repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript surface was not measured.
  • 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) — 9 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • 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 — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 1393 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • 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.
  • 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
  • X17 Uncapped recursion over a caller-supplied document — 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
  • X5 Nullable reference types — 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
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 11 finding(s)
D10 · Test Quality · No assertions (empty test) · ×2
  • No assertions (empty test): a quick test before the hang passes tests/fixtures/hanging-test-file.js:14 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): this test hangs on purpose while a child process runs tests/fixtures/hanging-test-file.js:16 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@gltf-transform/core' · ×1
  • Unlisted import '@gltf-transform/core' scripts/build-hero-first-view.mjs:16 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@gltf-transform/extensions' · ×1
  • Unlisted import '@gltf-transform/extensions' scripts/build-hero-first-view.mjs:17 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@gltf-transform/functions' · ×1
  • Unlisted import '@gltf-transform/functions' scripts/build-hero-first-view.mjs:18 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'sharp' · ×1
  • Unlisted import 'sharp' scripts/hero-first-view-crop.mjs:5 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) src/agent-bake.js:4 — src/agent-bake.js → src/agent-motion.js → src/agent-scene-modules.js → src/agent-bake.js (one verified cycle inside a mutually-dependent group of 6 files)
Serious — 1342 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×118
  • Hotspot: scripts/agent-runtime.mjs scripts/agent-runtime.mjs:131 — scripts/agent-runtime.mjs changed 141 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 390 in agent-runtime.createAgentRuntime at line 131. 7 of those changes were fix/bug commits, and the other 134 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- scripts/agent-runtime.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1559 — REDACTED changed 151 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 257 in agent-scene.createAgentScene at line 1559. 7 of those changes were fix/bug commits, and the other 144 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07: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: src/renderer.js src/renderer.js:709 — src/renderer.js changed 196 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in CrucibleRenderer.constructor at line 709. 3 of those changes were fix/bug commits, and the other 193 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/renderer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/gltf.js src/gltf.js:1247 — src/gltf.js changed 70 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 175 in gltf.parseGltf at line 1247. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/gltf.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/agent-render-jobs.mjs scripts/agent-render-jobs.mjs:394 — scripts/agent-render-jobs.mjs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 213 in agent-render-jobs.createAgentRenderJobs at line 394. 2 of those changes were fix/bug commits, and the other 46 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- scripts/agent-render-jobs.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: src/agent-asset.js src/agent-asset.js:280 — src/agent-asset.js changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 275 in agent-asset.createAgentAssetScene at line 280. 1 of those changes was a fix/bug commit, and the other 25 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/agent-asset.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/mcp-server.mjs scripts/mcp-server.mjs:969 — scripts/mcp-server.mjs changed 203 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in mcp-server.createAgentMcpServer at line 969. 4 of those changes were fix/bug commits, and the other 199 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- scripts/mcp-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: src/mesh-recipe.js src/mesh-recipe.js:119 — src/mesh-recipe.js changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 148 in mesh-recipe.normalizeMeshEdits at line 119. 2 of those changes were fix/bug commits, and the other 29 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/mesh-recipe.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: bench/agent-modeling/check.mjs bench/agent-modeling/check.mjs:205 — bench/agent-modeling/check.mjs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 134 in check.checkOne at line 205. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- bench/agent-modeling/check.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: src/agent-motion.js src/agent-motion.js:895 — src/agent-motion.js changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in agent-motion.compileAgentMotion at line 895. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/agent-motion.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/agent-preview-browser.js scripts/agent-preview-browser.js:391 — scripts/agent-preview-browser.js changed 124 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in agent-preview-browser.draw at line 391. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- scripts/agent-preview-browser.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/path-tracer.js src/path-tracer.js:1043 — src/path-tracer.js changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in path-tracer.describeIgnoredFeatures at line 1043. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/path-tracer.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/render-media.mjs scripts/render-media.mjs:160 — scripts/render-media.mjs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in render-media.renderMedia at line 160. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- scripts/render-media.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: bench/reference/run.mjs bench/reference/run.mjs:142 — bench/reference/run.mjs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in run.renderBackend at line 142. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- bench/reference/run.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: src/agent-look.js src/agent-look.js:269 — src/agent-look.js changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in agent-look.environmentFrom at line 269. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/agent-look.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/gltf-decode.js src/gltf-decode.js:143 — src/gltf-decode.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in gltf-decode.decodeGltf at line 143. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/gltf-decode.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/path-tracer-scene.js src/path-tracer-scene.js:894 — src/path-tracer-scene.js changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in path-tracer-scene.buildTraceScene at line 894. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/path-tracer-scene.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: bench/reference/harness.js bench/reference/harness.js:243 — bench/reference/harness.js changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in harness.renderReferenceScene at line 243. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- bench/reference/harness.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/fog-shader.js src/fog-shader.js:438 — src/fog-shader.js changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in fog-shader.localVolumeFunctions at line 438. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/fog-shader.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/local-volumes.js src/local-volumes.js:42 — src/local-volumes.js changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in local-volumes.packLocalVolumes at line 42. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/local-volumes.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/mesh-bevel.js src/mesh-bevel.js:171 — src/mesh-bevel.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in mesh-bevel.bevelEdges at line 171. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/mesh-bevel.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: bench/reference/render-blender.py bench/reference/render-blender.py:1040 — bench/reference/render-blender.py changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in render-blender.main at line 1040. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- bench/reference/render-blender.py`: 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: src/path-tracer-volume.js src/path-tracer-volume.js:320 — src/path-tracer-volume.js changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes at line 320. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/path-tracer-volume.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/export.js src/export.js:254 — src/export.js changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in export.exportGlb at line 254. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/export.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/game.js src/game.js:206 — src/game.js changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in game.buildGame at line 206. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/game.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 93 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×50
  • FunctionTooLong: agent-asset.createAgentAssetScene src/agent-asset.js:280 — FunctionTooLong — createAgentAssetScene runs 666 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 566 over it, 6.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: agent-scene.createAgentScene REDACTED:1559 — FunctionTooLong — createAgentScene runs 629 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 529 over it, 6.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: gltf.parseGltf src/gltf.js:1247 — FunctionTooLong — parseGltf runs 440 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 340 over it, 4.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: path-tracer.createPathTracer src/path-tracer.js:511 — FunctionTooLong — createPathTracer runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× 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: index.createThreeCompat packages/three-compat/index.mjs:320 — FunctionTooLong — createThreeCompat runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: audio.createAudio src/audio.js:369 — FunctionTooLong — createAudio runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× 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: gltf-decode.decodeGltf src/gltf-decode.js:143 — FunctionTooLong — decodeGltf runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86× 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: physics-jolt.createJoltWorld src/physics-jolt.js:80 — FunctionTooLong — createJoltWorld runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× 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: gas-sim.createSolver src/gas-sim.js:151 — FunctionTooLong — createSolver runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× 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: physics.prepare src/physics.js:281 — FunctionTooLong — prepare runs 270 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× 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: mesh-bevel.bevelEdges src/mesh-bevel.js:171 — FunctionTooLong — bevelEdges runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× 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: terrain.createTerrain src/terrain.js:206 — FunctionTooLong — createTerrain runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.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: physics-runtime.createPhysicsSystem src/physics-runtime.js:196 — FunctionTooLong — createPhysicsSystem runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× 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: streaming.createStreaming src/streaming.js:190 — FunctionTooLong — createStreaming runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: input.createInput src/input.js:53 — FunctionTooLong — createInput runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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-motion.compileAgentMotion src/agent-motion.js:895 — FunctionTooLong — compileAgentMotion 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: mesh-recipe.normalizeMeshEdits src/mesh-recipe.js:119 — FunctionTooLong — normalizeMeshEdits 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: mesh-recipe.runEdit src/mesh-recipe.js:418 — FunctionTooLong — runEdit 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: runtime.createRuntime src/runtime.js:102 — FunctionTooLong — createRuntime runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: line-art.createLineArtStage src/line-art.js:401 — FunctionTooLong — createLineArtStage runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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: model.createModel src/model.js:24 — FunctionTooLong — createModel runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× 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: nature.createNatureWorld src/nature.js:216 — FunctionTooLong — createNatureWorld runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: game-rules.createGameRules src/game-rules.js:362 — FunctionTooLong — createGameRules runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× 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: navmesh.createNavmesh src/navmesh.js:114 — FunctionTooLong — createNavmesh runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: render-passes.installRenderPasses src/render-passes.js:79 — FunctionTooLong — installRenderPasses runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 25 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking bench/agent-modeling/look.mjs:73 — `existsSync` in `withLookPage` 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 scripts/agent-path-trace-denoise.mjs:13 — `existsSync` in `callback to CHECKOUT_PACKAGE_URLS.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/agent-render-jobs.mjs:640 — `readFileSync` in `releaseLockOnExit` 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 scripts/agent-render-jobs.mjs:640 — `unlinkSync` in `releaseLockOnExit` 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 scripts/agent-shader-cache.mjs:139 — `mkdtempSync` in `launchWithShaderCache` 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 scripts/agent-shader-cache.mjs:145 — `rmSync` in `launchWithShaderCache` 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 scripts/agent-shader-cache.mjs:162 — `rmSync` in `close` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/drive.mjs:82 — `existsSync` in `startDevServer` 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 scripts/mcp-call-log.mjs:43 — `appendFileSync` in `logCall` 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 scripts/measure-hero-load.mjs:72 — `existsSync` in `callback to createServer` 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 scripts/measure-hero-load.mjs:72 — `statSync` in `callback to createServer` 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 scripts/measure-hero-load.mjs:76 — `readFileSync` in `callback to createServer` 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 scripts/measure-hero-load.mjs:78 — `brotliCompressSync` in `callback to createServer` 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 scripts/measure-hero-load.mjs:262 — `mkdirSync` in `runMatrix` 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 scripts/measure-hero-load.mjs:263 — `writeFileSync` in `runMatrix` 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 scripts/measure-hero-load.mjs:272 — `writeFileSync` in `captureStage` 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 scripts/measure-hero-load.mjs:287 — `mkdirSync` in `captureStills` 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 scripts/measure-hero-load.mjs:307 — `writeFileSync` in `captureStills` 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 scripts/measure-hero-load.mjs:313 — `rmSync` in `recordVideo` 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 scripts/measure-hero-load.mjs:314 — `mkdirSync` in `recordVideo` 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 scripts/measure-hero-load.mjs:329 — `writeFileSync` in `callback to frames.forEach` 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 scripts/measure-hero-load.mjs:334 — `writeFileSync` in `recordVideo` 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 scripts/measure-hero-load.mjs:335 — `spawnSync` in `recordVideo` 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 scripts/measure-hero-load.mjs:337 — `rmSync` in `recordVideo` 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 scripts/measure-hero-load.mjs:338 — `statSync` in `recordVideo` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
D8 · Code Coverage · Low coverage · ×26
  • Low coverage: bench/agent-modeling/default-judge.mjs bench/agent-modeling/default-judge.mjs:1 — 47.3% line coverage (87/184).
  • Low coverage: bench/cycles-parity/native-instance-scene.mjs bench/cycles-parity/native-instance-scene.mjs:1 — 33.3% line coverage (37/111).
  • Low coverage: bench/instancing/image-compare.mjs bench/instancing/image-compare.mjs:1 — 20.8% line coverage (10/48).
  • Low coverage: bench/reference/scenes.js bench/reference/scenes.js:1 — 43.5% line coverage (624/1433).
  • Low coverage: bench/streaming-crossing/run.mjs bench/streaming-crossing/run.mjs:1 — 47.6% line coverage (30/63).
  • Low coverage: scripts/agent-runtime.mjs scripts/agent-runtime.mjs:1 — 34.3% line coverage (588/1716).
  • Low coverage: scripts/annotate-open.mjs scripts/annotate-open.mjs:1 — 22.2% line coverage (4/18).
  • Low coverage: scripts/build-hero-first-view.mjs scripts/build-hero-first-view.mjs:1 — 48.9% line coverage (44/90).
  • Low coverage: scripts/frame-encoder.mjs scripts/frame-encoder.mjs:1 — 45.1% line coverage (88/195).
  • Low coverage: scripts/gpu-frame-reader.mjs scripts/gpu-frame-reader.mjs:1 — 21.9% line coverage (42/192).
  • Low coverage: scripts/hero-clip-loop.mjs scripts/hero-clip-loop.mjs:1 — 39.7% line coverage (152/383).
  • Low coverage: scripts/hero-first-view-crop.mjs scripts/hero-first-view-crop.mjs:1 — 41.7% line coverage (98/235).
  • Low coverage: scripts/measure-water-shadows.mjs scripts/measure-water-shadows.mjs:1 — 14.5% line coverage (25/172).
  • Low coverage: scripts/netcode-sample.js scripts/netcode-sample.js:1 — 37.4% line coverage (64/171).
  • Low coverage: scripts/render-file-native.mjs scripts/render-file-native.mjs:1 — 31.5% line coverage (70/222).
  • Low coverage: scripts/render-media.mjs scripts/render-media.mjs:1 — 29.3% line coverage (120/409).
  • Low coverage: scripts/test-compact-reporter.mjs scripts/test-compact-reporter.mjs:1 — 49.1% line coverage (26/53).
  • Low coverage: scripts/test-timing-reporter.mjs scripts/test-timing-reporter.mjs:1 — 24.0% line coverage (6/25).
  • Low coverage: src/hero-lab/loop/effects.js src/hero-lab/loop/effects.js:1 — 25.4% line coverage (53/209).
  • Low coverage: src/hero-lab/loop/world.js src/hero-lab/loop/world.js:1 — 42.4% line coverage (151/356).
  • Low coverage: src/liquid-renderer.js src/liquid-renderer.js:1 — 20.2% line coverage (19/94).
  • Low coverage: src/path-tracer-progressive.js src/path-tracer-progressive.js:1 — 16.2% line coverage (22/136).
  • Low coverage: src/path-tracer-realtime-gl.js src/path-tracer-realtime-gl.js:1 — 36.7% line coverage (29/79).
  • Low coverage: src/path-tracer-realtime.js src/path-tracer-realtime.js:1 — 42.9% line coverage (73/170).
  • Low coverage: src/showcase-download.js src/showcase-download.js:1 — 36.8% line coverage (32/87).
  • + 1 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×25
  • FileTooLong: src/renderer.js src/renderer.js — FileTooLong — 2208 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: CrucibleRenderer (708-2967). The bar is 500 significant lines; this is 1708 over it, 4.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1693 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1193 over it, 3.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/gltf.js src/gltf.js — FileTooLong — 1342 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 842 over it, 2.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/path-tracer.js src/path-tracer.js — FileTooLong — 1000 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 500 over it, 2.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/physics.js src/physics.js — FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 437 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/agent-asset.js src/agent-asset.js — FileTooLong — 866 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 77% of them inside a single declaration: createAgentAssetScene (280-1208). The bar is 500 significant lines; this is 366 over it, 1.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/netcode.js src/netcode.js — FileTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 351 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: src/film.js src/film.js — FileTooLong — 835 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 335 over it, 1.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/agent-motion.js src/agent-motion.js — FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 308 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/fog-shader.js src/fog-shader.js — FileTooLong — 807 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 307 over it, 1.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/vehicle.js src/vehicle.js — FileTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 292 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/light-bake.js src/light-bake.js — FileTooLong — 766 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 266 over it, 1.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/skeleton-pose.js src/skeleton-pose.js — FileTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 247 over it, 1.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/node-constraints.js src/node-constraints.js — FileTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 216 over it, 1.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/player.js src/player.js — FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 202 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/path-tracer-scene.js src/path-tracer-scene.js — FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/mesh-recipe.js src/mesh-recipe.js — FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 86 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: three-compat/index.mjs packages/three-compat/index.mjs — FileTooLong — 579 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 64% of them inside a single declaration: createThreeCompat (320-854). The bar is 500 significant lines; this is 79 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/vegetation.js src/vegetation.js — FileTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 77 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/agent-physics.js src/agent-physics.js — FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 74 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/cloth.js src/cloth.js — FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 70 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/audio.js src/audio.js — FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 45 over it, 1.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/material-graph.js src/material-graph.js — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 42 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: src/mesh-uv.js src/mesh-uv.js — FileTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 32 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/line-art.js src/line-art.js — FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 24 over it, 1.05× 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×24
  • Swallowed exception (empty catch) src/audio.js:223 — `.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) src/audio.js:342 — 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) src/audio.js:704 — 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) src/docs-live.js:208 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:148 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:171 — 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) src/explosion-bake-cache.js:106 — 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) src/game-physics.js:92 — `.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) src/game.js:349 — `.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) src/gaussian-splat-spz.js:104 — `.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) src/gaussian-splat-spz.js:108 — `.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) src/gltf.js:694 — `.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) src/mcp-update-check.js:73 — 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) src/mcp-update-check.js:114 — `.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) src/mcp-update-check.js:128 — 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) src/showcase.js:303 — `.then(…, () => {})` 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) src/showcase.js:314 — `.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) src/site-color.js:18 — 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) src/site-motion.js:13 — `.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) src/hero-lab/hero-loop.js:302 — `.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) src/hero-lab/loop/detail.js:40 — `.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) src/hero-lab/loop/world.js:154 — `.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) src/hero-lab/loop/world.js:155 — `.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) src/hero-lab/loop/world.js:168 — `.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.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×19
  • Untrusted text written into markup unescaped src/code-highlight.js:36 — `highlightCode(element.textContent,language)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/community-showcase.js:84 — `escapeHtml(entry.image)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/community-showcase.js:85 — `escapeHtml(entry.authorUrl)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/community-showcase.js:86 — `escapeHtml(entry.discussion)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/community-showcase.js:87 — `target` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/docs-api.js:19 — `entry.kind` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/docs-api.js:20 — `highlightCode(entry.signature,'javascript')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/docs-live.js:227 — `aspect` is text this program did not author, and it is written into a script or style context through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped src/docs-live.js:228 — `poster` is text this program did not author, and it is written into a URL attribute through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/docs-live.js:233 — `file` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/docs-live.js:241 — `title` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/docs-live.js:258 — ``${highlightCode(editor.value,'javascript')}\n`` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:126 — `language?highlightCode(source,language):escapeHtml(source)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:168 — `manager.name` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:191 — `escapeHtml(picture)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped REDACTED:233 — `source` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped REDACTED:235 — `source` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped REDACTED:270 — `step[1]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:391 — `direction` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
X2 · Cancellation propagation · Async function without AbortSignal · ×14
  • Async function without AbortSignal: defaultFetchJson src/community-showcase.js:107 — `defaultFetchJson` 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: loadStagedParts src/file-scene.js:16 — `loadStagedParts` 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: readJson src/file-scene.js:39 — `readJson` 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: start src/file-scene.js:45 — `start` 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: defaultFetchBytes src/game-assets.js:49 — `defaultFetchBytes` 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: loadRelease src/home.js:73 — `loadRelease` 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: loadPacks src/marketplace.js:119 — `loadPacks` 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: fetchLatestRange src/marketplace.js:159 — `fetchLatestRange` 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: loadAddons src/marketplace.js:186 — `loadAddons` 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: loadFirstPartyPackages src/marketplace.js:224 — `loadFirstPartyPackages` 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: readDescription src/showcase.js:219 — `readDescription` 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: fetchBlob src/texture-set.js:8 — `fetchBlob` 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: fetchBlob src/hero-lab/loop/world.js:35 — `fetchBlob` 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: fetchOidn packages/denoise-oidn/fetch-oidn.mjs:27 — `fetchOidn` 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 })`.
R4 · Test Coverage · No test reaches this file · ×11
  • 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 src/hero-lab/hero-loop.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/docs-live.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/marketplace.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/view2d.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/path-tracer-progressive.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/hero-lab/stage.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/docs-api.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/hero-lab/loop/camera.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/path-tracer-worker.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D10 · Test Quality · No assertions · ×9
  • No assertions: a well formed GLB with an unknown chunk after the binary chunk is still read tests/agent-draco.test.js:209 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: the committed featured.json is valid and every still is on disk tests/community-showcase.test.js:25 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a ranked, box-projected part with baked lightUvs reaches the path tracer with finite lightUvs tests/flush-lift-light-uvs.test.js:40 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a 32 cubed bake of 36 frames takes a few seconds tests/gas-sim.test.js:206 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: random face removal and rebuilding keeps the topology valid tests/mesh-core.test.js:126 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: the job triangle bound with the 65,536 instances of before still fits one message tests/path-tracer-native-instance-limit.test.js:128 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: skill reference ${name}, scene_create example ${index + 1} builds tests/skill-examples.test.js:46 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: skill reference ${name}, example ${index + 1} applies to a fresh scene tests/skill-examples.test.js:52 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a passing test that leaves a child process running tests/fixtures/leftover-child-test-file.js:6 — 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.
D35 · Change Coupling · Change coupling · ×8
  • Change coupling: blender-golden.py ↔ mesh-operations.js scripts/blender-golden.py:1 — `scripts/blender-golden.py` and `src/mesh-operations.js` change together 82% of the time (9 of the 11 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `dc9f148c` Add unsubdivide and circularize edits and Blender golden cases for po…; `e15a9cbe` Add lattice, curve, hook and wave modifiers (Part of #42); `de7a3b8d` Add screw, wireframe and skin modifiers (Part of #42) — run `git show` on any of them.
  • Change coupling: measure.mjs ↔ tasks.mjs bench/agent-modeling/measure.mjs:1 — `bench/agent-modeling/measure.mjs` and `bench/agent-modeling/tasks.mjs` change together 78% of the time (14 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `7bda02a9` Add render-pick suite task and measure branches on it (Part of #67); `0e7d0c82` Add sculpt and shrinkwrap mesh edits; `f3130d76` Bind physics bodies to the bones of a rig for ragdolls — run `git show` on any of them.
  • Change coupling: environment.js ↔ renderer.js src/environment.js:1 — `src/environment.js` and `src/renderer.js` change together 67% of the time (8 of the 12 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ea5410ea` Light HDRI diffuse from an exact cosine grid instead of nine SH terms…; `6667611c` Slice accessor copy, geometry conversion, HDRI rows and the sky prefi…; `cc58b0ba` Move liquid, splat and environment map code out of the core bundle — run `git show` on any of them.
  • Change coupling: render-blender.py ↔ scenes.js bench/reference/render-blender.py:1 — `bench/reference/render-blender.py` and `bench/reference/scenes.js` change together 64% of the time (14 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `15dd78b2` Tile the graph noise by default, keep Blender's endless lattice behin…; `bd6e448c` Make the graph noise node Blender's Noise Texture, value for value (p…; `794b244b` Add a material subsurface block with a lazily loaded rasterizer addon — run `git show` on any of them.
  • Change coupling: harness.js ↔ render-blender.py bench/reference/harness.js:1 — `bench/reference/harness.js` and `bench/reference/render-blender.py` change together 55% of the time (12 of the 22 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `bddc267d` Score the default look of bare scenes against three.js and Cycles (#988); `655c9e44` WIP #506: reflection measurement switches (--no-glossy, material ids,…; `4b07d1a5` Add the light emissive parts spill onto an open scene to the map boun… — run `git show` on any of them.
  • Change coupling: post.js ↔ volumetric.js src/post.js:1 — `src/post.js` and `src/volumetric.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `95c4ca66` Add volume fog detail controls: octaves, warp, contrast, layer top, k…; `1f4ecae4` Move the volume fog shader code into the fog-shader addon; `474508cc` Volume fog: density/velocity field, flow-advected noise and point-lig… — run `git show` on any of them.
  • Change coupling: vite.lib.config.js ↔ docs-live.js config/vite.lib.config.js:1 — `config/vite.lib.config.js` and `src/docs-live.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `aac71973` Add audio addon: spatial sounds triggered from input, contacts and an… (at that commit the file was still `vite.lib.config.js`); `50af7f35` Add live physics runtime system over an engine adapter (part of #771) (at that commit the file was still `vite.lib.config.js`); `7a10fbd8` Add player addon: character controller with kinematic collide-and-sli… (at that commit the file was still `vite.lib.config.js`) — run `git show` on any of them.
  • Change coupling: local-volume-resolve.js ↔ path-tracer-volume.js src/local-volume-resolve.js:1 — `src/local-volume-resolve.js` and `src/path-tracer-volume.js` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `cff12487` Load the emission ramp checks on demand and split the blackbody into …; `8b5dc613` Add an emission ramp to local volumes: blackbody or colour stops read…; `5213b392` Make the local volume surface shadow opt-in so the default frame stay… — run `git show` on any of them.
R11 · Import Boundaries · Boundary violation [package · ×8
  • Boundary violation [package:test-suite-dependency] scripts/agent-asset-fixture.mjs:2 — scripts/agent-asset-fixture.mjs:2 imports tests/fixtures/skinned-strip.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] scripts/agent-character-fixture.mjs:3 — scripts/agent-character-fixture.mjs:3 imports tests/fixtures/skinned-strip.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:relative-cross-package] scripts/render-file-native.mjs:82 — scripts/render-file-native.mjs:82 reaches into another package with a relative path (../packages/denoise-oidn/index.mjs) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] scripts/smoke-agent-drive.mjs:10 — scripts/smoke-agent-drive.mjs:10 imports tests/fixtures/car-glb.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] scripts/soft-body-film.mjs:4 — scripts/soft-body-film.mjs:4 imports tests/support/load-agent-scene-modules.mjs, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:third-party-deep-import] src/code-highlight.js:1 — src/code-highlight.js:1 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] src/code-highlight.js:2 — src/code-highlight.js:2 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] src/code-highlight.js:3 — src/code-highlight.js:3 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
D35 · Change Coupling · Change-coupling hub · ×5
  • Change-coupling hub: references.mjs → check.mjs, measure.mjs, run.mjs bench/agent-modeling/references.mjs — `bench/agent-modeling/references.mjs` changes together with 3 other files — `bench/agent-modeling/check.mjs`, `bench/agent-modeling/measure.mjs`, `bench/agent-modeling/run.mjs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: REDACTED → agent-mesh.js, agent-scene-assets.js, material-layer-shaders.js, modeling.js REDACTED — `REDACTED` changes together with 4 other files — `src/agent-mesh.js`, `src/agent-scene-assets.js`, `src/material-layer-shaders.js`, `src/modeling.js` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: shaders.js → environment.js, impostor-shader.js, material-layer-shaders.js src/shaders.js — `src/shaders.js` changes together with 3 other files — `src/environment.js`, `src/impostor-shader.js`, `src/material-layer-shaders.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: agent-scene-capabilities.js → blender-golden.py, agent-cloth.js, agent-explosion.js, agent-motion.js, agent-particles.js, agent-scene-assets.js, agent-scene-modules.js, cloth.js, local-volume-resolve.js, modeling.js, path-tracer-volume.js, render-passes.js src/agent-scene-capabilities.js — `src/agent-scene-capabilities.js` changes together with 12 other files — `scripts/blender-golden.py`, `src/agent-cloth.js`, `src/agent-explosion.js`, `src/agent-motion.js`, `src/agent-particles.js`, `src/agent-scene-assets.js`, `src/agent-scene-modules.js`, `src/cloth.js`, `src/local-volume-resolve.js`, `src/modeling.js`, `src/path-tracer-volume.js`, `src/render-passes.js` — none of which declares a dependency on it: one file is the hub of 12 separate couplings, not 12 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 12.
  • Change-coupling hub: path-tracer.js → path-tracer-gpu-pack.js, path-tracer-gpu-shader.js, path-tracer-webgpu-kernel.js src/path-tracer.js — `src/path-tracer.js` changes together with 3 other files — `src/path-tracer-gpu-pack.js`, `src/path-tracer-gpu-shader.js`, `src/path-tracer-webgpu-kernel.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×5
  • Duplicated block (6 lines × 2) bench/cycles-parity/render-cycles.py:190 — bench/cycles-parity/render-cycles.py:190-195 | bench/reference/render-blender.py:74-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) bench/cycles-parity/render-cycles.py:550 — bench/cycles-parity/render-cycles.py:550-555 | bench/reference/render-blender.py:722-727 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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 (6 lines × 2) bench/cycles-parity/render-cycles.py:493 — bench/cycles-parity/render-cycles.py:493-498 | bench/reference/render-blender.py:577-582 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) bench/reference/score.py:151 — bench/reference/score.py:151-156 | bench/reference/score.py:213-218 — 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 (6 lines × 2) scripts/blender-golden.py:445 — scripts/blender-golden.py:445-450 | scripts/blender-golden.py:583-588 — 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 (16 lines × 2 locations) · ×5
  • Duplicated block (16 lines × 2 locations) scripts/hero-clip-loop.mjs:41 — scripts/hero-clip-loop.mjs:41 · scripts/recode-glb-textures.mjs:45 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (16 lines × 2 locations) scripts/measure-render-budget.mjs:54 — scripts/measure-render-budget.mjs:54 · scripts/measure-render-estimate.mjs:64 — 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 (16 lines × 2 locations) scripts/prepare-hero-glb.mjs:44 — scripts/prepare-hero-glb.mjs:44 · scripts/split-showcase-glb.mjs:56 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (16 lines × 2 locations) scripts/smoke-gltf-skin-morph.mjs:7 — scripts/smoke-gltf-skin-morph.mjs:7 · scripts/smoke-morph-composition.mjs:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (16 lines × 2 locations) src/geometry.js:118 — src/geometry.js:118 · src/geometry.js:291 — 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.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) bench/cycles-parity/render-cycles.py:337 — bench/cycles-parity/render-cycles.py:337-349 | bench/reference/render-blender.py:175-190 — These two members are one piece of code written twice and then edited apart: 13 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.
  • Edited copy of a member (13 corresponding lines) bench/cycles-parity/render-cycles.py:568 — bench/cycles-parity/render-cycles.py:568-581 | bench/reference/render-blender.py:762-774 — These two members are one piece of code written twice and then edited apart: 13 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.
  • Edited copy of a member (13 corresponding lines) bench/cycles-parity/render-cycles.py:659 — bench/cycles-parity/render-cycles.py:659-673 | bench/reference/render-blender.py:825-837 — These two members are one piece of code written twice and then edited apart: 13 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.
  • Edited copy of a member (13 corresponding lines) bench/cycles-parity/render-cycles.py:215 — bench/cycles-parity/render-cycles.py:215-230 | bench/reference/render-blender.py:99-111 — These two members are one piece of code written twice and then edited apart: 13 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×4
  • Duplicated block (7 lines × 2) bench/cycles-parity/render-cycles.py:234 — bench/cycles-parity/render-cycles.py:234-240 | bench/cycles-parity/render-cycles.py:276-282 — 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 (7 lines × 2) bench/cycles-parity/render-cycles.py:360 — bench/cycles-parity/render-cycles.py:360-366 | bench/reference/render-blender.py:202-208 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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 (7 lines × 2) bench/reference/render-blender.py:119 — bench/reference/render-blender.py:119-125 | bench/reference/render-blender.py:149-155 — 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 (7 lines × 2) bench/cycles-parity/run-m0-suite.py:56 — bench/cycles-parity/run-m0-suite.py:56-62 | bench/cycles-parity/run-m1-parity.py:63-69 — 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.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×4
  • Duplicated block (17 lines × 2 locations) scripts/smoke-gltf-morph.mjs:8 — scripts/smoke-gltf-morph.mjs:8 · scripts/smoke-primitive-seams.mjs:20 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (17 lines × 2 locations) src/agent-asset.js:99 — src/agent-asset.js:99 · src/agent-look.js:118 — 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) src/agent-cloth.js:197 — src/agent-cloth.js:197 · src/path-tracer-scene.js:823 — 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) src/line-art.js:373 — src/line-art.js:373 · src/mesh-blend.js:204 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
AC1 · Text alternatives · <canvas> without a text alternative · ×3
  • <canvas> without a text alternative src/path-tracer-gpu.js:17 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative src/path-tracer-scene.js:164 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative src/splat.js:178 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×3
  • Focus outline removed in CSS without a :focus replacement src/documentation.css:27 — `.documentation #doc-article:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/documentation.css:168 — `.live-editor textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/hero-lab/loop/loop.css:87 — `.hero-loop .stage:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · createAgentScene · ×3
  • createAgentScene::apply (cyclomatic 66) REDACTED:2145 — createAgentScene::apply has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • createAgentScene::stage (cyclomatic 51) REDACTED:1640 — createAgentScene::stage has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • createAgentScene::inspect (cyclomatic 27) REDACTED:2310 — createAgentScene::inspect has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createAgentAssetScene · ×3
  • createAgentAssetScene::publish (cyclomatic 55) src/agent-asset.js:713 — createAgentAssetScene::publish has cyclomatic complexity 55 (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.
  • createAgentAssetScene::inspect (cyclomatic 42) src/agent-asset.js:1053 — createAgentAssetScene::inspect 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.
  • createAgentAssetScene::apply (cyclomatic 41) src/agent-asset.js:952 — createAgentAssetScene::apply has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D15 · Churn × Complexity Hotspots · Repeated repair · ×3
  • Repeated repair: packages/blender-addon/cook_blender/engine.py packages/blender-addon/cook_blender/engine.py:75 — packages/blender-addon/cook_blender/engine.py changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is CookRenderEngine._render at line 75), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix four Blender add-on export edge cases (#1608)”; “Fix portrait sensor fit, bound texture data, state the depth coverage limit and stop the Classroom driver reusing stale outputs (#900)”; “Fix the reviewed add-on defects; wire the Python tests into the node run (#900)”; “Fix diffuse material export and engine error handling; check the bridge refactor (#900)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- packages/blender-addon/cook_blender/engine.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/blender-addon/cook_blender/material_export.py packages/blender-addon/cook_blender/material_export.py:333 — packages/blender-addon/cook_blender/material_export.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is MaterialExporter.apply_normal at line 333), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix two silent Blender add-on export drops (#1589, #1591)”; “Fix portrait sensor fit, bound texture data, state the depth coverage limit and stop the Classroom driver reusing stale outputs (#900)”; “Fix the reviewed add-on defects; wire the Python tests into the node run (#900)”; “Fix diffuse material export and engine error handling; check the bridge refactor (#900)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- packages/blender-addon/cook_blender/material_export.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/game-rules.js src/game-rules.js:485 — src/game-rules.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is game-rules.createGameRules.runAction at line 485), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix three game runtime boundary bugs (#1387, #1388, #1389)”; “Fix silent onEvent, hidden nodes shown on frame 1 and contact leak after game over (#1281)”; “Fix the parented player jump and make restart reset the whole game (#1263)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 00:25:48 +07:00' --until='2026-11-18 00:25:48 +07:00' --full-history --no-merges -- src/game-rules.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · createAgentScene · ×3
  • createAgentScene::apply (cognitive 133) REDACTED:2145 — createAgentScene::apply has cognitive complexity 133 (threshold 15). Drivers by points: if/else 35 (78 pts), ternaries 14 (35 pts), boolean chains 7, loops 3 (7 pts), other 5, error handling 1 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • createAgentScene::stage (cognitive 61) REDACTED:1640 — createAgentScene::stage has cognitive complexity 61 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 12 (14 pts), boolean chains 13, loops 5 (8 pts), other 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • createAgentScene::inspect (cognitive 27) REDACTED:2310 — createAgentScene::inspect has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 18 (19 pts), boolean chains 3, other 3, if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createAgentAssetScene · ×3
  • createAgentAssetScene::apply (cognitive 97) src/agent-asset.js:952 — createAgentAssetScene::apply has cognitive complexity 97 (threshold 15). Drivers by points: if/else 25 (56 pts), ternaries 8 (25 pts), loops 5 (13 pts), boolean chains 3 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • createAgentAssetScene::publish (cognitive 58) src/agent-asset.js:713 — createAgentAssetScene::publish has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 10 (16 pts), ternaries 11 (12 pts), boolean chains 6, other 2, error handling 1 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • createAgentAssetScene::inspect (cognitive 49) src/agent-asset.js:1053 — createAgentAssetScene::inspect has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 9 (14 pts), boolean chains 11, loops 3 (5 pts), other 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeGltf · ×3
  • decodeGltf::buildNode (cognitive 22) src/gltf-decode.js:451 — decodeGltf::buildNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (5 pts), other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • decodeGltf::loadMaterial (cognitive 20) src/gltf-decode.js:258 — decodeGltf::loadMaterial has cognitive complexity 20 (threshold 15). Drivers by points: other 7, error handling 2 (4 pts), if/else 3 (4 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • decodeGltf::decodePrimitiveInto (cognitive 17) src/gltf-decode.js:310 — decodeGltf::decodePrimitiveInto has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 1, loops 1, other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×3
  • MethodTooLong: CrucibleRenderer.constructor src/renderer.js:709 — MethodTooLong — constructor runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CrucibleRenderer.render src/renderer.js:2720 — MethodTooLong — render 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.
  • MethodTooLong: CrucibleRenderer.replaceParts src/renderer.js:1408 — MethodTooLong — replaceParts runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 2+ corresponding lines) bench/cycles-parity/make-denoised-comparison-figure.py:43 — bench/cycles-parity/make-denoised-comparison-figure.py:43-44 | bench/cycles-parity/make-soft-falloff-figure.py:20-21 | packages/blender-addon/cook_blender/material_export.py:39-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 2+ corresponding lines) bench/cycles-parity/make-diffuse-transmission-figure.py:15 — bench/cycles-parity/make-diffuse-transmission-figure.py:15-17 | bench/cycles-parity/make-texture-mips-figure.py:17-19 | bench/webgpu-tracer/local-volumes/flip.py:16-17 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 2+ corresponding lines) bench/reference/light-components.py:43 — bench/reference/light-components.py:43-44 | bench/reference/noise.py:33-34 | bench/reference/shadow-depth.py:36-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) bench/cycles-parity/summarize-denoised-comparison.py:62 — bench/cycles-parity/summarize-denoised-comparison.py:62-68 | bench/tiers/score-tiers.py:92-98 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) bench/cycles-parity/render-cycles.py:360 — bench/cycles-parity/render-cycles.py:360-366 | bench/reference/render-blender.py:201-208 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) bench/cycles-parity/render-cycles.py:677 — bench/cycles-parity/render-cycles.py:677-685 | bench/reference/render-blender.py:841-847 — These two members are one piece of code written twice and then edited apart: 7 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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard src/hero-lab/loop/loop.css:47 — `.hero-loop .copy .rename-note` moves (`animation: rise 700ms var(--ease-out) 330ms backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard src/hero-lab/loop/loop.css:51 — `.hero-loop .copy .lede` moves (`animation: rise 700ms var(--ease-out) backwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · parseGltf · ×2
  • parseGltf::visitNode (cyclomatic 40) src/gltf.js:1298 — parseGltf::visitNode 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.
  • parseGltf::normalizePose (cyclomatic 27) src/gltf.js:1593 — parseGltf::normalizePose has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decodeGltf · ×2
  • decodeGltf::loadMaterial (cyclomatic 17) src/gltf-decode.js:258 — decodeGltf::loadMaterial 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.
  • decodeGltf::buildNode (cyclomatic 17) src/gltf-decode.js:451 — decodeGltf::buildNode 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.
D2 · Cognitive Complexity · parseGltf · ×2
  • parseGltf::visitNode (cognitive 88) src/gltf.js:1298 — parseGltf::visitNode has cognitive complexity 88 (threshold 15). Drivers by points: if/else 23 (56 pts), ternaries 6 (20 pts), boolean chains 4, other 4, error handling 1 (3 pts), loops 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • parseGltf::normalizePose (cognitive 37) src/gltf.js:1593 — parseGltf::normalizePose has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 3 (6 pts), boolean chains 5, loops 2 (3 pts), other 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · copiedJson · ×2
  • copiedJson::copy (cognitive 37) REDACTED:133 — copiedJson::copy has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 11, ternaries 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • copiedJson::copy (cognitive 36) src/agent-asset.js:69 — copiedJson::copy has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 12, ternaries 3 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSceneQuery · ×2
  • createSceneQuery::walkMap (cognitive 30) src/scene-query.js:249 — createSceneQuery::walkMap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (23 pts), boolean chains 3, loops 2 (3 pts), other 1 (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.
  • createSceneQuery::raycast (cognitive 20) src/scene-query.js:216 — createSceneQuery::raycast has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 2, other 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installRenderPasses · ×2
  • installRenderPasses::drawBatch (cognitive 28) src/render-passes.js:238 — installRenderPasses::drawBatch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 5 (7 pts), boolean chains 4, other 4, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • installRenderPasses::prepare (cognitive 16) src/render-passes.js:126 — installRenderPasses::prepare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 3 (5 pts), boolean chains 3, other 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · physics.recordedScene · ×2
  • physics.recordedScene::sample (cognitive 24) src/physics.js:1050 — physics.recordedScene::sample has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (physics.recordedScene::bindParts) 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.
  • physics.recordedScene::bindParts (cognitive 22) src/physics.js:1107 — physics.recordedScene::bindParts has cognitive complexity 22 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This shape REPEATS in the file: one other method here (physics.recordedScene::sample) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) bench/cycles-parity/render-cycles.py:187 — bench/cycles-parity/render-cycles.py:187-211 | bench/reference/render-blender.py:69-94 — These two members are one piece of code written twice and then edited apart: 25 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.
  • Edited copy of a member (25 corresponding lines) bench/cycles-parity/render-cycles.py:370 — bench/cycles-parity/render-cycles.py:370-394 | bench/reference/render-blender.py:212-236 — These two members are one piece of code written twice and then edited apart: 25 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.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) bench/reference/reflection-share.py:76 — bench/reference/reflection-share.py:76-80 | bench/reference/score.py:99-103 — These two members are one piece of code written twice and then edited apart: 5 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.
  • Edited copy of a member (5 corresponding lines) bench/cycles-parity/make-denoised-comparison-figure.py:34 — bench/cycles-parity/make-denoised-comparison-figure.py:34-39 | bench/cycles-parity/render-cycles.py:20-24 — These two members are one piece of code written twice and then edited apart: 5 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.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×2
  • Edited copy of a member (2 corresponding lines) bench/cycles-parity/run-classroom-parity.py:162 — bench/cycles-parity/run-classroom-parity.py:162-163 | bench/cycles-parity/run-classroom-parity.py:167-168 — These two members are one piece of code written twice and then edited apart: 2 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.
  • Edited copy of a member (2 corresponding lines) bench/reference/light-components.py:29 — bench/reference/light-components.py:29-30 | bench/reference/water-shadows-score.py:20-21 — These two members are one piece of code written twice and then edited apart: 2 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) bench/cycles-parity/render-cycles.py:519 — bench/cycles-parity/render-cycles.py:519-527 | bench/reference/render-blender.py:686-694 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) bench/cycles-parity/render-cycles.py:536 — bench/cycles-parity/render-cycles.py:536-544 | bench/reference/render-blender.py:708-716 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
R10 · Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (38 matched lines × 2 locations) scripts/check-tool-cost.mjs:26 — scripts/check-tool-cost.mjs:26 · scripts/measure-size.mjs:175 — the two spans are one implementation copied and then locally edited — 269 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 with local edits (38 matched lines × 2 locations) scripts/smoke-character.mjs:13 — scripts/smoke-character.mjs:13 · scripts/smoke-glb-export.mjs:11 — the two spans are one implementation copied and then locally edited — 346 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 (32 lines × 2 locations) · ×2
  • Duplicated block (32 lines × 2 locations) scripts/smoke-agent-cloth.mjs:59 — scripts/smoke-agent-cloth.mjs:59 · scripts/smoke-agent-physics.mjs:63 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (32 lines × 2 locations) scripts/smoke-object-motion-blur.mjs:77 — scripts/smoke-object-motion-blur.mjs:77 · scripts/smoke-wireframe-pass.mjs:36 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (28 matched lines × 2 locations) scripts/agent-draco.mjs:143 — scripts/agent-draco.mjs:143 · REDACTED:134 — the two spans are one implementation copied and then locally edited — 283 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 with local edits (28 matched lines × 2 locations) src/particle-sparks.js:79 — src/particle-sparks.js:79 · src/spume.js:207 — the two spans are one implementation copied and then locally edited — 312 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 (20 lines × 2 locations) · ×2
  • Duplicated block (20 lines × 2 locations) src/line-art.js:12 — src/line-art.js:12 · src/mesh-blend.js:181 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (20 lines × 2 locations) src/modeling.js:364 — src/modeling.js:364 · src/text-geometry.js:161 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (20 matched lines × 2 locations) src/path-tracer.js:453 — src/path-tracer.js:453 · src/path-tracer.js:476 — the two spans are one implementation copied and then locally edited — 161 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 with local edits (20 matched lines × 2 locations) src/physics-jolt.js:349 — src/physics-jolt.js:349 · src/physics-runtime.js:105 — the two spans are one implementation copied and then locally edited — 124 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 (19 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (19 matched lines × 2 locations) src/lighting-setups.js:78 — src/lighting-setups.js:78 · src/physical-sky.js:211 — the two spans are one implementation copied and then locally edited — 220 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 with local edits (19 matched lines × 2 locations) src/marketplace.js:139 — src/marketplace.js:139 · src/marketplace.js:204 — the two spans are one implementation copied and then locally edited — 185 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×2
  • Duplicated block (15 lines × 2 locations) scripts/smoke-agent-drive.mjs:18 — scripts/smoke-agent-drive.mjs:18 · scripts/smoke-agent-scene-assets.mjs: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.
  • Duplicated block (15 lines × 2 locations) src/input-sources.js:6 — src/input-sources.js:6 · src/input.js:14 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (15 matched lines × 2 locations) src/file-scene.js:52 — src/file-scene.js:52 · src/showcase.js:314 — the two spans are one implementation copied and then locally edited — 152 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 with local edits (15 matched lines × 2 locations) src/mesh-uv.js:149 — src/mesh-uv.js:149 · src/navmesh.js:91 — the two spans are one implementation copied and then locally edited — 76 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.
D1 · Cyclomatic Complexity · validateDocument (cyclomatic 193) · ×1
  • validateDocument (cyclomatic 193) src/gltf.js:339 — validateDocument has cyclomatic complexity 193 (threshold 15). Of this number, 185 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeMeshEdits (cyclomatic 185) · ×1
  • normalizeMeshEdits (cyclomatic 185) src/mesh-recipe.js:119 — normalizeMeshEdits has cyclomatic complexity 185 (threshold 15). Most of this is not in the body itself: 3 of the 185 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 122, 188, 200). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · prepare (cyclomatic 140) · ×1
  • prepare (cyclomatic 140) src/physics.js:281 — prepare has cyclomatic complexity 140 (threshold 15). Of this number, 29 points are the body's own statements and 111 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · agent-scene.createAgentScene (cyclomatic 121) · ×1
  • agent-scene.createAgentScene (cyclomatic 121) REDACTED:1559 — agent-scene.createAgentScene has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-asset.createAgentAssetScene (cyclomatic 106) · ×1
  • agent-asset.createAgentAssetScene (cyclomatic 106) src/agent-asset.js:280 — agent-asset.createAgentAssetScene has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent 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 (agent-asset.createAgentAssetScene::normalize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · agent-motion.compileAgentMotion (cyclomatic 90) · ×1
  • agent-motion.compileAgentMotion (cyclomatic 90) src/agent-motion.js:895 — agent-motion.compileAgentMotion has cyclomatic complexity 90 (threshold 15). Of this number, 76 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bevelEdges (cyclomatic 89) · ×1
  • bevelEdges (cyclomatic 89) src/mesh-bevel.js:171 — bevelEdges has cyclomatic complexity 89 (threshold 15). Of this number, 71 points are the body's own statements and 18 belong to 17 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · constructor (cyclomatic 87) · ×1
  • constructor (cyclomatic 87) src/renderer.js:709 — constructor has cyclomatic complexity 87 (threshold 15). Of this number, 86 points are the body's own statements and 1 belongs to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createInput (cyclomatic 84) · ×1
  • createInput (cyclomatic 84) src/input.js:53 — createInput has cyclomatic complexity 84 (threshold 15). Most of this is not in the body itself: 12 of the 84 points are its own statements and the rest belongs to 31 function items inside it that branch (sample, bindAxis, registerSource, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.createThreeCompat (cyclomatic 82) · ×1
  • index.createThreeCompat (cyclomatic 82) packages/three-compat/index.mjs:320 — index.createThreeCompat has cyclomatic complexity 82 (threshold 15). Of this number, 42 points are the body's own statements and 40 belong to 13 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · updateParts (cyclomatic 82) · ×1
  • updateParts (cyclomatic 82) src/renderer.js:1582 — updateParts has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geometryEstimate (cyclomatic 79) · ×1
  • geometryEstimate (cyclomatic 79) REDACTED:552 — geometryEstimate has cyclomatic complexity 79 (threshold 15). Of this number, 73 points are the body's own statements and 6 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeAgentMotion (cyclomatic 76) · ×1
  • normalizeAgentMotion (cyclomatic 76) src/agent-motion.js:506 — normalizeAgentMotion has cyclomatic complexity 76 (threshold 15). Of this number, 37 points are the body's own statements and 39 belong to 16 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-select.selectFaces · ×1
  • mesh-select.selectFaces::evaluate (cyclomatic 73) src/mesh-select.js:64 — mesh-select.selectFaces::evaluate has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · render (cyclomatic 68) · ×1
  • render (cyclomatic 68) src/renderer.js:2720 — render has cyclomatic complexity 68 (threshold 15). Of this number, 67 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runEdit (cyclomatic 63) · ×1
  • runEdit (cyclomatic 63) src/mesh-recipe.js:418 — runEdit has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createPhysicsSystem (cyclomatic 59) · ×1
  • createPhysicsSystem (cyclomatic 59) src/physics-runtime.js:196 — createPhysicsSystem has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 7 of the 59 points are its own statements and the rest belongs to 38 function items inside it that branch (fixedUpdate, setKinematicPose, assertPosesSound, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createSurfaceAttachment · ×1
  • createSurfaceAttachment::update (cyclomatic 56) src/surface-attachment.js:164 — createSurfaceAttachment::update has cyclomatic complexity 56 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · replaceParts (cyclomatic 54) · ×1
  • replaceParts (cyclomatic 54) src/renderer.js:1408 — replaceParts has cyclomatic complexity 54 (threshold 15). Of this number, 38 points are the body's own statements and 16 belong to 14 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · createRuntime (cyclomatic 54) · ×1
  • createRuntime (cyclomatic 54) src/runtime.js:102 — createRuntime has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 7 of the 54 points are its own statements and the rest belongs to 37 function items inside it that branch (tick, addSystem, runFixedSteps, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · normalizeExtraConstraint (cyclomatic 49) · ×1
  • normalizeExtraConstraint (cyclomatic 49) src/node-constraints.js:181 — normalizeExtraConstraint has cyclomatic complexity 49 (threshold 15). Of this number, 46 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · model.createModel (cyclomatic 47) · ×1
  • model.createModel (cyclomatic 47) src/model.js:24 — model.createModel has cyclomatic complexity 47 (threshold 15). Of this number, 40 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · nodeFrom (cyclomatic 45) · ×1
  • nodeFrom (cyclomatic 45) REDACTED:357 — nodeFrom has cyclomatic complexity 45 (threshold 15). Of this number, 44 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · describeIgnoredFeatures (cyclomatic 45) · ×1
  • describeIgnoredFeatures (cyclomatic 45) src/path-tracer.js:1043 — describeIgnoredFeatures has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fitPerspectiveDistance (cyclomatic 44) · ×1
  • fitPerspectiveDistance (cyclomatic 44) src/camera.js:169 — fitPerspectiveDistance has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to 8 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · selectEdges (cyclomatic 43) · ×1
  • selectEdges (cyclomatic 43) src/mesh-bevel.js:29 — selectEdges has cyclomatic complexity 43 (threshold 15). Of this number, 42 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.
D1 · Cyclomatic Complexity · createSolver (cyclomatic 42) · ×1
  • createSolver (cyclomatic 42) src/skeleton-pose.js:333 — createSolver has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · game.buildGame (cyclomatic 41) · ×1
  • game.buildGame (cyclomatic 41) src/game.js:206 — game.buildGame has cyclomatic complexity 41 (threshold 15). Of this number, 39 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.
D1 · Cyclomatic Complexity · expandAssetPlacements (cyclomatic 41) · ×1
  • expandAssetPlacements (cyclomatic 41) src/agent-scene-assets.js:273 — expandAssetPlacements has cyclomatic complexity 41 (threshold 15). Of this number, 26 points are the body's own statements and 15 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-look.environmentFrom (cyclomatic 40) · ×1
  • agent-look.environmentFrom (cyclomatic 40) src/agent-look.js:269 — agent-look.environmentFrom has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · animation-mixer.createAnimationMixer (cyclomatic 40) · ×1
  • animation-mixer.createAnimationMixer (cyclomatic 40) src/animation-mixer.js:155 — animation-mixer.createAnimationMixer has cyclomatic complexity 40 (threshold 15). Of this number, 26 points are the body's own statements and 14 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeRecipe (cyclomatic 40) · ×1
  • normalizeRecipe (cyclomatic 40) REDACTED:1036 — normalizeRecipe has cyclomatic complexity 40 (threshold 15). Of this number, 34 points are the body's own statements and 6 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createCloth (cyclomatic 40) · ×1
  • createCloth (cyclomatic 40) src/cloth.js:567 — createCloth has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scene-graph.createSceneGraph (cyclomatic 39) · ×1
  • scene-graph.createSceneGraph (cyclomatic 39) src/scene-graph.js:77 — scene-graph.createSceneGraph has cyclomatic complexity 39 (threshold 15). Of this number, 18 points are the body's own statements and 21 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.
D1 · Cyclomatic Complexity · nature.createNatureWorld (cyclomatic 39) · ×1
  • nature.createNatureWorld (cyclomatic 39) src/nature.js:216 — nature.createNatureWorld has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shrinkwrap.shrinkwrapGeometry (cyclomatic 39) · ×1
  • shrinkwrap.shrinkwrapGeometry (cyclomatic 39) src/shrinkwrap.js:89 — shrinkwrap.shrinkwrapGeometry has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · materialFrom (cyclomatic 39) · ×1
  • materialFrom (cyclomatic 39) REDACTED:278 — materialFrom has cyclomatic complexity 39 (threshold 15). Of this number, 35 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · convertGeometry (cyclomatic 39) · ×1
  • convertGeometry (cyclomatic 39) src/gltf.js:893 — convertGeometry has cyclomatic complexity 39 (threshold 15). Of this number, 29 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resolveFrame (cyclomatic 38) · ×1
  • resolveFrame (cyclomatic 38) src/renderer.js:2340 — resolveFrame has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizeBody (cyclomatic 38) · ×1
  • normalizeBody (cyclomatic 38) src/agent-physics.js:82 — normalizeBody has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scene-query.createSceneQuery (cyclomatic 37) · ×1
  • scene-query.createSceneQuery (cyclomatic 37) src/scene-query.js:186 — scene-query.createSceneQuery has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 5 function items inside it that branch (raycast, walkMap, walkMap::obstacleCell, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · drawBatch (cyclomatic 37) · ×1
  • drawBatch (cyclomatic 37) src/renderer.js:2622 — drawBatch has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · exportGlb (cyclomatic 37) · ×1
  • exportGlb (cyclomatic 37) src/export.js:254 — exportGlb has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 10 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 309, geometryFor, a function literal at line 276, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createSurfaceAttachment (cyclomatic 37) · ×1
  • createSurfaceAttachment (cyclomatic 37) src/surface-attachment.js:89 — createSurfaceAttachment has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · validateAnimationChannels (cyclomatic 36) · ×1
  • validateAnimationChannels (cyclomatic 36) src/gltf.js:168 — validateAnimationChannels 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.
D1 · Cyclomatic Complexity · importMaterial (cyclomatic 36) · ×1
  • importMaterial (cyclomatic 36) packages/three-bridge/index.mjs:189 — importMaterial has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · packLocalVolumes (cyclomatic 36) · ×1
  • packLocalVolumes (cyclomatic 36) src/local-volumes.js:42 — packLocalVolumes has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 59, 53, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · parseForLoop (cyclomatic 35) · ×1
  • parseForLoop (cyclomatic 35) src/shader-snippet-validator.js:154 — parseForLoop has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · normalizeRelation (cyclomatic 35) · ×1
  • normalizeRelation (cyclomatic 35) src/agent-relations.js:53 — normalizeRelation has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes (cyclomatic 34) · ×1
  • path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes (cyclomatic 34) src/path-tracer-volume.js:320 — path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · npc-follower.createPathFollower (cyclomatic 34) · ×1
  • npc-follower.createPathFollower (cyclomatic 34) src/npc-follower.js:63 — npc-follower.createPathFollower has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-asset.createAgentAssetScene · ×1
  • agent-asset.createAgentAssetScene::normalize (cyclomatic 34) src/agent-asset.js:489 — agent-asset.createAgentAssetScene::normalize has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (agent-asset.createAgentAssetScene) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · compileAgentMotion · ×1
  • compileAgentMotion::sample (cyclomatic 34) src/agent-motion.js:1080 — compileAgentMotion::sample has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createCameraRig (cyclomatic 34) · ×1
  • createCameraRig (cyclomatic 34) src/player.js:339 — createCameraRig has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 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.
D1 · Cyclomatic Complexity · createLocalVolumeCrossing · ×1
  • createLocalVolumeCrossing::crossLocalVolumes (cyclomatic 34) src/path-tracer-volume.js:320 — createLocalVolumeCrossing::crossLocalVolumes has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · physics.prepare.joints (cyclomatic 33) · ×1
  • physics.prepare.joints (cyclomatic 33) src/physics.js:465 — physics.prepare.joints has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · applyFloorSkyVisibility (cyclomatic 33) · ×1
  • applyFloorSkyVisibility (cyclomatic 33) src/floor-sky-visibility.js:227 — applyFloorSkyVisibility has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · agent-asset.copiedJson · ×1
  • agent-asset.copiedJson::copy (cyclomatic 32) src/agent-asset.js:69 — agent-asset.copiedJson::copy has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseGltf (cyclomatic 32) · ×1
  • parseGltf (cyclomatic 32) src/gltf.js:1247 — parseGltf has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createCharacterController (cyclomatic 32) · ×1
  • createCharacterController (cyclomatic 32) src/player.js:156 — createCharacterController has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (advance, applyRootMotion, currentCameraYaw, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · meshFromGeometry (cyclomatic 32) · ×1
  • meshFromGeometry (cyclomatic 32) src/mesh-convert.js:372 — meshFromGeometry has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · installUserPasses (cyclomatic 32) · ×1
  • installUserPasses (cyclomatic 32) src/user-pass.js:171 — installUserPasses has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 20 function items inside it that branch (drawPass, a function literal at line 310, a function literal at line 207, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · validateSplatMaterial (cyclomatic 32) · ×1
  • validateSplatMaterial (cyclomatic 32) src/splat.js:83 — validateSplatMaterial has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · agent-apply-report.describeOperation (cyclomatic 31) · ×1
  • agent-apply-report.describeOperation (cyclomatic 31) src/agent-apply-report.js:69 — agent-apply-report.describeOperation has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-scene.copiedJson · ×1
  • agent-scene.copiedJson::copy (cyclomatic 31) REDACTED:133 — agent-scene.copiedJson::copy has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CrucibleRenderer.bindGeometryAttributes (cyclomatic 31) · ×1
  • CrucibleRenderer.bindGeometryAttributes (cyclomatic 31) src/renderer.js:1206 — CrucibleRenderer.bindGeometryAttributes has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeSettle (cyclomatic 31) · ×1
  • normalizeSettle (cyclomatic 31) src/settle.js:72 — normalizeSettle has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · node-constraints.normalizeConstraint (cyclomatic 30) · ×1
  • node-constraints.normalizeConstraint (cyclomatic 30) src/node-constraints.js:114 — node-constraints.normalizeConstraint has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gas-sim.createSolver.project (cyclomatic 30) · ×1
  • gas-sim.createSolver.project (cyclomatic 30) src/gas-sim.js:413 — gas-sim.createSolver.project has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeIkSolver (cyclomatic 30) · ×1
  • normalizeIkSolver (cyclomatic 30) src/agent-motion.js:306 — normalizeIkSolver has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createCloth.step (cyclomatic 30) · ×1
  • createCloth.step (cyclomatic 30) src/cloth.js:632 — createCloth.step has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createSolver.project (cyclomatic 30) · ×1
  • createSolver.project (cyclomatic 30) src/gas-sim.js:413 — createSolver.project has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createAnimationClip (cyclomatic 30) · ×1
  • createAnimationClip (cyclomatic 30) src/animation.js:55 — createAnimationClip has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 59, 69, 84). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · particles.buildParticleMesh (cyclomatic 29) · ×1
  • particles.buildParticleMesh (cyclomatic 29) src/particles.js:449 — particles.buildParticleMesh has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generateGeometry (cyclomatic 29) · ×1
  • generateGeometry (cyclomatic 29) REDACTED:790 — generateGeometry has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · normalizeLights (cyclomatic 29) · ×1
  • normalizeLights (cyclomatic 29) src/light-bake.js:157 — normalizeLights has cyclomatic complexity 29 (threshold 15). Of this number, 17 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · buildTraceScene (cyclomatic 29) · ×1
  • buildTraceScene (cyclomatic 29) src/path-tracer-scene.js:894 — buildTraceScene has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · mesh-cut-edits.normalizeCutEdit (cyclomatic 28) · ×1
  • mesh-cut-edits.normalizeCutEdit (cyclomatic 28) src/mesh-cut-edits.js:29 — mesh-cut-edits.normalizeCutEdit has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-look.copiedJson (cyclomatic 28) · ×1
  • agent-look.copiedJson (cyclomatic 28) src/agent-look.js:95 — agent-look.copiedJson has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-scene.checkCameraLens (cyclomatic 28) · ×1
  • agent-scene.checkCameraLens (cyclomatic 28) REDACTED:452 — agent-scene.checkCameraLens has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · textureDescriptorInfo (cyclomatic 28) · ×1
  • textureDescriptorInfo (cyclomatic 28) src/renderer.js:598 — textureDescriptorInfo 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.
D1 · Cyclomatic Complexity · postStepsOf (cyclomatic 28) · ×1
  • postStepsOf (cyclomatic 28) src/renderer.js:2287 — postStepsOf has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · prepareResources (cyclomatic 28) · ×1
  • prepareResources (cyclomatic 28) src/gltf.js:708 — prepareResources has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · normalizeSheet (cyclomatic 28) · ×1
  • normalizeSheet (cyclomatic 28) src/agent-cloth.js:45 — normalizeSheet has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeMaterialPattern (cyclomatic 28) · ×1
  • normalizeMaterialPattern (cyclomatic 28) src/material-patterns.js:188 — normalizeMaterialPattern has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · local-volume-resolve.resolveLocalVolume (cyclomatic 27) · ×1
  • local-volume-resolve.resolveLocalVolume (cyclomatic 27) src/local-volume-resolve.js:38 — local-volume-resolve.resolveLocalVolume has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-lint.meshTopologyMetrics (cyclomatic 27) · ×1
  • mesh-lint.meshTopologyMetrics (cyclomatic 27) src/mesh-lint.js:44 — mesh-lint.meshTopologyMetrics has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · camera-path.createCameraPath · ×1
  • camera-path.createCameraPath::sample (cyclomatic 27) src/camera-path.js:113 — camera-path.createCameraPath::sample has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · agent-drive-schema.normalizeDrive (cyclomatic 27) · ×1
  • agent-drive-schema.normalizeDrive (cyclomatic 27) src/agent-drive-schema.js:106 — agent-drive-schema.normalizeDrive has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cloth.createCloth.step (cyclomatic 27) · ×1
  • cloth.createCloth.step (cyclomatic 27) src/cloth.js:632 — cloth.createCloth.step has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gltf-lights.readPunctualLights (cyclomatic 27) · ×1
  • gltf-lights.readPunctualLights (cyclomatic 27) src/gltf-lights.js:42 — gltf-lights.readPunctualLights has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · path-tracer.createPathTracer.trace (cyclomatic 27) · ×1
  • path-tracer.createPathTracer.trace (cyclomatic 27) src/path-tracer.js:915 — path-tracer.createPathTracer.trace has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shrinkwrap.validateSource (cyclomatic 27) · ×1
  • shrinkwrap.validateSource (cyclomatic 27) src/shrinkwrap.js:44 — shrinkwrap.validateSource has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · surface.validateTarget (cyclomatic 27) · ×1
  • surface.validateTarget (cyclomatic 27) src/surface.js:33 — surface.validateTarget has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shaderFeaturesOfParts (cyclomatic 27) · ×1
  • shaderFeaturesOfParts (cyclomatic 27) src/renderer.js:114 — shaderFeaturesOfParts has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createPathTracer.trace (cyclomatic 27) · ×1
  • createPathTracer.trace (cyclomatic 27) src/path-tracer.js:915 — createPathTracer.trace has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildMaterial (cyclomatic 27) · ×1
  • buildMaterial (cyclomatic 27) packages/three-bridge/index.mjs:416 — buildMaterial has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · installMeshBlend (cyclomatic 27) · ×1
  • installMeshBlend (cyclomatic 27) src/mesh-blend.js:260 — installMeshBlend has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 20 function items inside it that branch (render, apply, needsStableIds, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · node-constraints.createNodeConstraintEvaluator · ×1
  • node-constraints.createNodeConstraintEvaluator::applyConstraint (cyclomatic 26) src/node-constraints.js:850 — node-constraints.createNodeConstraintEvaluator::applyConstraint has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-scene-assets.normalizeAssetPlacement (cyclomatic 26) · ×1
  • agent-scene-assets.normalizeAssetPlacement (cyclomatic 26) src/agent-scene-assets.js:120 — agent-scene-assets.normalizeAssetPlacement has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scene-query.readWalkOptions (cyclomatic 26) · ×1
  • scene-query.readWalkOptions (cyclomatic 26) src/scene-query.js:141 — scene-query.readWalkOptions has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · convertMaterial (cyclomatic 26) · ×1
  • convertMaterial (cyclomatic 26) src/gltf.js:1196 — convertMaterial has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · physicsDefinition (cyclomatic 26) · ×1
  • physicsDefinition (cyclomatic 26) src/agent-physics.js:491 — physicsDefinition has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · normalizeSparkSystem (cyclomatic 26) · ×1
  • normalizeSparkSystem (cyclomatic 26) src/agent-particles.js:234 — normalizeSparkSystem has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · applyProjection (cyclomatic 26) · ×1
  • applyProjection (cyclomatic 26) src/camera.js:13 — applyProjection has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · physics.prepare.colliders (cyclomatic 25) · ×1
  • physics.prepare.colliders (cyclomatic 25) src/physics.js:352 — physics.prepare.colliders has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · physics.bakePrepared (cyclomatic 25) · ×1
  • physics.bakePrepared (cyclomatic 25) src/physics.js:937 — physics.bakePrepared has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · docs-live.createLiveExample (cyclomatic 25) · ×1
  • docs-live.createLiveExample (cyclomatic 25) src/docs-live.js:219 — docs-live.createLiveExample has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 355, run, a function literal at line 323, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · sculpt.validateGeometry (cyclomatic 25) · ×1
  • sculpt.validateGeometry (cyclomatic 25) src/sculpt.js:10 — sculpt.validateGeometry has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createDirectIrradiance (cyclomatic 25) · ×1
  • createDirectIrradiance (cyclomatic 25) src/light-bake.js:345 — createDirectIrradiance has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 5 function items inside it that branch (directIrradiance, addSpotLight, addLight, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createAuthority.receiveMessage (cyclomatic 25) · ×1
  • createAuthority.receiveMessage (cyclomatic 25) src/netcode.js:433 — createAuthority.receiveMessage has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createAnimationGraph (cyclomatic 25) · ×1
  • createAnimationGraph (cyclomatic 25) src/animation-graph.js:565 — createAnimationGraph has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 25 function items inside it that branch (set, advance, reset, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · normalizeVegetation (cyclomatic 25) · ×1
  • normalizeVegetation (cyclomatic 25) src/agent-vegetation.js:120 — normalizeVegetation 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.
D1 · Cyclomatic Complexity · resolveSettings (cyclomatic 25) · ×1
  • resolveSettings (cyclomatic 25) src/grass.js:209 — resolveSettings has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mesh-query.topology (cyclomatic 24) · ×1
  • mesh-query.topology (cyclomatic 24) src/mesh-query.js:199 — mesh-query.topology has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-reshape-edits.normalizeReshapeEdit (cyclomatic 24) · ×1
  • mesh-reshape-edits.normalizeReshapeEdit (cyclomatic 24) src/mesh-reshape-edits.js:21 — mesh-reshape-edits.normalizeReshapeEdit 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.
D1 · Cyclomatic Complexity · modeling.splineFrom (cyclomatic 24) · ×1
  • modeling.splineFrom (cyclomatic 24) src/modeling.js:337 — modeling.splineFrom 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.
D1 · Cyclomatic Complexity · skeleton-pose.solveChain (cyclomatic 24) · ×1
  • skeleton-pose.solveChain (cyclomatic 24) src/skeleton-pose.js:592 — skeleton-pose.solveChain 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.
D1 · Cyclomatic Complexity · agent-clip-layers.normalizedLayer (cyclomatic 24) · ×1
  • agent-clip-layers.normalizedLayer (cyclomatic 24) src/agent-clip-layers.js:145 — agent-clip-layers.normalizedLayer 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.
D1 · Cyclomatic Complexity · agent-motion.validateValue (cyclomatic 24) · ×1
  • agent-motion.validateValue (cyclomatic 24) src/agent-motion.js:71 — agent-motion.validateValue has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · material-graph.bakeMaterialGraph (cyclomatic 24) · ×1
  • material-graph.bakeMaterialGraph (cyclomatic 24) src/material-graph.js:734 — material-graph.bakeMaterialGraph has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flush-search.createPairTest.testPair (cyclomatic 24) · ×1
  • flush-search.createPairTest.testPair (cyclomatic 24) src/flush-search.js:401 — flush-search.createPairTest.testPair has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · netcode.createAuthority.receiveMessage (cyclomatic 24) · ×1
  • netcode.createAuthority.receiveMessage (cyclomatic 24) src/netcode.js:433 — netcode.createAuthority.receiveMessage has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · uploadBatchData (cyclomatic 24) · ×1
  • uploadBatchData (cyclomatic 24) src/renderer.js:1364 — uploadBatchData has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validateNetcodeOptions (cyclomatic 24) · ×1
  • validateNetcodeOptions (cyclomatic 24) src/netcode.js:331 — validateNetcodeOptions has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveLights (cyclomatic 24) · ×1
  • resolveLights (cyclomatic 24) src/vehicle.js:408 — resolveLights has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 420, 409, 428). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · queryLocalSurface (cyclomatic 24) · ×1
  • queryLocalSurface (cyclomatic 24) src/mesh-query.js:417 — queryLocalSurface has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 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.
D1 · Cyclomatic Complexity · findCoplanarOverlaps (cyclomatic 24) · ×1
  • findCoplanarOverlaps (cyclomatic 24) src/coplanar-overlap.js:387 — findCoplanarOverlaps has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createPairTest · ×1
  • createPairTest::testPair (cyclomatic 24) src/flush-search.js:401 — createPairTest::testPair has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mesh-convert.joinTriangles (cyclomatic 23) · ×1
  • mesh-convert.joinTriangles (cyclomatic 23) src/mesh-convert.js:222 — mesh-convert.joinTriangles has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · animation.sampleTrackInto (cyclomatic 23) · ×1
  • animation.sampleTrackInto (cyclomatic 23) src/animation.js:110 — animation.sampleTrackInto has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shader-snippet-validator.validateSnippetUniforms (cyclomatic 23) · ×1
  • shader-snippet-validator.validateSnippetUniforms (cyclomatic 23) src/shader-snippet-validator.js:342 — shader-snippet-validator.validateSnippetUniforms has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hero-loop.tick (cyclomatic 23) · ×1
  • hero-loop.tick (cyclomatic 23) src/hero-lab/hero-loop.js:258 — hero-loop.tick has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizePathTracerOptions (cyclomatic 23) · ×1
  • normalizePathTracerOptions (cyclomatic 23) src/path-tracer.js:111 — normalizePathTracerOptions has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveLights (cyclomatic 23) · ×1
  • resolveLights (cyclomatic 23) src/path-tracer-scene.js:520 — resolveLights has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 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.
D1 · Cyclomatic Complexity · normalizeJoint (cyclomatic 23) · ×1
  • normalizeJoint (cyclomatic 23) src/agent-physics.js:194 — normalizeJoint has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · closeTJunctions (cyclomatic 23) · ×1
  • closeTJunctions (cyclomatic 23) src/modeling.js:167 — closeTJunctions has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 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.
D1 · Cyclomatic Complexity · createParticleLaunches (cyclomatic 23) · ×1
  • createParticleLaunches (cyclomatic 23) src/particles.js:111 — createParticleLaunches has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · expandVegetation (cyclomatic 23) · ×1
  • expandVegetation (cyclomatic 23) src/agent-vegetation.js:285 — expandVegetation 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 7 function literals inside it that branch (lines 327, 309, 359, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · selectScene (cyclomatic 23) · ×1
  • selectScene (cyclomatic 23) src/showcase.js:275 — selectScene has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · springChainSolver (cyclomatic 23) · ×1
  • springChainSolver (cyclomatic 23) src/spring-bones.js:150 — springChainSolver 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 24 function items inside it that branch (create::pushOutOfColliders, a function literal at line 236, create::solve, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · installRenderPasses · ×1
  • installRenderPasses::drawBatch (cyclomatic 23) src/render-passes.js:238 — installRenderPasses::drawBatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-render.extractRender (cyclomatic 22) · ×1
  • mesh-render.extractRender (cyclomatic 22) src/mesh-render.js:173 — mesh-render.extractRender has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-lint.lintMesh (cyclomatic 22) · ×1
  • mesh-lint.lintMesh (cyclomatic 22) src/mesh-lint.js:303 — mesh-lint.lintMesh has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modeling-shapes.buildExtrusion (cyclomatic 22) · ×1
  • modeling-shapes.buildExtrusion (cyclomatic 22) src/modeling-shapes.js:169 — modeling-shapes.buildExtrusion has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · modeling.nurbsBasisFrom (cyclomatic 22) · ×1
  • modeling.nurbsBasisFrom (cyclomatic 22) src/modeling.js:311 — modeling.nurbsBasisFrom has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · animation.createAnimationPlayer (cyclomatic 22) · ×1
  • animation.createAnimationPlayer (cyclomatic 22) src/animation.js:246 — animation.createAnimationPlayer has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · physics.validateMotorBounds (cyclomatic 22) · ×1
  • physics.validateMotorBounds (cyclomatic 22) src/physics.js:625 — physics.validateMotorBounds has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fog-shader.localVolumeFunctions (cyclomatic 22) · ×1
  • fog-shader.localVolumeFunctions (cyclomatic 22) src/fog-shader.js:438 — fog-shader.localVolumeFunctions has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · terrain.createTerrain.buildMirrorGeometry (cyclomatic 22) · ×1
  • terrain.createTerrain.buildMirrorGeometry (cyclomatic 22) src/terrain.js:389 — terrain.createTerrain.buildMirrorGeometry 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, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · light-profile.resolveIesProfile (cyclomatic 22) · ×1
  • light-profile.resolveIesProfile (cyclomatic 22) src/light-profile.js:33 — light-profile.resolveIesProfile has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · motion.createMotionScene (cyclomatic 22) · ×1
  • motion.createMotionScene (cyclomatic 22) src/motion.js:27 — motion.createMotionScene has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · surface.patchGeometry (cyclomatic 22) · ×1
  • surface.patchGeometry (cyclomatic 22) src/surface.js:114 — surface.patchGeometry has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dispose (cyclomatic 22) · ×1
  • dispose (cyclomatic 22) src/renderer.js:2917 — dispose has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveDriveOptions (cyclomatic 22) · ×1
  • resolveDriveOptions (cyclomatic 22) src/vehicle.js:891 — resolveDriveOptions has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizeEvent (cyclomatic 22) · ×1
  • normalizeEvent (cyclomatic 22) src/agent-physics.js:240 — normalizeEvent has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createTerrain.buildMirrorGeometry (cyclomatic 22) · ×1
  • createTerrain.buildMirrorGeometry (cyclomatic 22) src/terrain.js:389 — createTerrain.buildMirrorGeometry has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selectBlendedLevels (cyclomatic 22) · ×1
  • selectBlendedLevels (cyclomatic 22) src/vegetation-impostors.js:389 — selectBlendedLevels has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · expandInstancedNodes (cyclomatic 22) · ×1
  • expandInstancedNodes (cyclomatic 22) src/mesh-instances.js:324 — expandInstancedNodes has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-uv.solveLeastSquares (cyclomatic 21) · ×1
  • mesh-uv.solveLeastSquares (cyclomatic 21) src/mesh-uv.js:275 — mesh-uv.solveLeastSquares has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · node-constraints.normalizeDriver (cyclomatic 21) · ×1
  • node-constraints.normalizeDriver (cyclomatic 21) src/node-constraints.js:301 — node-constraints.normalizeDriver has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-motion.checkLookTarget (cyclomatic 21) · ×1
  • agent-motion.checkLookTarget (cyclomatic 21) src/agent-motion.js:153 — agent-motion.checkLookTarget has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · material-graph.compileNode (cyclomatic 21) · ×1
  • material-graph.compileNode (cyclomatic 21) src/material-graph.js:616 — material-graph.compileNode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · agent-scene-assets.normalizeMaterialOverride (cyclomatic 21) · ×1
  • agent-scene-assets.normalizeMaterialOverride (cyclomatic 21) src/agent-scene-assets.js:57 — agent-scene-assets.normalizeMaterialOverride has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-crowd.normalizeCrowd (cyclomatic 21) · ×1
  • agent-crowd.normalizeCrowd (cyclomatic 21) src/agent-crowd.js:46 — agent-crowd.normalizeCrowd has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createCamera (cyclomatic 21) · ×1
  • createCamera (cyclomatic 21) src/path-tracer.js:155 — createCamera has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createMeshQueryIndex (cyclomatic 21) · ×1
  • createMeshQueryIndex (cyclomatic 21) src/mesh-query.js:537 — createMeshQueryIndex has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · normalizeAgentBake (cyclomatic 21) · ×1
  • normalizeAgentBake (cyclomatic 21) src/agent-bake.js:21 — normalizeAgentBake has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveSettings (cyclomatic 21) · ×1
  • resolveSettings (cyclomatic 21) src/clutter.js:279 — resolveSettings has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · setSceneUniforms (cyclomatic 21) · ×1
  • setSceneUniforms (cyclomatic 21) src/path-tracer-gpu.js:124 — setSceneUniforms has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · checkClips (cyclomatic 21) · ×1
  • checkClips (cyclomatic 21) src/game-animation.js:63 — checkClips has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseHeader (cyclomatic 21) · ×1
  • parseHeader (cyclomatic 21) src/gaussian-splat-ply.js:50 — parseHeader has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resolveFlush (cyclomatic 21) · ×1
  • resolveFlush (cyclomatic 21) src/flush-resolve.js:197 — resolveFlush has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-query.validateGeometry (cyclomatic 20) · ×1
  • mesh-query.validateGeometry (cyclomatic 20) src/mesh-query.js:123 — mesh-query.validateGeometry has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MeshBuilder.build (cyclomatic 20) · ×1
  • MeshBuilder.build (cyclomatic 20) src/mesh-stack.js:81 — MeshBuilder.build has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-dissolve.selectVertices (cyclomatic 20) · ×1
  • mesh-dissolve.selectVertices (cyclomatic 20) src/mesh-dissolve.js:221 — mesh-dissolve.selectVertices has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · mesh-instances.curvePoints (cyclomatic 20) · ×1
  • mesh-instances.curvePoints (cyclomatic 20) src/mesh-instances.js:203 — mesh-instances.curvePoints has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · physics.jointMotor (cyclomatic 20) · ×1
  • physics.jointMotor (cyclomatic 20) src/physics.js:163 — physics.jointMotor 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.
D1 · Cyclomatic Complexity · probe-trace.traceProbeMaps (cyclomatic 20) · ×1
  • probe-trace.traceProbeMaps (cyclomatic 20) src/probe-trace.js:46 — probe-trace.traceProbeMaps has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · vegetation.poissonDiskPoints (cyclomatic 20) · ×1
  • vegetation.poissonDiskPoints (cyclomatic 20) src/vegetation.js:648 — vegetation.poissonDiskPoints has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (isFree). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · view-transform.parseCube (cyclomatic 20) · ×1
  • view-transform.parseCube (cyclomatic 20) src/view-transform.js:109 — view-transform.parseCube 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.
D1 · Cyclomatic Complexity · scene-query.keepClear (cyclomatic 20) · ×1
  • scene-query.keepClear (cyclomatic 20) src/scene-query.js:370 — scene-query.keepClear has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · film.sampleFilm (cyclomatic 20) · ×1
  • film.sampleFilm (cyclomatic 20) src/film.js:984 — film.sampleFilm 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.
D1 · Cyclomatic Complexity · spume.buildSprayGeometry (cyclomatic 20) · ×1
  • spume.buildSprayGeometry (cyclomatic 20) src/spume.js:226 — spume.buildSprayGeometry has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateMaterialMaps (cyclomatic 20) · ×1
  • validateMaterialMaps (cyclomatic 20) src/renderer.js:192 — validateMaterialMaps has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createMeshPairQuery (cyclomatic 20) · ×1
  • createMeshPairQuery (cyclomatic 20) src/mesh-query.js:594 — createMeshPairQuery has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (evaluate, a function literal at line 615). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · normalizeEmitterSystem (cyclomatic 20) · ×1
  • normalizeEmitterSystem (cyclomatic 20) src/agent-particles.js:168 — normalizeEmitterSystem 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.
D1 · Cyclomatic Complexity · createCrowd (cyclomatic 20) · ×1
  • createCrowd (cyclomatic 20) src/retarget.js:490 — createCrowd has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validateGeometry (cyclomatic 20) · ×1
  • validateGeometry (cyclomatic 20) src/surface-attachment.js:49 — validateGeometry has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · validateOptions (cyclomatic 20) · ×1
  • validateOptions (cyclomatic 20) src/runtime.js:75 — validateOptions 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.
D1 · Cyclomatic Complexity · checkParts (cyclomatic 20) · ×1
  • checkParts (cyclomatic 20) src/export-mesh.js:48 — checkParts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-fields.compileAttribute (cyclomatic 19) · ×1
  • mesh-fields.compileAttribute (cyclomatic 19) src/mesh-fields.js:186 — mesh-fields.compileAttribute has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mesh-boolean.polygonsFromTriangles (cyclomatic 19) · ×1
  • mesh-boolean.polygonsFromTriangles (cyclomatic 19) src/mesh-boolean.js:98 — mesh-boolean.polygonsFromTriangles has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-uv.conformalMap (cyclomatic 19) · ×1
  • mesh-uv.conformalMap (cyclomatic 19) src/mesh-uv.js:342 — mesh-uv.conformalMap has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-uv.unwrapUv (cyclomatic 19) · ×1
  • mesh-uv.unwrapUv (cyclomatic 19) src/mesh-uv.js:624 — mesh-uv.unwrapUv has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-instance-placement.checkedPlace (cyclomatic 19) · ×1
  • mesh-instance-placement.checkedPlace (cyclomatic 19) src/mesh-instance-placement.js:32 — mesh-instance-placement.checkedPlace 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.
D1 · Cyclomatic Complexity · text-geometry.text (cyclomatic 19) · ×1
  • text-geometry.text (cyclomatic 19) src/text-geometry.js:198 — text-geometry.text has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · animation.normalizedValue (cyclomatic 19) · ×1
  • animation.normalizedValue (cyclomatic 19) src/animation.js:31 — animation.normalizedValue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · skinning.validateSkinGeometry (cyclomatic 19) · ×1
  • skinning.validateSkinGeometry (cyclomatic 19) src/skinning.js:125 — skinning.validateSkinGeometry has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · path-tracer-volume.createLocalVolumeCrossing (cyclomatic 19) · ×1
  • path-tracer-volume.createLocalVolumeCrossing (cyclomatic 19) src/path-tracer-volume.js:225 — path-tracer-volume.createLocalVolumeCrossing has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function items inside it that branch (addScatteredLight, crossGridStep, writeSkyLight, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · agent-scene.cameraFrom (cyclomatic 19) · ×1
  • agent-scene.cameraFrom (cyclomatic 19) REDACTED:479 — agent-scene.cameraFrom has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · budget.planRenderSize (cyclomatic 19) · ×1
  • budget.planRenderSize (cyclomatic 19) src/budget.js:48 — budget.planRenderSize has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gltf.parseGltf · ×1
  • gltf.parseGltf::preparePose (cyclomatic 19) src/gltf.js:1530 — gltf.parseGltf::preparePose has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scene_export.collect_parts (cyclomatic 19) · ×1
  • scene_export.collect_parts (cyclomatic 19) packages/blender-addon/cook_blender/scene_export.py:392 — scene_export.collect_parts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extrude (cyclomatic 19) · ×1
  • extrude (cyclomatic 19) src/modeling.js:247 — extrude has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · describeIsland (cyclomatic 19) · ×1
  • describeIsland (cyclomatic 19) src/mesh-uv.js:64 — describeIsland has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · traceOnWebGpu (cyclomatic 19) · ×1
  • traceOnWebGpu (cyclomatic 19) src/path-tracer-webgpu.js:294 — traceOnWebGpu has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · forEachCandidatePair (cyclomatic 19) · ×1
  • forEachCandidatePair (cyclomatic 19) src/coplanar-overlap.js:335 — forEachCandidatePair has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · splitRegion (cyclomatic 19) · ×1
  • splitRegion (cyclomatic 19) src/mesh-ops.js:103 — splitRegion has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · traceIrradianceGrid (cyclomatic 19) · ×1
  • traceIrradianceGrid (cyclomatic 19) src/irradiance-grid.js:238 — traceIrradianceGrid has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateDefinition (cyclomatic 19) · ×1
  • validateDefinition (cyclomatic 19) src/streaming.js:156 — validateDefinition has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createStreaming (cyclomatic 19) · ×1
  • createStreaming (cyclomatic 19) src/streaming.js:190 — createStreaming has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · openTopic (cyclomatic 19) · ×1
  • openTopic (cyclomatic 19) REDACTED:360 — openTopic has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · sampleLitSurfaces (cyclomatic 19) · ×1
  • sampleLitSurfaces (cyclomatic 19) src/sun-bounce.js:55 — sampleLitSurfaces has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (drawSamples, a function literal at line 60, corner, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exportObj (cyclomatic 19) · ×1
  • exportObj (cyclomatic 19) src/export-mesh.js:186 — exportObj has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 198, 226). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mesh-query.computeMatrixState (cyclomatic 18) · ×1
  • mesh-query.computeMatrixState (cyclomatic 18) src/mesh-query.js:335 — mesh-query.computeMatrixState has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mesh-generator-modifiers.wireframeMesh (cyclomatic 18) · ×1
  • mesh-generator-modifiers.wireframeMesh (cyclomatic 18) src/mesh-generator-modifiers.js:94 — mesh-generator-modifiers.wireframeMesh has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · agent-drive-schema.normalizeLights (cyclomatic 18) · ×1
  • agent-drive-schema.normalizeLights (cyclomatic 18) src/agent-drive-schema.js:71 — agent-drive-schema.normalizeLights has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · volume-grid.decodeVolumeGrid (cyclomatic 18) · ×1
  • volume-grid.decodeVolumeGrid (cyclomatic 18) src/volume-grid.js:147 — volume-grid.decodeVolumeGrid 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · film-timeline.normalizeFilmTimeline.shots (cyclomatic 18) · ×1
  • film-timeline.normalizeFilmTimeline.shots (cyclomatic 18) src/film-timeline.js:55 — film-timeline.normalizeFilmTimeline.shots has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · world-material-shader.bindWaterBody (cyclomatic 18) · ×1
  • world-material-shader.bindWaterBody (cyclomatic 18) src/world-material-shader.js:123 — world-material-shader.bindWaterBody 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · navmesh.createNavmesh.searchCells (cyclomatic 18) · ×1
  • navmesh.createNavmesh.searchCells (cyclomatic 18) src/navmesh.js:257 — navmesh.createNavmesh.searchCells has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent-asset-mesh.normalizeMeshEditEntries (cyclomatic 18) · ×1
  • agent-asset-mesh.normalizeMeshEditEntries (cyclomatic 18) src/agent-asset-mesh.js:20 — agent-asset-mesh.normalizeMeshEditEntries 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.
D1 · Cyclomatic Complexity · path-tracer-scene.validateGeometry (cyclomatic 18) · ×1
  • path-tracer-scene.validateGeometry (cyclomatic 18) src/path-tracer-scene.js:242 — path-tracer-scene.validateGeometry has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · animation-mixer.finishProperty (cyclomatic 18) · ×1
  • animation-mixer.finishProperty (cyclomatic 18) src/animation-mixer.js:129 — animation-mixer.finishProperty has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · film.createScientistHeadMesh (cyclomatic 18) · ×1
  • film.createScientistHeadMesh (cyclomatic 18) src/film.js:113 — film.createScientistHeadMesh has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 130, 123). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · stagePose (cyclomatic 18) · ×1
  • stagePose (cyclomatic 18) REDACTED:1283 — stagePose 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.
D1 · Cyclomatic Complexity · createIkEvaluator (cyclomatic 18) · ×1
  • createIkEvaluator (cyclomatic 18) src/agent-motion.js:688 — createIkEvaluator has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 701, a function literal at line 739, a function literal at line 740, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · addScientist (cyclomatic 18) · ×1
  • addScientist (cyclomatic 18) src/film.js:435 — addScientist has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (shape, transform, a function literal at line 453). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · animateSet (cyclomatic 18) · ×1
  • animateSet (cyclomatic 18) src/film.js:780 — animateSet has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 798, a function literal at line 783, a function literal at line 788, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createClient.receiveMessage (cyclomatic 18) · ×1
  • createClient.receiveMessage (cyclomatic 18) src/netcode.js:653 — createClient.receiveMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createCameraClip (cyclomatic 18) · ×1
  • createCameraClip (cyclomatic 18) src/player.js:456 — createCameraClip has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (freeFraction, clipEye, groundHeight, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · compileBrick (cyclomatic 18) · ×1
  • compileBrick (cyclomatic 18) src/material-graph.js:480 — compileBrick has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · trimFrom (cyclomatic 18) · ×1
  • trimFrom (cyclomatic 18) src/modeling.js:281 — trimFrom has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · planCurveSet (cyclomatic 18) · ×1
  • planCurveSet (cyclomatic 18) src/modeling.js:414 — planCurveSet has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createParameterTemplate (cyclomatic 18) · ×1
  • createParameterTemplate (cyclomatic 18) src/path-tracer-webgpu.js:182 — createParameterTemplate has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizeScatter (cyclomatic 18) · ×1
  • normalizeScatter (cyclomatic 18) src/agent-vegetation.js:67 — normalizeScatter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createNavmesh.searchCells (cyclomatic 18) · ×1
  • createNavmesh.searchCells (cyclomatic 18) src/navmesh.js:257 — createNavmesh.searchCells has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · checkAssetClips (cyclomatic 18) · ×1
  • checkAssetClips (cyclomatic 18) src/game-animation.js:102 — checkAssetClips has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · writeRule (cyclomatic 18) · ×1
  • writeRule (cyclomatic 18) src/splat.js:129 — writeRule has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mesh-data.validateExplicitEdges (cyclomatic 17) · ×1
  • mesh-data.validateExplicitEdges (cyclomatic 17) src/mesh-data.js:63 — mesh-data.validateExplicitEdges has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-loopcut.loopCut (cyclomatic 17) · ×1
  • mesh-loopcut.loopCut (cyclomatic 17) src/mesh-loopcut.js:74 — mesh-loopcut.loopCut has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · mesh-shape-keys.normalizeShapeKeys (cyclomatic 17) · ×1
  • mesh-shape-keys.normalizeShapeKeys (cyclomatic 17) src/mesh-shape-keys.js:32 — mesh-shape-keys.normalizeShapeKeys 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 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · animation-modifiers.remapTime (cyclomatic 17) · ×1
  • animation-modifiers.remapTime (cyclomatic 17) src/animation-modifiers.js:141 — animation-modifiers.remapTime has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · local-volume-grid.resolveGridVolume (cyclomatic 17) · ×1
  • local-volume-grid.resolveGridVolume (cyclomatic 17) src/local-volume-grid.js:20 — local-volume-grid.resolveGridVolume has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · irradiance-grid.smoothNodes (cyclomatic 17) · ×1
  • irradiance-grid.smoothNodes (cyclomatic 17) src/irradiance-grid.js:181 — irradiance-grid.smoothNodes has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · agent-relations.normalizeRelations (cyclomatic 17) · ×1
  • agent-relations.normalizeRelations (cyclomatic 17) src/agent-relations.js:170 — agent-relations.normalizeRelations has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 198). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · subsurface-limits.validateSubsurface (cyclomatic 17) · ×1
  • subsurface-limits.validateSubsurface (cyclomatic 17) src/subsurface-limits.js:23 — subsurface-limits.validateSubsurface has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flush-clip.clipGeometry (cyclomatic 17) · ×1
  • flush-clip.clipGeometry (cyclomatic 17) src/flush-clip.js:353 — flush-clip.clipGeometry has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · coplanar-overlap.pairOverlap (cyclomatic 17) · ×1
  • coplanar-overlap.pairOverlap (cyclomatic 17) src/coplanar-overlap.js:265 — coplanar-overlap.pairOverlap has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · renderer.validateReplacementGeometry (cyclomatic 17) · ×1
  • renderer.validateReplacementGeometry (cyclomatic 17) src/renderer.js:666 — renderer.validateReplacementGeometry has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gaussian-splat-spz.inflateSpz (cyclomatic 17) · ×1
  • gaussian-splat-spz.inflateSpz (cyclomatic 17) src/gaussian-splat-spz.js:74 — gaussian-splat-spz.inflateSpz has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.importGeometry (cyclomatic 17) · ×1
  • index.importGeometry (cyclomatic 17) packages/three-bridge/index.mjs:139 — index.importGeometry has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · netcode.readWireEntityDelta (cyclomatic 17) · ×1
  • netcode.readWireEntityDelta (cyclomatic 17) src/netcode.js:260 — netcode.readWireEntityDelta has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · netcode.createClient.receiveMessage (cyclomatic 17) · ×1
  • netcode.createClient.receiveMessage (cyclomatic 17) src/netcode.js:653 — netcode.createClient.receiveMessage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · film.addRoom (cyclomatic 17) · ×1
  • film.addRoom (cyclomatic 17) src/film.js:506 — film.addRoom has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · materialMapState (cyclomatic 17) · ×1
  • materialMapState (cyclomatic 17) src/renderer.js:225 — materialMapState 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createFlightController (cyclomatic 17) · ×1
  • createFlightController (cyclomatic 17) src/player.js:694 — createFlightController has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (writeNode, advance, updateSpeed, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · normalizeAgentPhysics (cyclomatic 17) · ×1
  • normalizeAgentPhysics (cyclomatic 17) src/agent-physics.js:327 — normalizeAgentPhysics has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · prepareExtras (cyclomatic 17) · ×1
  • prepareExtras (cyclomatic 17) src/cloth.js:471 — prepareExtras has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createThreeCompat · ×1
  • createThreeCompat::constructor (cyclomatic 17) packages/three-compat/index.mjs:396 — createThreeCompat::constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · packWebGpuLocalVolumes (cyclomatic 17) · ×1
  • packWebGpuLocalVolumes (cyclomatic 17) src/path-tracer-webgpu-local-volumes.js:55 — packWebGpuLocalVolumes 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 6 function literals inside it that branch (lines 61, 57, 65, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · importMesh (cyclomatic 17) · ×1
  • importMesh (cyclomatic 17) packages/three-bridge/index.mjs:271 — importMesh has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createSceneQuery · ×1
  • createSceneQuery::raycast (cyclomatic 17) src/scene-query.js:216 — createSceneQuery::raycast has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · writeMaterial (cyclomatic 17) · ×1
  • writeMaterial (cyclomatic 17) src/export.js:181 — writeMaterial has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · compileNode (cyclomatic 17) · ×1
  • compileNode (cyclomatic 17) src/modeling-sdf.js:187 — compileNode has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · comparatorBounds (cyclomatic 17) · ×1
  • comparatorBounds (cyclomatic 17) REDACTED:87 — comparatorBounds has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transferVertexAttributes (cyclomatic 17) · ×1
  • transferVertexAttributes (cyclomatic 17) src/mesh-import.js:191 — transferVertexAttributes has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateLayer (cyclomatic 17) · ×1
  • validateLayer (cyclomatic 17) src/splat.js:43 — validateLayer has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-data.createMeshData (cyclomatic 16) · ×1
  • mesh-data.createMeshData (cyclomatic 16) src/mesh-data.js:129 — mesh-data.createMeshData has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mesh-normals.cornerNormals (cyclomatic 16) · ×1
  • mesh-normals.cornerNormals (cyclomatic 16) src/mesh-normals.js:66 — mesh-normals.cornerNormals has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · triangle-math.closestPointOnTriangle (cyclomatic 16) · ×1
  • triangle-math.closestPointOnTriangle (cyclomatic 16) src/triangle-math.js:38 — triangle-math.closestPointOnTriangle has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mesh-bisect.bisectPlane (cyclomatic 16) · ×1
  • mesh-bisect.bisectPlane (cyclomatic 16) src/mesh-bisect.js:179 — mesh-bisect.bisectPlane has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-reshape-more.selectedLoops (cyclomatic 16) · ×1
  • mesh-reshape-more.selectedLoops (cyclomatic 16) src/mesh-reshape-more.js:143 — mesh-reshape-more.selectedLoops has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mesh-instances.checkedSpec (cyclomatic 16) · ×1
  • mesh-instances.checkedSpec (cyclomatic 16) src/mesh-instances.js:292 — mesh-instances.checkedSpec has cyclomatic complexity 16 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mesh-validate.checkFaces (cyclomatic 16) · ×1
  • mesh-validate.checkFaces (cyclomatic 16) src/mesh-validate.js:63 — mesh-validate.checkFaces has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · physics.initialJointCoordinate (cyclomatic 16) · ×1
  • physics.initialJointCoordinate (cyclomatic 16) src/physics.js:184 — physics.initialJointCoordinate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · physics.recordedScene · ×1
  • physics.recordedScene::sample (cyclomatic 16) src/physics.js:1050 — physics.recordedScene::sample has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · light-bake.unwrapIntoSecondUvSet (cyclomatic 16) · ×1
  • light-bake.unwrapIntoSecondUvSet (cyclomatic 16) src/light-bake.js:616 — light-bake.unwrapIntoSecondUvSet has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · light-bake.smoothTexels (cyclomatic 16) · ×1
  • light-bake.smoothTexels (cyclomatic 16) src/light-bake.js:785 — light-bake.smoothTexels has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fog-shader.uploadGridTexture (cyclomatic 16) · ×1
  • fog-shader.uploadGridTexture (cyclomatic 16) src/fog-shader.js:264 — fog-shader.uploadGridTexture has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · terrain.validateOptions (cyclomatic 16) · ×1
  • terrain.validateOptions (cyclomatic 16) src/terrain.js:158 — terrain.validateOptions has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · agent-texture-sequence.sequenceFrameIds · ×1
  • agent-texture-sequence.sequenceFrameIds::visit (cyclomatic 16) src/agent-texture-sequence.js:73 — agent-texture-sequence.sequenceFrameIds::visit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · vegetation-impostors.drawFrame (cyclomatic 16) · ×1
  • vegetation-impostors.drawFrame (cyclomatic 16) src/vegetation-impostors.js:80 — vegetation-impostors.drawFrame has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · vegetation-impostors.bleedColors (cyclomatic 16) · ×1
  • vegetation-impostors.bleedColors (cyclomatic 16) src/vegetation-impostors.js:194 — vegetation-impostors.bleedColors has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · crowd-skinning.createCrowdRig (cyclomatic 16) · ×1
  • crowd-skinning.createCrowdRig (cyclomatic 16) src/crowd-skinning.js:50 — crowd-skinning.createCrowdRig has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · morph.geometryMetadata (cyclomatic 16) · ×1
  • morph.geometryMetadata (cyclomatic 16) src/morph.js:47 — morph.geometryMetadata has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · compressed-texture.describeCompressedImage (cyclomatic 16) · ×1
  • compressed-texture.describeCompressedImage (cyclomatic 16) src/compressed-texture.js:48 — compressed-texture.describeCompressedImage has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · reversed-depth.installReversedDepth (cyclomatic 16) · ×1
  • reversed-depth.installReversedDepth (cyclomatic 16) src/reversed-depth.js:166 — reversed-depth.installReversedDepth has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (enable, endReversed, useCameraRelativeProgram, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · surface.candidateIndices (cyclomatic 16) · ×1
  • surface.candidateIndices (cyclomatic 16) src/surface.js:76 — surface.candidateIndices has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validateTransform (cyclomatic 16) · ×1
  • validateTransform (cyclomatic 16) src/renderer.js:325 — validateTransform has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · applyAlphaState (cyclomatic 16) · ×1
  • applyAlphaState (cyclomatic 16) src/renderer.js:2464 — applyAlphaState has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · skipReason (cyclomatic 16) · ×1
  • skipReason (cyclomatic 16) src/light-bake.js:200 — skipReason has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveMaterial (cyclomatic 16) · ×1
  • resolveMaterial (cyclomatic 16) src/path-tracer-scene.js:201 — resolveMaterial has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · buildGame · ×1
  • buildGame::update (cyclomatic 16) src/game.js:302 — buildGame::update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · trimSamples (cyclomatic 16) · ×1
  • trimSamples (cyclomatic 16) src/modeling-splines.js:239 — trimSamples has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizeTrackEffects (cyclomatic 16) · ×1
  • normalizeTrackEffects (cyclomatic 16) src/animation-modifiers.js:113 — normalizeTrackEffects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resolvePhysicalSky (cyclomatic 16) · ×1
  • resolvePhysicalSky (cyclomatic 16) src/physical-sky.js:50 — resolvePhysicalSky has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createAnimationMixer · ×1
  • createAnimationMixer::apply (cyclomatic 16) src/animation-mixer.js:252 — createAnimationMixer::apply 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.
D10 · Test Quality · Fixed-sleep synchronisation · ×1
  • Fixed-sleep synchronisation: a look that arrives while a render job waits on a first-come queue joins the job once it is granted, with one grant tests/agent-gpu-queue.test.js:199 — This test starts work it did not wait for (`blocker`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 5))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D2 · Cognitive Complexity · validateDocument (cognitive 289) · ×1
  • validateDocument (cognitive 289) src/gltf.js:339 — validateDocument has cognitive complexity 289 (threshold 15). Drivers by points: if/else 53 (156 pts), boolean chains 56, other 35, loops 18 (34 pts), ternaries 3 (8 pts) (nesting depth added 124). Of this number, 285 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeMeshEdits (cognitive 237) · ×1
  • normalizeMeshEdits (cognitive 237) src/mesh-recipe.js:119 — normalizeMeshEdits has cognitive complexity 237 (threshold 15). Drivers by points: if/else 58 (116 pts), boolean chains 42, other 37, ternaries 18 (37 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 79). Most of this is not in the body itself: 2 of the 237 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 122, 188, 200). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agent-scene.createAgentScene (cognitive 190) · ×1
  • agent-scene.createAgentScene (cognitive 190) REDACTED:1559 — agent-scene.createAgentScene has cognitive complexity 190 (threshold 15). Drivers by points: if/else 92 (149 pts), ternaries 64 (96 pts), boolean chains 48, loops 15 (25 pts), error handling 1 (nesting depth added 99). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-asset.createAgentAssetScene (cognitive 169) · ×1
  • agent-asset.createAgentAssetScene (cognitive 169) src/agent-asset.js:280 — agent-asset.createAgentAssetScene has cognitive complexity 169 (threshold 15). Drivers by points: if/else 107 (163 pts), ternaries 56 (97 pts), loops 32 (50 pts), boolean chains 43, error handling 1 (nesting depth added 115). To reduce it, split the body into named stages: move each independent 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-asset.createAgentAssetScene::normalize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · bevelEdges (cognitive 155) · ×1
  • bevelEdges (cognitive 155) src/mesh-bevel.js:171 — bevelEdges has cognitive complexity 155 (threshold 15). Drivers by points: if/else 39 (78 pts), loops 29 (48 pts), ternaries 7 (16 pts), boolean chains 11, other 2 (nesting depth added 67). Of this number, 128 points are the body's own statements and 27 belong to 17 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare (cognitive 154) · ×1
  • prepare (cognitive 154) src/physics.js:281 — prepare has cognitive complexity 154 (threshold 15). Drivers by points: if/else 52 (66 pts), boolean chains 34, other 26, ternaries 12 (16 pts), loops 8 (12 pts) (nesting depth added 22). Of this number, 35 points are the body's own statements and 119 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · agent-motion.compileAgentMotion (cognitive 137) · ×1
  • agent-motion.compileAgentMotion (cognitive 137) src/agent-motion.js:895 — agent-motion.compileAgentMotion has cognitive complexity 137 (threshold 15). Drivers by points: if/else 39 (66 pts), loops 31 (46 pts), boolean chains 14, ternaries 8 (11 pts) (nesting depth added 45). Of this number, 115 points are the body's own statements and 22 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateParts (cognitive 117) · ×1
  • updateParts (cognitive 117) src/renderer.js:1582 — updateParts has cognitive complexity 117 (threshold 15). Drivers by points: if/else 33 (70 pts), boolean chains 21, other 15, loops 8 (11 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 104) · ×1
  • constructor (cognitive 104) src/renderer.js:709 — constructor has cognitive complexity 104 (threshold 15). Drivers by points: if/else 32 (52 pts), boolean chains 27, ternaries 10 (12 pts), loops 7 (9 pts), other 4 (nesting depth added 24). Of this number, 103 points are the body's own statements and 1 belongs to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSolver.project (cognitive 101) · ×1
  • createSolver.project (cognitive 101) src/gas-sim.js:413 — createSolver.project has cognitive complexity 101 (threshold 15). Drivers by points: ternaries 18 (78 pts), loops 11 (23 pts) (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-select.selectFaces · ×1
  • mesh-select.selectFaces::evaluate (cognitive 100) src/mesh-select.js:64 — mesh-select.selectFaces::evaluate has cognitive complexity 100 (threshold 15). Drivers by points: if/else 26 (57 pts), loops 12 (29 pts), boolean chains 13, match/switch 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeAgentMotion (cognitive 91) · ×1
  • normalizeAgentMotion (cognitive 91) src/agent-motion.js:506 — normalizeAgentMotion has cognitive complexity 91 (threshold 15). Drivers by points: if/else 29 (36 pts), ternaries 16 (31 pts), other 12, boolean chains 10, loops 1 (2 pts) (nesting depth added 23). Of this number, 39 points are the body's own statements and 52 belong to 16 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometryEstimate (cognitive 86) · ×1
  • geometryEstimate (cognitive 86) REDACTED:552 — geometryEstimate has cognitive complexity 86 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 11 (25 pts), boolean chains 13, other 9, loops 4 (6 pts), match/switch 1 (nesting depth added 32). Of this number, 80 points are the body's own statements and 6 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runEdit (cognitive 86) · ×1
  • runEdit (cognitive 86) src/mesh-recipe.js:418 — runEdit has cognitive complexity 86 (threshold 15). Drivers by points: if/else 28 (38 pts), error handling 15 (29 pts), ternaries 6 (12 pts), boolean chains 5, match/switch 1, other 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.
D2 · Cognitive Complexity · createLocalVolumeCrossing · ×1
  • createLocalVolumeCrossing::crossLocalVolumes (cognitive 79) src/path-tracer-volume.js:320 — createLocalVolumeCrossing::crossLocalVolumes has cognitive complexity 79 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 8 (18 pts), ternaries 3 (11 pts), boolean chains 4 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · physics.bakePrepared (cognitive 76) · ×1
  • physics.bakePrepared (cognitive 76) src/physics.js:937 — physics.bakePrepared has cognitive complexity 76 (threshold 15). Drivers by points: if/else 17 (60 pts), loops 4 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 50). Of this number, 69 points are the body's own statements and 7 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.
D2 · Cognitive Complexity · createSurfaceAttachment · ×1
  • createSurfaceAttachment::update (cognitive 76) src/surface-attachment.js:164 — createSurfaceAttachment::update has cognitive complexity 76 (threshold 15). Drivers by points: loops 16 (39 pts), if/else 14 (23 pts), boolean chains 11, other 3 (nesting depth added 32). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · model.createModel (cognitive 73) · ×1
  • model.createModel (cognitive 73) src/model.js:24 — model.createModel has cognitive complexity 73 (threshold 15). Drivers by points: loops 32 (50 pts), ternaries 13 (22 pts), if/else 1 (nesting depth added 27). Of this number, 64 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · render (cognitive 73) · ×1
  • render (cognitive 73) src/renderer.js:2720 — render has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 18, other 14, ternaries 11 (14 pts), loops 1 (nesting depth added 9). Of this number, 72 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes (cognitive 72) · ×1
  • path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes (cognitive 72) src/path-tracer-volume.js:320 — path-tracer-volume.createLocalVolumeCrossing.crossLocalVolumes has cognitive complexity 72 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 8 (18 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createPathTracer.trace (cognitive 72) · ×1
  • createPathTracer.trace (cognitive 72) src/path-tracer.js:915 — createPathTracer.trace has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (49 pts), ternaries 5 (12 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · gas-sim.createSolver.project (cognitive 71) · ×1
  • gas-sim.createSolver.project (cognitive 71) src/gas-sim.js:413 — gas-sim.createSolver.project has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 12 (48 pts), loops 11 (23 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer.createPathTracer.trace (cognitive 71) · ×1
  • path-tracer.createPathTracer.trace (cognitive 71) src/path-tracer.js:915 — path-tracer.createPathTracer.trace has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (49 pts), ternaries 4 (11 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · createPhysicsSystem (cognitive 68) · ×1
  • createPhysicsSystem (cognitive 68) src/physics-runtime.js:196 — createPhysicsSystem has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (32 pts), loops 9 (13 pts), boolean chains 9, ternaries 7, other 6, error handling 1 (nesting depth added 11). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 38 function items inside it that branch (assertPosesSound, fixedUpdate, setKinematicPose, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · normalizeExtraConstraint (cognitive 64) · ×1
  • normalizeExtraConstraint (cognitive 64) src/node-constraints.js:181 — normalizeExtraConstraint has cognitive complexity 64 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 11 (23 pts), boolean chains 6, loops 2 (4 pts), other 3, match/switch 1 (nesting depth added 28). Of this number, 58 points are the body's own statements and 6 belong to 3 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · selectEdges (cognitive 64) · ×1
  • selectEdges (cognitive 64) src/mesh-bevel.js:29 — selectEdges has cognitive complexity 64 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 12, loops 5 (10 pts), ternaries 1 (3 pts), other 1 (nesting depth added 25). Of this number, 63 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildParticleMesh (cognitive 64) · ×1
  • buildParticleMesh (cognitive 64) src/particles.js:449 — buildParticleMesh has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 10 (27 pts), if/else 11 (23 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 35). Of this number, 63 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · replaceParts (cognitive 62) · ×1
  • replaceParts (cognitive 62) src/renderer.js:1408 — replaceParts has cognitive complexity 62 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 11 (17 pts), boolean chains 13, ternaries 3, other 2, error handling 1 (nesting depth added 17). Of this number, 51 points are the body's own statements and 11 belong to 14 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createNatureWorld (cognitive 62) · ×1
  • createNatureWorld (cognitive 62) src/nature.js:216 — createNatureWorld has cognitive complexity 62 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 12 (18 pts), ternaries 9 (15 pts), boolean chains 5 (nesting depth added 23). Of this number, 47 points are the body's own statements and 15 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawBatch (cognitive 61) · ×1
  • drawBatch (cognitive 61) src/renderer.js:2622 — drawBatch has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 14 (31 pts), if/else 15 (20 pts), boolean chains 5, other 3, loops 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · light-bake.smoothTexels (cognitive 60) · ×1
  • light-bake.smoothTexels (cognitive 60) src/light-bake.js:785 — light-bake.smoothTexels has cognitive complexity 60 (threshold 15). Drivers by points: if/else 6 (33 pts), loops 7 (25 pts), boolean chains 2 (nesting depth added 45). Of this number, 50 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convertGeometry (cognitive 60) · ×1
  • convertGeometry (cognitive 60) src/gltf.js:893 — convertGeometry has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 6 (11 pts), ternaries 4 (11 pts), boolean chains 8, other 1 (nesting depth added 23). Of this number, 46 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateAnimationChannels (cognitive 57) · ×1
  • validateAnimationChannels (cognitive 57) src/gltf.js:168 — validateAnimationChannels has cognitive complexity 57 (threshold 15). Drivers by points: if/else 9 (27 pts), ternaries 5 (16 pts), boolean chains 8, loops 2 (3 pts), other 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · expandAssetPlacements (cognitive 56) · ×1
  • expandAssetPlacements (cognitive 56) src/agent-scene-assets.js:273 — expandAssetPlacements has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 8 (17 pts), boolean chains 7, loops 2 (3 pts), other 3 (nesting depth added 22). Of this number, 31 points are the body's own statements and 25 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeIkSolver (cognitive 55) · ×1
  • normalizeIkSolver (cognitive 55) src/agent-motion.js:306 — normalizeIkSolver has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (46 pts), ternaries 2 (5 pts), boolean chains 3, other 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.
D2 · Cognitive Complexity · nodeFrom (cognitive 54) · ×1
  • nodeFrom (cognitive 54) REDACTED:357 — nodeFrom has cognitive complexity 54 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 13, ternaries 2 (4 pts), other 3, loops 1 (nesting depth added 11). Of this number, 53 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createRuntime (cognitive 54) · ×1
  • createRuntime (cognitive 54) src/runtime.js:102 — createRuntime has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21, boolean chains 10, loops 7 (9 pts), ternaries 6, other 5, error handling 3 (nesting depth added 2). Most of this is not in the body itself: 6 of the 54 points are its own statements and the rest belongs to 37 function items inside it that branch (tick, runFixedSteps, advance, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · shrinkwrap.shrinkwrapGeometry (cognitive 53) · ×1
  • shrinkwrap.shrinkwrapGeometry (cognitive 53) src/shrinkwrap.js:89 — shrinkwrap.shrinkwrapGeometry has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 7 (9 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · describeIgnoredFeatures (cognitive 53) · ×1
  • describeIgnoredFeatures (cognitive 53) src/path-tracer.js:1043 — describeIgnoredFeatures has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 15, other 6, loops 3 (5 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.
D2 · Cognitive Complexity · createSolver (cognitive 53) · ×1
  • createSolver (cognitive 53) src/skeleton-pose.js:333 — createSolver has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 9, other 6, ternaries 4 (6 pts) (nesting depth added 15). Of this number, 51 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · createCloth.step (cognitive 52) · ×1
  • createCloth.step (cognitive 52) src/cloth.js:632 — createCloth.step has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (15 pts), boolean chains 4, other 2 (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.
D2 · Cognitive Complexity · coplanar-overlap.pairOverlap (cognitive 51) · ×1
  • coplanar-overlap.pairOverlap (cognitive 51) src/coplanar-overlap.js:265 — coplanar-overlap.pairOverlap has cognitive complexity 51 (threshold 15). Drivers by points: if/else 7 (32 pts), loops 5 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeRecipe (cognitive 51) · ×1
  • normalizeRecipe (cognitive 51) REDACTED:1036 — normalizeRecipe has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (31 pts), ternaries 7 (12 pts), boolean chains 4, loops 2, other 2 (nesting depth added 10). Of this number, 43 points are the body's own statements and 8 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · cloth.createCloth.step (cognitive 50) · ×1
  • cloth.createCloth.step (cognitive 50) src/cloth.js:632 — cloth.createCloth.step has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (15 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · CrucibleRenderer.bindGeometryAttributes (cognitive 50) · ×1
  • CrucibleRenderer.bindGeometryAttributes (cognitive 50) src/renderer.js:1206 — CrucibleRenderer.bindGeometryAttributes has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 5 (16 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-lint.meshTopologyMetrics (cognitive 49) · ×1
  • mesh-lint.meshTopologyMetrics (cognitive 49) src/mesh-lint.js:44 — mesh-lint.meshTopologyMetrics has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scene-graph.createSceneGraph (cognitive 48) · ×1
  • scene-graph.createSceneGraph (cognitive 48) src/scene-graph.js:77 — scene-graph.createSceneGraph has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 9 (12 pts), boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 11). Of this number, 21 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vegetation-impostors.drawFrame (cognitive 48) · ×1
  • vegetation-impostors.drawFrame (cognitive 48) src/vegetation-impostors.js:80 — vegetation-impostors.drawFrame has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (29 pts), loops 5 (12 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · game.buildGame (cognitive 48) · ×1
  • game.buildGame (cognitive 48) src/game.js:206 — game.buildGame has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 14 (18 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 10). Of this number, 46 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · shaderFeaturesOfParts (cognitive 48) · ×1
  • shaderFeaturesOfParts (cognitive 48) src/renderer.js:114 — shaderFeaturesOfParts has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 3 (5 pts), other 3, boolean chains 2 (nesting depth added 22). Of this number, 45 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileAgentMotion · ×1
  • compileAgentMotion::sample (cognitive 48) src/agent-motion.js:1080 — compileAgentMotion::sample has cognitive complexity 48 (threshold 15). Drivers by points: loops 14 (19 pts), if/else 13 (18 pts), ternaries 3 (5 pts), other 4, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-look.environmentFrom (cognitive 47) · ×1
  • agent-look.environmentFrom (cognitive 47) src/agent-look.js:269 — agent-look.environmentFrom has cognitive complexity 47 (threshold 15). Drivers by points: if/else 28 (36 pts), boolean chains 10, ternaries 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.
D2 · Cognitive Complexity · physicsDefinition (cognitive 47) · ×1
  • physicsDefinition (cognitive 47) src/agent-physics.js:491 — physicsDefinition has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 8 (18 pts), other 5, loops 2 (nesting depth added 19). Of this number, 35 points are the body's own statements and 12 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.
D2 · Cognitive Complexity · bakeMaterialGraph (cognitive 47) · ×1
  • bakeMaterialGraph (cognitive 47) src/material-graph.js:734 — bakeMaterialGraph has cognitive complexity 47 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 11 (17 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 24). Of this number, 46 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createTerrain.buildMirrorGeometry (cognitive 47) · ×1
  • createTerrain.buildMirrorGeometry (cognitive 47) src/terrain.js:389 — createTerrain.buildMirrorGeometry has cognitive complexity 47 (threshold 15). Drivers by points: loops 9 (21 pts), ternaries 4 (16 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 28). Of this number, 44 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-apply-report.describeOperation (cognitive 46) · ×1
  • agent-apply-report.describeOperation (cognitive 46) src/agent-apply-report.js:69 — agent-apply-report.describeOperation has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 8 (16 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exportGlb (cognitive 46) · ×1
  • exportGlb (cognitive 46) src/export.js:254 — exportGlb has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 10 (13 pts), loops 3 (4 pts), other 3, boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 15 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 309, geometryFor, a function literal at line 276, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.createThreeCompat (cognitive 45) · ×1
  • index.createThreeCompat (cognitive 45) packages/three-compat/index.mjs:320 — index.createThreeCompat has cognitive complexity 45 (threshold 15). Drivers by points: if/else 45 (52 pts), boolean chains 13, ternaries 9 (13 pts), loops 11 (12 pts) (nesting depth added 12). 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 (index.createThreeCompat::environmentFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · materialFrom (cognitive 45) · ×1
  • materialFrom (cognitive 45) REDACTED:278 — materialFrom has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 10, ternaries 5 (6 pts), loops 2, other 2 (nesting depth added 7). Of this number, 41 points are the body's own statements and 4 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.
D2 · Cognitive Complexity · applyFloorSkyVisibility (cognitive 45) · ×1
  • applyFloorSkyVisibility (cognitive 45) src/floor-sky-visibility.js:227 — applyFloorSkyVisibility has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (11 pts), boolean chains 7, ternaries 6 (7 pts), error handling 1, other 1 (nesting depth added 15). Of this number, 42 points are the body's own statements and 3 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createSurfaceAttachment (cognitive 45) · ×1
  • createSurfaceAttachment (cognitive 45) src/surface-attachment.js:89 — createSurfaceAttachment has cognitive complexity 45 (threshold 15). Drivers by points: loops 23 (51 pts), if/else 27 (41 pts), boolean chains 18, other 11 (nesting depth added 42). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · light-bake.dilate (cognitive 44) · ×1
  • light-bake.dilate (cognitive 44) src/light-bake.js:750 — light-bake.dilate has cognitive complexity 44 (threshold 15). Drivers by points: loops 7 (23 pts), if/else 4 (20 pts), boolean chains 1 (nesting depth added 32). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-query.topology (cognitive 43) · ×1
  • mesh-query.topology (cognitive 43) src/mesh-query.js:199 — mesh-query.topology has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 10 (16 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 21). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forEachCandidatePair (cognitive 42) · ×1
  • forEachCandidatePair (cognitive 42) src/coplanar-overlap.js:335 — forEachCandidatePair has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 5 (9 pts), boolean chains 4, other 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · expandInstancedNodes (cognitive 42) · ×1
  • expandInstancedNodes (cognitive 42) src/mesh-instances.js:324 — expandInstancedNodes has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (9 pts), boolean chains 6, ternaries 2 (6 pts), other 1 (nesting depth added 21). Of this number, 39 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · surface-nets.quadsAroundEdges (cognitive 41) · ×1
  • surface-nets.quadsAroundEdges (cognitive 41) src/surface-nets.js:57 — surface-nets.quadsAroundEdges has cognitive complexity 41 (threshold 15). Drivers by points: if/else 3 (15 pts), ternaries 3 (15 pts), loops 4 (10 pts), boolean chains 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.
D2 · Cognitive Complexity · agent-asset.createAgentAssetScene · ×1
  • agent-asset.createAgentAssetScene::normalize (cognitive 41) src/agent-asset.js:489 — agent-asset.createAgentAssetScene::normalize has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 10 (21 pts), if/else 9 (12 pts), boolean chains 8 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (agent-asset.createAgentAssetScene) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · createAnimationPlayer (cognitive 41) · ×1
  • createAnimationPlayer (cognitive 41) src/animation.js:246 — createAnimationPlayer has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (10 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · animation.sampleTrackInto (cognitive 40) · ×1
  • animation.sampleTrackInto (cognitive 40) src/animation.js:110 — animation.sampleTrackInto has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 11 (15 pts), loops 4 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · irradiance-grid.fillInvalidNodes (cognitive 40) · ×1
  • irradiance-grid.fillInvalidNodes (cognitive 40) src/irradiance-grid.js:131 — irradiance-grid.fillInvalidNodes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 6 (16 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gltf-lights.readPunctualLights (cognitive 40) · ×1
  • gltf-lights.readPunctualLights (cognitive 40) src/gltf-lights.js:42 — gltf-lights.readPunctualLights has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeBody (cognitive 40) · ×1
  • normalizeBody (cognitive 40) src/agent-physics.js:82 — normalizeBody has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25 (27 pts), boolean chains 6, ternaries 3 (4 pts), other 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createCloth (cognitive 40) · ×1
  • createCloth (cognitive 40) src/cloth.js:567 — createCloth has cognitive complexity 40 (threshold 15). Drivers by points: other 23, if/else 5 (7 pts), loops 4, ternaries 4, boolean chains 2 (nesting depth added 2). Of this number, 39 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · normalizeSheet (cognitive 40) · ×1
  • normalizeSheet (cognitive 40) src/agent-cloth.js:45 — normalizeSheet has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 4, ternaries 1 (2 pts), loops 1, other 1 (nesting depth added 13). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packLocalVolumes (cognitive 40) · ×1
  • packLocalVolumes (cognitive 40) src/local-volumes.js:42 — packLocalVolumes has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 9, if/else 7 (8 pts), other 6, loops 1 (nesting depth added 6). Most of this is not in the body itself: 6 of the 40 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 59, 58, 43, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · normalizeRelation (cognitive 40) · ×1
  • normalizeRelation (cognitive 40) src/agent-relations.js:53 — normalizeRelation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 3 (9 pts), boolean chains 8, other 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-boolean.polygonsFromTriangles (cognitive 39) · ×1
  • mesh-boolean.polygonsFromTriangles (cognitive 39) src/mesh-boolean.js:98 — mesh-boolean.polygonsFromTriangles has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 7 (14 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · npc-follower.createPathFollower (cognitive 39) · ×1
  • npc-follower.createPathFollower (cognitive 39) src/npc-follower.js:63 — npc-follower.createPathFollower has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 10, loops 2, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 22 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseGltf (cognitive 39) · ×1
  • parseGltf (cognitive 39) src/gltf.js:1247 — parseGltf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 82 (150 pts), ternaries 14 (34 pts), loops 28 (33 pts), boolean chains 28, other 12, error handling 6 (8 pts) (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-convert.joinTriangles (cognitive 38) · ×1
  • mesh-convert.joinTriangles (cognitive 38) src/mesh-convert.js:222 — mesh-convert.joinTriangles has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · probe-trace.traceProbeMaps (cognitive 38) · ×1
  • probe-trace.traceProbeMaps (cognitive 38) src/probe-trace.js:46 — probe-trace.traceProbeMaps has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 5 (12 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 22). Most of this is not in the body itself: 5 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · createGatherer · ×1
  • createGatherer::gather (cognitive 38) src/light-bake.js:479 — createGatherer::gather has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 5 (10 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeConstraint (cognitive 38) · ×1
  • normalizeConstraint (cognitive 38) src/node-constraints.js:114 — normalizeConstraint has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skeleton-pose.solveChain (cognitive 37) · ×1
  • skeleton-pose.solveChain (cognitive 37) src/skeleton-pose.js:592 — skeleton-pose.solveChain has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 5 (8 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scene-query.readWalkOptions (cognitive 37) · ×1
  • scene-query.readWalkOptions (cognitive 37) src/scene-query.js:141 — scene-query.readWalkOptions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 6 (9 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepareResources (cognitive 37) · ×1
  • prepareResources (cognitive 37) src/gltf.js:708 — prepareResources has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, ternaries 2 (6 pts), other 5, loops 2 (nesting depth added 13). Of this number, 36 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · expandVegetation (cognitive 37) · ×1
  • expandVegetation (cognitive 37) src/agent-vegetation.js:285 — expandVegetation has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 4 (10 pts), boolean chains 4, other 3, loops 1 (nesting depth added 16). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 327, 309, 359, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · build (cognitive 37) · ×1
  • build (cognitive 37) src/mesh-stack.js:81 — build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 4 (12 pts), loops 7 (10 pts), boolean chains 2 (nesting depth added 18). Of this number, 23 points are the body's own statements and 14 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.
D2 · Cognitive Complexity · cloth-self-collision.createSelfCollision.build (cognitive 36) · ×1
  • cloth-self-collision.createSelfCollision.build (cognitive 36) src/cloth-self-collision.js:57 — cloth-self-collision.createSelfCollision.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 6 (16 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · surface.patchGeometry (cognitive 36) · ×1
  • surface.patchGeometry (cognitive 36) src/surface.js:114 — surface.patchGeometry has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scene_export.collect_parts (cognitive 36) · ×1
  • scene_export.collect_parts (cognitive 36) packages/blender-addon/cook_blender/scene_export.py:392 — scene_export.collect_parts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · closeTJunctions (cognitive 36) · ×1
  • closeTJunctions (cognitive 36) src/modeling.js:167 — closeTJunctions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 11 (16 pts), boolean chains 2, other 1, ternaries 1 (nesting depth added 14). Of this number, 27 points are the body's own statements and 9 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.
D2 · Cognitive Complexity · describeIsland (cognitive 36) · ×1
  • describeIsland (cognitive 36) src/mesh-uv.js:64 — describeIsland has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 8 (13 pts), ternaries 1 (3 pts), boolean chains 1, other 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.
D2 · Cognitive Complexity · importMaterial (cognitive 36) · ×1
  • importMaterial (cognitive 36) packages/three-bridge/index.mjs:189 — importMaterial has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (19 pts), other 8, boolean chains 7, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · meshFromGeometry (cognitive 36) · ×1
  • meshFromGeometry (cognitive 36) src/mesh-convert.js:372 — meshFromGeometry has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 6 (8 pts), boolean chains 6, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local-volume-resolve.resolveLocalVolume (cognitive 35) · ×1
  • local-volume-resolve.resolveLocalVolume (cognitive 35) src/local-volume-resolve.js:38 — local-volume-resolve.resolveLocalVolume has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 4, loops 2 (3 pts), ternaries 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-render.extractRender (cognitive 35) · ×1
  • mesh-render.extractRender (cognitive 35) src/mesh-render.js:173 — mesh-render.extractRender has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (9 pts), ternaries 7 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-clip-layers.normalizedLayer (cognitive 35) · ×1
  • agent-clip-layers.normalizedLayer (cognitive 35) src/agent-clip-layers.js:145 — agent-clip-layers.normalizedLayer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 3, ternaries 1 (3 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.
D2 · Cognitive Complexity · agent-scene-assets.normalizeAssetPlacement (cognitive 35) · ×1
  • agent-scene-assets.normalizeAssetPlacement (cognitive 35) src/agent-scene-assets.js:120 — agent-scene-assets.normalizeAssetPlacement has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 6, ternaries 1 (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.
D2 · Cognitive Complexity · animation-mixer.createAnimationMixer (cognitive 35) · ×1
  • animation-mixer.createAnimationMixer (cognitive 35) src/animation-mixer.js:155 — animation-mixer.createAnimationMixer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (35 pts), loops 12 (14 pts), boolean chains 3, ternaries 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 (animation-mixer.createAnimationMixer::clipAction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · parseForLoop (cognitive 35) · ×1
  • parseForLoop (cognitive 35) src/shader-snippet-validator.js:154 — parseForLoop has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 15, if/else 10, ternaries 3 (6 pts), other 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · normalizeSettle (cognitive 35) · ×1
  • normalizeSettle (cognitive 35) src/settle.js:72 — normalizeSettle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (13 pts), other 10, ternaries 3 (6 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · surface-nets.placeCellVertices (cognitive 34) · ×1
  • surface-nets.placeCellVertices (cognitive 34) src/surface-nets.js:8 — surface-nets.placeCellVertices has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 3 (14 pts), boolean chains 1 (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · camera-path.createCameraPath · ×1
  • camera-path.createCameraPath::sample (cognitive 34) src/camera-path.js:113 — camera-path.createCameraPath::sample has cognitive complexity 34 (threshold 15). Drivers by points: loops 11 (17 pts), if/else 7 (13 pts), boolean chains 4 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · agent-drive-schema.normalizeDrive (cognitive 34) · ×1
  • agent-drive-schema.normalizeDrive (cognitive 34) src/agent-drive-schema.js:106 — agent-drive-schema.normalizeDrive has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 3 (8 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · light-bake.createGatherer.gather (cognitive 34) · ×1
  • light-bake.createGatherer.gather (cognitive 34) src/light-bake.js:479 — light-bake.createGatherer.gather has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 5 (10 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local-volume-fire-light.gridEmissionSums (cognitive 34) · ×1
  • local-volume-fire-light.gridEmissionSums (cognitive 34) src/local-volume-fire-light.js:27 — local-volume-fire-light.gridEmissionSums has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 3 (9 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · vegetation-impostors.bleedColors (cognitive 34) · ×1
  • vegetation-impostors.bleedColors (cognitive 34) src/vegetation-impostors.js:194 — vegetation-impostors.bleedColors has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 7 (15 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveFrame (cognitive 34) · ×1
  • resolveFrame (cognitive 34) src/renderer.js:2340 — resolveFrame has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9, other 9, ternaries 9, boolean chains 6, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createNodeConstraintEvaluator · ×1
  • createNodeConstraintEvaluator::applyConstraint (cognitive 34) src/node-constraints.js:850 — createNodeConstraintEvaluator::applyConstraint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (18 pts), ternaries 9 (15 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · normalizeVegetation (cognitive 34) · ×1
  • normalizeVegetation (cognitive 34) src/agent-vegetation.js:120 — normalizeVegetation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, other 4, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-loopcut.edgeRings (cognitive 33) · ×1
  • mesh-loopcut.edgeRings (cognitive 33) src/mesh-loopcut.js:17 — mesh-loopcut.edgeRings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-generator-modifiers.wireframeMesh (cognitive 33) · ×1
  • mesh-generator-modifiers.wireframeMesh (cognitive 33) src/mesh-generator-modifiers.js:94 — mesh-generator-modifiers.wireframeMesh has cognitive complexity 33 (threshold 15). Drivers by points: loops 9 (17 pts), ternaries 6 (14 pts), if/else 2 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · node-constraints.normalizeDriver (cognitive 33) · ×1
  • node-constraints.normalizeDriver (cognitive 33) src/node-constraints.js:301 — node-constraints.normalizeDriver has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flush-clip.clipGeometry (cognitive 33) · ×1
  • flush-clip.clipGeometry (cognitive 33) src/flush-clip.js:353 — flush-clip.clipGeometry has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (13 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hdri.readRunLengthScanline (cognitive 33) · ×1
  • hdri.readRunLengthScanline (cognitive 33) src/hdri.js:41 — hdri.readRunLengthScanline has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (11 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · copiedJson (cognitive 33) · ×1
  • copiedJson (cognitive 33) src/agent-look.js:95 — copiedJson has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 12, ternaries 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateSnippetUniforms (cognitive 33) · ×1
  • validateSnippetUniforms (cognitive 33) src/shader-snippet-validator.js:342 — validateSnippetUniforms has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, ternaries 3 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · refineCornerAttributes (cognitive 33) · ×1
  • refineCornerAttributes (cognitive 33) src/mesh-subdivide.js:177 — refineCornerAttributes has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 4 (19 pts), loops 5 (14 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fitPerspectiveDistance (cognitive 33) · ×1
  • fitPerspectiveDistance (cognitive 33) src/camera.js:169 — fitPerspectiveDistance has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, if/else 11, other 4, loops 3, ternaries 1 (2 pts) (nesting depth added 1). Of this number, 29 points are the body's own statements and 4 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · physics.prepare.joints (cognitive 32) · ×1
  • physics.prepare.joints (cognitive 32) src/physics.js:465 — physics.prepare.joints has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 12, loops 1 (2 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · irradiance-grid.smoothNodes (cognitive 32) · ×1
  • irradiance-grid.smoothNodes (cognitive 32) src/irradiance-grid.js:181 — irradiance-grid.smoothNodes has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 3 (12 pts), boolean chains 3 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · convertMaterial (cognitive 32) · ×1
  • convertMaterial (cognitive 32) src/gltf.js:1196 — convertMaterial has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5 (9 pts), other 7, boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCameraRig (cognitive 32) · ×1
  • createCameraRig (cognitive 32) src/player.js:339 — createCameraRig has cognitive complexity 32 (threshold 15). Drivers by points: other 13, if/else 9, boolean chains 6, ternaries 4. Of this number, 20 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · findCoplanarOverlaps (cognitive 32) · ×1
  • findCoplanarOverlaps (cognitive 32) src/coplanar-overlap.js:387 — findCoplanarOverlaps has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, ternaries 3 (7 pts), loops 3 (4 pts), other 3 (nesting depth added 10). Of this number, 26 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · splitRegion (cognitive 32) · ×1
  • splitRegion (cognitive 32) src/mesh-ops.js:103 — splitRegion has cognitive complexity 32 (threshold 15). Drivers by points: loops 12 (18 pts), if/else 4 (12 pts), boolean chains 1, other 1 (nesting depth added 14). Of this number, 31 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · sculpt-strokes.applyStroke (cognitive 31) · ×1
  • sculpt-strokes.applyStroke (cognitive 31) src/sculpt-strokes.js:41 — sculpt-strokes.applyStroke has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (17 pts), if/else 5 (9 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · modeling-shapes.buildExtrusion (cognitive 31) · ×1
  • modeling-shapes.buildExtrusion (cognitive 31) src/modeling-shapes.js:169 — modeling-shapes.buildExtrusion has cognitive complexity 31 (threshold 15). Drivers by points: loops 11 (15 pts), ternaries 7 (12 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local-volumes.localVolumeInterval (cognitive 31) · ×1
  • local-volumes.localVolumeInterval (cognitive 31) src/local-volumes.js:270 — local-volumes.localVolumeInterval has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 4 (14 pts), loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · terrain.createTerrain.buildMirrorGeometry (cognitive 31) · ×1
  • terrain.createTerrain.buildMirrorGeometry (cognitive 31) src/terrain.js:389 — terrain.createTerrain.buildMirrorGeometry has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (21 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 16). Of this number, 28 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · motion.createMotionScene (cognitive 31) · ×1
  • motion.createMotionScene (cognitive 31) src/motion.js:27 — motion.createMotionScene has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (22 pts), loops 8 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildTraceScene (cognitive 31) · ×1
  • buildTraceScene (cognitive 31) src/path-tracer-scene.js:894 — buildTraceScene has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (9 pts), if/else 5 (8 pts), other 4, loops 1 (nesting depth added 6). Of this number, 28 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · buildMaterial (cognitive 31) · ×1
  • buildMaterial (cognitive 31) packages/three-bridge/index.mjs:416 — buildMaterial has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), other 6, boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · selectBlendedLevels (cognitive 31) · ×1
  • selectBlendedLevels (cognitive 31) src/vegetation-impostors.js:389 — selectBlendedLevels has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 5 (9 pts), boolean chains 3, other 3, loops 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · springChainSolver (cognitive 31) · ×1
  • springChainSolver (cognitive 31) src/spring-bones.js:150 — springChainSolver has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 5 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). None of this is in the body itself: all 31 points belong to 24 function items inside it that branch (create::pushOutOfColliders, a function literal at line 236, create::solve, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · mesh-lint.lintMesh (cognitive 30) · ×1
  • mesh-lint.lintMesh (cognitive 30) src/mesh-lint.js:303 — mesh-lint.lintMesh has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 6 (7 pts), ternaries 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-validate.checkFaces (cognitive 30) · ×1
  • mesh-validate.checkFaces (cognitive 30) src/mesh-validate.js:63 — mesh-validate.checkFaces has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · physics.prepare.colliders (cognitive 30) · ×1
  • physics.prepare.colliders (cognitive 30) src/physics.js:352 — physics.prepare.colliders has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, ternaries 4 (5 pts), loops 1 (2 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · agent-scene.checkCameraLens (cognitive 30) · ×1
  • agent-scene.checkCameraLens (cognitive 30) REDACTED:452 — agent-scene.checkCameraLens has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 9 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-scene.validateGraph (cognitive 30) · ×1
  • agent-scene.validateGraph (cognitive 30) REDACTED:881 — agent-scene.validateGraph has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 3 (9 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · morph.validateMorphTransform (cognitive 30) · ×1
  • morph.validateMorphTransform (cognitive 30) src/morph.js:139 — morph.validateMorphTransform has cognitive complexity 30 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (11 pts), ternaries 1 (3 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · stagePose (cognitive 30) · ×1
  • stagePose (cognitive 30) REDACTED:1283 — stagePose has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 5 (7 pts), loops 3 (6 pts), boolean chains 2, other 2 (nesting depth added 13). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCharacterController (cognitive 30) · ×1
  • createCharacterController (cognitive 30) src/player.js:156 — createCharacterController has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11, other 8, boolean chains 6, ternaries 5. Most of this is not in the body itself: 12 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (advance, currentCameraYaw, applyRootMotion, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · traceIrradianceGrid (cognitive 30) · ×1
  • traceIrradianceGrid (cognitive 30) src/irradiance-grid.js:238 — traceIrradianceGrid has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (9 pts), ternaries 2 (5 pts), boolean chains 2, other 1 (nesting depth added 13). Of this number, 28 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openTopic (cognitive 30) · ×1
  • openTopic (cognitive 30) REDACTED:360 — openTopic has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (7 pts), ternaries 2 (4 pts), boolean chains 2, other 1 (nesting depth added 11). Of this number, 29 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · keepClear (cognitive 30) · ×1
  • keepClear (cognitive 30) src/scene-query.js:370 — keepClear has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 5 (9 pts), boolean chains 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installUserPasses (cognitive 30) · ×1
  • installUserPasses (cognitive 30) src/user-pass.js:171 — installUserPasses has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15, boolean chains 6, ternaries 4, other 3, error handling 1, loops 1. Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 20 function items inside it that branch (drawPass, a function literal at line 310, a function literal at line 207, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · parseHeader (cognitive 30) · ×1
  • parseHeader (cognitive 30) src/gaussian-splat-ply.js:50 — parseHeader has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, loops 1, other 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-convert.weldVertices (cognitive 29) · ×1
  • mesh-convert.weldVertices (cognitive 29) src/mesh-convert.js:23 — mesh-convert.weldVertices has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 2 (8 pts), boolean chains 3, ternaries 2 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-uv.conformalMap (cognitive 29) · ×1
  • mesh-uv.conformalMap (cognitive 29) src/mesh-uv.js:342 — mesh-uv.conformalMap has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (9 pts), boolean chains 3, ternaries 1 (nesting depth added 10). Of this number, 27 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.
D2 · Cognitive Complexity · mesh-import.rebuildMissingUvs (cognitive 29) · ×1
  • mesh-import.rebuildMissingUvs (cognitive 29) src/mesh-import.js:141 — mesh-import.rebuildMissingUvs has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (13 pts), loops 5 (12 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · physics.validateMotorBounds (cognitive 29) · ×1
  • physics.validateMotorBounds (cognitive 29) src/physics.js:625 — physics.validateMotorBounds has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 7, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 20 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navmesh.createNavmesh.searchCells (cognitive 29) · ×1
  • navmesh.createNavmesh.searchCells (cognitive 29) src/navmesh.js:257 — navmesh.createNavmesh.searchCells has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vegetation.poissonDiskPoints (cognitive 29) · ×1
  • vegetation.poissonDiskPoints (cognitive 29) src/vegetation.js:648 — vegetation.poissonDiskPoints has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 14). Of this number, 16 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shader-snippet-validator.findFunctions (cognitive 29) · ×1
  • shader-snippet-validator.findFunctions (cognitive 29) src/shader-snippet-validator.js:215 — shader-snippet-validator.findFunctions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hdri.sunFromEnvironmentMap (cognitive 29) · ×1
  • hdri.sunFromEnvironmentMap (cognitive 29) src/hdri.js:183 — hdri.sunFromEnvironmentMap has cognitive complexity 29 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 4 (10 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · surface.candidateIndices (cognitive 29) · ×1
  • surface.candidateIndices (cognitive 29) src/surface.js:76 — surface.candidateIndices has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nurbsBasisFrom (cognitive 29) · ×1
  • nurbsBasisFrom (cognitive 29) src/modeling.js:311 — nurbsBasisFrom has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 26 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · splineFrom (cognitive 29) · ×1
  • splineFrom (cognitive 29) src/modeling.js:337 — splineFrom has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (9 pts), boolean chains 6, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createParticleLaunches (cognitive 29) · ×1
  • createParticleLaunches (cognitive 29) src/particles.js:111 — createParticleLaunches has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (6 pts), other 6, loops 3 (4 pts), boolean chains 2 (nesting depth added 8). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createNavmesh.searchCells (cognitive 29) · ×1
  • createNavmesh.searchCells (cognitive 29) src/navmesh.js:257 — createNavmesh.searchCells has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · remapTime (cognitive 29) · ×1
  • remapTime (cognitive 29) src/animation-modifiers.js:141 — remapTime has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5 (12 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveFlush (cognitive 29) · ×1
  • resolveFlush (cognitive 29) src/flush-resolve.js:197 — resolveFlush has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5, ternaries 2 (4 pts), boolean chains 2, other 2 (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateSplatMaterial (cognitive 29) · ×1
  • validateSplatMaterial (cognitive 29) src/splat.js:83 — validateSplatMaterial has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 12, loops 2, other 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mesh-render.earClip (cognitive 28) · ×1
  • mesh-render.earClip (cognitive 28) src/mesh-render.js:33 — mesh-render.earClip has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 14). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-reshape-more.selectedLoops (cognitive 28) · ×1
  • mesh-reshape-more.selectedLoops (cognitive 28) src/mesh-reshape-more.js:143 — mesh-reshape-more.selectedLoops has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · animation-mixer.finishProperty (cognitive 28) · ×1
  • animation-mixer.finishProperty (cognitive 28) src/animation-mixer.js:129 — animation-mixer.finishProperty has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createScientistHeadMesh (cognitive 28) · ×1
  • createScientistHeadMesh (cognitive 28) src/film.js:113 — createScientistHeadMesh has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 5 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 130, a function literal at line 123, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · normalizeEvent (cognitive 28) · ×1
  • normalizeEvent (cognitive 28) src/agent-physics.js:240 — normalizeEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, other 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installMeshBlend (cognitive 28) · ×1
  • installMeshBlend (cognitive 28) src/mesh-blend.js:260 — installMeshBlend has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 3, ternaries 2 (3 pts), loops 2, other 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 20 function items inside it that branch (render, apply, pinBlendBatches, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · checkParts (cognitive 28) · ×1
  • checkParts (cognitive 28) src/export-mesh.js:48 — checkParts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 3 (5 pts), other 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-loopcut.loopCut (cognitive 27) · ×1
  • mesh-loopcut.loopCut (cognitive 27) src/mesh-loopcut.js:74 — mesh-loopcut.loopCut has cognitive complexity 27 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 4 (5 pts), ternaries 3 (5 pts) (nesting depth added 11). Of this number, 24 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · agent-relations.normalizeRelations (cognitive 27) · ×1
  • agent-relations.normalizeRelations (cognitive 27) src/agent-relations.js:170 — agent-relations.normalizeRelations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 198). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · fog-shader.localVolumeFunctions (cognitive 27) · ×1
  • fog-shader.localVolumeFunctions (cognitive 27) src/fog-shader.js:438 — fog-shader.localVolumeFunctions has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 20 (26 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · path-tracer-subsurface.createRandomWalk.walk (cognitive 27) · ×1
  • path-tracer-subsurface.createRandomWalk.walk (cognitive 27) src/path-tracer-subsurface.js:67 — path-tracer-subsurface.createRandomWalk.walk has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (11 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fog-bounce.fogBounceGrid (cognitive 27) · ×1
  • fog-bounce.fogBounceGrid (cognitive 27) src/fog-bounce.js:22 — fog-bounce.fogBounceGrid has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (20 pts), if/else 1 (5 pts), error handling 1, ternaries 1 (nesting depth added 18). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · netcode.readWireEntityDelta (cognitive 27) · ×1
  • netcode.readWireEntityDelta (cognitive 27) src/netcode.js:260 — netcode.readWireEntityDelta has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 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.
D2 · Cognitive Complexity · spume.buildSprayGeometry (cognitive 27) · ×1
  • spume.buildSprayGeometry (cognitive 27) src/spume.js:226 — spume.buildSprayGeometry has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 7 (8 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 8). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · surface.validateTarget (cognitive 27) · ×1
  • surface.validateTarget (cognitive 27) src/surface.js:33 — surface.validateTarget has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateHierarchy (cognitive 27) · ×1
  • validateHierarchy (cognitive 27) src/gltf.js:592 — validateHierarchy has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 5 (9 pts), other 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contactReport (cognitive 27) · ×1
  • contactReport (cognitive 27) src/agent-physics.js:554 — contactReport has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (20 pts), if/else 2 (5 pts), loops 1, other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solveLeastSquares (cognitive 27) · ×1
  • solveLeastSquares (cognitive 27) src/mesh-uv.js:275 — solveLeastSquares has cognitive complexity 27 (threshold 15). Drivers by points: loops 15 (20 pts), ternaries 2 (4 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · createAnimationClip (cognitive 27) · ×1
  • createAnimationClip (cognitive 27) src/animation.js:55 — createAnimationClip has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 9, ternaries 2, loops 1, other 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 59, 69, 84). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mesh-polygons.boundaryLoops (cognitive 26) · ×1
  • mesh-polygons.boundaryLoops (cognitive 26) src/mesh-polygons.js:64 — mesh-polygons.boundaryLoops has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 5 (9 pts), boolean chains 3, ternaries 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-uv.unwrapUv (cognitive 26) · ×1
  • mesh-uv.unwrapUv (cognitive 26) src/mesh-uv.js:624 — mesh-uv.unwrapUv has cognitive complexity 26 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 5 (10 pts), ternaries 3, boolean chains 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-attribute-edits.setVertexColor (cognitive 26) · ×1
  • mesh-attribute-edits.setVertexColor (cognitive 26) src/mesh-attribute-edits.js:172 — mesh-attribute-edits.setVertexColor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (6 pts), ternaries 5, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-hull-modifiers.convexHullMesh (cognitive 26) · ×1
  • mesh-hull-modifiers.convexHullMesh (cognitive 26) src/mesh-hull-modifiers.js:100 — mesh-hull-modifiers.convexHullMesh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 7 (12 pts), boolean chains 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flush-search.buildCells (cognitive 26) · ×1
  • flush-search.buildCells (cognitive 26) src/flush-search.js:268 — flush-search.buildCells has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 2 function items inside it that branch (visitCells, a function literal at line 293). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · closed-room.skyVisibilityGrid (cognitive 26) · ×1
  • closed-room.skyVisibilityGrid (cognitive 26) src/closed-room.js:204 — closed-room.skyVisibilityGrid has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (19 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · path-tracer-denoise.guideLuminance (cognitive 26) · ×1
  • path-tracer-denoise.guideLuminance (cognitive 26) src/path-tracer-denoise.js:90 — path-tracer-denoise.guideLuminance has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 4 (10 pts), boolean chains 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.
D2 · Cognitive Complexity · validatePositionBounds (cognitive 26) · ×1
  • validatePositionBounds (cognitive 26) src/agent-asset.js:218 — validatePositionBounds has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 3 (11 pts), ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeJoint (cognitive 26) · ×1
  • normalizeJoint (cognitive 26) src/agent-physics.js:194 — normalizeJoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2, loops 2, other 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalCellsOf (cognitive 26) · ×1
  • normalCellsOf (cognitive 26) src/flush-search.js:212 — normalCellsOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (11 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createPairTest · ×1
  • createPairTest::testPair (cognitive 26) src/flush-search.js:401 — createPairTest::testPair has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · normalizeMaterialPattern (cognitive 26) · ×1
  • normalizeMaterialPattern (cognitive 26) src/material-patterns.js:188 — normalizeMaterialPattern has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (11 pts), other 8, boolean chains 4, ternaries 2, 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.
D2 · Cognitive Complexity · latticeDeform (cognitive 26) · ×1
  • latticeDeform (cognitive 26) src/mesh-deform-modifiers.js:36 — latticeDeform has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 6 (11 pts), if/else 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-lint.facesWoundAgainstNeighbours (cognitive 25) · ×1
  • mesh-lint.facesWoundAgainstNeighbours (cognitive 25) src/mesh-lint.js:264 — mesh-lint.facesWoundAgainstNeighbours has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (9 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Collapser.collapse (cognitive 25) · ×1
  • Collapser.collapse (cognitive 25) src/geometry-simplify.js:245 — Collapser.collapse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-validate.checkEdges (cognitive 25) · ×1
  • mesh-validate.checkEdges (cognitive 25) src/mesh-validate.js:32 — mesh-validate.checkEdges has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flush-search.createPairTest.testPair (cognitive 25) · ×1
  • flush-search.createPairTest.testPair (cognitive 25) src/flush-search.js:401 — flush-search.createPairTest.testPair has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sun-bounce.sampleLitSurfaces · ×1
  • sun-bounce.sampleLitSurfaces::drawSamples (cognitive 25) src/sun-bounce.js:80 — sun-bounce.sampleLitSurfaces::drawSamples has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (7 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · crucible-addon-check.parseArguments (cognitive 25) · ×1
  • crucible-addon-check.parseArguments (cognitive 25) bin/crucible-addon-check.mjs:208 — crucible-addon-check.parseArguments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, ternaries 1 (3 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.
D2 · Cognitive Complexity · film.sampleFilm (cognitive 25) · ×1
  • film.sampleFilm (cognitive 25) src/film.js:984 — film.sampleFilm has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 6 (9 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · validateMotionBounds (cognitive 25) · ×1
  • validateMotionBounds (cognitive 25) src/physics.js:684 — validateMotionBounds has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2, ternaries 2, boolean chains 1 (nesting depth added 12). Of this number, 23 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · createAuthority.receiveMessage (cognitive 25) · ×1
  • createAuthority.receiveMessage (cognitive 25) src/netcode.js:433 — createAuthority.receiveMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, error handling 1 (2 pts), loops 2, ternaries 2, other 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createCameraClip (cognitive 25) · ×1
  • createCameraClip (cognitive 25) src/player.js:456 — createCameraClip has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), boolean chains 3, ternaries 3, other 2 (nesting depth added 7). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 9 function items inside it that branch (clipEye, freeFraction, groundHeight, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · createAnimationGraph (cognitive 25) · ×1
  • createAnimationGraph (cognitive 25) src/animation-graph.js:565 — createAnimationGraph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 5, ternaries 4, other 3, boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 25 function items inside it that branch (set, advance, reset, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · normalizeAgentBake (cognitive 25) · ×1
  • normalizeAgentBake (cognitive 25) src/agent-bake.js:21 — normalizeAgentBake has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, loops 2, ternaries 1 (2 pts), other 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createInput · ×1
  • createInput::sample (cognitive 25) src/input.js:207 — createInput::sample has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 8 (10 pts), ternaries 1 (2 pts), other 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createLiveExample (cognitive 25) · ×1
  • createLiveExample (cognitive 25) src/docs-live.js:219 — createLiveExample has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (4 pts), error handling 2, loops 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 14 function items inside it that branch (run, a function literal at line 355, a function literal at line 323, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · createAnimationMixer · ×1
  • createAnimationMixer::apply (cognitive 25) src/animation-mixer.js:252 — createAnimationMixer::apply has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 9 (11 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-uv.cutToDisks (cognitive 24) · ×1
  • mesh-uv.cutToDisks (cognitive 24) src/mesh-uv.js:238 — mesh-uv.cutToDisks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-motion.validateValue (cognitive 24) · ×1
  • agent-motion.validateValue (cognitive 24) src/agent-motion.js:71 — agent-motion.validateValue has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), 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.
D2 · Cognitive Complexity · local-volume-grid.resolveGridVolume (cognitive 24) · ×1
  • local-volume-grid.resolveGridVolume (cognitive 24) src/local-volume-grid.js:20 — local-volume-grid.resolveGridVolume has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navmesh.growBlockedAreas (cognitive 24) · ×1
  • navmesh.growBlockedAreas (cognitive 24) src/navmesh.js:395 — navmesh.growBlockedAreas has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-scene-assets.normalizeMaterialOverride (cognitive 24) · ×1
  • agent-scene-assets.normalizeMaterialOverride (cognitive 24) src/agent-scene-assets.js:57 — agent-scene-assets.normalizeMaterialOverride has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-asset-mesh.normalizeMeshEditEntries (cognitive 24) · ×1
  • agent-asset-mesh.normalizeMeshEditEntries (cognitive 24) src/agent-asset-mesh.js:20 — agent-asset-mesh.normalizeMeshEditEntries has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (8 pts), boolean chains 5, loops 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gltf.parseGltf · ×1
  • gltf.parseGltf::preparePose (cognitive 24) src/gltf.js:1530 — gltf.parseGltf::preparePose has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer-denoise.filterPass (cognitive 24) · ×1
  • path-tracer-denoise.filterPass (cognitive 24) src/path-tracer-denoise.js:115 — path-tracer-denoise.filterPass has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · film.addRoom (cognitive 24) · ×1
  • film.addRoom (cognitive 24) src/film.js:506 — film.addRoom has cognitive complexity 24 (threshold 15). Drivers by points: loops 13 (17 pts), ternaries 3 (7 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · scene_export.modifier_signature (cognitive 24) · ×1
  • scene_export.modifier_signature (cognitive 24) packages/blender-addon/cook_blender/scene_export.py:255 — scene_export.modifier_signature has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · postStepsOf (cognitive 24) · ×1
  • postStepsOf (cognitive 24) src/renderer.js:2287 — postStepsOf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, boolean chains 8, other 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · normalizeLights (cognitive 24) · ×1
  • normalizeLights (cognitive 24) src/light-bake.js:157 — normalizeLights has cognitive complexity 24 (threshold 15). Drivers by points: other 10, boolean chains 7, if/else 5, ternaries 2. Of this number, 15 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · validateNetcodeOptions (cognitive 24) · ×1
  • validateNetcodeOptions (cognitive 24) src/netcode.js:331 — validateNetcodeOptions has cognitive complexity 24 (threshold 15). Drivers by points: other 13, if/else 7 (8 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · queryLocalSurface (cognitive 24) · ×1
  • queryLocalSurface (cognitive 24) src/mesh-query.js:417 — queryLocalSurface has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, other 2, ternaries 1 (nesting depth added 2). Of this number, 12 points are the body's own statements and 12 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · importMesh (cognitive 24) · ×1
  • importMesh (cognitive 24) packages/three-bridge/index.mjs:271 — importMesh has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 6 (9 pts), loops 3 (4 pts), other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · grassTuft (cognitive 24) · ×1
  • grassTuft (cognitive 24) src/nature.js:132 — grassTuft has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (13 pts), ternaries 3 (6 pts), if/else 2 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · solidifyMesh (cognitive 24) · ×1
  • solidifyMesh (cognitive 24) src/mesh-stack.js:294 — solidifyMesh has cognitive complexity 24 (threshold 15). Drivers by points: loops 8 (13 pts), ternaries 3 (8 pts), if/else 2 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · refinePointAttributes (cognitive 24) · ×1
  • refinePointAttributes (cognitive 24) src/mesh-subdivide.js:210 — refinePointAttributes has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (15 pts), ternaries 2 (8 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · checkClips (cognitive 24) · ×1
  • checkClips (cognitive 24) src/game-animation.js:63 — checkClips has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, error handling 1 (2 pts), other 2, loops 1 (nesting depth added 7). Of this number, 16 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.
D2 · Cognitive Complexity · mesh-data.validateExplicitEdges (cognitive 23) · ×1
  • mesh-data.validateExplicitEdges (cognitive 23) src/mesh-data.js:63 — mesh-data.validateExplicitEdges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 3 (4 pts), ternaries 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.
D2 · Cognitive Complexity · mesh-normals.cornerNormals (cognitive 23) · ×1
  • mesh-normals.cornerNormals (cognitive 23) src/mesh-normals.js:66 — mesh-normals.cornerNormals has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4, boolean chains 3, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Collapser.isSafe (cognitive 23) · ×1
  • Collapser.isSafe (cognitive 23) src/geometry-simplify.js:215 — Collapser.isSafe has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · particle-collision.findFirstCollision (cognitive 23) · ×1
  • particle-collision.findFirstCollision (cognitive 23) src/particle-collision.js:49 — particle-collision.findFirstCollision has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (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.
D2 · Cognitive Complexity · particle-emitter-mesh.edgesOf (cognitive 23) · ×1
  • particle-emitter-mesh.edgesOf (cognitive 23) src/particle-emitter-mesh.js:155 — particle-emitter-mesh.edgesOf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 2 (7 pts), loops 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · netcode.createAuthority.receiveMessage (cognitive 23) · ×1
  • netcode.createAuthority.receiveMessage (cognitive 23) src/netcode.js:433 — netcode.createAuthority.receiveMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 1 (2 pts), loops 2, ternaries 2 (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.
D2 · Cognitive Complexity · dispose (cognitive 23) · ×1
  • dispose (cognitive 23) src/renderer.js:2917 — dispose has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, loops 5 (6 pts), other 3, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · initialJointCoordinate (cognitive 23) · ×1
  • initialJointCoordinate (cognitive 23) src/physics.js:184 — initialJointCoordinate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createClient.receiveMessage (cognitive 23) · ×1
  • createClient.receiveMessage (cognitive 23) src/netcode.js:653 — createClient.receiveMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 2, other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeScatter (cognitive 23) · ×1
  • normalizeScatter (cognitive 23) src/agent-vegetation.js:67 — normalizeScatter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, other 3, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selectScene (cognitive 23) · ×1
  • selectScene (cognitive 23) src/showcase.js:275 — selectScene has cognitive complexity 23 (threshold 15). Drivers by points: other 9, if/else 4 (5 pts), ternaries 5, error handling 2, boolean chains 1, loops 1 (nesting depth added 1). Of this number, 21 points are the body's own statements and 2 belong to 9 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveSettings (cognitive 23) · ×1
  • resolveSettings (cognitive 23) src/grass.js:209 — resolveSettings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, other 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · applyProjection (cognitive 23) · ×1
  • applyProjection (cognitive 23) src/camera.js:13 — applyProjection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, other 3, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · exportObj (cognitive 23) · ×1
  • exportObj (cognitive 23) src/export-mesh.js:186 — exportObj has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (6 pts), ternaries 3 (4 pts), boolean chains 2, other 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 198, 226). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · settle.scatterCandidates (cognitive 22) · ×1
  • settle.scatterCandidates (cognitive 22) src/settle.js:193 — settle.scatterCandidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · material-graph.compileNode (cognitive 22) · ×1
  • material-graph.compileNode (cognitive 22) src/material-graph.js:616 — material-graph.compileNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · fog-shader.uploadGridTexture (cognitive 22) · ×1
  • fog-shader.uploadGridTexture (cognitive 22) src/fog-shader.js:264 — fog-shader.uploadGridTexture has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 6, boolean chains 3, ternaries 2 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · agent-texture-sequence.sequenceFrameIds · ×1
  • agent-texture-sequence.sequenceFrameIds::visit (cognitive 22) src/agent-texture-sequence.js:73 — agent-texture-sequence.sequenceFrameIds::visit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · game-rules.createGameRules.trackZoneOccupancy (cognitive 22) · ×1
  • game-rules.createGameRules.trackZoneOccupancy (cognitive 22) src/game-rules.js:413 — game-rules.createGameRules.trackZoneOccupancy has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gltf-fallbacks.moveSecondSetTextures (cognitive 22) · ×1
  • gltf-fallbacks.moveSecondSetTextures (cognitive 22) src/gltf-fallbacks.js:66 — gltf-fallbacks.moveSecondSetTextures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 8). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gltf.computeVertexNormals (cognitive 22) · ×1
  • gltf.computeVertexNormals (cognitive 22) src/gltf.js:849 — gltf.computeVertexNormals has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 2 (5 pts), boolean chains 3 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · path-tracer.renderBand (cognitive 22) · ×1
  • path-tracer.renderBand (cognitive 22) src/path-tracer.js:1095 — path-tracer.renderBand has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 1 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · gaussian-splat-spz.inflateSpz (cognitive 22) · ×1
  • gaussian-splat-spz.inflateSpz (cognitive 22) src/gaussian-splat-spz.js:74 — gaussian-splat-spz.inflateSpz has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · netcode.createClient.receiveMessage (cognitive 22) · ×1
  • netcode.createClient.receiveMessage (cognitive 22) src/netcode.js:653 — netcode.createClient.receiveMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shrinkwrap.validateSource (cognitive 22) · ×1
  • shrinkwrap.validateSource (cognitive 22) src/shrinkwrap.js:44 — shrinkwrap.validateSource has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uploadBatchData (cognitive 22) · ×1
  • uploadBatchData (cognitive 22) src/renderer.js:1364 — uploadBatchData has cognitive complexity 22 (threshold 15). Drivers by points: other 8, ternaries 8, boolean chains 4, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveLights (cognitive 22) · ×1
  • resolveLights (cognitive 22) src/path-tracer-scene.js:520 — resolveLights has cognitive complexity 22 (threshold 15). Drivers by points: other 14, if/else 3 (4 pts), ternaries 3, boolean chains 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveDriveOptions (cognitive 22) · ×1
  • resolveDriveOptions (cognitive 22) src/vehicle.js:891 — resolveDriveOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 3 (6 pts), other 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dentGeometry (cognitive 22) · ×1
  • dentGeometry (cognitive 22) src/vehicle-damage.js:146 — dentGeometry has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (4 pts), ternaries 1 (2 pts), boolean chains 1, other 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · shortestPath (cognitive 22) · ×1
  • shortestPath (cognitive 22) src/mesh-uv.js:172 — shortestPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (8 pts), other 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createGameRules.trackZoneOccupancy (cognitive 22) · ×1
  • createGameRules.trackZoneOccupancy (cognitive 22) src/game-rules.js:413 — createGameRules.trackZoneOccupancy has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · localVolumeProfile (cognitive 22) · ×1
  • localVolumeProfile (cognitive 22) src/local-volumes.js:232 — localVolumeProfile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solveRelations (cognitive 22) · ×1
  • solveRelations (cognitive 22) src/agent-relations.js:293 — solveRelations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (6 pts), ternaries 2 (5 pts), error handling 1 (2 pts), boolean chains 1, other 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 306, 294, 298, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transferVertexAttributes (cognitive 22) · ×1
  • transferVertexAttributes (cognitive 22) src/mesh-import.js:191 — transferVertexAttributes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2, other 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-ops.mergeByDistance (cognitive 21) · ×1
  • mesh-ops.mergeByDistance (cognitive 21) src/mesh-ops.js:599 — mesh-ops.mergeByDistance has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 4 (8 pts), boolean chains 3 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-stack.removeCoincidentFaces (cognitive 21) · ×1
  • mesh-stack.removeCoincidentFaces (cognitive 21) src/mesh-stack.js:182 — mesh-stack.removeCoincidentFaces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 7 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · text-geometry.text (cognitive 21) · ×1
  • text-geometry.text (cognitive 21) src/text-geometry.js:198 — text-geometry.text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 213). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · skinning.validateSkinGeometry (cognitive 21) · ×1
  • skinning.validateSkinGeometry (cognitive 21) src/skinning.js:125 — skinning.validateSkinGeometry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometry-normals.recomputeNormals (cognitive 21) · ×1
  • geometry-normals.recomputeNormals (cognitive 21) src/geometry-normals.js:1 — geometry-normals.recomputeNormals has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · light-bake.createDirectIrradiance.directIrradiance (cognitive 21) · ×1
  • light-bake.createDirectIrradiance.directIrradiance (cognitive 21) src/light-bake.js:406 — light-bake.createDirectIrradiance.directIrradiance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · light-bake.unwrapIntoSecondUvSet (cognitive 21) · ×1
  • light-bake.unwrapIntoSecondUvSet (cognitive 21) src/light-bake.js:616 — light-bake.unwrapIntoSecondUvSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), ternaries 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer-volume.createLocalVolumeCrossing (cognitive 21) · ×1
  • path-tracer-volume.createLocalVolumeCrossing (cognitive 21) src/path-tracer-volume.js:225 — path-tracer-volume.createLocalVolumeCrossing has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (10 pts), if/else 6, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 3). None of this is in the body itself: all 21 points belong to 5 function items inside it that branch (addScatteredLight, crossGridStep, writeSkyLight, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · agent-crowd.normalizeCrowd (cognitive 21) · ×1
  • agent-crowd.normalizeCrowd (cognitive 21) src/agent-crowd.js:46 — agent-crowd.normalizeCrowd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, loops 2, ternaries 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.
D2 · Cognitive Complexity · hero-loop.tick (cognitive 21) · ×1
  • hero-loop.tick (cognitive 21) src/hero-lab/hero-loop.js:258 — hero-loop.tick has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sculpt.positionGroups (cognitive 21) · ×1
  • sculpt.positionGroups (cognitive 21) src/sculpt.js:45 — sculpt.positionGroups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizePathTracerOptions (cognitive 21) · ×1
  • normalizePathTracerOptions (cognitive 21) src/path-tracer.js:111 — normalizePathTracerOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10, other 7, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createIkEvaluator (cognitive 21) · ×1
  • createIkEvaluator (cognitive 21) src/agent-motion.js:688 — createIkEvaluator has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 4, boolean chains 2, other 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 701, a function literal at line 739, a function literal at line 740, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · createDirectIrradiance · ×1
  • createDirectIrradiance::directIrradiance (cognitive 21) src/light-bake.js:406 — createDirectIrradiance::directIrradiance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepareExtras (cognitive 21) · ×1
  • prepareExtras (cognitive 21) src/cloth.js:471 — prepareExtras has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), other 5, ternaries 4 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMeshQueryIndex (cognitive 21) · ×1
  • createMeshQueryIndex (cognitive 21) src/mesh-query.js:537 — createMeshQueryIndex has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (6 pts), if/else 5, other 5, ternaries 4, boolean chains 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · extrude (cognitive 21) · ×1
  • extrude (cognitive 21) src/modeling.js:247 — extrude has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 2 (3 pts), other 2, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · traceOnWebGpu (cognitive 21) · ×1
  • traceOnWebGpu (cognitive 21) src/path-tracer-webgpu.js:294 — traceOnWebGpu has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 5 (6 pts), boolean chains 2, loops 2, other 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · resolveSettings (cognitive 21) · ×1
  • resolveSettings (cognitive 21) src/clutter.js:279 — resolveSettings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 3, other 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · checkAssetClips (cognitive 21) · ×1
  • checkAssetClips (cognitive 21) src/game-animation.js:102 — checkAssetClips has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 2 (4 pts), loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rebuildOutput (cognitive 21) · ×1
  • rebuildOutput (cognitive 21) src/mesh-boolean.js:190 — rebuildOutput has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (7 pts), ternaries 2, other 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · near-plane-fit.sceneBoundsOfParts (cognitive 20) · ×1
  • near-plane-fit.sceneBoundsOfParts (cognitive 20) src/near-plane-fit.js:15 — near-plane-fit.sceneBoundsOfParts has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 3 (6 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triangle-bvh.traverseTriangleBvh (cognitive 20) · ×1
  • triangle-bvh.traverseTriangleBvh (cognitive 20) src/triangle-bvh.js:171 — triangle-bvh.traverseTriangleBvh has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 4 (8 pts), loops 2 (4 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.
D2 · Cognitive Complexity · mesh-query.validateGeometry (cognitive 20) · ×1
  • mesh-query.validateGeometry (cognitive 20) src/mesh-query.js:123 — mesh-query.validateGeometry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-knife.edgeCrossings (cognitive 20) · ×1
  • mesh-knife.edgeCrossings (cognitive 20) src/mesh-knife.js:41 — mesh-knife.edgeCrossings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Decimator.run (cognitive 20) · ×1
  • Decimator.run (cognitive 20) src/mesh-decimate.js:301 — Decimator.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 7). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · animation.normalizedValue (cognitive 20) · ×1
  • animation.normalizedValue (cognitive 20) src/animation.js:31 — animation.normalizedValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · crowd-skinning.clusterCrowdGeometry (cognitive 20) · ×1
  • crowd-skinning.clusterCrowdGeometry (cognitive 20) src/crowd-skinning.js:286 — crowd-skinning.clusterCrowdGeometry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (7 pts), boolean chains 2, ternaries 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view-transform.parseCube (cognitive 20) · ×1
  • view-transform.parseCube (cognitive 20) src/view-transform.js:109 — view-transform.parseCube has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, loops 2 (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.
D2 · Cognitive Complexity · coplanar-overlap.markContactRegions (cognitive 20) · ×1
  • coplanar-overlap.markContactRegions (cognitive 20) src/coplanar-overlap.js:312 — coplanar-overlap.markContactRegions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · morph.geometryMetadata (cognitive 20) · ×1
  • morph.geometryMetadata (cognitive 20) src/morph.js:47 — morph.geometryMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gltf-fallbacks.dropTexturesWithoutUvs (cognitive 20) · ×1
  • gltf-fallbacks.dropTexturesWithoutUvs (cognitive 20) src/gltf-fallbacks.js:109 — gltf-fallbacks.dropTexturesWithoutUvs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (10 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.
D2 · Cognitive Complexity · sculpt.validateGeometry (cognitive 20) · ×1
  • sculpt.validateGeometry (cognitive 20) src/sculpt.js:10 — sculpt.validateGeometry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · textureDescriptorInfo (cognitive 20) · ×1
  • textureDescriptorInfo (cognitive 20) src/renderer.js:598 — textureDescriptorInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7, other 7, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · prepareFrame (cognitive 20) · ×1
  • prepareFrame (cognitive 20) src/renderer.js:974 — prepareFrame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyAlphaState (cognitive 20) · ×1
  • applyAlphaState (cognitive 20) src/renderer.js:2464 — applyAlphaState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 5, other 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · rasterizeTexels (cognitive 20) · ×1
  • rasterizeTexels (cognitive 20) src/light-bake.js:656 — rasterizeTexels has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (6 pts), boolean chains 1, other 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · normalizeEmitterSystem (cognitive 20) · ×1
  • normalizeEmitterSystem (cognitive 20) src/agent-particles.js:168 — normalizeEmitterSystem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), other 5, ternaries 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.
D2 · Cognitive Complexity · buildGame · ×1
  • buildGame::update (cognitive 20) src/game.js:302 — buildGame::update has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5 (7 pts), boolean chains 1, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setSceneUniforms (cognitive 20) · ×1
  • setSceneUniforms (cognitive 20) src/path-tracer-gpu.js:124 — setSceneUniforms has cognitive complexity 20 (threshold 15). Drivers by points: other 15, ternaries 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · loadSpumeCache (cognitive 20) · ×1
  • loadSpumeCache (cognitive 20) src/spume.js:163 — loadSpumeCache has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 3, other 2 (nesting depth added 7). Of this number, 19 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeGeneratorEdit (cognitive 20) · ×1
  • normalizeGeneratorEdit (cognitive 20) src/mesh-generator-modifiers.js:232 — normalizeGeneratorEdit has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (4 pts), other 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · mesh-data.validateFaces (cognitive 19) · ×1
  • mesh-data.validateFaces (cognitive 19) src/mesh-data.js:42 — mesh-data.validateFaces has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-convert.rebuildFromCorners (cognitive 19) · ×1
  • mesh-convert.rebuildFromCorners (cognitive 19) src/mesh-convert.js:77 — mesh-convert.rebuildFromCorners has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-fields.compileAttribute (cognitive 19) · ×1
  • mesh-fields.compileAttribute (cognitive 19) src/mesh-fields.js:186 — mesh-fields.compileAttribute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mesh-bisect.bisectPlane (cognitive 19) · ×1
  • mesh-bisect.bisectPlane (cognitive 19) src/mesh-bisect.js:179 — mesh-bisect.bisectPlane has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-subdivide.vertexNeighborhoods (cognitive 19) · ×1
  • mesh-subdivide.vertexNeighborhoods (cognitive 19) src/mesh-subdivide.js:112 — mesh-subdivide.vertexNeighborhoods has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (7 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-instance-placement.crowded (cognitive 19) · ×1
  • mesh-instance-placement.crowded (cognitive 19) src/mesh-instance-placement.js:120 — mesh-instance-placement.crowded has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (9 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · triangulate.clipEars (cognitive 19) · ×1
  • triangulate.clipEars (cognitive 19) src/triangulate.js:86 — triangulate.clipEars has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 11 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skinning.validateMatrices (cognitive 19) · ×1
  • skinning.validateMatrices (cognitive 19) src/skinning.js:55 — skinning.validateMatrices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skinning.validateSkinPose (cognitive 19) · ×1
  • skinning.validateSkinPose (cognitive 19) src/skinning.js:195 — skinning.validateSkinPose has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skeleton-pose.resolveChainJoints (cognitive 19) · ×1
  • skeleton-pose.resolveChainJoints (cognitive 19) src/skeleton-pose.js:200 — skeleton-pose.resolveChainJoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-motion.motionEnvironment (cognitive 19) · ×1
  • agent-motion.motionEnvironment (cognitive 19) src/agent-motion.js:811 — agent-motion.motionEnvironment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · physics.jointMotor (cognitive 19) · ×1
  • physics.jointMotor (cognitive 19) src/physics.js:163 — physics.jointMotor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · cloth.createBodyBounce.reflectBody (cognitive 19) · ×1
  • cloth.createBodyBounce.reflectBody (cognitive 19) src/cloth.js:359 — cloth.createBodyBounce.reflectBody has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · film-timeline.normalizeFilmTimeline.shots (cognitive 19) · ×1
  • film-timeline.normalizeFilmTimeline.shots (cognitive 19) src/film-timeline.js:55 — film-timeline.normalizeFilmTimeline.shots has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-scene.cameraFrom (cognitive 19) · ×1
  • agent-scene.cameraFrom (cognitive 19) REDACTED:479 — agent-scene.cameraFrom has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image-header.jpegImageSize (cognitive 19) · ×1
  • image-header.jpegImageSize (cognitive 19) src/image-header.js:34 — image-header.jpegImageSize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer-scene.validateGeometry (cognitive 19) · ×1
  • path-tracer-scene.validateGeometry (cognitive 19) src/path-tracer-scene.js:242 — path-tracer-scene.validateGeometry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · animation-mixer.createAnimationMixer · ×1
  • animation-mixer.createAnimationMixer::clipAction (cognitive 19) src/animation-mixer.js:172 — animation-mixer.createAnimationMixer::clipAction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (animation-mixer.createAnimationMixer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · index.importGeometry (cognitive 19) · ×1
  • index.importGeometry (cognitive 19) packages/three-bridge/index.mjs:139 — index.importGeometry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, loops 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.
D2 · Cognitive Complexity · mcp-volume-grids.readVolumeGridFiles (cognitive 19) · ×1
  • mcp-volume-grids.readVolumeGridFiles (cognitive 19) src/mcp-volume-grids.js:110 — mcp-volume-grids.readVolumeGridFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clutter.addStone (cognitive 19) · ×1
  • clutter.addStone (cognitive 19) src/clutter.js:132 — clutter.addStone has cognitive complexity 19 (threshold 15). Drivers by points: loops 9 (15 pts), ternaries 3, if/else 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · effects.prepareEffects.apply (cognitive 19) · ×1
  • effects.prepareEffects.apply (cognitive 19) src/hero-lab/loop/effects.js:178 — effects.prepareEffects.apply has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (7 pts), ternaries 2 (7 pts), if/else 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · removeNode (cognitive 19) · ×1
  • removeNode (cognitive 19) REDACTED:1523 — removeNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), other 3, boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addScientist · ×1
  • addScientist::shape (cognitive 19) src/film.js:450 — addScientist::shape has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 2 (3 pts), boolean chains 2, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finishLightmaps (cognitive 19) · ×1
  • finishLightmaps (cognitive 19) src/light-bake.js:1010 — finishLightmaps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 1013, 1045). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · createBodyBounce · ×1
  • createBodyBounce::reflectBody (cognitive 19) src/cloth.js:359 — createBodyBounce::reflectBody has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · blankComments (cognitive 19) · ×1
  • blankComments (cognitive 19) src/shader-snippet-validator.js:67 — blankComments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createNavmesh.heightAt (cognitive 19) · ×1
  • createNavmesh.heightAt (cognitive 19) src/navmesh.js:165 — createNavmesh.heightAt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startLive (cognitive 19) · ×1
  • startLive (cognitive 19) src/hero-lab/hero-loop.js:342 — startLive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, other 1, ternaries 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 8 function items inside it that branch (step, a function literal at line 376, releaseDetail, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · torus (cognitive 19) · ×1
  • torus (cognitive 19) src/geometry.js:214 — torus has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), loops 3 (5 pts), boolean chains 2, if/else 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateOptions (cognitive 19) · ×1
  • validateOptions (cognitive 19) src/runtime.js:75 — validateOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, other 6, boolean chains 5, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · applyValueModifiers (cognitive 19) · ×1
  • applyValueModifiers (cognitive 19) src/animation-modifiers.js:198 — applyValueModifiers has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), ternaries 1 (4 pts), other 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-data.createMeshData (cognitive 18) · ×1
  • mesh-data.createMeshData (cognitive 18) src/mesh-data.js:129 — mesh-data.createMeshData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 3 (4 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mesh-lint-geometry.lintMeshGeometry (cognitive 18) · ×1
  • mesh-lint-geometry.lintMeshGeometry (cognitive 18) src/mesh-lint-geometry.js:239 — mesh-lint-geometry.lintMeshGeometry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-dissolve.selectVertices (cognitive 18) · ×1
  • mesh-dissolve.selectVertices (cognitive 18) src/mesh-dissolve.js:221 — mesh-dissolve.selectVertices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-reshape.scaleElements (cognitive 18) · ×1
  • mesh-reshape.scaleElements (cognitive 18) src/mesh-reshape.js:242 — mesh-reshape.scaleElements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-reshape-edits.normalizeReshapeEdit (cognitive 18) · ×1
  • mesh-reshape-edits.normalizeReshapeEdit (cognitive 18) src/mesh-reshape-edits.js:21 — mesh-reshape-edits.normalizeReshapeEdit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · mesh-deform-modifiers.waveDeform (cognitive 18) · ×1
  • mesh-deform-modifiers.waveDeform (cognitive 18) src/mesh-deform-modifiers.js:96 — mesh-deform-modifiers.waveDeform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-instance-placement.mergeRealizedInstances (cognitive 18) · ×1
  • mesh-instance-placement.mergeRealizedInstances (cognitive 18) src/mesh-instance-placement.js:164 — mesh-instance-placement.mergeRealizedInstances has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 3 (5 pts), ternaries 4, boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mesh-validate.checkVertices (cognitive 18) · ×1
  • mesh-validate.checkVertices (cognitive 18) src/mesh-validate.js:7 — mesh-validate.checkVertices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-motion.checkLookTarget (cognitive 18) · ×1
  • agent-motion.checkLookTarget (cognitive 18) src/agent-motion.js:153 — agent-motion.checkLookTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ragdoll.createRagdoll (cognitive 18) · ×1
  • ragdoll.createRagdoll (cognitive 18) src/ragdoll.js:112 — ragdoll.createRagdoll has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (5 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cloth.collide (cognitive 18) · ×1
  • cloth.collide (cognitive 18) src/cloth.js:305 — cloth.collide has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer-volume.volumeInterval (cognitive 18) · ×1
  • path-tracer-volume.volumeInterval (cognitive 18) src/path-tracer-volume.js:34 — path-tracer-volume.volumeInterval has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vegetation.bakeCrownSkyVisibility (cognitive 18) · ×1
  • vegetation.bakeCrownSkyVisibility (cognitive 18) src/vegetation.js:432 — vegetation.bakeCrownSkyVisibility has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-scene.oceanTimeGeometries (cognitive 18) · ×1
  • agent-scene.oceanTimeGeometries (cognitive 18) REDACTED:1334 — agent-scene.oceanTimeGeometries has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). 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.
D2 · Cognitive Complexity · path-tracer-light-tree.splitGroup (cognitive 18) · ×1
  • path-tracer-light-tree.splitGroup (cognitive 18) src/path-tracer-light-tree.js:140 — path-tracer-light-tree.splitGroup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 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.
D2 · Cognitive Complexity · streaming.createStreaming.update (cognitive 18) · ×1
  • streaming.createStreaming.update (cognitive 18) src/streaming.js:353 — streaming.createStreaming.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 2 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.createThreeCompat · ×1
  • index.createThreeCompat::environmentFor (cognitive 18) packages/three-compat/index.mjs:574 — index.createThreeCompat::environmentFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.createThreeCompat) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · film.createSettlement (cognitive 18) · ×1
  • film.createSettlement (cognitive 18) src/film.js:633 — film.createSettlement has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · heightfield.createHeightfieldGeometry (cognitive 18) · ×1
  • heightfield.createHeightfieldGeometry (cognitive 18) src/heightfield.js:123 — heightfield.createHeightfieldGeometry has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · createCamera (cognitive 18) · ×1
  • createCamera (cognitive 18) src/path-tracer.js:155 — createCamera has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 3, loops 2, other 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · jointLimits (cognitive 18) · ×1
  • jointLimits (cognitive 18) src/agent-motion.js:234 — jointLimits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveLights (cognitive 18) · ×1
  • resolveLights (cognitive 18) src/vehicle.js:408 — resolveLights has cognitive complexity 18 (threshold 15). Drivers by points: other 6, boolean chains 5, ternaries 2 (4 pts), if/else 3 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 420, 409, 428). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · normalizeSparkSystem (cognitive 18) · ×1
  • normalizeSparkSystem (cognitive 18) src/agent-particles.js:234 — normalizeSparkSystem has cognitive complexity 18 (threshold 15). Drivers by points: other 9, if/else 6, boolean chains 2, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · packWebGpuLocalVolumes (cognitive 18) · ×1
  • packWebGpuLocalVolumes (cognitive 18) src/path-tracer-webgpu-local-volumes.js:55 — packWebGpuLocalVolumes has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (10 pts), other 4, if/else 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 61, 57, 65, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · createCrowd (cognitive 18) · ×1
  • createCrowd (cognitive 18) src/retarget.js:490 — createCrowd has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, other 2, ternaries 2. Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · validateDefinition (cognitive 18) · ×1
  • validateDefinition (cognitive 18) src/streaming.js:156 — validateDefinition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 3, other 2, loops 1 (nesting depth added 1). 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: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createStreaming (cognitive 18) · ×1
  • createStreaming (cognitive 18) src/streaming.js:190 — createStreaming has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6, other 6, boolean chains 4, loops 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createStreaming.update (cognitive 18) · ×1
  • createStreaming.update (cognitive 18) src/streaming.js:353 — createStreaming.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 2 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cutTriangle (cognitive 18) · ×1
  • cutTriangle (cognitive 18) src/flush-clip.js:177 — cutTriangle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editMesh (cognitive 18) · ×1
  • editMesh (cognitive 18) src/mesh-edit.js:455 — editMesh has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), ternaries 2 (6 pts), if/else 1 (2 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · renderNavigation (cognitive 18) · ×1
  • renderNavigation (cognitive 18) REDACTED:305 — renderNavigation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), ternaries 3, boolean chains 1 (nesting depth added 8). Of this number, 11 points are the body's own statements and 7 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.
D2 · Cognitive Complexity · validateGeometry (cognitive 18) · ×1
  • validateGeometry (cognitive 18) src/surface-attachment.js:49 — validateGeometry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 4, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileBlur (cognitive 18) · ×1
  • compileBlur (cognitive 18) src/field-mesh-inputs.js:308 — compileBlur has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (4 pts), boolean chains 3, if/else 3, other 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planTileBlades (cognitive 18) · ×1
  • planTileBlades (cognitive 18) src/grass.js:87 — planTileBlades has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeTrackEffects (cognitive 18) · ×1
  • normalizeTrackEffects (cognitive 18) src/animation-modifiers.js:113 — normalizeTrackEffects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, other 2, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateLayer (cognitive 18) · ×1
  • validateLayer (cognitive 18) src/splat.js:43 — validateLayer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (4 pts), boolean chains 3, other 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · triangle-bvh.transformedTriangleBounds (cognitive 17) · ×1
  • triangle-bvh.transformedTriangleBounds (cognitive 17) src/triangle-bvh.js:227 — triangle-bvh.transformedTriangleBounds has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-query.containment (cognitive 17) · ×1
  • mesh-query.containment (cognitive 17) src/mesh-query.js:363 — mesh-query.containment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-query.createMeshPairQuery (cognitive 17) · ×1
  • mesh-query.createMeshPairQuery (cognitive 17) src/mesh-query.js:594 — mesh-query.createMeshPairQuery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mesh-reshape.trisToQuads (cognitive 17) · ×1
  • mesh-reshape.trisToQuads (cognitive 17) src/mesh-reshape.js:163 — mesh-reshape.trisToQuads has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · kernel-offload.buildWithKernels (cognitive 17) · ×1
  • kernel-offload.buildWithKernels (cognitive 17) src/kernel-offload.js:245 — kernel-offload.buildWithKernels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Decimator.buildQuadrics (cognitive 17) · ×1
  • Decimator.buildQuadrics (cognitive 17) src/mesh-decimate.js:154 — Decimator.buildQuadrics has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · animation.createAnimationPlayer.apply (cognitive 17) · ×1
  • animation.createAnimationPlayer.apply (cognitive 17) src/animation.js:291 — animation.createAnimationPlayer.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · animation-modifiers.sampleTrackWithEffects (cognitive 17) · ×1
  • animation-modifiers.sampleTrackWithEffects (cognitive 17) src/animation-modifiers.js:228 — animation-modifiers.sampleTrackWithEffects has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), loops 4 (6 pts), boolean chains 1, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skinning.skinnedWorldBounds (cognitive 17) · ×1
  • skinning.skinnedWorldBounds (cognitive 17) src/skinning.js:321 — skinning.skinnedWorldBounds has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · retarget.mapHumanoidBones (cognitive 17) · ×1
  • retarget.mapHumanoidBones (cognitive 17) src/retarget.js:127 — retarget.mapHumanoidBones has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-drive-schema.normalizeLights (cognitive 17) · ×1
  • agent-drive-schema.normalizeLights (cognitive 17) src/agent-drive-schema.js:71 — agent-drive-schema.normalizeLights has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rig.bakedTracks (cognitive 17) · ×1
  • rig.bakedTracks (cognitive 17) src/rig.js:415 — rig.bakedTracks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fracture.buildCell (cognitive 17) · ×1
  • fracture.buildCell (cognitive 17) src/fracture.js:225 — fracture.buildCell has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · navmesh.rasterizeTopSurface (cognitive 17) · ×1
  • navmesh.rasterizeTopSurface (cognitive 17) src/navmesh.js:350 — navmesh.rasterizeTopSurface has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · crowd-skinning.mergeCrowdGeometry (cognitive 17) · ×1
  • crowd-skinning.mergeCrowdGeometry (cognitive 17) src/crowd-skinning.js:105 — crowd-skinning.mergeCrowdGeometry has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (6 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · flush-clip.withPointsOnSides (cognitive 17) · ×1
  • flush-clip.withPointsOnSides (cognitive 17) src/flush-clip.js:281 — flush-clip.withPointsOnSides has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sun-bounce.clusterSamples (cognitive 17) · ×1
  • sun-bounce.clusterSamples (cognitive 17) src/sun-bounce.js:127 — sun-bounce.clusterSamples has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 pts), ternaries 1 (nesting depth added 8). Of this number, 9 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · path-tracer-denoise.smoothedVariance (cognitive 17) · ×1
  • path-tracer-denoise.smoothedVariance (cognitive 17) src/path-tracer-denoise.js:47 — path-tracer-denoise.smoothedVariance has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 1 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · path-tracer-gpu-pack.packAtlas (cognitive 17) · ×1
  • path-tracer-gpu-pack.packAtlas (cognitive 17) src/path-tracer-gpu-pack.js:137 — path-tracer-gpu-pack.packAtlas has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frame-checks.placementProblems (cognitive 17) · ×1
  • frame-checks.placementProblems (cognitive 17) src/frame-checks.js:249 — frame-checks.placementProblems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), loops 3, boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 254). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · film-rig.createFilmActorRig.<returned closure> (cognitive 17) · ×1
  • film-rig.createFilmActorRig.<returned closure> (cognitive 17) src/film-rig.js:120 — film-rig.createFilmActorRig.<returned closure> has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (6 pts), ternaries 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateMaterialMaps (cognitive 17) · ×1
  • validateMaterialMaps (cognitive 17) src/renderer.js:192 — validateMaterialMaps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 1 (2 pts), other 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createPathTracer.enterSubsurface (cognitive 17) · ×1
  • createPathTracer.enterSubsurface (cognitive 17) src/path-tracer.js:891 — createPathTracer.enterSubsurface has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (5 pts), ternaries 1 (2 pts), other 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · createFlightController (cognitive 17) · ×1
  • createFlightController (cognitive 17) src/player.js:694 — createFlightController has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, other 6, boolean chains 3. Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (writeNode, advance, steer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · compileParameters (cognitive 17) · ×1
  • compileParameters (cognitive 17) src/animation-graph.js:90 — compileParameters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), other 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createThreeCompat · ×1
  • createThreeCompat::constructor (cognitive 17) packages/three-compat/index.mjs:396 — createThreeCompat::constructor has cognitive complexity 17 (threshold 15). Drivers by points: other 13, if/else 1 (2 pts), loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · meshFrom (cognitive 17) · ×1
  • meshFrom (cognitive 17) src/modeling.js:64 — meshFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (6 pts), boolean chains 1, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · trimFrom (cognitive 17) · ×1
  • trimFrom (cognitive 17) src/modeling.js:281 — trimFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, ternaries 2 (3 pts), other 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createParameterTemplate (cognitive 17) · ×1
  • createParameterTemplate (cognitive 17) src/path-tracer-webgpu.js:182 — createParameterTemplate has cognitive complexity 17 (threshold 15). Drivers by points: other 15, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createLocalVolumeSurfaceShadow · ×1
  • createLocalVolumeSurfaceShadow::writeSurfaceShadow (cognitive 17) src/path-tracer-volume.js:410 — createLocalVolumeSurfaceShadow::writeSurfaceShadow has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), loops 4 (6 pts), if/else 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · meshData (cognitive 17) · ×1
  • meshData (cognitive 17) src/mesh-edit.js:529 — meshData has cognitive complexity 17 (threshold 15). Drivers by points: loops 9 (12 pts), if/else 3 (5 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · bakeMaterialPattern (cognitive 17) · ×1
  • bakeMaterialPattern (cognitive 17) src/material-patterns.js:225 — bakeMaterialPattern has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), loops 3 (6 pts), if/else 2, other 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createAnimationPlayer.apply (cognitive 17) · ×1
  • createAnimationPlayer.apply (cognitive 17) src/animation.js:291 — createAnimationPlayer.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeChain (cognitive 17) · ×1
  • normalizeChain (cognitive 17) src/spring-bones.js:61 — normalizeChain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (5 pts), other 5, ternaries 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compileNode (cognitive 17) · ×1
  • compileNode (cognitive 17) src/modeling-sdf.js:187 — compileNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 1 (2 pts), other 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · blendInfluences (cognitive 17) · ×1
  • blendInfluences (cognitive 17) src/mesh-import.js:92 — blendInfluences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (5 pts), loops 4 (5 pts), ternaries 2 (3 pts), boolean chains 2, other 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometry.cone (cognitive 16) · ×1
  • geometry.cone (cognitive 16) src/geometry.js:94 — geometry.cone has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), loops 3 (5 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geometry.cylinder (cognitive 16) · ×1
  • geometry.cylinder (cognitive 16) src/geometry.js:262 — geometry.cylinder has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (7 pts), ternaries 2 (6 pts), boolean chains 2, if/else 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.
D2 · Cognitive Complexity · mesh-query.validateSelfIntersections (cognitive 16) · ×1
  • mesh-query.validateSelfIntersections (cognitive 16) src/mesh-query.js:282 — mesh-query.validateSelfIntersections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 285). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · mesh-render.triangulateMesh (cognitive 16) · ×1
  • mesh-render.triangulateMesh (cognitive 16) src/mesh-render.js:99 — mesh-render.triangulateMesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-lint-geometry.unmatchedMirrorVertices (cognitive 16) · ×1
  • mesh-lint-geometry.unmatchedMirrorVertices (cognitive 16) src/mesh-lint-geometry.js:181 — mesh-lint-geometry.unmatchedMirrorVertices has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (11 pts), boolean chains 3, if/else 1 (2 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-attribute-edits.setVertexGroup (cognitive 16) · ×1
  • mesh-attribute-edits.setVertexGroup (cognitive 16) src/mesh-attribute-edits.js:146 — mesh-attribute-edits.setVertexGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-subdivide.vertexPoints (cognitive 16) · ×1
  • mesh-subdivide.vertexPoints (cognitive 16) src/mesh-subdivide.js:147 — mesh-subdivide.vertexPoints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-generator-modifiers.skinMesh (cognitive 16) · ×1
  • mesh-generator-modifiers.skinMesh (cognitive 16) src/mesh-generator-modifiers.js:188 — mesh-generator-modifiers.skinMesh has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 1 (2 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · mesh-remesh.floodOutside (cognitive 16) · ×1
  • mesh-remesh.floodOutside (cognitive 16) src/mesh-remesh.js:86 — mesh-remesh.floodOutside has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mesh-instance-placement.checkedPlace (cognitive 16) · ×1
  • mesh-instance-placement.checkedPlace (cognitive 16) src/mesh-instance-placement.js:32 — mesh-instance-placement.checkedPlace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mesh-instances.curvePoints (cognitive 16) · ×1
  • mesh-instances.curvePoints (cognitive 16) src/mesh-instances.js:203 — mesh-instances.curvePoints has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · triangulate.bridgeHole (cognitive 16) · ×1
  • triangulate.bridgeHole (cognitive 16) src/triangulate.js:48 — triangulate.bridgeHole has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · force-fields.addFieldAcceleration (cognitive 16) · ×1
  • force-fields.addFieldAcceleration (cognitive 16) src/force-fields.js:129 — force-fields.addFieldAcceleration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (6 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · vehicle-damage.recomputeNormals (cognitive 16) · ×1
  • vehicle-damage.recomputeNormals (cognitive 16) src/vehicle-damage.js:102 — vehicle-damage.recomputeNormals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cloth-bending.solveDihedrals (cognitive 16) · ×1
  • cloth-bending.solveDihedrals (cognitive 16) src/cloth-bending.js:135 — cloth-bending.solveDihedrals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cloth.pushOutOfBox (cognitive 16) · ×1
  • cloth.pushOutOfBox (cognitive 16) src/cloth.js:266 — cloth.pushOutOfBox has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (7 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vegetation-textures.paintLeaf (cognitive 16) · ×1
  • vegetation-textures.paintLeaf (cognitive 16) src/vegetation-textures.js:33 — vegetation-textures.paintLeaf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flush-clip.splitPolygon (cognitive 16) · ×1
  • flush-clip.splitPolygon (cognitive 16) src/flush-clip.js:82 — flush-clip.splitPolygon has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 8). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · material-snippet.probeMaterialSnippets (cognitive 16) · ×1
  • material-snippet.probeMaterialSnippets (cognitive 16) REDACTED:204 — material-snippet.probeMaterialSnippets has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-diagnostics.materialProblems (cognitive 16) · ×1
  • agent-diagnostics.materialProblems (cognitive 16) src/agent-diagnostics.js:23 — agent-diagnostics.materialProblems has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), boolean chains 5, if/else 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer-gpu-pack.packTriangles (cognitive 16) · ×1
  • path-tracer-gpu-pack.packTriangles (cognitive 16) src/path-tracer-gpu-pack.js:94 — path-tracer-gpu-pack.packTriangles has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 3 (4 pts), boolean chains 2, if/else 1 (2 pts) (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · path-tracer.fillHit (cognitive 16) · ×1
  • path-tracer.fillHit (cognitive 16) src/path-tracer.js:325 — path-tracer.fillHit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · path-tracer.createPathTracer.enterSubsurface (cognitive 16) · ×1
  • path-tracer.createPathTracer.enterSubsurface (cognitive 16) src/path-tracer.js:891 — path-tracer.createPathTracer.enterSubsurface has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · benchmark.runBenchmark (cognitive 16) · ×1
  • benchmark.runBenchmark (cognitive 16) src/benchmark.js:23 — benchmark.runBenchmark has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), loops 4 (5 pts), if/else 2 (3 pts) (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detail.completeDetail (cognitive 16) · ×1
  • detail.completeDetail (cognitive 16) src/hero-lab/loop/detail.js:13 — detail.completeDetail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · materialMapState (cognitive 16) · ×1
  • materialMapState (cognitive 16) src/renderer.js:225 — materialMapState has cognitive complexity 16 (threshold 15). Drivers by points: other 12, boolean chains 2, if/else 2. Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · scanExtensions (cognitive 16) · ×1
  • scanExtensions (cognitive 16) src/gltf.js:219 — scanExtensions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 4 (5 pts), other 3, boolean chains 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nodeInstanceCount (cognitive 16) · ×1
  • nodeInstanceCount (cognitive 16) src/gltf.js:319 — nodeInstanceCount has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · animateSet (cognitive 16) · ×1
  • animateSet (cognitive 16) src/film.js:780 — animateSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, loops 1, other 1, ternaries 1 (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 7 function items inside it that branch (a function literal at line 798, a function literal at line 783, a function literal at line 788, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · evaluateMorphLayers (cognitive 16) · ×1
  • evaluateMorphLayers (cognitive 16) src/skeleton-pose.js:847 — evaluateMorphLayers has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), loops 3 (6 pts), if/else 1 (2 pts), other 1 (nesting depth added 9). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createVehicleController (cognitive 16) · ×1
  • createVehicleController (cognitive 16) src/player.js:578 — createVehicleController has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 5, other 5 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (updateSpeed, advance, writeNode, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · normalizeAgentPhysics (cognitive 16) · ×1
  • normalizeAgentPhysics (cognitive 16) src/agent-physics.js:327 — normalizeAgentPhysics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 4, other 3. Of this number, 13 points are the body's own statements and 3 belong to 8 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · addCrownClumps (cognitive 16) · ×1
  • addCrownClumps (cognitive 16) src/vegetation.js:322 — addCrownClumps has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 2 (4 pts), loops 3 (4 pts), other 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createMeshPairQuery · ×1
  • createMeshPairQuery::evaluate (cognitive 16) src/mesh-query.js:603 — createMeshPairQuery::evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planCurveSet (cognitive 16) · ×1
  • planCurveSet (cognitive 16) src/modeling.js:414 — planCurveSet has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 4, if/else 4. Of this number, 8 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createCrowdRig (cognitive 16) · ×1
  • createCrowdRig (cognitive 16) src/crowd-skinning.js:50 — createCrowdRig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · spread (cognitive 16) · ×1
  • spread (cognitive 16) src/scene-query.js:353 — spread has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 2 (6 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · writeMaterial (cognitive 16) · ×1
  • writeMaterial (cognitive 16) src/export.js:181 — writeMaterial has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, other 5, boolean chains 1, loops 1, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · textureProblems (cognitive 16) · ×1
  • textureProblems (cognitive 16) src/frame-checks.js:303 — textureProblems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 5, loops 2 (3 pts), other 2 (nesting depth added 5). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · surfaceUnder (cognitive 16) · ×1
  • surfaceUnder (cognitive 16) src/settle.js:127 — surfaceUnder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dualMesh (cognitive 16) · ×1
  • dualMesh (cognitive 16) src/mesh-reshape.js:79 — dualMesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constraintsFor (cognitive 16) · ×1
  • constraintsFor (cognitive 16) src/agent-relations.js:247 — constraintsFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 1, other 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · comparatorBounds (cognitive 16) · ×1
  • comparatorBounds (cognitive 16) REDACTED:87 — comparatorBounds has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (12 pts), other 2, if/else 1, match/switch 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · writeRule (cognitive 16) · ×1
  • writeRule (cognitive 16) src/splat.js:129 — writeRule has cognitive complexity 16 (threshold 15). Drivers by points: other 9, ternaries 6, boolean chains 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: CrucibleRenderer src/renderer.js:708 — ClassTooLong — 1749 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 1349 over it, 4.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: CrucibleRenderer src/renderer.js:708 — TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) bench/cycles-parity/classroom_bridge.py:463 — bench/cycles-parity/classroom_bridge.py:463-463 | packages/blender-addon/cook_blender/material_export.py:21-21 — These two members are one piece of code written twice and then edited apart: 1 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.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) bench/cycles-parity/render-cycles.py:612 — bench/cycles-parity/render-cycles.py:612-640 | bench/reference/render-blender.py:731-756 — These two members are one piece of code written twice and then edited apart: 26 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.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) bench/cycles-parity/render-cycles.py:518 — bench/cycles-parity/render-cycles.py:518-546 | bench/reference/render-blender.py:684-716 — These two members are one piece of code written twice and then edited apart: 29 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.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) bench/cycles-parity/render-cycles.py:446 — bench/cycles-parity/render-cycles.py:446-472 | bench/reference/render-blender.py:529-555 — These two members are one piece of code written twice and then edited apart: 27 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.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) bench/cycles-parity/render-cycles.py:476 — bench/cycles-parity/render-cycles.py:476-504 | bench/reference/render-blender.py:561-583 — These two members are one piece of code written twice and then edited apart: 23 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.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) bench/cycles-parity/render-cycles.py:585 — bench/cycles-parity/render-cycles.py:585-608 | bench/reference/render-blender.py:780-799 — These two members are one piece of code written twice and then edited apart: 20 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.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) bench/cycles-parity/make-diffuse-transmission-figure.py:21 — bench/cycles-parity/make-diffuse-transmission-figure.py:21-26 | bench/cycles-parity/make-texture-mips-figure.py:27-34 — These two members are one piece of code written twice and then edited apart: 6 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.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) bench/cycles-parity/render-cycles.py:263 — bench/cycles-parity/render-cycles.py:263-272 | bench/cycles-parity/render-cycles.py:276-285 | bench/reference/render-blender.py:148-158 | bench/reference/render-blender.py:162-171 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) bench/cycles-parity/probe-shade-gaps.py:67 — bench/cycles-parity/probe-shade-gaps.py:67-75 | bench/cycles-parity/run-sphere-light-parity.py:81-91 — These two members are one piece of code written twice and then edited apart: 9 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.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) bench/reference/noise.py:27 — bench/reference/noise.py:27-29 | bench/reference/shadow-depth.py:30-32 — These two members are one piece of code written twice and then edited apart: 3 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.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) bench/reference/crown-leak.py:23 — bench/reference/crown-leak.py:23-26 | bench/reference/default-look-score.py:23-26 | bench/reference/score.py:26-29 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) bench/cycles-parity/render-cycles.py:353 — bench/cycles-parity/render-cycles.py:353-356 | bench/reference/render-blender.py:194-197 — These two members are one piece of code written twice and then edited apart: 4 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.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) bench/cycles-parity/classroom_bridge.py:59 — bench/cycles-parity/classroom_bridge.py:59-62 | bench/cycles-parity/run-normal-map-parity.py:36-39 | bench/tiers/render-eevee.py:36-39 | bench/tiers/score-tiers.py:34-37 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, 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 out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) bench/cycles-parity/render-cycles.py:599 — bench/cycles-parity/render-cycles.py:599-607 | bench/reference/render-blender.py:790-799 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) bench/cycles-parity/render-cycles.py:242 — bench/cycles-parity/render-cycles.py:242-259 | bench/reference/render-blender.py:127-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) bench/cycles-parity/render-cycles.py:344 — bench/cycles-parity/render-cycles.py:344-349 | bench/reference/render-blender.py:184-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) bench/cycles-parity/render-cycles.py:246 — bench/cycles-parity/render-cycles.py:246-250 | bench/reference/render-blender.py:131-135 | bench/reference/render-blender.py:503-507 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) bench/cycles-parity/render-cycles.py:72 — bench/cycles-parity/render-cycles.py:72-77 | bench/cycles-parity/run-m0-suite.py:15-20 | bench/cycles-parity/run-m1-parity.py:23-28 — 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 all 3 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×1
  • Duplicated block (5 lines × 2) bench/cycles-parity/render-cycles.py:449 — bench/cycles-parity/render-cycles.py:449-453 | bench/reference/render-blender.py:533-537 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×1
  • Duplicated block (8 lines × 2) bench/wasm-skin/src/lib.rs:73 — bench/wasm-skin/src/lib.rs:73-80 | bench/wasm-skin/src/lib.rs:81-88 — 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.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 478 Python, JavaScript/TypeScript production file(s) this check read across 6 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 1462 plain JS — the untyped files are packages/denoise-oidn/fetch-oidn.mjs, packages/denoise-oidn/index.mjs, packages/three-bridge/index.mjs, packages/three-compat/index.mjs, scripts/addon-job-paths.mjs, scripts/agent-asset-catalog.mjs (+1456 more).
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (24 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (24 clone groups) scripts/hero-first-view-crop.mjs:43 — 24 duplicated blocks under the repository root have copies in at least two of the sibling directories bin, packages, scripts, src — 20 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 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 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 24 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 (114 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (114 matched lines × 2 locations) scripts/smoke-agent-character.mjs:29 — scripts/smoke-agent-character.mjs:29 · scripts/smoke-agent-motion.mjs:23 — the two spans are one implementation copied and then locally edited — 1226 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 (102 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (102 matched lines × 2 locations) scripts/smoke-agent-texture-sequence-streamed.mjs:26 — scripts/smoke-agent-texture-sequence-streamed.mjs:26 · scripts/smoke-agent-texture-sequence.mjs:21 — the two spans are one implementation copied and then locally edited — 1111 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 (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) scripts/draw-water-sheet.mjs:16 — scripts/draw-water-sheet.mjs:16 · scripts/measure-water-roughness.mjs:10 — the two spans are one implementation copied and then locally edited — 464 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 (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) src/geometry-simplify.js:15 — src/geometry-simplify.js:15 · src/mesh-decimate.js:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) src/player.js:652 — src/player.js:652 · src/player.js:766 — the two spans are one implementation copied and then locally edited — 238 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) src/main.js:182 — src/main.js:182 · src/view2d.js:138 — the two spans are one implementation copied and then locally edited — 299 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 (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) src/mesh-edit.js:168 — src/mesh-edit.js:168 · src/mesh-edit.js:271 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) src/mesh-edit.js:214 — src/mesh-edit.js:214 · src/mesh-edit.js: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.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) scripts/smoke-object-motion-blur.mjs:28 — scripts/smoke-object-motion-blur.mjs:28 · scripts/smoke-render-passes.mjs:26 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (23 matched lines × 2 locations) src/closed-room.js:133 — src/closed-room.js:133 · src/fitted-closed-room.js:60 — the two spans are one implementation copied and then locally edited — 151 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 (22 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (22 matched lines × 2 locations) scripts/downsample-hdr.mjs:12 — scripts/downsample-hdr.mjs:12 · scripts/split-showcase-glb.mjs:424 — the two spans are one implementation copied and then locally edited — 261 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 (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) src/agent-explosion.js:34 — src/agent-explosion.js:34 · src/vehicle-damage.js:244 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (17 matched lines × 2 locations) src/closed-room.js:164 — src/closed-room.js:164 · src/closed-room.js:204 — the two spans are one implementation copied and then locally edited — 134 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (15 lines × 3 locations) · ×1
  • Duplicated block (15 lines × 3 locations) scripts/smoke-glb-fidelity.mjs:10 — scripts/smoke-glb-fidelity.mjs:10 · scripts/smoke-gltf-morph.mjs:8 · scripts/smoke-primitive-seams.mjs:20 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. 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.
R2 · Cyclomatic Complexity · Complex function validateDocument (cyclomatic 185, cognitive 285) · ×1
  • Complex function validateDocument (cyclomatic 185, cognitive 285) src/gltf.js:339 — validateDocument has cyclomatic complexity 185 and cognitive complexity 285; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 183, cognitive 235) · ×1
  • Complex function (anonymous) (cyclomatic 183, cognitive 235) src/mesh-recipe.js:122 — (anonymous) has cyclomatic complexity 183 and cognitive complexity 235; 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 runJob (cyclomatic 127, cognitive 279) · ×1
  • Complex function runJob (cyclomatic 127, cognitive 279) scripts/agent-runtime.mjs:802 — runJob has cyclomatic complexity 127 and cognitive complexity 279; 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 constructor (cyclomatic 86, cognitive 103) · ×1
  • Complex function constructor (cyclomatic 86, cognitive 103) src/renderer.js:709 — constructor has cyclomatic complexity 86 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.
R2 · Cyclomatic Complexity · Complex function updateParts (cyclomatic 82, cognitive 117) · ×1
  • Complex function updateParts (cyclomatic 82, cognitive 117) src/renderer.js:1582 — updateParts has cyclomatic complexity 82 and cognitive complexity 117; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function evaluate (cyclomatic 75, cognitive 113) · ×1
  • Complex function evaluate (cyclomatic 75, cognitive 113) src/mesh-select.js:64 — evaluate has cyclomatic complexity 75 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function geometryEstimate (cyclomatic 73, cognitive 80) · ×1
  • Complex function geometryEstimate (cyclomatic 73, cognitive 80) REDACTED:552 — geometryEstimate has cyclomatic complexity 73 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function bevelEdges (cyclomatic 71, cognitive 128) · ×1
  • Complex function bevelEdges (cyclomatic 71, cognitive 128) src/mesh-bevel.js:171 — bevelEdges has cyclomatic complexity 71 and cognitive complexity 128; 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 settingsFrom (cyclomatic 68, cognitive 75) · ×1
  • Complex function settingsFrom (cyclomatic 68, cognitive 75) scripts/agent-render-jobs.mjs:111 — settingsFrom has cyclomatic complexity 68 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 67, cognitive 72) · ×1
  • Complex function render (cyclomatic 67, cognitive 72) src/renderer.js:2720 — render has cyclomatic complexity 67 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function apply (cyclomatic 66, cognitive 133) · ×1
  • Complex function apply (cyclomatic 66, cognitive 133) REDACTED:2145 — apply has cyclomatic complexity 66 and cognitive complexity 133; 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 runEdit (cyclomatic 63, cognitive 86) · ×1
  • Complex function runEdit (cyclomatic 63, cognitive 86) src/mesh-recipe.js:418 — runEdit has cyclomatic complexity 63 and cognitive complexity 86; 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 renderMedia (cyclomatic 61, cognitive 85) · ×1
  • Complex function renderMedia (cyclomatic 61, cognitive 85) scripts/render-media.mjs:160 — renderMedia has cyclomatic complexity 61 and cognitive complexity 85; 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 update (cyclomatic 56, cognitive 76) · ×1
  • Complex function update (cyclomatic 56, cognitive 76) src/surface-attachment.js:164 — update has cyclomatic complexity 56 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function publish (cyclomatic 55, cognitive 58) · ×1
  • Complex function publish (cyclomatic 55, cognitive 58) src/agent-asset.js:713 — publish has cyclomatic complexity 55 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 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 parseRenderOptions (cyclomatic 53, cognitive 51) · ×1
  • Complex function parseRenderOptions (cyclomatic 53, cognitive 51) scripts/render-media.mjs:68 — parseRenderOptions has cyclomatic complexity 53 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function stage (cyclomatic 51, cognitive 61) · ×1
  • Complex function stage (cyclomatic 51, cognitive 61) REDACTED:1640 — stage has cyclomatic complexity 51 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function shrinkwrapGeometry (cyclomatic 48, cognitive 63) · ×1
  • Complex function shrinkwrapGeometry (cyclomatic 48, cognitive 63) src/shrinkwrap.js:89 — shrinkwrapGeometry has cyclomatic complexity 48 and cognitive complexity 63; 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 compileAgentMotion (cyclomatic 47, cognitive 70) · ×1
  • Complex function compileAgentMotion (cyclomatic 47, cognitive 70) src/agent-motion.js:895 — compileAgentMotion has cyclomatic complexity 47 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeExtraConstraint (cyclomatic 46, cognitive 58) · ×1
  • Complex function normalizeExtraConstraint (cyclomatic 46, cognitive 58) src/node-constraints.js:181 — normalizeExtraConstraint has cyclomatic complexity 46 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 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 maskJavaScript (cyclomatic 45, cognitive 91) · ×1
  • Complex function maskJavaScript (cyclomatic 45, cognitive 91) scripts/check-names.mjs:51 — maskJavaScript has cyclomatic complexity 45 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 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 describeIgnoredFeatures (cyclomatic 45, cognitive 53) · ×1
  • Complex function describeIgnoredFeatures (cyclomatic 45, cognitive 53) src/path-tracer.js:1043 — describeIgnoredFeatures has cyclomatic complexity 45 and cognitive complexity 53; 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 nodeFrom (cyclomatic 44, cognitive 53) · ×1
  • Complex function nodeFrom (cyclomatic 44, cognitive 53) REDACTED:357 — nodeFrom has cyclomatic complexity 44 and cognitive complexity 53; 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 selectEdges (cyclomatic 42, cognitive 63) · ×1
  • Complex function selectEdges (cyclomatic 42, cognitive 63) src/mesh-bevel.js:29 — selectEdges has cyclomatic complexity 42 and cognitive complexity 63; 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 inspect (cyclomatic 42, cognitive 49) · ×1
  • Complex function inspect (cyclomatic 42, cognitive 49) src/agent-asset.js:1053 — inspect has cyclomatic complexity 42 and cognitive complexity 49; 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 apply (cyclomatic 41, cognitive 97) · ×1
  • Complex function apply (cyclomatic 41, cognitive 97) src/agent-asset.js:952 — apply has cyclomatic complexity 41 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function recover (cyclomatic 41, cognitive 64) · ×1
  • Complex function recover (cyclomatic 41, cognitive 64) scripts/agent-render-jobs.mjs:795 — recover has cyclomatic complexity 41 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.
R2 · Cyclomatic Complexity · Complex function createSolver (cyclomatic 41, cognitive 51) · ×1
  • Complex function createSolver (cyclomatic 41, cognitive 51) src/skeleton-pose.js:333 — createSolver has cyclomatic complexity 41 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 fitPerspectiveDistance (cyclomatic 41, cognitive 29) · ×1
  • Complex function fitPerspectiveDistance (cyclomatic 41, cognitive 29) src/camera.js:169 — fitPerspectiveDistance has cyclomatic complexity 41 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.
R2 · Cyclomatic Complexity · Complex function visitNode (cyclomatic 40, cognitive 88) · ×1
  • Complex function visitNode (cyclomatic 40, cognitive 88) src/gltf.js:1298 — visitNode has cyclomatic complexity 40 and cognitive complexity 88; 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 createModel (cyclomatic 40, cognitive 64) · ×1
  • Complex function createModel (cyclomatic 40, cognitive 64) src/model.js:24 — createModel has cyclomatic complexity 40 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.
R2 · Cyclomatic Complexity · Complex function resolveLocalVolume (cyclomatic 40, cognitive 49) · ×1
  • Complex function resolveLocalVolume (cyclomatic 40, cognitive 49) src/local-volume-resolve.js:38 — resolveLocalVolume has cyclomatic complexity 40 and cognitive complexity 49; 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 environmentFrom (cyclomatic 40, cognitive 47) · ×1
  • Complex function environmentFrom (cyclomatic 40, cognitive 47) src/agent-look.js:269 — environmentFrom has cyclomatic complexity 40 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.
R2 · Cyclomatic Complexity · Complex function evaluate (cyclomatic 40, cognitive 44) · ×1
  • Complex function evaluate (cyclomatic 40, cognitive 44) tests/agent-runtime.test.js:150 — evaluate has cyclomatic complexity 40 and cognitive complexity 44; 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 createCloth (cyclomatic 39, cognitive 39) · ×1
  • Complex function createCloth (cyclomatic 39, cognitive 39) src/cloth.js:567 — createCloth has cyclomatic complexity 39 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.
R2 · Cyclomatic Complexity · Complex function replaceParts (cyclomatic 38, cognitive 51) · ×1
  • Complex function replaceParts (cyclomatic 38, cognitive 51) src/renderer.js:1408 — replaceParts has cyclomatic complexity 38 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 normalizeBody (cyclomatic 38, cognitive 40) · ×1
  • Complex function normalizeBody (cyclomatic 38, cognitive 40) src/agent-physics.js:82 — normalizeBody has cyclomatic complexity 38 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 resolveFrame (cyclomatic 38, cognitive 34) · ×1
  • Complex function resolveFrame (cyclomatic 38, cognitive 34) src/renderer.js:2340 — resolveFrame has cyclomatic complexity 38 and cognitive complexity 34; 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 drawBatch (cyclomatic 37, cognitive 61) · ×1
  • Complex function drawBatch (cyclomatic 37, cognitive 61) src/renderer.js:2622 — drawBatch has cyclomatic complexity 37 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createSurfaceAttachment (cyclomatic 37, cognitive 45) · ×1
  • Complex function createSurfaceAttachment (cyclomatic 37, cognitive 45) src/surface-attachment.js:89 — createSurfaceAttachment has cyclomatic complexity 37 and cognitive complexity 45; 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.
R3 · Large Files · src/renderer.js · ×1
  • src/renderer.js: 2809 lines of code src/renderer.js:1 — src/renderer.js has 2809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2321 lines of code REDACTED:1 — REDACTED has 2321 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 · src/gltf.js · ×1
  • src/gltf.js: 1755 lines of code src/gltf.js:1 — src/gltf.js has 1755 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 · src/path-tracer-webgpu-kernel.js · ×1
  • src/path-tracer-webgpu-kernel.js: 1555 lines of code src/path-tracer-webgpu-kernel.js:1 — src/path-tracer-webgpu-kernel.js has 1555 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 · src/path-tracer-gpu-shader.js · ×1
  • src/path-tracer-gpu-shader.js: 1229 lines of code src/path-tracer-gpu-shader.js:1 — src/path-tracer-gpu-shader.js has 1229 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 · src/path-tracer.js · ×1
  • src/path-tracer.js: 1219 lines of code src/path-tracer.js:1 — src/path-tracer.js has 1219 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 · src/physics.js · ×1
  • src/physics.js: 1195 lines of code src/physics.js:1 — src/physics.js has 1195 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 · src/agent-asset.js · ×1
  • src/agent-asset.js: 1161 lines of code src/agent-asset.js:1 — src/agent-asset.js has 1161 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 · src/netcode.js · ×1
  • src/netcode.js: 1121 lines of code src/netcode.js:1 — src/netcode.js has 1121 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 · src/agent-motion.js · ×1
  • src/agent-motion.js: 1115 lines of code src/agent-motion.js:1 — src/agent-motion.js has 1115 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 · src/shaders.js · ×1
  • src/shaders.js: 1028 lines of code src/shaders.js:1 — src/shaders.js has 1028 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 · src/vehicle.js · ×1
  • src/vehicle.js: 1009 lines of code src/vehicle.js:1 — src/vehicle.js has 1009 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 · src/film.js · ×1
  • src/film.js: 1004 lines of code src/film.js:1 — src/film.js has 1004 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 · src/light-bake.js · ×1
  • src/light-bake.js: 1001 lines of code src/light-bake.js:1 — src/light-bake.js has 1001 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 · src/fog-shader.js · ×1
  • src/fog-shader.js: 998 lines of code src/fog-shader.js:1 — src/fog-shader.js has 998 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 · src/skeleton-pose.js · ×1
  • src/skeleton-pose.js: 978 lines of code src/skeleton-pose.js:1 — src/skeleton-pose.js has 978 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 · src/player.js · ×1
  • src/player.js: 890 lines of code src/player.js:1 — src/player.js has 890 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 · src/node-constraints.js · ×1
  • src/node-constraints.js: 861 lines of code src/node-constraints.js:1 — src/node-constraints.js has 861 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 · src/path-tracer-scene.js · ×1
  • src/path-tracer-scene.js: 857 lines of code src/path-tracer-scene.js:1 — src/path-tracer-scene.js has 857 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 · src/cloth.js · ×1
  • src/cloth.js: 782 lines of code src/cloth.js:1 — src/cloth.js has 782 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 · src/vegetation.js · ×1
  • src/vegetation.js: 766 lines of code src/vegetation.js:1 — src/vegetation.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/three-compat/index.mjs · ×1
  • packages/three-compat/index.mjs: 761 lines of code packages/three-compat/index.mjs:1 — packages/three-compat/index.mjs has 761 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 · src/agent-physics.js · ×1
  • src/agent-physics.js: 749 lines of code src/agent-physics.js:1 — src/agent-physics.js has 749 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 · src/audio.js · ×1
  • src/audio.js: 717 lines of code src/audio.js:1 — src/audio.js has 717 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 · src/mesh-recipe.js · ×1
  • src/mesh-recipe.js: 711 lines of code src/mesh-recipe.js:1 — src/mesh-recipe.js has 711 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 · src/material-graph.js · ×1
  • src/material-graph.js: 706 lines of code src/material-graph.js:1 — src/material-graph.js has 706 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 · src/mesh-uv.js · ×1
  • src/mesh-uv.js: 685 lines of code src/mesh-uv.js:1 — src/mesh-uv.js has 685 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 · src/line-art.js · ×1
  • src/line-art.js: 651 lines of code src/line-art.js:1 — src/line-art.js has 651 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 · src/animation-graph.js · ×1
  • src/animation-graph.js: 632 lines of code src/animation-graph.js:1 — src/animation-graph.js has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/mesh-ops.js · ×1
  • src/mesh-ops.js: 617 lines of code src/mesh-ops.js:1 — src/mesh-ops.js has 617 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 · src/mesh-query.js · ×1
  • src/mesh-query.js: 604 lines of code src/mesh-query.js:1 — src/mesh-query.js has 604 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 · src/vehicle-damage.js · ×1
  • src/vehicle-damage.js: 594 lines of code src/vehicle-damage.js:1 — src/vehicle-damage.js has 594 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 · src/game-rules.js · ×1
  • src/game-rules.js: 552 lines of code src/game-rules.js:1 — src/game-rules.js has 552 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 · src/mesh-edit.js · ×1
  • src/mesh-edit.js: 547 lines of code src/mesh-edit.js:1 — src/mesh-edit.js has 547 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 · src/gas-sim.js · ×1
  • src/gas-sim.js: 531 lines of code src/gas-sim.js:1 — src/gas-sim.js has 531 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 · src/modeling.js · ×1
  • src/modeling.js: 526 lines of code src/modeling.js:1 — src/modeling.js has 526 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 · src/agent-particles.js · ×1
  • src/agent-particles.js: 523 lines of code src/agent-particles.js:1 — src/agent-particles.js has 523 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 · src/coplanar-overlap.js · ×1
  • src/coplanar-overlap.js: 516 lines of code src/coplanar-overlap.js:1 — src/coplanar-overlap.js has 516 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 · src/path-tracer-webgpu-local-volumes.js · ×1
  • src/path-tracer-webgpu-local-volumes.js: 498 lines of code src/path-tracer-webgpu-local-volumes.js:1 — src/path-tracer-webgpu-local-volumes.js has 498 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 · src/agent-cloth.js · ×1
  • src/agent-cloth.js: 492 lines of code src/agent-cloth.js:1 — src/agent-cloth.js has 492 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint script · ×1
  • No lint 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.
R8 · Dependency Hygiene · Unused dependency 'three-mesh-bvh' · ×1
  • Unused dependency 'three-mesh-bvh' package.json:306 — 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.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked templates/addon-starter/package.json:19 — templates/addon-starter/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
Minor — 113 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate src/export.js:65 — `!(geometry.indices instanceof Uint32Array) || geometry.indices.length === 0 || geometry.indices.length % 3 !== 0` appears character-identically in 2 files — src/export.js, src/light-bake.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/export-mesh.js:59 — `!(indices instanceof Uint32Array) || indices.length === 0 || indices.length % 3 !== 0` appears character-identically in 3 files — src/export-mesh.js, src/mesh-query.js, src/surface.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/mesh-convert.js:374 — `!(positions instanceof Float32Array) || positions.length % 3 !== 0 || positions.length === 0` appears character-identically in 2 files — src/mesh-convert.js, src/mesh-data.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/sculpt.js:12 — `!(positions instanceof Float32Array) || positions.length < 9 || positions.length % 3 || !(normals instanceof Float32Array) || normals.length…` appears character-identically in 2 files — src/sculpt.js, src/shrinkwrap.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/export.js:12 — `!(values instanceof Float32Array) || values.length !== length` appears character-identically in 2 files — src/export.js, src/morph.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:632 — `!Array.isArray(holes) || holes.length > 128` appears character-identically in 2 files — REDACTED, src/modeling.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-look.js:180 — `!Array.isArray(lights) || lights.length > maximum` appears character-identically in 3 files — src/agent-look.js, src/light-bake.js, src/lighting.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/three-bridge/index.mjs:463 — `!Array.isArray(parts) || parts.length === 0` appears character-identically in 4 files — packages/three-bridge/index.mjs, src/export-mesh.js, src/export.js, src/vehicle.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/irradiance-grid.js:239 — `!Array.isArray(parts) || parts.length === 0 || parts.length > MAX_BAKE_PARTS` appears character-identically in 2 files — src/irradiance-grid.js, src/probe-trace.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-explosion.js:60 — `!Array.isArray(value) || value.length !== 2` appears character-identically in 3 files — src/agent-explosion.js, src/agent-particles.js, src/local-volume-ramp.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-navigation.js:63 — `!Array.isArray(value) || value.length !== 2 || !value.every(Number.isFinite)` appears character-identically in 2 files — src/agent-navigation.js, src/navmesh.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-look.js:158 — `!Array.isArray(value) || value.length !== 3` appears character-identically in 9 files — src/agent-look.js, src/agent-recipe-checks.js, src/force-fields.js, src/line-art.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/clutter.js:276 — `!Array.isArray(value) || value.length !== 3 || !value.every(Number.isFinite)` appears character-identically in 4 files — src/clutter.js, src/game-rules.js, src/gas-sim.js, src/mesh-select.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:207 — `!Array.isArray(value) || value.length !== length` appears character-identically in 2 files — REDACTED, src/netcode.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-physics.js:76 — `!Array.isArray(value) || value.length > maximum` appears character-identically in 2 files — src/agent-physics.js, src/agent-recipe-checks.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/mesh-query.js:344 — `!Number.isFinite(determinant) || determinant === 0` appears character-identically in 3 files — src/mesh-query.js, src/scene-graph.js, src/shrinkwrap.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/animation.js:56 — `!Number.isFinite(duration) || duration <= 0` appears character-identically in 2 files — src/animation.js, src/crowd-skinning.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/camera-path.js:38 — `!Number.isFinite(fov) || fov <= 0 || fov >= 180` appears character-identically in 2 files — src/camera-path.js, src/camera.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/crowd-skinning.js:181 — `!Number.isFinite(frameRate) || frameRate <= 0` appears character-identically in 2 files — src/crowd-skinning.js, src/retarget.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/shrinkwrap.js:55 — `!Number.isFinite(length) || Math.abs(length - 1) > 0.001` appears character-identically in 2 files — src/shrinkwrap.js, src/surface-attachment.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/animation-mixer.js:148 — `!Number.isFinite(length) || length === 0` appears character-identically in 4 files — src/animation-mixer.js, src/animation.js, src/modeling.js, src/surface.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/camera-path.js:41 — `!Number.isFinite(near) || !Number.isFinite(far) || near <= 0 || far <= near` appears character-identically in 2 files — src/camera-path.js, src/camera.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/agent-terrain.js:21 — `!Number.isFinite(resolved) || resolved < minimum || resolved > maximum` appears character-identically in 3 files — src/agent-terrain.js, src/animation-ik.js, src/player.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/effects.js:12 — `!Number.isFinite(result) || result < minimum || result > maximum` appears character-identically in 4 files — src/effects.js, src/modeling-splines.js, src/post-fields.js, src/post-mask.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/game-rules.js:540 — `!Number.isFinite(stepSeconds) || stepSeconds <= 0` appears character-identically in 2 files — src/game-rules.js, src/npc-follower.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Disabled test · ×17
  • Disabled test tests/agent-asset-catalog.test.js:216 — 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/agent-runtime-jobs-root.test.js:51 — 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/agent-runtime-jobs-root.test.js:63 — 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/ambient-occlusion-flat-wall.test.js:71 — 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/ambient-occlusion-flat-wall.test.js:82 — 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/cycles-parity-python.test.js:44 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test tests/denoise-oidn-persistent.test.js:52 — 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/mcp-addons.test.js:104 — 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/mcp-addons.test.js:119 — 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/mcp-scene-ids.test.js:57 — 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/mcp-scene-ids.test.js:117 — 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/mcp-scene-ids.test.js:145 — 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/native-exit-code.test.js:43 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test tests/packaged-looks.test.js:29 — 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/packs.test.js:138 — 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/path-tracer-webgpu-fxc.test.js:35 — 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/path-tracer-webgpu-portal.test.js:121 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex src/agent-scene-modules.js:77 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/agent-scene-modules.js:94 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/agent-scene-modules.js:113 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex src/gltf.js:58 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch src/sun-bounce.js:203 — `findSunBounceLights` 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 bench/cycles-parity/large-sequence-memory.mjs:22 — `queryNvidiaSmi` 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 scripts/agent-render-estimate.mjs:258 — `parseHistory` 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.
D24 · Comment Value · redundant comment · ×2
  • redundant comment src/path-tracer-gpu-shader.js:22 — "Camera mode: one pixel is one jittered camera ray." repeats the code it sits on: 4 of its 5 words (camera, pixel, jittered, ray) are already in `const CAMERA_MAIN = `void main() {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/mcp-scene-ids.test.js:174 — "A checkpoint of one scene is foreign to the other." repeats the code it sits on: 3 of its 3 words (checkpoint, scene, foreign) are already in `const foreignRestore = await client.callTool({ name: 'scene_restore', arguments: { sessionId: other.structuredContent.se …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D21 · Naming Consistency · `releaseURL` spells `URL` where 33 names in the project spell it `Url` · ×1
  • `releaseURL` spells `URL` where 33 names in the project spell it `Url` src/home.js:22 — 33 of 34 names in project @codepawlhq/crucible spell the token `Url` (33 of 34; unit: names in project @codepawlhq/crucible containing `Url`). Peers: harness.imageUrl (bench/crowd/harness.js:44); scene-bridge.readRepositoryAsset(rootRelativeUrl) (bench/cycles-parity/scene-bridge.mjs:156); viewer.loadFromUrl (bench/flicker/viewer.js:620); default-look.drawScenes(serverUrl) (bench/reference/default-look.mjs:27); run.renderBackend(serverUrl) (bench/reference/run.mjs:142). Rename to `releaseUrl`. [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)` (178500 LoC, 953 module-visible types across 32 directories) overshoots its size bounds. 1 of 4 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 5.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P3 · Security & performance tooling · Dependabot does not watch cargo · ×1
  • Dependabot does not watch cargo REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
P4 · Deployment & Rollback · No release approval gate · ×1
  • 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 'MASK_SIZE' · ×1
  • Unused export 'MASK_SIZE' bench/agent-modeling/silhouette.mjs:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_COLOUR_THRESHOLD' · ×1
  • Unused export 'DEFAULT_COLOUR_THRESHOLD' bench/flicker/ground-truth.js:19 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'EEVEE_PRESETS' · ×1
  • Unused export 'EEVEE_PRESETS' bench/tiers/tiers.mjs:63 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'BASE_RESOLUTION' · ×1
  • Unused export 'BASE_RESOLUTION' bench/tiers/tiers.mjs:68 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'HIGH_RESOLUTION' · ×1
  • Unused export 'HIGH_RESOLUTION' bench/tiers/tiers.mjs:69 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadDefaultDracoDecoder' · ×1
  • Unused export 'loadDefaultDracoDecoder' scripts/agent-draco.mjs:26 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAXIMUM_GPU_QUEUE_WAIT_SECONDS' · ×1
  • Unused export 'MAXIMUM_GPU_QUEUE_WAIT_SECONDS' scripts/agent-gpu-queue.mjs:8 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadDefaultKtx2Transcoder' · ×1
  • Unused export 'loadDefaultKtx2Transcoder' REDACTED:48 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PATH_TRACER_SAMPLE_STEPS' · ×1
  • Unused export 'PATH_TRACER_SAMPLE_STEPS' scripts/agent-render-budget.mjs:15 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'RASTER_SCALE_STEPS' · ×1
  • Unused export 'RASTER_SCALE_STEPS' scripts/agent-render-budget.mjs:16 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SHADER_CACHE_MAX_BYTES' · ×1
  • Unused export 'SHADER_CACHE_MAX_BYTES' scripts/agent-shader-cache.mjs:16 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'runPullRequestCheck' · ×1
  • Unused export 'runPullRequestCheck' scripts/pr-metadata-run.mjs:107 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'combinedAssetBytesLimitMessage' · ×1
  • Unused export 'combinedAssetBytesLimitMessage' src/agent-asset-limits.js:43 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'BAKE_CACHE_MAX_BYTES' · ×1
  • Unused export 'BAKE_CACHE_MAX_BYTES' src/explosion-bake-cache.js:12 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_MAX_TEXTURE_SIZE' · ×1
  • Unused export 'DEFAULT_MAX_TEXTURE_SIZE' src/export-textures.js:5 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAXIMUM_SIMPLIFY_VERTICES' · ×1
  • Unused export 'MAXIMUM_SIMPLIFY_VERTICES' src/geometry-simplify.js:15 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DETAIL_RETRY_DELAYS_MS' · ×1
  • Unused export 'DETAIL_RETRY_DELAYS_MS' src/hero-lab/loop/detail.js:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'measureLinkMegabits' · ×1
  • Unused export 'measureLinkMegabits' src/hero-lab/loop/world.js:131 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'damp' · ×1
  • Unused export 'damp' src/hero-lab/stage.js:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'median' · ×1
  • Unused export 'median' src/hero-lab/stage.js:20 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SHADOW_ATLAS_TILES' · ×1
  • Unused export 'SHADOW_ATLAS_TILES' src/lighting.js:10 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SHADOW_ATLAS_HEIGHT' · ×1
  • Unused export 'SHADOW_ATLAS_HEIGHT' src/local-shadows.js:5 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hasMaterialLayers' · ×1
  • Unused export 'hasMaterialLayers' src/material-layers.js:116 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'UPDATE_CHECK_TIMEOUT_MS' · ×1
  • Unused export 'UPDATE_CHECK_TIMEOUT_MS' src/mcp-update-check.js:10 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_VERTEX_GROUPS' · ×1
  • Unused export 'MAX_VERTEX_GROUPS' src/mesh-attribute-edits.js:13 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_CURVE_POINTS' · ×1
  • Unused export 'MAX_CURVE_POINTS' src/mesh-deform-modifiers.js:12 — Nothing imports THIS copy of 'MAX_CURVE_POINTS' — but src/curve-operations.js:6 in the same directory exports that same name, and it is the copy every import site resolves to. Grepping the name therefore finds live callers that do not reach this binding: it is the dead half of a duplicated pair, left behind when the API moved. Delete it here and keep src/curve-operations.js's, or, if this one is meant to be the survivor, repoint the importers before removing the other.
R7 · Dead Code · Unused export 'MAX_HULL_VERTICES' · ×1
  • Unused export 'MAX_HULL_VERTICES' src/mesh-hull-modifiers.js:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_REALIZED_VERTICES' · ×1
  • Unused export 'MAX_REALIZED_VERTICES' src/mesh-instance-placement.js:18 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_OCEAN_WORK' · ×1
  • Unused export 'MAX_OCEAN_WORK' src/mesh-ocean-modifier.js:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_CURVE_SPLINES' · ×1
  • Unused export 'MAX_CURVE_SPLINES' src/mesh-to-curve.js:5 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_POINTS_PER_SPLINE' · ×1
  • Unused export 'MAX_POINTS_PER_SPLINE' src/mesh-to-curve.js:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_TOTAL_CURVE_POINTS' · ×1
  • Unused export 'MAX_TOTAL_CURVE_POINTS' src/mesh-to-curve.js:7 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'buildBezierSweep' · ×1
  • Unused export 'buildBezierSweep' src/modeling-bezier.js:170 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'NATIVE_TEXEL_POOL_MAX_BYTES' · ×1
  • Unused export 'NATIVE_TEXEL_POOL_MAX_BYTES' src/path-tracer-native-volumes.js:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'FULLSCREEN_VERTEX_SOURCE' · ×1
  • Unused export 'FULLSCREEN_VERTEX_SOURCE' src/path-tracer-realtime-gl.js:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ENCLOSED_HIT_FRACTION' · ×1
  • Unused export 'ENCLOSED_HIT_FRACTION' src/probe-trace.js:15 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_RAGDOLL_BONES' · ×1
  • Unused export 'MAX_RAGDOLL_BONES' src/ragdoll.js:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_LOD_PIXEL_ERROR' · ×1
  • Unused export 'DEFAULT_LOD_PIXEL_ERROR' src/render-culling.js:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'splatBatchState' · ×1
  • Unused export 'splatBatchState' src/splat.js:108 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 4/18 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.
Minor — 18 finding(s)
D10 · Test Quality · Skipped (documented) · ×16
  • Skipped (documented): a texture folder that links out of the catalog folder is refused tests/agent-asset-catalog.test.js:207 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): resolveJobRoot follows a linked jobs folder to its real target tests/agent-runtime-jobs-root.test.js:45 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a linked --jobs folder runs the job store on the real folder tests/agent-runtime-jobs-root.test.js:57 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): ambient occlusion leaves a flat wall seen at a slant within one display level of the frame without it tests/ambient-occlusion-flat-wall.test.js:66 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the Blender-free cycles-parity Python unit tests pass tests/cycles-parity-python.test.js:41 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): findOidnLibrary reads OIDN_LIBRARY_PATH and the release folder of the tool tests/denoise-oidn-persistent.test.js:50 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a package whose real path is outside the addons folder is refused tests/mcp-addons.test.js:97 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a file inside an addon that links outside the package is not served tests/mcp-addons.test.js:110 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): two scenes in one server are edited without interference and a call without an id means the last used scene tests/mcp-scene-ids.test.js:53 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the least recently used scene is evicted past the open scene cap and its id gets a clear error tests/mcp-scene-ids.test.js:111 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): checkpoints are kept up to the limit per scene and the oldest is evicted first tests/mcp-scene-ids.test.js:141 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the bytes read from a real browser Blob equal what an evaluate returns as base64 tests/native-export-blob.test.js:117 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the built MCP server reads shipped HDRIs and .cube looks from assets/looks tests/packaged-looks.test.js:22 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a symbolic link in the pack is refused tests/packs.test.js:132 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): the bundled Chromium compiles every path tracer kernel with FXC tests/path-tracer-webgpu-fxc.test.js:33 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): on a WebGPU adapter a portal keeps the mean of a room lit through a window and cuts the change between seeds tests/path-tracer-webgpu-portal.test.js:88 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
D12 · Dependency Hygiene · Outdated (npm) · ×1
  • Outdated (npm): playwright-core — playwright-core is pinned at 1.65.0; registry.npmjs.org publishes 1.65.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.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names src/rig.js:135 — 0 of 10 documented parameters and 1 of 2399 summaries in `@codepawlhq/crucible` only repeat the member or parameter name (e.g. "Node ID of a bone." for `boneNodeId`). 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.

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

Run 01a1ead6-0cfb-763c-9d2b-3d762100a618 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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