Public report of nubjs/nub, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey β
Signed and filed in the standard's public register, 14 November 2026, 21:10 UTC Β· Survey ID cd_722c88d2161f42c7a7ba2cb9a9f90097
nubjs/nub
Measured 14 November 2026, 21:09 UTC, at code version c020f13
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureTestRunFailed).
Test reliability is not measured: The rust executor ran against the .rs half and did not finish re-running within its tier budget.
CAI scoreAt riskUp 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 152,221 lines of product code in 17 projects, tests not counted Β· Estimated rebuild effort: about 1.3 person-years Β· Weakest lens: Code Health, 40
Findings by how serious they are
55 critical760 serious100 minor
14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 21:09 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology βΈ
69of 69 dimensions measured by tools.
871of 915 findings point to an exact file and line, so you can open each one in the code. The other 44 concern the repository as a whole, such as missing documentation.
69dimensions across 7 lenses, read from 152,221 lines of product code in 17 projects.
nubjs/nub is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 53 out of 100, which the At risk rating leaves unchanged.
Code Health, at 40, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 3 points. Adding type checking would lift Code Health itself, worth about 6 points. Raising Code Health to 70 would lift the score to about 62.
Eleven secrets can leak from the build pipeline. Eight known security holes in the packages the code depends on can be used by attackers. Limiting each secret to its own step and updating the vulnerable packages would close both risks. Pinning each tool to an exact version would fix the eight pipeline tools referenced by a changeable name, and the five pipeline steps that run downloads without checking them need each download checked against a known checksum first. Adding the tests the test command is meant to run would take care of the eight test commands with no tests behind them.
The product code is 152,221 lines, about β¬200,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 40 to 70, the lowest score rated Strong, the score would rise from 53 to about 62.
Code composition: what the lines of code are
Product code 75%Tests 25%
New since the last survey: 266 findings
These 266 critical or serious findings weren't in the previous survey, on 28 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes Β· FunctionTooLong: throttle.throttle runtime/util/throttle.cjs
God Classes Β· ClassTooLong: NativeAddons crates/nub-cli/src/compile/native.rs
God Classes Β· FunctionTooLong: debounce.debounce runtime/util/debounce.cjs
God Classes Β· FileTooLong: compile/closure.rs crates/nub-cli/src/compile/closure.rs
God Classes Β· FileTooLong: node/runtime_cache.rs crates/nub-core/src/node/runtime_cache.rs
God Classes Β· FileTooLong: node/feature_matrix.rs crates/nub-core/src/node/feature_matrix.rs
God Classes Β· FileTooLong: pm/resolve.rs crates/nub-core/src/pm/resolve.rs
Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) crates/nub-cli/src/compile/bundle.rs
Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) crates/nub-cli/src/pm_engine/info_family.rs
Code Duplication Β· Edited copy of a member (50 corresponding lines) crates/nub-core/src/node/runtime_cache.rs
Code Duplication Β· Edited copy of a member (60 corresponding lines) crates/nub-cli/src/compile/inject.rs
Code Duplication Β· Edited copy of a member (37 corresponding lines) crates/nub-core/src/node/runtime_cache.rs
Code Duplication Β· Edited copy of a member (46 corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs
Code Duplication Β· Edited copy of a member (35 corresponding lines) crates/nub-phantom-scan/src/graph.rs
Code Duplication Β· Edited copy of a member (39 corresponding lines) crates/nub-cli/src/cli.rs
Code Duplication Β· Edited copy of a member (34 corresponding lines) crates/nub-core/src/node/runtime_cache.rs
Code Duplication Β· Edited copy of a member (23 corresponding lines) crates/nub-core/src/node/discovery.rs
Code Duplication Β· Edited copies of one member (3 members, 20+ corresponding lines) crates/nub-cli/src/compile/inject.rs
Code Duplication Β· Edited copies of one member (3 members, 13+ corresponding lines) crates/nub-core/src/node/shim.rs
Code Duplication Β· Edited copy of a member (32 corresponding lines) crates/nub-cli/src/compile/native.rs
Code Duplication Β· Edited copy of a member (16 corresponding lines) crates/nub-cli/src/compile/assets.rs
Code Duplication Β· Edited copy of a member (34 corresponding lines) crates/nub-cli/src/cli.rs
Code Duplication Β· Edited copy of a member (13 corresponding lines) crates/nub-cli/src/compile/inject.rs
Code Duplication Β· Edited copy of a member (34 corresponding lines) crates/nub-core/src/node/discovery.rs
Code Duplication Β· Edited copy of a member (23 corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs
Code Duplication Β· Edited copy of a member (16 corresponding lines) crates/nub-core/src/version_management/download.rs
Code Duplication Β· Edited copy of a member (17 corresponding lines) crates/nub-cli/src/cli.rs
Code Duplication Β· Edited copies of one member (3 members, 15+ corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs
Code Duplication Β· Edited copy of a member (16 corresponding lines) crates/nub-cli/src/pm_engine/mod.rs
Code Duplication Β· Edited copy of a member (8 corresponding lines) crates/nub-core/src/version_management/download.rs
Code Duplication Β· Edited copy of a member (10 corresponding lines) crates/nub-cli/src/compile/mod.rs
Code Duplication Β· Edited copy of a member (15 corresponding lines) crates/nub-core/src/compile.rs
Code Duplication Β· Edited copy of a member (10 corresponding lines) crates/nub-core/src/node/discovery.rs
Code Duplication Β· Edited copies of one member (3 members, 11+ corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs
Code Duplication Β· Edited copy of a member (12 corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs
Code Duplication Β· Edited copy of a member (13 corresponding lines) crates/nub-tsconfig/src/lib.rs
Code Duplication Β· Edited copy of a member (10 corresponding lines) crates/nub-cli/src/pm_engine/store_config_family.rs
Code Duplication Β· Edited copy of a member (8 corresponding lines) crates/nub-core/src/version_management/mod.rs
Code Duplication Β· Edited copies of one member (3 members, 9+ corresponding lines) crates/nub-core/src/node/spawn.rs
Code Duplication Β· Edited copy of a member (12 corresponding lines) crates/nub-cli/src/compile/bundle.rs
Code Duplication Β· Edited copies of one member (3 members, 14+ corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs
Code Duplication Β· Edited copy of a member (11 corresponding lines) crates/nub-cli/src/pm_engine/unsupported_config.rs
Code Duplication Β· Edited copy of a member (8 corresponding lines) crates/nub-core/src/version_management/mod.rs
Code Duplication Β· Edited copy of a member (11 corresponding lines) crates/nub-core/src/lib.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 211 findings
These 211 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one. The first 100 are listed here.
Cyclomatic Complexity Β· Complex function main (cyclomatic 25, cognitive 31) scripts/mac-build.ts
Large Files Β· runtime/preload-common.cjs: 2399 lines of code runtime/preload-common.cjs
Large Files Β· runtime/polyfills.cjs: 2159 lines of code runtime/polyfills.cjs
Large Files Β· runtime/transform-core.mjs: 1112 lines of code runtime/transform-core.mjs
Large Files Β· scripts/remote-build.ts: 1033 lines of code scripts/remote-build.ts
Large Files Β· runtime/worker-polyfill.mjs: 705 lines of code runtime/worker-polyfill.mjs
Large Files Β· runtime/preload.cjs: 438 lines of code runtime/preload.cjs
Large Files Β· runtime/compile-sea-loader.cjs: 432 lines of code runtime/compile-sea-loader.cjs
Test Coverage Β· No test reaches this file runtime/transform-core.mjs
Rebuild cost: about β¬200,000 Β· Estimate
Cost to rebuild
β¬65,000 to β¬330,000, for 1,081 to 3,428 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 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.
Size
Large: 152,221 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at β¬60 to β¬95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality β start with scan-verdicts.rs.
Raises the score by about 3 points Β· Low effort Β· ADR Quality
2
Resolve the 1 finding(s) in Type Safety.
Raises the score by about 6 points Β· Medium effort Β· Type Safety
3
Resolve the 3 No assertions (empty test) finding(s) in Test Quality β start with flag-parsing.test.mjs, counts.test.mjs, serves.test.mjs.
Raises the score by about 3 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.
Where the investment is most exposed Β· Value at risk
This code would cost about β¬200,000 to build again, about 1.3 person-years of work. Its weakest lens is Code Health, at 40 (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
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year Β· Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 179,000 lines over the last 90 days, which is about 725,944 lines a year. At that pace, the extra work comes to an estimated 80.5 to 483.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture β module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
540 modules, with 747 dependencies between them. 8 loops run through 19 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 500 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
aube.commands.npm_fallback uses aube.cli_args, so a change to aube.cli_args can break aube.commands.npm_fallback, while a change to aube.commands.npm_fallback can't break aube.cli_args.
Position
Below the diagonal: aube.commands.npm_fallback uses a module listed above it, which is the healthy direction.
aube_lockfile.io uses aube_manifest, so a change to aube_manifest can break aube_lockfile.io, while a change to aube_lockfile.io can't break aube_manifest.
Position
Below the diagonal: aube_lockfile.io uses a module listed above it, which is the healthy direction.
13β17 aube_lockfile.io uses aube_lockfilepart of a loop✕
Connections
1 pair of types, where a type in aube_lockfile.io uses a type in aube_lockfile.
aube_lockfile.io uses aube_lockfile, so a change to aube_lockfile can break aube_lockfile.io, while a change to aube_lockfile.io can't break aube_lockfile.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
aube_workspace.selector uses aube_manifest, so a change to aube_manifest can break aube_workspace.selector, while a change to aube_workspace.selector can't break aube_manifest.
Position
Below the diagonal: aube_workspace.selector uses a module listed above it, which is the healthy direction.
nub_cli.project_config uses aube_linker.error, so a change to aube_linker.error can break nub_cli.project_config, while a change to nub_cli.project_config can't break aube_linker.error.
Position
Below the diagonal: nub_cli.project_config uses a module listed above it, which is the healthy direction.
nub_cli.project_config uses nub_data_formats.value, so a change to nub_data_formats.value can break nub_cli.project_config, while a change to nub_cli.project_config can't break nub_data_formats.value.
Position
Below the diagonal: nub_cli.project_config uses a module listed above it, which is the healthy direction.
aube_lockfile uses aube_lockfile.source, so a change to aube_lockfile.source can break aube_lockfile, while a change to aube_lockfile can't break aube_lockfile.source.
Position
Below the diagonal: aube_lockfile uses a module listed above it, which is the healthy direction.
aube_lockfile uses aube_lockfile.io, so a change to aube_lockfile.io can break aube_lockfile, while a change to aube_lockfile can't break aube_lockfile.io.
Position
Below the diagonal: aube_lockfile uses a module listed above it, which is the healthy direction.
aube_registry.client uses aube_registry, so a change to aube_registry can break aube_registry.client, while a change to aube_registry.client can't break aube_registry.
Position
Below the diagonal: aube_registry.client uses a module listed above it, which is the healthy direction.
aube_resolver.types uses aube_lockfile.source, so a change to aube_lockfile.source can break aube_resolver.types, while a change to aube_resolver.types can't break aube_lockfile.source.
Position
Below the diagonal: aube_resolver.types uses a module listed above it, which is the healthy direction.
aube_resolver.types uses aube_registry, so a change to aube_registry can break aube_resolver.types, while a change to aube_resolver.types can't break aube_registry.
Position
Below the diagonal: aube_resolver.types uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine uses aube_linker.error, so a change to aube_linker.error can break nub_cli.pm_engine, while a change to nub_cli.pm_engine can't break aube_linker.error.
Position
Below the diagonal: nub_cli.pm_engine uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine uses aube_manifest, so a change to aube_manifest can break nub_cli.pm_engine, while a change to nub_cli.pm_engine can't break aube_manifest.
Position
Below the diagonal: nub_cli.pm_engine uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine uses aube_lockfile.io, so a change to aube_lockfile.io can break nub_cli.pm_engine, while a change to nub_cli.pm_engine can't break aube_lockfile.io.
Position
Below the diagonal: nub_cli.pm_engine uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine uses nub_cli.project_config, so a change to nub_cli.project_config can break nub_cli.pm_engine, while a change to nub_cli.pm_engine can't break nub_cli.project_config.
Position
Below the diagonal: nub_cli.pm_engine uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_manifest, so a change to aube_manifest can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_store, so a change to aube_store can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_store.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
aube.commands.install.lifecycle uses aube_registry.client, so a change to aube_registry.client can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube_registry.client.
Position
Below the diagonal: aube.commands.install.lifecycle uses a module listed above it, which is the healthy direction.
21β26 aube.commands.install.lifecycle uses aube.commands.doctorpart of a loop✕
Connections
1 pair of types, where a type in aube.commands.install.lifecycle uses a type in aube.commands.doctor.
aube.commands.install.lifecycle uses aube.commands.doctor, so a change to aube.commands.doctor can break aube.commands.install.lifecycle, while a change to aube.commands.install.lifecycle can't break aube.commands.doctor.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
aube.commands.install.resolve uses aube_linker.error, so a change to aube_linker.error can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_linker.error.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_manifest, so a change to aube_manifest can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_lockfile.io, so a change to aube_lockfile.io can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_lockfile.io.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_registry, so a change to aube_registry can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_registry.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.commands.install.resolve uses aube_resolver.types, so a change to aube_resolver.types can break aube.commands.install.resolve, while a change to aube.commands.install.resolve can't break aube_resolver.types.
Position
Below the diagonal: aube.commands.install.resolve uses a module listed above it, which is the healthy direction.
aube.runtime uses aube_settings.values, so a change to aube_settings.values can break aube.runtime, while a change to aube.runtime can't break aube_settings.values.
Position
Below the diagonal: aube.runtime uses a module listed above it, which is the healthy direction.
aube.runtime uses aube_lockfile.io, so a change to aube_lockfile.io can break aube.runtime, while a change to aube.runtime can't break aube_lockfile.io.
Position
Below the diagonal: aube.runtime uses a module listed above it, which is the healthy direction.
aube_resolver uses aube_registry.client, so a change to aube_registry.client can break aube_resolver, while a change to aube_resolver can't break aube_registry.client.
Position
Below the diagonal: aube_resolver uses a module listed above it, which is the healthy direction.
aube_resolver uses aube_resolver.types, so a change to aube_resolver.types can break aube_resolver, while a change to aube_resolver can't break aube_resolver.types.
Position
Below the diagonal: aube_resolver uses a module listed above it, which is the healthy direction.
aube.commands.doctor uses aube.commands.install.lifecycle, so a change to aube.commands.install.lifecycle can break aube.commands.doctor, while a change to aube.commands.doctor can't break aube.commands.install.lifecycle.
Position
Below the diagonal: aube.commands.doctor uses a module listed above it, which is the healthy direction.
aube.commands.install.args uses aube.cli_args, so a change to aube.cli_args can break aube.commands.install.args, while a change to aube.commands.install.args can't break aube.cli_args.
Position
Below the diagonal: aube.commands.install.args uses a module listed above it, which is the healthy direction.
aube.commands.install.args uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install.args, while a change to aube.commands.install.args can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install.args uses a module listed above it, which is the healthy direction.
aube.commands.install.args uses aube_registry, so a change to aube_registry can break aube.commands.install.args, while a change to aube.commands.install.args can't break aube_registry.
Position
Below the diagonal: aube.commands.install.args uses a module listed above it, which is the healthy direction.
aube.commands.install.args uses aube_workspace.selector, so a change to aube_workspace.selector can break aube.commands.install.args, while a change to aube.commands.install.args can't break aube_workspace.selector.
Position
Below the diagonal: aube.commands.install.args uses a module listed above it, which is the healthy direction.
aube.commands.install.args uses aube.runtime, so a change to aube.runtime can break aube.commands.install.args, while a change to aube.commands.install.args can't break aube.runtime.
Position
Below the diagonal: aube.commands.install.args uses a module listed above it, which is the healthy direction.
aube uses aube.commands.install.args, so a change to aube.commands.install.args can break aube, while a change to aube can't break aube.commands.install.args.
Position
Below the diagonal: aube uses a module listed above it, which is the healthy direction.
aube.commands.add uses aube.cli_args, so a change to aube.cli_args can break aube.commands.add, while a change to aube.commands.add can't break aube.cli_args.
Position
Below the diagonal: aube.commands.add uses a module listed above it, which is the healthy direction.
aube.commands.add uses aube_workspace.selector, so a change to aube_workspace.selector can break aube.commands.add, while a change to aube.commands.add can't break aube_workspace.selector.
Position
Below the diagonal: aube.commands.add uses a module listed above it, which is the healthy direction.
aube.commands.add uses aube.runtime, so a change to aube.runtime can break aube.commands.add, while a change to aube.commands.add can't break aube.runtime.
Position
Below the diagonal: aube.commands.add uses a module listed above it, which is the healthy direction.
aube.commands.add uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.commands.add, while a change to aube.commands.add can't break aube.commands.install.args.
Position
Below the diagonal: aube.commands.add uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_manifest, so a change to aube_manifest can break aube.commands.install, while a change to aube.commands.install can't break aube_manifest.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install, while a change to aube.commands.install can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install, while a change to aube.commands.install can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_store, so a change to aube_store can break aube.commands.install, while a change to aube.commands.install can't break aube_store.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_registry, so a change to aube_registry can break aube.commands.install, while a change to aube.commands.install can't break aube_registry.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install, while a change to aube.commands.install can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.commands.install, while a change to aube.commands.install can't break aube.commands.install.args.
Position
Below the diagonal: aube.commands.install uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_linker.error, so a change to aube_linker.error can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_linker.error.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_lockfile.source, so a change to aube_lockfile.source can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_lockfile.source.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_manifest, so a change to aube_manifest can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_store, so a change to aube_store can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_store.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube_registry.client, so a change to aube_registry.client can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube_registry.client.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.fetch uses aube.commands.doctor, so a change to aube.commands.doctor can break aube.commands.install.fetch, while a change to aube.commands.install.fetch can't break aube.commands.doctor.
Position
Below the diagonal: aube.commands.install.fetch uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_manifest, so a change to aube_manifest can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_lockfile.io, so a change to aube_lockfile.io can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_lockfile.io.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_resolver.types, so a change to aube_resolver.types can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_resolver.types.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube_resolver, so a change to aube_resolver can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube_resolver.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.install.settings uses aube.commands.doctor, so a change to aube.commands.doctor can break aube.commands.install.settings, while a change to aube.commands.install.settings can't break aube.commands.doctor.
Position
Below the diagonal: aube.commands.install.settings uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_linker.error, so a change to aube_linker.error can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_linker.error.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_manifest, so a change to aube_manifest can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_manifest.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_settings.values, so a change to aube_settings.values can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_settings.values.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_lockfile.io, so a change to aube_lockfile.io can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_lockfile.io.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_lockfile, so a change to aube_lockfile can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_lockfile.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube_registry.client, so a change to aube_registry.client can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube_registry.client.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.settings_context uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.commands.settings_context, while a change to aube.commands.settings_context can't break aube.commands.install.args.
Position
Below the diagonal: aube.commands.settings_context uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube.cli_args, so a change to aube.cli_args can break aube.commands.update, while a change to aube.commands.update can't break aube.cli_args.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube_manifest, so a change to aube_manifest can break aube.commands.update, while a change to aube.commands.update can't break aube_manifest.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube_settings.values, so a change to aube_settings.values can break aube.commands.update, while a change to aube.commands.update can't break aube_settings.values.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube_workspace.selector, so a change to aube_workspace.selector can break aube.commands.update, while a change to aube.commands.update can't break aube_workspace.selector.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube_lockfile, so a change to aube_lockfile can break aube.commands.update, while a change to aube.commands.update can't break aube_lockfile.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
aube.commands.update uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.commands.update, while a change to aube.commands.update can't break aube.commands.install.args.
Position
Below the diagonal: aube.commands.update uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.install_family uses aube_linker.error, so a change to aube_linker.error can break nub_cli.pm_engine.install_family, while a change to nub_cli.pm_engine.install_family can't break aube_linker.error.
Position
Below the diagonal: nub_cli.pm_engine.install_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.install_family uses aube_workspace.selector, so a change to aube_workspace.selector can break nub_cli.pm_engine.install_family, while a change to nub_cli.pm_engine.install_family can't break aube_workspace.selector.
Position
Below the diagonal: nub_cli.pm_engine.install_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.install_family uses nub_cli.pm_engine, so a change to nub_cli.pm_engine can break nub_cli.pm_engine.install_family, while a change to nub_cli.pm_engine.install_family can't break nub_cli.pm_engine.
Position
Below the diagonal: nub_cli.pm_engine.install_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.install_family uses aube.commands.install.args, so a change to aube.commands.install.args can break nub_cli.pm_engine.install_family, while a change to nub_cli.pm_engine.install_family can't break aube.commands.install.args.
Position
Below the diagonal: nub_cli.pm_engine.install_family uses a module listed above it, which is the healthy direction.
35β39 nub_cli.pm_engine.install_family uses nub_cli.clipart of a loop✕
Connections
1 pair of types, where a type in nub_cli.pm_engine.install_family uses a type in nub_cli.cli.
nub_cli.pm_engine.install_family uses nub_cli.cli, so a change to nub_cli.cli can break nub_cli.pm_engine.install_family, while a change to nub_cli.pm_engine.install_family can't break nub_cli.cli.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
aube.commands.install.finalize uses aube_manifest, so a change to aube_manifest can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube_store, so a change to aube_store can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_store.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube.commands.install.lifecycle, so a change to aube.commands.install.lifecycle can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube.commands.install.lifecycle.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube_linker, so a change to aube_linker can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube_linker.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube.commands.install.args.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.finalize uses aube.commands.install, so a change to aube.commands.install can break aube.commands.install.finalize, while a change to aube.commands.install.finalize can't break aube.commands.install.
Position
Below the diagonal: aube.commands.install.finalize uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_manifest, so a change to aube_manifest can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_manifest.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_scripts.policy, so a change to aube_scripts.policy can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_scripts.policy.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_settings.values, so a change to aube_settings.values can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_settings.values.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_store, so a change to aube_store can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_store.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_lockfile, so a change to aube_lockfile can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_lockfile.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube_linker, so a change to aube_linker can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube_linker.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.commands.install.link uses aube.commands.install, so a change to aube.commands.install can break aube.commands.install.link, while a change to aube.commands.install.link can't break aube.commands.install.
Position
Below the diagonal: aube.commands.install.link uses a module listed above it, which is the healthy direction.
aube.embed uses aube.commands.doctor, so a change to aube.commands.doctor can break aube.embed, while a change to aube.embed can't break aube.commands.doctor.
Position
Below the diagonal: aube.embed uses a module listed above it, which is the healthy direction.
aube.embed uses aube.commands.install.args, so a change to aube.commands.install.args can break aube.embed, while a change to aube.embed can't break aube.commands.install.args.
Position
Below the diagonal: aube.embed uses a module listed above it, which is the healthy direction.
nub_cli.cli uses aube_linker.error, so a change to aube_linker.error can break nub_cli.cli, while a change to nub_cli.cli can't break aube_linker.error.
Position
Below the diagonal: nub_cli.cli uses a module listed above it, which is the healthy direction.
nub_cli.cli uses nub_core.node.version, so a change to nub_core.node.version can break nub_cli.cli, while a change to nub_cli.cli can't break nub_core.node.version.
Position
Below the diagonal: nub_cli.cli uses a module listed above it, which is the healthy direction.
nub_cli.cli uses nub_data_formats.value, so a change to nub_data_formats.value can break nub_cli.cli, while a change to nub_cli.cli can't break nub_data_formats.value.
Position
Below the diagonal: nub_cli.cli uses a module listed above it, which is the healthy direction.
nub_cli.cli uses nub_cli.project_config, so a change to nub_cli.project_config can break nub_cli.cli, while a change to nub_cli.cli can't break nub_cli.project_config.
Position
Below the diagonal: nub_cli.cli uses a module listed above it, which is the healthy direction.
nub_cli.cli uses nub_cli.pm_engine.install_family, so a change to nub_cli.pm_engine.install_family can break nub_cli.cli, while a change to nub_cli.cli can't break nub_cli.pm_engine.install_family.
Position
Below the diagonal: nub_cli.cli uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.publish_family uses aube.cli_args, so a change to aube.cli_args can break nub_cli.pm_engine.publish_family, while a change to nub_cli.pm_engine.publish_family can't break aube.cli_args.
Position
Below the diagonal: nub_cli.pm_engine.publish_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.publish_family uses aube.commands.npm_fallback, so a change to aube.commands.npm_fallback can break nub_cli.pm_engine.publish_family, while a change to nub_cli.pm_engine.publish_family can't break aube.commands.npm_fallback.
Position
Below the diagonal: nub_cli.pm_engine.publish_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.publish_family uses aube_workspace.selector, so a change to aube_workspace.selector can break nub_cli.pm_engine.publish_family, while a change to nub_cli.pm_engine.publish_family can't break aube_workspace.selector.
Position
Below the diagonal: nub_cli.pm_engine.publish_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.publish_family uses nub_cli.pm_engine, so a change to nub_cli.pm_engine can break nub_cli.pm_engine.publish_family, while a change to nub_cli.pm_engine.publish_family can't break nub_cli.pm_engine.
Position
Below the diagonal: nub_cli.pm_engine.publish_family uses a module listed above it, which is the healthy direction.
nub_cli.pm_engine.publish_family uses nub_cli.cli, so a change to nub_cli.cli can break nub_cli.pm_engine.publish_family, while a change to nub_cli.pm_engine.publish_family can't break nub_cli.cli.
Position
Below the diagonal: nub_cli.pm_engine.publish_family uses a module listed above it, which is the healthy direction.
At a glance β Code Health Β· 40% Β· Weak Β· gated by D1, D2, R1 Β·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 β Software Supply Chain Failures
59
High / Critical
A05:2025 β Injection
42
High / Critical
A02:2025 β Security Misconfiguration
7
High / Critical
Roadmap
Top priorities: Resolve the 1 finding(s) in Type Safety; Resolve the 1 No ADRs found finding(s) in ADR Quality β start with scan-verdicts.rs; Resolve the 3 No assertions (empty test) finding(s) in Test Quality β start with flag-parsing.test.mjs, counts.test.mjs, serves.test.mjs.
Ranked by impact Γ· effort. "Helps" is the estimated gain on the 0β100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality β start with scan-verdicts.rs.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Per-file score 0β10 β a quality signature. Of 135 files carrying findings, judged against the Production bar: 3% slop Β· 67% mixed Β· 30% near-clean.
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 β 55
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 β 760
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 β 100
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved β 14
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 69 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: β Measured β a deterministic fact (LoC, complexity, coverage); ~ Modeled β an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): β Tool-verified means the property itself was measured across the surface; β Nothing flagged means the probes came back clean β a claim bounded by what a repository can show; β Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence β absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked β 69 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality β in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report β three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line β never an absolute scratch path. Here, 871 of 915 do; the remainder are repo-wide signals β a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score β and this report, byte for byte β is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) β re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time β a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
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 364 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 76 test source file(s) (.rs) 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.
D11 Test Reliability β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and did not finish re-running within its tier budget β so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript/packages/service/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript/packages/tooling/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript/packages/ui-core/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript/packages/ui-widgets/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript-b/packages/service/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript-b/packages/tooling/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript-b/packages/ui-core/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in benchmarks/pm/fixtures/workspace-descript-b/packages/ui-widgets/ (0 tests); node:test via `npm ci --ignore-scripts` in tests/registry/ (3 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) β but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo β test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D14 License Compliance β measured, with a gap in what it reached β We measured this, but not all of it. What we did not reach is a gap on our side β a collector, parser or image we have not built yet β so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor β not measured this run β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository β bus factor is not applicable (16 contributor(s) across 2174 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 15 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated β so the bus factor is not applicable and there is nothing here for the owner to act on.
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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency β not measured this run β 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. 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 on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. 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.
D27 Navigability β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. `npm/nub-types/common.d.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX6 Interface segregation β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
AXR1 Runtime accessibility β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): package.json has no "dev" script, so `npm run dev` could not start the app. Last output: "npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
GD1 Unfinished & placeholder code β 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, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and 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.
IC1 Incompleteness & stubs β 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, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and 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.
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. A badge or prose version claim scored 9/17 in its adjudication (docs/plans/deterministic-engine/adjudication/M4-v3.md: badges 9/9, prose 0/8, where prose versions are minimums or history), short of the 95 % precision gate, 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. The .NET and Node.js version checks are a different kind and still publish.
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.
P8 Schema migrations β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
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. 77 further occurrence(s) are not listed individually; the score already reflects all 117.
X12 Unreachable branch β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X13 Undrained process stream β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X16 Unfloored truncation loop β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X18 Disposal-pattern correctness β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X19 Unrestored process-global state β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X3 Exception handling β not measured this run β We could not measure this here. That is a gap on our side β a collector, parser or image we have not built yet β and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach β not a finding about this repository.
X3 Exception handling β 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. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored β auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap β a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see β the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically β it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type β a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module β one class/IIFE β earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity β an in-process token-stream comparison over sliding windows, with type-aware normalization β so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED β its repetition is the tool's, not the team's β so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies β runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic β it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural β it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles β a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree β a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy β mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history β a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project β a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns β a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) β it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases β a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention β a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is β methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
141 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was polyfills.installIteratorSurface at 176. A further 6 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being preload-common.installAsyncTierCjsSource at 23 β they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason β every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/nub-cli/src/project_config_precedence_matrix.rs (nub_cli::project_config_precedence_matrix::ordinal at 22), crates/nub-cli/src/pm_engine/info_family.rs (nub_cli::pm_engine::info_family::run_verb 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.
+ 55 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity β start with polyfills.installIteratorSurface (cyclomatic 176). β Refactoring it lifts Cyclomatic Complexity from 3.8 to about 4.5/10.
Detailed fixes: d1_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 77 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity β start with polyfills.installIteratorSurface (cognitive 279), worker-polyfill.installWorkerPolyfill (cognitive 175), nub_cli::cli::run_nub (cognitive 131). β 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 3 together lifts Cognitive Complexity from 2.0 to about 2.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 Β· God Classes8.9 / 10Strongβ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 23 FileTooLong finding(s) in God Classes β start with mod.rs (3), cli.rs, bundle.rs. β One of this dimension's main actionable groups (23 warning-level).
Resolve the 14 FunctionTooLong finding(s) in God Classes β start with mod.rs (2), page.tsx (2), worker-polyfill.mjs. β One of this dimension's main actionable groups (14 warning-level).
Resolve the 4 TooManyFunctions finding(s) in God Classes β start with unsupported_config.rs, env.rs, inject.rs. β One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d3_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
66 duplicated block group(s) detected. 1.8 % of the production lines (2,699 of 152,221) are in a reported copy. A further 53 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (16 corresponding lines) Β· Γ4crates/nub-cli/src/compile/assets.rs:353
+ 51 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (9 lines × 2) finding(s) in Code Duplication β start with cli.rs (2), bundle.rs, info_family.rs. β One of this dimension's main actionable groups (10 warning-level).
Resolve the 10 Duplicated block (6 lines × 2) finding(s) in Code Duplication β start with mod.rs (2), env_owner.rs, install_family.rs. β One of this dimension's main actionable groups (10 warning-level).
Resolve the 8 Duplicated block (8 lines × 2) finding(s) in Code Duplication β start with unsupported_config.rs (2), cli.rs, inject.rs. β One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d4_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 Β· Coupling9.1 / 10Stronggated by 2 serious findingsβ 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.
17 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 10 of the 17 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: nub-core Β· Γ2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. β One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class β the population is all types, not a name convention.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) β start with spawn.rs. β One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 Β· Test Quality9.0 / 10Adequategated by 3 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.
4 skipped (4 with a documented reason), 22 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 364 tests. Measured on the JavaScript/TypeScript suite only β at least 76 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions (empty test): nub-as-node parity leg Β· Γ3tests/flag-parsing/flag-parsing.test.mjs:194
No assertions: (unnamed test) Β· Γ19tests/worker-wpt/wpt/workers/Worker-replace-event-handler.any.js:7
Test project verifies nothing: tests/fixtures/non-program-modestests/fixtures/non-program-modes/counts.test.mjs:8
Skipped (documented): the repo Dockerfile prebake (when present) matches the tracked pins Β· Γ4scripts/soak/external-tools.test.mts:134
What to do
Resolve the 3 No assertions (empty test) finding(s) in Test Quality β start with flag-parsing.test.mjs, counts.test.mjs, serves.test.mjs. β One of this dimension's main actionable groups (3 issue-level).
Resolve the 19 No assertions finding(s) in Test Quality β start with MessageEvent.any.js (3), reporterror.any.js (3), urlpattern-constructor.any.js (2). β One of this dimension's main actionable groups (19 warning-level).
Resolve the 1 Test project verifies nothing finding(s) in Test Quality β start with counts.test.mjs. β 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.
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.
16 outdated, 0 yanked direct Cargo dependencies. 65 of 72 direct crates were graded against crates.io (0 not published there, 7 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit β which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded β crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: blake3 Β· Γ16
Detailed fixes: d12_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 632 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles β this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. β COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass β a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex β the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 26 Hotspot finding(s) in Churn × Complexity Hotspots β start with cli.rs, spawn.rs, mod.rs. β One of this dimension's main actionable groups (26 warning-level).
Detailed fixes: d15_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code β TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 152221 LoC (0.0/KLoC) β score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether 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.
No ADRs foundcrates/nub-phantom-scan/src/bin/scan-verdicts.rs:1
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality β start with scan-verdicts.rs. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether 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.
3 of 16 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed β scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout β the full git history, then a second --no-git pass over the working tree as it stands β merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side β unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings β likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files β exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
42 finding(s): 0 critical, 31 high, 11 medium, 0 low. 2 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` β one pinning decision is charged once, not once per lens. semgrep hit a parse error in 16 file(s) β `.githooks/pre-push` (line 112, lines 232β233, lines 301β302), `.github/scripts/gen-homebrew-formula.sh` (line 17, line 18), `.github/scripts/npm-stage-publish.sh` (line 16), `.github/scripts/smoke.sh` (line 17), `benchmarks/pm/fixtures/workspace-descript-b/pnpm-lock.yaml`, β¦ (+11 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 16 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
+ 9 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED (10). β One of this dimension's main actionable groups (10 issue-level).
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED (4), REDACTED, REDACTED. β One of this dimension's main actionable groups (6 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED, REDACTED, REDACTED. β One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d29_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares β Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 1 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Resolve the 28 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities β start with REDACTED (28). β One of this dimension's main actionable groups (28 warning-level).
Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities β start with REDACTED (5), REDACTED. β One of this dimension's main actionable groups (6 issue-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities β start with REDACTED (2). β One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Resolve the 4 High IaC finding(s) in IaC & Container Security β start with REDACTED (4). β One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 Medium IaC finding(s) in IaC & Container Security β start with REDACTED, REDACTED, REDACTED. β One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d31_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned β last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge β recently and meaningfully worked. Counted over 137 of the 247 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together β pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only β tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file β₯10 revisions, β₯5 shared commits, β₯50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only β test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real productionβproduction coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a codeβdocs pair β a command and the reference page that restates it β is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity β generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals β generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions β scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact β 10; present without a contact β 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable β a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it β a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON β the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates β no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged β `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on β and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads β never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 5 dependency declaration(s). This dimension reads what the repository says about ITSELF β a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
β On the Gold path β maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS Β· M = Maturity Β· P = Readiness.
AC1 Β· Text alternatives10.0 / 10Exemplaryβ Nothing flagged
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.
Do you agree with this assessment?
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.
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.
Other Β· Accessibility β Whether ARIA is used correctly β valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script β tagged-template (html`β¦`) UIs and hyperscript DOM factories β is not read at all.
Other Β· Accessibility β Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast β PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL β only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) β computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script β tagged-template (html`β¦`) UIs and hyperscript DOM factories β is not read at all.
Other Β· Architecture β How the codebase splits by code ROLE β domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER β domain, then infrastructure, then application β so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone β no declared namespace was available to add to the evidence β and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention β a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other Β· Architecture β Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other Β· Architecture β Whether dependencies point inward (Domain β Application β Infrastructure/Web) β the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 Β· Test isolation10.0 / 10Exemplaryβ Tool-verified
Other Β· Architecture β Whether production projects stay free of references to test projects β tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other Β· Architecture β Whether read (query) handlers stay side-effect-free β a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set β a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity Β· Maturity β Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity Β· Maturity β Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity Β· Maturity β Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity Β· Maturity β Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
npm/nub-types/README.md names TypeScript 6, but the manifest declares `typescript` ^5.3.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β npm/nub-types/README.md:17
tests/compile-corpus/README.md names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β tests/compile-corpus/README.md:11
tests/bench/runtime/README.md names Fastify 5, but the manifest declares `fastify` ^4.28.1. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β tests/bench/runtime/README.md:8
site/content/docs/runtime/loaders.mdx names TypeScript 7, but the manifest declares `typescript` ^5.3.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β site/content/docs/runtime/loaders.mdx:34
site/content/docs/runtime/modern-apis.mdx names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β site/content/docs/runtime/modern-apis.mdx:281
site/content/docs/runtime/modern-apis.mdx names Node.js 26, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. β site/content/docs/runtime/modern-apis.mdx:581
What to do
Reconcile the README with reality: npm/nub-types/README.md names TypeScript 6, but the manifest declares `typescript` ^5.3.3; tests/compile-corpus/README.md names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22; tests/bench/runtime/README.md names Fastify 5, but the manifest declares `fastify` ^4.28.1; site/content/docs/runtime/loaders.mdx names TypeScript 7, but the manifest declares `typescript` ^5.3.3; site/content/docs/runtime/modern-apis.mdx names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22.
Readiness Β· Readiness β Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 Β· Library API & versioning10.0 / 10Exemplaryβ Nothing flagged
Readiness Β· Readiness β For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Only 2/9 runnable modules use logging (modules with no entry point or server are excluded β they are libraries a runnable module hosts). Silent: `.`, `crates/nub-alias`, `crates/nub-launcher`, `crates/nub-phantom`, `crates/nub-phantom-scan` and 2 more.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
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.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness Β· Readiness β Whether releases are automated and safely reversible (probes, rolling updates, approval gates) β from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced β a bad release is harder to detect and reverse.
What to do
Add readiness/liveness probes and a rolling-update (or blue/green) strategy so a bad release is caught and rolled back automatically.
Readiness Β· Readiness β Whether releases are traceable β a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file β what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness Β· Readiness β Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them β resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`got (` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β or never, for a client with no default timeout. β runtime/preload-common.cjs:470
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness Β· Performance β Whether the code protects its performance with benchmarks β a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark β scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
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.
`mkdirSync` in `main` 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/mac-build.ts:217, scripts/mac-build.ts:269
`mkdtempSync` in `main` 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/mac-build.ts:223
`existsSync` in `main` 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/mac-build.ts:227, scripts/mac-build.ts:267, scripts/remote-build.ts:1076
`rmSync` in `main` 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/mac-build.ts:228, scripts/mac-build.ts:235, scripts/mac-build.ts:273
`readdirSync` in `main` 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/mac-build.ts:232
`renameSync` in `main` 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/mac-build.ts:233
`copyFileSync` in `main` 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/mac-build.ts:274
`execFileSync` in `main` 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/merge-cascade.ts:385
`readFileSync` in `createInstance` 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/remote-build.ts:412
`existsSync` in `attachToJob` 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/remote-build.ts:711, scripts/remote-build.ts:728
`readFileSync` in `attachToJob` 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/remote-build.ts:728
`writeFileSync` in `drain` 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/remote-build.ts:741
`rmSync` in `attachToJob` 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/remote-build.ts:763
`existsSync` in `reap` 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/remote-build.ts:925
`statSync` in `readdirSync` 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/remote-build.ts:926
`readFileSync` in `main` 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/remote-build.ts:1080, scripts/soak/external-tools.mts:686
`existsSync` in `installAssetTool` blocks the event loop until it finishes β a blocking call inside async code stalls the event loop β every other request waits for as long as it runs. (×4) β scripts/soak/external-tools.mts:434, scripts/soak/external-tools.mts:438, scripts/soak/external-tools.mts:457, β¦
`mkdirSync` in `installAssetTool` 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/soak/external-tools.mts:445
`rmSync` in `installAssetTool` 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/soak/external-tools.mts:452, scripts/soak/external-tools.mts:462
`writeFileSync` in `installAssetTool` 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/soak/external-tools.mts:466
`chmodSync` in `installAssetTool` 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/soak/external-tools.mts:468
`existsSync` in `installNpmTarball` 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/soak/external-tools.mts:494, scripts/soak/external-tools.mts:503
`rmSync` in `installNpmTarball` 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/soak/external-tools.mts:495, scripts/soak/external-tools.mts:505
`mkdirSync` in `installNpmTarball` 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/soak/external-tools.mts:498
`readFileSync` in `installNpmTarball` 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/soak/external-tools.mts:501
`writeFileSync` in `installNpmTarball` 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/soak/external-tools.mts:520
`chmodSync` in `installNpmTarball` 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/soak/external-tools.mts:521
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 Β· Type Safety0.6 / 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.
10 typed · 163 plain JS β the untyped files are crates/nub-cli/src/compile/code_cache.test.cjs, crates/nub-cli/src/compile/code_cache_generate.cjs, crates/nub-cli/src/compile/code_cache_install.cjs, npm/nub-types/test/run.mjs, npm/nub/platform.js, npm/nub/postinstall.js (+157 more).
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.
runtime/util/debounce.cjs:66 · runtime/util/throttle.cjs:110 β the two spans are one implementation copied and then locally edited β 382 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. β runtime/util/debounce.cjs:66
runtime/polyfills.cjs:2317 · runtime/polyfills.cjs:2398 β 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. β runtime/polyfills.cjs:2317
runtime/compile-inline-loader.cjs:181 · runtime/compile-sea-loader.cjs:470 β 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. β runtime/compile-inline-loader.cjs:181
runtime/compile-bootstrap.cjs:186 · runtime/compile-sea-loader.cjs:303 · runtime/worker-polyfill.mjs:45 β 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. β runtime/compile-bootstrap.cjs:186
runtime/polyfills.cjs:2290 · runtime/polyfills.cjs:2361 β 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. β runtime/polyfills.cjs:2290
runtime/cache-evict.mjs:74 · runtime/cache-evict.mjs:140 β 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. β runtime/cache-evict.mjs:74
npm/nub/platform.js:16 · runtime/loader-platform.cjs:18 β the two spans are one implementation copied and then locally edited β 101 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. β npm/nub/platform.js:16
scripts/lib/download-stats.mjs:32 · scripts/lib/download-stats.mjs:78 β 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. β scripts/lib/download-stats.mjs:32
runtime/compile-bootstrap.cjs:162 · runtime/compile-sea-loader.cjs:350 β 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. β runtime/compile-bootstrap.cjs:162
runtime/compile-bootstrap.cjs:249 · runtime/preload-common.cjs:1822 β the two spans are one implementation copied and then locally edited β 81 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. β runtime/compile-bootstrap.cjs:249
scripts/md-toc/index.mjs:23 · scripts/todo/index.mjs:103 β the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. β scripts/md-toc/index.mjs:23
scripts/soak/external-tools.mts:181 · scripts/soak/external-tools.mts:213 β 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. β scripts/soak/external-tools.mts:181
scripts/soak/soak.mts:111 · scripts/soak/soak.mts:204 β 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. β scripts/soak/soak.mts:111
runtime/preload-async-hooks.mjs:108 · runtime/preload-common.cjs:799 β the two spans are one implementation copied and then locally edited β 77 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. β runtime/preload-async-hooks.mjs:108
runtime/transform-core.mjs:90 · runtime/worker-polyfill.mjs:79 β the two spans are one implementation copied and then locally edited β 54 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. β runtime/transform-core.mjs:90
scripts/mac-build.ts:59 · scripts/remote-build.ts:170 β 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/mac-build.ts:59
runtime/polyfills.cjs:729 · runtime/polyfills.cjs:767 β 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. β runtime/polyfills.cjs:729
runtime/polyfills.cjs:1689 · runtime/polyfills.cjs:1711 β 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. β runtime/polyfills.cjs:1689
runtime/polyfills.cjs:1768 · runtime/polyfills.cjs:1799 β 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. β runtime/polyfills.cjs:1768
scripts/mac-build.ts:279 · scripts/remote-build.ts:1190 β 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/mac-build.ts:279
scripts/soak/soak.mts:132 · scripts/soak/soak.mts:148 β 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. β scripts/soak/soak.mts:132
runtime/nubr.mjs:218 · runtime/nubr.mjs:311 β 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. β runtime/nubr.mjs:218
runtime/polyfills.cjs:814 · runtime/polyfills.cjs:830 β 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. β runtime/polyfills.cjs:814
runtime/preload-common.cjs:852 · runtime/preload-common.cjs:970 β 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. β runtime/preload-common.cjs:852
scripts/gen-extensions-table.mjs:59 · scripts/gen-extensions-table.mjs:82 β 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. β scripts/gen-extensions-table.mjs:59
runtime/navigator-shim.mjs:30 · runtime/transform-core.mjs:90 β the two spans are one implementation copied and then locally edited β 53 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. β runtime/navigator-shim.mjs:30
runtime/navigator-shim.mjs:30 · runtime/worker-polyfill.mjs:79 β the two spans are one implementation copied and then locally edited β 51 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. β runtime/navigator-shim.mjs:30
runtime/polyfills.cjs:1092 · runtime/polyfills.cjs:1117 β 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. β runtime/polyfills.cjs:1092
scripts/mac-build.ts:60 · scripts/new-worktree.ts:87 · scripts/remote-build.ts:171 β the 3 copies are spread across 3 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/mac-build.ts:60
runtime/polyfills.cjs:1125 · runtime/polyfills.cjs:2520 β 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. β runtime/polyfills.cjs:1125
scripts/remote-build.ts:780 · scripts/remote-build.ts:827 β 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. β scripts/remote-build.ts:780
stats/download-counts/report.mjs:107 · stats/download-counts/report.mjs:141 β 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. β stats/download-counts/report.mjs:107
npm/nub/bin/launch.js:187 · npm/nub/bin/launch.js:213 β 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. β npm/nub/bin/launch.js:187
npm/nub/bin/launch.js:313 · npm/nub/bin/launch.js:336 β 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. β npm/nub/bin/launch.js:313
scripts/merge-cascade.ts:302 · scripts/merge-cascade.ts:340 β the two spans are one implementation copied and then locally edited β 50 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. β scripts/merge-cascade.ts:302
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory β sometimes there is nothing to extract.
React / JS Β· Code Health β Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) β real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
main has cyclomatic complexity 53 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. β tests/cross-runtime/run.mjs:670
loadInner 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. β runtime/preload-common.cjs:884
check has cyclomatic complexity 35 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/npm-corpus/check-tree.mjs:189
installSyncPolyfills has cyclomatic complexity 35 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/polyfills.cjs:131
parseArgs has cyclomatic complexity 31 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. β scripts/ci-watch.ts:145
parseArgs has cyclomatic complexity 29 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/remote-build.ts:156
request has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β runtime/navigator-locks.mjs:150
(anonymous) has cyclomatic complexity 28 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β tests/worker-wpt/harness/run-wpt.mjs:167
fromBase64 has cyclomatic complexity 28 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/polyfills.cjs:2010
catFor has cyclomatic complexity 28 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β tests/pnpm-conformance/gen-allowlist.mjs:48
_resolveFilename has cyclomatic complexity 26 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 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. β runtime/preload-common.cjs:1263
sumPrecise has cyclomatic complexity 26 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/polyfills.cjs:1496
main has cyclomatic complexity 26 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/mac-build.ts:121
fork has cyclomatic complexity 24 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 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. β runtime/compile-bootstrap.cjs:249
main has cyclomatic complexity 23 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/compile-native-islands/driver.mjs:240
extractPnpm has cyclomatic complexity 22 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β tests/mutation/extract-graph.mjs:76
main has cyclomatic complexity 22 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β scripts/soak/external-tools.mts:680
constructor has cyclomatic complexity 22 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 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. β runtime/worker-polyfill.mjs:231
resolveSpec has cyclomatic complexity 22 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/transform-core.mjs:514
loadTranspile has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/transform-core.mjs:978
parse has cyclomatic complexity 21 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β runtime/polyfills.cjs:1580
main has cyclomatic complexity 21 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/release-notify.ts:184
determineSpecificType has cyclomatic complexity 21 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/util/internals.cjs:86
phantomDepHint has cyclomatic complexity 21 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/preload-common.cjs:683
installWorkerPolyfill has cyclomatic complexity 20 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/worker-polyfill.mjs:170
refreshShimsIn has cyclomatic complexity 20 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β npm/nub/postinstall.js:120
buildPlainCommand has cyclomatic complexity 20 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/cross-runtime/run.mjs:378
checkHandCopies has cyclomatic complexity 19 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/cross-runtime/readme-table.mjs:94
(anonymous) has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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/npm-corpus/check-tree.mjs:98
args has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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/compile-native-islands/driver.mjs:36
main has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/nubr.mjs:323
main has cyclomatic complexity 18 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. β scripts/merge-cascade.ts:324
checkPins has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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/soak/external-tools.mts:118
(anonymous) has cyclomatic complexity 18 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/compile-sea-loader.cjs:34
installFloorBuiltins has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/polyfills.cjs:1635
installLazyEsmPolyfills has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/preload.cjs:319
leadsToUs has cyclomatic complexity 17 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 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. β npm/nub/bin/launch.js:147
classifyRollup has cyclomatic complexity 17 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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/lib/ci-rollup.ts:83
foreignAsyncLoaderPresent has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. β runtime/loader-entry.mjs:90
b64ToU8 has cyclomatic complexity 17 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. β runtime/polyfills.cjs:2100
Do you agree with this assessment?
R3 Β· Large Files5.8 / 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.
runtime/preload-common.cjs has 2572 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/preload-common.cjs:1
runtime/polyfills.cjs has 2515 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/polyfills.cjs:1
runtime/transform-core.mjs has 1175 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/transform-core.mjs:1
scripts/remote-build.ts has 1135 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β scripts/remote-build.ts:1
runtime/worker-polyfill.mjs has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/worker-polyfill.mjs:1
runtime/compile-sea-loader.cjs has 521 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/compile-sea-loader.cjs:1
runtime/preload.cjs has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β runtime/preload.cjs:1
scripts/ci-watch.ts has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module. β scripts/ci-watch.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 Β· Test Coverage6.0 / 10Adequateβ Tool-verified
React / JS Β· Readiness β Static test reachability (D-386): the share of production files reachable from any test via the import graph β measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph β measured without running anything. Deterministic.
npm/nub-types/test/fixtures/positive/index.ts:41 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β npm/nub-types/test/fixtures/positive/index.ts:41
npm/nub-types/test/fixtures/stepaside-dom/index.ts:9 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β npm/nub-types/test/fixtures/stepaside-dom/index.ts:9
npm/nub-types/test/fixtures/stepaside-stub/index.ts:7 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β npm/nub-types/test/fixtures/stepaside-stub/index.ts:7
scripts/native-worker.test.mts:8 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β scripts/native-worker.test.mts:8
scripts/runtime-primordials.test.mts:8 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β scripts/runtime-primordials.test.mts:8
scripts/runtime-shims.test.mts:10 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β scripts/runtime-shims.test.mts:10
scripts/worker-exec-argv.test.mts:16 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β scripts/worker-exec-argv.test.mts:16
tests/compile-augmentation/fixtures/a-addon-esm-package.cjs:18 imports './nub-native.node', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/compile-augmentation/fixtures/a-addon-esm-package.cjs:18
tests/compile-augmentation/fixtures/a-resolution.ts:6 imports './src/deep', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/compile-augmentation/fixtures/a-resolution.ts:6
tests/fixtures/data-loaders-require/resolution.cjs:10 imports './config', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/fixtures/data-loaders-require/resolution.cjs:10
tests/fixtures/dir-main/main.ts:2 imports './main-no-index', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/fixtures/dir-main/main.ts:2
tests/fixtures/loader-source-reuse/main.mjs:8 imports './absent.mjs', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/fixtures/loader-source-reuse/main.mjs:8
tests/fixtures/vanilla-ts/js-no-probe.js:1 imports './nonexistent', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/fixtures/vanilla-ts/js-no-probe.js:1
tests/fixtures/worker/unhandled-error-fatal-main.ts:7 imports './does-not-exist.mjs', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. β tests/fixtures/worker/unhandled-error-fatal-main.ts:7
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. (×19) β runtime/compile-sea-loader.cjs:1, runtime/nubr.mjs:1, runtime/compile-bootstrap.cjs:1, β¦
What to do
Add tests that import the unreached modules (directly or through their public entry).
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.
Do you agree with this assessment?
R6 Β· Tooling10.0 / 10Exemplaryβ Tool-verified
React / JS Β· Readiness β Whether the project wires up test, lint and typecheck β detected from each 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.
This repository declares test tooling, and the β above records that declaration β but npm/nub-types/test/fixtures/positive/index.ts and 13 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) β each one is reported with its failing import under Test Coverage β then the declared script exercises what it claims to. β npm/nub-types/test/fixtures/positive/index.ts:41
Do you agree with this assessment?
R7 Β· Dead Code9.9 / 10Exemplaryβ 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.
7 file(s) (~1112 LoC) were excluded from dead-code analysis β declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. β tests/registry
Unreachable from the 260 application, 70 tooling and 476 test entry point(s) detected in this repo. Gate removals on `npm run typecheck` β an undetected custom entry would make these reachable.
no import path from any entry point (260 application, 70 tooling, 476 test roots considered), and no other file in the scanned tree imports it β nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make β scripts/lat-prompt.mjs
Nothing imports this binding β it is safe to review for removal. β scripts/lib/download-stats.mjs:15
This top-level declaration is not exported and its name occurs nowhere else in its module β not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. β tests/conformance/registry/main.mjs:7
What to do
Delete the dead files and unused exports β every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS Β· Readiness β npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps β from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json β installs work only by hoisting accident. β runtime/transform-core.mjs:1189
Declared in npm/nub-types/test/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. (×3)
Declared in tests/agent-sandbox/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. (×2)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS Β· Architecture β Import cycles in the module graph (D-386) β files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other Β· Security β Read from this repository's Rust 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 serves no HTTP of its own β no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, β¦) among its Cargo manifests' run-time dependencies, and no server started in its production source β so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything β a signature, an integrity or tamper check, a credential, or any value an attacker can influence β that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(β¦)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead β a non-cryptographic hash such as xxhash or murmurhash says it in code β since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. β crates/nub-core/src/pm/registry.rs:866
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
Other Β· Code Health β Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other Β· Security β Whether a hand-rolled public/private IP check can be walked past β a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other Β· Code Health β Whether 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 1/4 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.
`getStarCount` awaits `fetch(β¦)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×3) β site/src/components/github-star-button.tsx:32, site/src/components/github-star-pill.tsx:63, site/src/app/stars.svg/route.ts:50
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other Β· Code Health β Whether a `when` guard is free of side effects β a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a condition that tests a value for emptiness indexes that same value only where the test holds β an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty β a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 Β· Per-element action decided by a fixed element10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a decision taken once per element is taken ABOUT that element β a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`βs condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move β written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engineβs own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = β¦; β¦; β¦)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 Β· Support guard that admits what it rejects10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a guard written as a NEGATED `||` says what its author meant β `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read β an identifier or member access, never an invocation, which is a predicate rather than a capability flag β and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other Β· Code Health β Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engineβs own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard libraryβs `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`β¦`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravelβs `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentryβs structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${β¦}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gemβs `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{β¦}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug!` at line 155 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β crates/nub-core/src/node/runtime_cache.rs:155
`debug!` at line 213 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β crates/nub-core/src/node/runtime_cache.rs:213
`debug!` at line 229 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β crates/nub-core/src/node/runtime_cache.rs:229
`warn!` at line 2137 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β crates/nub-cli/src/pm_engine/mod.rs:2137
`warn!` at line 478 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. β crates/nub-cli/src/pm_engine/phantom_closure.rs:478
Other Β· Code Health β Whether strict null checking is enabled and not undermined by heavy `!` assertion β TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
8/24 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~0.3 `!` null assertions per 1k TypeScript source lines β 2 assertion(s) across the 7969 source line(s) of the 63 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: site/src/components/code.tsx (1), site/src/lib/ansi-screen.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off β `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family β and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage β what static analysis assessed
Statically assessed 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).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by β¦") and is never the strongest area however high its average.
Unscored β 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score β either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty β 1 observation(s) recorded Β· 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.
SC1 Supply-chain hygiene β 8 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
X10 Duplicated predicate β 22 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
X7 Silent fallback defaults β 29 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
X9 Subsumed condition operand β 1 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 β 54 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; 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 β AX6 reached only 17% of this repository's production lines β rust (139,273 lines), python (26 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion β not applicable β not a vertical-slice architecture
AXB2 Runtime readiness β Advisory β this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility β the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): package.json has no "dev" script, so `npm run dev` could not start the app. Last output: "npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" 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, first_name, date_of_birth, phone, β¦) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE β and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, β¦) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls β No access-control surface detected in the analyzed source β this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here β a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail β No personal data detected in a persisted data model β no PII-named field (email, first_name, date_of_birth, phone, β¦) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE β and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, β¦) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store 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, first_name, date_of_birth, phone, β¦) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE β and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, β¦) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights β No personal data detected in a persisted data model β no PII-named field (email, first_name, date_of_birth, phone, β¦) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE β and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, β¦) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability β Test reliability not scored β polyglot repository, one half's runner produced no measurement
D16 Bus Factor β single-maintainer repository β bus factor is not applicable
D18 Solution Shape β D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency β D21 withholds its case and prefix conventions rows: 3 candidate(s) found and not reported.
D22 Internal API Consistency β API consistency is measured on C# only; the exposed Rust 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 β no ADRs to check
D27 Navigability β D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) β 1 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.
D7 Architectural Integrity β no checkable ADRs, and no project-reference graph for the cycle pass to read β so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage β Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured β the vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/tooling/ ran and not one test passed (RUN v1.6.1 benchmarks/pm/fixtures/workspace-descript/packages/tooling), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling β not scored β this repository shows only 1 of the 3 signals this lens looks for (45 value object(s))
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
GD1 Unfinished & placeholder code β no source files were read β this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs β 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
P8 Schema migrations β Knex, Prisma is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage β coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here β Test coverage (D8) says why
PF2 Allocation hygiene β Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries β No recognizable feature-sliced/layered src layout β boundary rules not applicable.
X12 Unreachable branch β X12 reached only 17% of this repository's production lines β rust (139,273 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream β X13 reached only 17% of this repository's production lines β rust (139,273 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
X16 Unfloored truncation loop β X16 reached only 17% of this repository's production lines β rust (139,273 lines), python (26 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
X18 Disposal-pattern correctness β X18 reached only 17% of this repository's production lines β rust (139,273 lines), python (26 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state β X19 reached only 17% of this repository's production lines β rust (139,273 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
X24 Document value interpolated into markup unescaped β not applicable β the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob β 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: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
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
X3 Exception handling β X3 reached only 17% of this repository's production lines β rust (139,273 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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.
X6 Hand-rolled structured-format parsing β 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.
D11 Β· Test ReliabilityΒ· Test suite declares a test script but contains no test files Β· Γ8
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript/packages/service/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/service/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript/packages/tooling/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/tooling/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript/packages/ui-core/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/ui-core/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript/packages/ui-widgets/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/ui-widgets/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript-b/packages/service/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript-b/packages/service/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript-b/packages/tooling/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript-b/packages/tooling/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript-b/packages/ui-core/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript-b/packages/ui-core/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
Test suite declares a test script but contains no test files: benchmarks/pm/fixtures/workspace-descript-b/packages/ui-widgets/ β The vitest suite in benchmarks/pm/fixtures/workspace-descript-b/packages/ui-widgets/ was installed and launched successfully, and the runner then found no test files to run β include: **/*.{test,spec}.?(c|m)[jt]s?(x). The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL β there are none.
D10 Β· Test QualityΒ· No assertions (empty test) Β· Γ3
No assertions (empty test): nub-as-node parity leg tests/flag-parsing/flag-parsing.test.mjs:194β Test method has an empty body β it asserts nothing and exercises no code.
No assertions (empty test): noop tests/fixtures/non-program-modes/counts.test.mjs:8β Test method has an empty body β it asserts nothing and exercises no code.
No assertions (empty test): noop tests/fixtures/non-program-modes/serves.test.mjs:5β Test method has an empty body β it asserts nothing and exercises no code.
Unlisted import 'yaml' runtime/transform-core.mjs:1189β Imported but not declared in any reachable package.json β installs work only by hoisting accident.
nub_cli::cli::run_nub (cognitive 131) crates/nub-cli/src/cli.rs:2175β nub_cli::cli::run_nub has cognitive complexity 131 (threshold 15). Drivers by points: if/else 49 (101 pts), boolean chains 13, match/switch 3 (11 pts), loops 2 (6 pts) (nesting depth added 64). 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.
nub_cli::cli::run_workspace_target (cognitive 100) crates/nub-cli/src/cli.rs:5484β nub_cli::cli::run_workspace_target has cognitive complexity 100 (threshold 15). Drivers by points: if/else 34 (52 pts), match/switch 6 (20 pts), boolean chains 15, loops 5 (13 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.
nub_cli::cli::run_watch (cognitive 79) crates/nub-cli/src/cli.rs:7416β nub_cli::cli::run_watch has cognitive complexity 79 (threshold 15). Drivers by points: if/else 38 (48 pts), boolean chains 15, loops 7 (11 pts), match/switch 3 (5 pts) (nesting depth added 16). 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.
nub_cli::compile::run (cognitive 77) crates/nub-cli/src/compile/mod.rs:114β nub_cli::compile::run has cognitive complexity 77 (threshold 15). Drivers by points: if/else 47 (57 pts), boolean chains 10, loops 4 (5 pts), match/switch 3 (5 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth β checks laid out side by side rather than stacked β so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
nub_cli::compile::closure::scan (cognitive 76) crates/nub-cli/src/compile/closure.rs:571β nub_cli::compile::closure::scan has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (46 pts), match/switch 6 (19 pts), boolean chains 10, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::compile::bundle::bundle_inner (cognitive 61) crates/nub-cli/src/compile/bundle.rs:380β nub_cli::compile::bundle::bundle_inner has cognitive complexity 61 (threshold 15). Drivers by points: if/else 30 (45 pts), match/switch 3 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::dispatch_subcommand (cognitive 56) crates/nub-cli/src/cli.rs:2912β nub_cli::cli::dispatch_subcommand has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (39 pts), boolean chains 9, match/switch 5 (8 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.
nub_cli::compile::native::require_rebindings (cognitive 44) crates/nub-cli/src/compile/native.rs:2179β nub_cli::compile::native::require_rebindings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 9, loops 4 (7 pts), match/switch 4 (7 pts) (nesting depth added 13). Of this number, 20 points are the body's own statements and 24 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::run_nubx (cognitive 41) crates/nub-cli/src/cli.rs:3584β nub_cli::cli::run_nubx has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 8, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::build_script_command (cognitive 40) crates/nub-cli/src/cli.rs:6280β nub_cli::cli::build_script_command has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 5, match/switch 5, loops 2 (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.
nub_cli::phantom_scan::walk_source (cognitive 40) crates/nub-cli/src/phantom_scan.rs:294β nub_cli::phantom_scan::walk_source has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (34 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::pm_engine::use_nub::plan_migration (cognitive 40) crates/nub-cli/src/pm_engine/use_nub.rs:409β nub_cli::pm_engine::use_nub::plan_migration has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 5 (11 pts), boolean chains 2, match/switch 1 (2 pts) (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.
nub_cli::cli::run_upgrade (cognitive 39) crates/nub-cli/src/cli.rs:8782β nub_cli::cli::run_upgrade has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 5 (13 pts), boolean chains 1 (nesting depth added 22). Of this number, 35 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::run_pm (cognitive 39) crates/nub-cli/src/cli.rs:10368β nub_cli::cli::run_pm has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 4 (9 pts), loops 3 (7 pts), boolean chains 3 (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.
nub_cli::pm_engine::use_nub::apply_manifest_edits (cognitive 38) crates/nub-cli/src/pm_engine/use_nub.rs:622β nub_cli::pm_engine::use_nub::apply_manifest_edits has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 4 (9 pts), loops 3 (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.
nub_cli::cli::prepare_preload_chain (cognitive 34) crates/nub-cli/src/cli.rs:4036β nub_cli::cli::prepare_preload_chain has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 9, match/switch 3 (4 pts), loops 2 (3 pts) (nesting depth added 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.
nub_cli::compile::bundle::finish_eager_startup (cognitive 33) crates/nub-cli/src/compile/bundle.rs:2130β nub_cli::compile::bundle::finish_eager_startup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 2 (3 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.
nub_cli::compile::prepare_node_bytes (cognitive 31) crates/nub-cli/src/compile/mod.rs:2893β nub_cli::compile::prepare_node_bytes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 7, match/switch 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.
nub_cli::compile::bundle::reject_unresolved (cognitive 31) crates/nub-cli/src/compile/bundle.rs:6148β nub_cli::compile::bundle::reject_unresolved has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 3, loops 2, match/switch 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, 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.
nub_cli::compile::native::plan_closure (cognitive 30) crates/nub-cli/src/compile/native.rs:1795β nub_cli::compile::native::plan_closure has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 5 (7 pts), boolean chains 2, match/switch 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.
nub_cli::init::run_init (cognitive 30) crates/nub-cli/src/init.rs:44β nub_cli::init::run_init has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (17 pts), match/switch 5 (8 pts), boolean chains 4, loops 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.
nub_cli::pm_engine::lower_native_install_settings (cognitive 30) crates/nub-cli/src/pm_engine/mod.rs:1156β nub_cli::pm_engine::lower_native_install_settings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (7 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::drain_both_inline (cognitive 29) crates/nub-cli/src/cli.rs:7033β nub_cli::cli::drain_both_inline has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (3 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.
nub_cli::cli::swap_bin_files_windows (cognitive 28) crates/nub-cli/src/cli.rs:9203β nub_cli::cli::swap_bin_files_windows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::compile::bundle::worker_alias_bindings (cognitive 28) crates/nub-cli/src/compile/bundle.rs:4426β nub_cli::compile::bundle::worker_alias_bindings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (6 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_cli::cli::run_nub (cyclomatic 77) crates/nub-cli/src/cli.rs:2175β nub_cli::cli::run_nub has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_cli::cli::run_watch (cyclomatic 63) crates/nub-cli/src/cli.rs:7416β nub_cli::cli::run_watch has cyclomatic complexity 63 (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.
nub_cli::compile::closure::scan (cyclomatic 61) crates/nub-cli/src/compile/closure.rs:571β nub_cli::compile::closure::scan has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_cli::cli::run_workspace_target (cyclomatic 54) crates/nub-cli/src/cli.rs:5484β nub_cli::cli::run_workspace_target has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_cli::cli::dispatch_subcommand (cyclomatic 53) crates/nub-cli/src/cli.rs:2912β nub_cli::cli::dispatch_subcommand has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_cli::compile::run (cyclomatic 46) crates/nub-cli/src/compile/mod.rs:114β nub_cli::compile::run has cyclomatic complexity 46 (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.
nub_cli::compile::native::require_rebindings (cyclomatic 39) crates/nub-cli/src/compile/native.rs:2179β nub_cli::compile::native::require_rebindings has cyclomatic complexity 39 (threshold 15). Of this number, 16 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
nub_cli::cli::build_script_command (cyclomatic 35) crates/nub-cli/src/cli.rs:6280β nub_cli::cli::build_script_command has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nub_cli::compile::bundle::bundle_inner (cyclomatic 34) crates/nub-cli/src/compile/bundle.rs:380β nub_cli::compile::bundle::bundle_inner 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.
nub_cli::pm_engine::use_nub::plan_migration (cyclomatic 33) crates/nub-cli/src/pm_engine/use_nub.rs:409β nub_cli::pm_engine::use_nub::plan_migration has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_cli::cli::run_pm (cyclomatic 28) crates/nub-cli/src/cli.rs:10368β nub_cli::cli::run_pm has cyclomatic complexity 28 (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.
nub_cli::cli::prepare_preload_chain (cyclomatic 26) crates/nub-cli/src/cli.rs:4036β nub_cli::cli::prepare_preload_chain 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.
nub_cli::cli::run_upgrade (cyclomatic 26) crates/nub-cli/src/cli.rs:8782β nub_cli::cli::run_upgrade has cyclomatic complexity 26 (threshold 15). Of this number, 23 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.
nub_cli::cli::run_nubx (cyclomatic 25) crates/nub-cli/src/cli.rs:3584β nub_cli::cli::run_nubx 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.
nub_cli::compile::prepare_node_bytes (cyclomatic 25) crates/nub-cli/src/compile/mod.rs:2893β nub_cli::compile::prepare_node_bytes 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.
nub_cli::project_config::validate_root (cyclomatic 25) crates/nub-cli/src/project_config.rs:1347β nub_cli::project_config::validate_root 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.
nub_cli::init::run_init (cyclomatic 23) crates/nub-cli/src/init.rs:44β nub_cli::init::run_init 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.
nub_cli::pm_engine::use_nub::apply_manifest_edits (cyclomatic 23) crates/nub-cli/src/pm_engine/use_nub.rs:622β nub_cli::pm_engine::use_nub::apply_manifest_edits 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.
nub_cli::project_config::merge_layer (cyclomatic 23) crates/nub-cli/src/project_config.rs:1076β nub_cli::project_config::merge_layer 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.
nub_cli::compile::bundle::rewrite_entry_main_checks (cyclomatic 22) crates/nub-cli/src/compile/bundle.rs:3250β nub_cli::compile::bundle::rewrite_entry_main_checks has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
nub_cli::compile::bundle::reject_unresolved (cyclomatic 22) crates/nub-cli/src/compile/bundle.rs:6148β nub_cli::compile::bundle::reject_unresolved 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.
nub_cli::pm_engine::use_nub::run_use_nub (cyclomatic 22) crates/nub-cli/src/pm_engine/use_nub.rs:886β nub_cli::pm_engine::use_nub::run_use_nub 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.
nub_cli::cli::run_pm_shim_install (cyclomatic 21) crates/nub-cli/src/cli.rs:11219β nub_cli::cli::run_pm_shim_install 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.
nub_cli::compile::bundle::scan_new_urls (cyclomatic 21) crates/nub-cli/src/compile/bundle.rs:4031β nub_cli::compile::bundle::scan_new_urls 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.
nub_cli::compile::inline::classify (cyclomatic 21) crates/nub-cli/src/compile/inline.rs:328β nub_cli::compile::inline::classify 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.
Sync-over-async blocking scripts/mac-build.ts:217β `mkdirSync` in `main` 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/mac-build.ts:223β `mkdtempSync` in `main` 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/mac-build.ts:227β `existsSync` in `main` 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/mac-build.ts:228β `rmSync` in `main` 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/mac-build.ts:232β `readdirSync` in `main` 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/mac-build.ts:233β `renameSync` in `main` 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/mac-build.ts:235β `rmSync` in `main` 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/mac-build.ts:267β `existsSync` in `main` 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/mac-build.ts:269β `mkdirSync` in `main` 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/mac-build.ts:273β `rmSync` in `main` 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/mac-build.ts:274β `copyFileSync` in `main` 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/merge-cascade.ts:385β `execFileSync` in `main` 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/remote-build.ts:412β `readFileSync` in `createInstance` 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/remote-build.ts:711β `existsSync` in `attachToJob` 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/remote-build.ts:728β `existsSync` in `attachToJob` 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/remote-build.ts:728β `readFileSync` in `attachToJob` 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/remote-build.ts:741β `writeFileSync` in `drain` 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/remote-build.ts:763β `rmSync` in `attachToJob` 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/remote-build.ts:925β `existsSync` in `reap` 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/remote-build.ts:926β `statSync` in `readdirSync` 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/remote-build.ts:1076β `existsSync` in `main` 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/remote-build.ts:1080β `readFileSync` in `main` 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/soak/external-tools.mts:434β `existsSync` in `installAssetTool` 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/soak/external-tools.mts:438β `existsSync` in `installAssetTool` 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/soak/external-tools.mts:445β `mkdirSync` in `installAssetTool` 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.
D30 Β· Dependency VulnerabilitiesΒ· Medium advisory (unsound) Β· Γ28
Hotspot: crates/nub-cli/src/cli.rs crates/nub-cli/src/cli.rs:2175β crates/nub-cli/src/cli.rs changed 64 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in nub_cli::cli::run_nub at line 2175. 3 of those changes were fix/bug commits, and the other 61 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/cli.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-core/src/node/spawn.rs crates/nub-core/src/node/spawn.rs:828β crates/nub-core/src/node/spawn.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in nub_core::node::spawn::spawn_node at line 828. 1 of those changes was a fix/bug commit, and the other 26 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-core/src/node/spawn.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-cli/src/compile/mod.rs crates/nub-cli/src/compile/mod.rs:114β crates/nub-cli/src/compile/mod.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in nub_cli::compile::run at line 114. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/compile/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: runtime/polyfills.cjs runtime/polyfills.cjs:465β runtime/polyfills.cjs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 176 in polyfills.installIteratorSurface at line 465. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons β this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/polyfills.cjs`: 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: runtime/preload-common.cjs runtime/preload-common.cjs:884β runtime/preload-common.cjs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in preload-common.makeHooks.loadInner at line 884. 4 of those changes were fix/bug commits, and the other 22 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/preload-common.cjs`: 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: crates/nub-cli/src/compile/bundle.rs crates/nub-cli/src/compile/bundle.rs:380β crates/nub-cli/src/compile/bundle.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in nub_cli::compile::bundle::bundle_inner at line 380. 3 of those changes were fix/bug commits, and the other 23 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/compile/bundle.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-launcher/src/main.rs crates/nub-launcher/src/main.rs:201β crates/nub-launcher/src/main.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in nub_launcher::launch at line 201. 2 of those changes were fix/bug commits, and the other 20 changed it for other reasons β this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-launcher/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: runtime/worker-polyfill.mjs runtime/worker-polyfill.mjs:170β runtime/worker-polyfill.mjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in worker-polyfill.installWorkerPolyfill at line 170. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons β this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/worker-polyfill.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: crates/nub-cli/src/pm_engine/install_family.rs crates/nub-cli/src/pm_engine/install_family.rs:1388β crates/nub-cli/src/pm_engine/install_family.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in nub_cli::pm_engine::install_family::run_install at line 1388. 3 of those changes were fix/bug commits, and the other 13 changed it for other reasons β this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/pm_engine/install_family.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: runtime/transform-core.mjs runtime/transform-core.mjs:514β runtime/transform-core.mjs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in transform-core.resolveSpec at line 514. 1 of those changes was a fix/bug commit, and the other 12 changed it for other reasons β this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/transform-core.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: runtime/preload.cjs runtime/preload.cjs:319β runtime/preload.cjs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in preload.installLazyEsmPolyfills at line 319. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/preload.cjs`: 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: runtime/compile-sea-loader.cjs runtime/compile-sea-loader.cjs:159β runtime/compile-sea-loader.cjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in compile-sea-loader.installPayloadContainer at line 159. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/compile-sea-loader.cjs`: 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: tests/cross-runtime/run.mjs tests/cross-runtime/run.mjs:670β tests/cross-runtime/run.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in main at line 670. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- tests/cross-runtime/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: crates/nub-cli/src/pm_engine/use_nub.rs crates/nub-cli/src/pm_engine/use_nub.rs:622β crates/nub-cli/src/pm_engine/use_nub.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in nub_cli::pm_engine::use_nub::apply_manifest_edits at line 622. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/pm_engine/use_nub.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: scripts/remote-build.ts scripts/remote-build.ts:1069β scripts/remote-build.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in remote-build.main at line 1069. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- scripts/remote-build.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-cli/src/project_config.rs crates/nub-cli/src/project_config.rs:1347β crates/nub-cli/src/project_config.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in nub_cli::project_config::validate_root at line 1347. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/project_config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-cli/src/compile/native.rs crates/nub-cli/src/compile/native.rs:707β crates/nub-cli/src/compile/native.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in NativeAddons::walk_closure at line 707. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/compile/native.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-cli/src/compile/inline.rs crates/nub-cli/src/compile/inline.rs:328β crates/nub-cli/src/compile/inline.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in nub_cli::compile::inline::classify at line 328. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/compile/inline.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-core/src/node/runtime_cache.rs crates/nub-core/src/node/runtime_cache.rs:635β crates/nub-core/src/node/runtime_cache.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in nub_core::node::runtime_cache::walk_windows_base_under at line 635. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-core/src/node/runtime_cache.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-cli/src/pm_engine/store_config_family.rs crates/nub-cli/src/pm_engine/store_config_family.rs:652β crates/nub-cli/src/pm_engine/store_config_family.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in nub_cli::pm_engine::store_config_family::dispatch_config at line 652. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-cli/src/pm_engine/store_config_family.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/nub-tsconfig/src/lib.rs crates/nub-tsconfig/src/lib.rs:663β crates/nub-tsconfig/src/lib.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in nub_tsconfig::inner_parse at line 663. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- crates/nub-tsconfig/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: scripts/mac-build.ts scripts/mac-build.ts:121β scripts/mac-build.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in mac-build.main at line 121. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- scripts/mac-build.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: runtime/loader-entry.mjs runtime/loader-entry.mjs:124β runtime/loader-entry.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in loader-entry.arm at line 124. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- runtime/loader-entry.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: scripts/release-notify.ts scripts/release-notify.ts:184β scripts/release-notify.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in release-notify.main at line 184. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- scripts/release-notify.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each β a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: npm/nub/postinstall.js npm/nub/postinstall.js:120β npm/nub/postinstall.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in postinstall.refreshShimsIn at line 120. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 18:54:51 -08:00' --until='2026-11-12 18:54:51 -08:00' --full-history --no-merges -- npm/nub/postinstall.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.
nub_core::node::spawn::spawn_node (cognitive 86) crates/nub-core/src/node/spawn.rs:828β nub_core::node::spawn::spawn_node has cognitive complexity 86 (threshold 15). Drivers by points: if/else 40 (66 pts), boolean chains 9, loops 4 (8 pts), match/switch 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::workspace::env::strongly_connected (cognitive 31) crates/nub-core/src/workspace/env.rs:366β nub_core::workspace::env::strongly_connected has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts) (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.
nub_core::workspace::env::parse_env (cognitive 30) crates/nub-core/src/workspace/env.rs:579β nub_core::workspace::env::parse_env has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 1 (3 pts), boolean chains 2, 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.
nub_core::node::discovery::walk_up_for_pin (cognitive 27) crates/nub-core/src/node/discovery.rs:583β nub_core::node::discovery::walk_up_for_pin has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth β most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
nub_core::pm::shim::npm_install_route (cognitive 26) crates/nub-core/src/pm/shim.rs:259β nub_core::pm::shim::npm_install_route has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 13). 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.
nub_core::workspace::filter::topological_chunks (cognitive 26) crates/nub-core/src/workspace/filter.rs:467β nub_core::workspace::filter::topological_chunks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (8 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.
nub_core::node::runtime_cache::walk_windows_base_under (cognitive 23) crates/nub-core/src/node/runtime_cache.rs:635β nub_core::node::runtime_cache::walk_windows_base_under has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::pm::provision::provision_pm_announced (cognitive 23) crates/nub-core/src/pm/provision.rs:104β nub_core::pm::provision::provision_pm_announced has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 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.
nub_core::workspace::detect::detect_project_walk (cognitive 23) crates/nub-core/src/workspace/detect.rs:102β nub_core::workspace::detect::detect_project_walk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 3, 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.
nub_core::workspace::env::load_env_files_raw_reporting (cognitive 23) crates/nub-core/src/workspace/env.rs:453β nub_core::workspace::env::load_env_files_raw_reporting has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::workspace::filter::read_pnpm_workspace (cognitive 23) crates/nub-core/src/workspace/filter.rs:321β nub_core::workspace::filter::read_pnpm_workspace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::node::runtime_cache::walk_unix_base (cognitive 22) crates/nub-core/src/node/runtime_cache.rs:468β nub_core::node::runtime_cache::walk_unix_base has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (5 pts), boolean chains 2, 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.
nub_core::workspace::env::scan_references (cognitive 22) crates/nub-core/src/workspace/env.rs:753β nub_core::workspace::env::scan_references has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::workspace::filter::expand_member_patterns (cognitive 22) crates/nub-core/src/workspace/filter.rs:98β nub_core::workspace::filter::expand_member_patterns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 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.
nub_core::node::discovery::discover_node (cognitive 20) crates/nub-core/src/node/discovery.rs:252β nub_core::node::discovery::discover_node has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::node::flags::node_options_tokens (cognitive 19) crates/nub-core/src/node/flags.rs:392β nub_core::node::flags::node_options_tokens has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::pm::registry::parse_npmrc_auth (cognitive 19) crates/nub-core/src/pm/registry.rs:336β nub_core::pm::registry::parse_npmrc_auth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (2 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.
nub_core::node::discovery::which_node_in (cognitive 17) crates/nub-core/src/node/discovery.rs:1128β nub_core::node::discovery::which_node_in has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1, match/switch 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.
nub_core::pm::shim::scan_path (cognitive 17) crates/nub-core/src/pm/shim.rs:1783β nub_core::pm::shim::scan_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::version_management::download::try_download_extract (cognitive 17) crates/nub-core/src/version_management/download.rs:485β nub_core::version_management::download::try_download_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::workspace::filter::splits_into_segments (cognitive 17) crates/nub-core/src/workspace/filter.rs:274β nub_core::workspace::filter::splits_into_segments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (4 pts), match/switch 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.
nub_core::workspace::shell_escape::cmd (cognitive 17) crates/nub-core/src/workspace/shell_escape.rs:90β nub_core::workspace::shell_escape::cmd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::node::runtime_cache::gc_stale (cognitive 16) crates/nub-core/src/node/runtime_cache.rs:1124β nub_core::node::runtime_cache::gc_stale has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_core::windows_security::dacl_is_stable (cognitive 16) crates/nub-core/src/windows_security.rs:382β nub_core::windows_security::dacl_is_stable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 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.
FileTooLong: src/cli.rs crates/nub-cli/src/cli.rsβ FileTooLong β 6051 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 201 free functions. The bar is 500 significant lines; this is 5551 over it, 12.10× 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: compile/bundle.rs crates/nub-cli/src/compile/bundle.rsβ FileTooLong β 3273 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 117 free functions. The bar is 500 significant lines; this is 2773 over it, 6.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: compile/mod.rs crates/nub-cli/src/compile/mod.rsβ FileTooLong β 1905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 89 free functions. The bar is 500 significant lines; this is 1405 over it, 3.81× 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: node/spawn.rs crates/nub-core/src/node/spawn.rsβ FileTooLong β 1858 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 107 free functions. The bar is 500 significant lines; this is 1358 over it, 3.72× 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/main.rs crates/nub-launcher/src/main.rsβ FileTooLong β 1852 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 120 free functions. The bar is 500 significant lines; this is 1352 over it, 3.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: runtime/polyfills.cjs runtime/polyfills.cjsβ FileTooLong β 1614 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 1114 over it, 3.23× 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: pm_engine/mod.rs crates/nub-cli/src/pm_engine/mod.rsβ FileTooLong β 1559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 78 free functions. The bar is 500 significant lines; this is 1059 over it, 3.12× 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: compile/native.rs crates/nub-cli/src/compile/native.rsβ FileTooLong β 1463 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 32 free functions. The bar is 500 significant lines; this is 963 over it, 2.93× 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: (home)/page.tsx site/src/app/(home)/page.tsxβ FileTooLong β 1195 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 695 over it, 2.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: node/discovery.rs crates/nub-core/src/node/discovery.rsβ FileTooLong β 1120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 77 free functions. The bar is 500 significant lines; this is 620 over it, 2.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: runtime/preload-common.cjs runtime/preload-common.cjsβ FileTooLong β 1041 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 541 over it, 2.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: pm_engine/install_family.rs crates/nub-cli/src/pm_engine/install_family.rsβ FileTooLong β 968 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 52 free functions. The bar is 500 significant lines; this is 468 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/project_config.rs crates/nub-cli/src/project_config.rsβ FileTooLong β 904 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 46 free functions. The bar is 500 significant lines; this is 404 over it, 1.81× 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/lib.rs crates/nub-tsconfig/src/lib.rsβ FileTooLong β 869 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 46 free functions. The bar is 500 significant lines; this is 369 over it, 1.74× 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: pm/shim.rs crates/nub-core/src/pm/shim.rsβ FileTooLong β 864 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 52 free functions. The bar is 500 significant lines; this is 364 over it, 1.73× 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: version_management/mod.rs crates/nub-core/src/version_management/mod.rsβ FileTooLong β 598 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 33 free functions. The bar is 500 significant lines; this is 98 over it, 1.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: compile/closure.rs crates/nub-cli/src/compile/closure.rsβ FileTooLong β 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted). The bar is 500 significant lines; this is 87 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: node/runtime_cache.rs crates/nub-core/src/node/runtime_cache.rsβ FileTooLong β 576 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 39 free functions. The bar is 500 significant lines; this is 76 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: pm_engine/use_nub.rs crates/nub-cli/src/pm_engine/use_nub.rsβ FileTooLong β 539 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted). The bar is 500 significant lines; this is 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: node/feature_matrix.rs crates/nub-core/src/node/feature_matrix.rsβ FileTooLong β 537 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted). The bar is 500 significant lines; this is 37 over it, 1.07× 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: compile/native_layout.rs crates/nub-cli/src/compile/native_layout.rsβ FileTooLong β 532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted). 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: pm_engine/store_config_family.rs crates/nub-cli/src/pm_engine/store_config_family.rsβ FileTooLong β 530 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted). The bar is 500 significant lines; this is 30 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: pm/resolve.rs crates/nub-core/src/pm/resolve.rsβ FileTooLong β 503 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), declaring 31 free functions. The bar is 500 significant lines; this is 3 over it, 1.01× 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.
No assertions: (unnamed test) tests/worker-wpt/wpt/workers/Worker-replace-event-handler.any.js:7β 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: (unnamed test) tests/worker-wpt/wpt/webmessaging/Channel_postMessage_DataCloneErr.any.js:5β 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: (unnamed test) tests/worker-wpt/wpt/webmessaging/Channel_postMessage_clone_port.any.js:24β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) β so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: (unnamed test) tests/worker-wpt/wpt/webmessaging/Channel_postMessage_clone_port_error.any.js:5β 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: (unnamed test) tests/worker-wpt/wpt/webmessaging/MessageEvent.any.js:7β 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: (unnamed test) tests/worker-wpt/wpt/webmessaging/MessageEvent.any.js:11β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) β so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: (unnamed test) tests/worker-wpt/wpt/webmessaging/MessageEvent.any.js:17β 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: (unnamed test) tests/worker-wpt/wpt/webmessaging/message-channels/close.any.js:56β 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: (unnamed test) tests/worker-wpt/wpt/web-locks/non-secure-context.any.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.
No assertions: (unnamed test) tests/worker-wpt/wpt/urlpattern/urlpattern-constructor.any.js:2β 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: (unnamed test) tests/worker-wpt/wpt/urlpattern/urlpattern-constructor.any.js:8β 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: (unnamed test) tests/worker-wpt/wpt/urlpattern/urlpattern-generate.tentative.any.js:5β 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: (unnamed test) tests/worker-wpt/wpt/urlpattern/resources/urlpattern-compare-tests.tentative.js:3β 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: (unnamed test) tests/worker-wpt/wpt/urlpattern/resources/urlpattern-hasregexpgroups-tests.js:1β 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: (unnamed test) tests/worker-wpt/wpt/urlpattern/resources/urlpatterntests.js:15β 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: (unnamed test) tests/worker-wpt/wpt/resources/testharness.js:1228β 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: (unnamed test) tests/worker-wpt/wpt/html/webappapis/scripting/reporterror.any.js:8β 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: (unnamed test) tests/worker-wpt/wpt/html/webappapis/scripting/reporterror.any.js:23β 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: (unnamed test) tests/worker-wpt/wpt/html/webappapis/scripting/reporterror.any.js:27β 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.
R4 Β· Test CoverageΒ· No test reaches this file Β· Γ19
No test reaches this file runtime/compile-sea-loader.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/nubr.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/compile-bootstrap.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file npm/nub/postinstall.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 runtime/compile-inline-loader.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-entry.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/preload.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/preload-async-hooks.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file stats/download-counts/report.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-platform.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/pnp-bin-run.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/watch-env-guard.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/floor-builtin.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/threadpool-snapshot.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-register.cjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-addon-env.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/compile-cache-restore.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-esm.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
No test reaches this file runtime/loader-register.mjs:1β No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL β if neither does, no test reaches this one.
D30 Β· Dependency VulnerabilitiesΒ· Medium vulnerability Β· Γ16
FunctionTooLong: nub_cli::compile::run crates/nub-cli/src/compile/mod.rs:114β FunctionTooLong β nub_cli::compile::run runs 369 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 269 over it, 3.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: worker-polyfill.installWorkerPolyfill runtime/worker-polyfill.mjs:170β FunctionTooLong β installWorkerPolyfill runs 304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 204 over it, 3.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: page.RunFileBand site/src/app/(home)/page.tsx:326β FunctionTooLong β RunFileBand runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.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: throttle.throttle runtime/util/throttle.cjs:25β FunctionTooLong β throttle 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: page.HypermanagerBand site/src/app/(home)/page.tsx:1136β FunctionTooLong β HypermanagerBand runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: nub_cli::project_config_precedence_matrix::specs crates/nub-cli/src/project_config_precedence_matrix.rs:73β FunctionTooLong β nub_cli::project_config_precedence_matrix::specs runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: nub_launcher::launch crates/nub-launcher/src/main.rs:201β FunctionTooLong β nub_launcher::launch runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: navigator-locks.installNavigatorLocks runtime/navigator-locks.mjs:11β FunctionTooLong β installNavigatorLocks runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: nub_cli::compile::native::require_rebindings crates/nub-cli/src/compile/native.rs:2179β FunctionTooLong β nub_cli::compile::native::require_rebindings runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: debounce.debounce runtime/util/debounce.cjs:23β FunctionTooLong β debounce runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: ansi-player.AnsiPlayer site/src/components/ansi-player.tsx:41β FunctionTooLong β AnsiPlayer runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: nub_cli::compile::external::shim crates/nub-cli/src/compile/external.rs:213β FunctionTooLong β nub_cli::compile::external::shim runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
FunctionTooLong: nub_cli::pm_engine::use_nub::run_use_nub crates/nub-cli/src/pm_engine/use_nub.rs:886β FunctionTooLong β nub_cli::pm_engine::use_nub::run_use_nub runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: nub_cli::compile::prepare_node_bytes crates/nub-cli/src/compile/mod.rs:2893β FunctionTooLong β nub_cli::compile::prepare_node_bytes runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
R4 Β· Test CoverageΒ· This test file cannot be loaded Β· Γ14
This test file cannot be loaded npm/nub-types/test/fixtures/positive/index.ts:41β npm/nub-types/test/fixtures/positive/index.ts:41 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded npm/nub-types/test/fixtures/stepaside-dom/index.ts:9β npm/nub-types/test/fixtures/stepaside-dom/index.ts:9 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded npm/nub-types/test/fixtures/stepaside-stub/index.ts:7β npm/nub-types/test/fixtures/stepaside-stub/index.ts:7 imports './worker.js', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded scripts/native-worker.test.mts:8β scripts/native-worker.test.mts:8 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded scripts/runtime-primordials.test.mts:8β scripts/runtime-primordials.test.mts:8 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded scripts/runtime-shims.test.mts:10β scripts/runtime-shims.test.mts:10 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded scripts/worker-exec-argv.test.mts:16β scripts/worker-exec-argv.test.mts:16 imports '../runtime/', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/compile-augmentation/fixtures/a-addon-esm-package.cjs:18β tests/compile-augmentation/fixtures/a-addon-esm-package.cjs:18 imports './nub-native.node', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/compile-augmentation/fixtures/a-resolution.ts:6β tests/compile-augmentation/fixtures/a-resolution.ts:6 imports './src/deep', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either (2 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/fixtures/data-loaders-require/resolution.cjs:10β tests/fixtures/data-loaders-require/resolution.cjs:10 imports './config', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/fixtures/dir-main/main.ts:2β tests/fixtures/dir-main/main.ts:2 imports './main-no-index', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/fixtures/loader-source-reuse/main.mjs:8β tests/fixtures/loader-source-reuse/main.mjs:8 imports './absent.mjs', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/fixtures/vanilla-ts/js-no-probe.js:1β tests/fixtures/vanilla-ts/js-no-probe.js:1 imports './nonexistent', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
This test file cannot be loaded tests/fixtures/worker/unhandled-error-fatal-main.ts:7β tests/fixtures/worker/unhandled-error-fatal-main.ts:7 imports './does-not-exist.mjs', which names no file in this repository β and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
Duplicated block (9 lines × 2) crates/nub-cli/src/cli.rs:6142β crates/nub-cli/src/cli.rs:6142-6150 | crates/nub-cli/src/cli.rs:6157-6165 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:6142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/nub-cli/src/compile/bundle.rs:1249β crates/nub-cli/src/compile/bundle.rs:1249-1257 | crates/nub-cli/src/compile/native.rs:2087-2095 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/bundle.rs:1249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/nub-cli/src/pm_engine/info_family.rs:427β crates/nub-cli/src/pm_engine/info_family.rs:427-435 | crates/nub-cli/src/pm_engine/info_family.rs:445-453 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/info_family.rs:427` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) crates/nub-core/src/version_management/download.rs:383β crates/nub-core/src/version_management/download.rs:383-391 | crates/nub-core/src/version_management/download.rs:473-481 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/version_management/download.rs:383` it runs out through the closing brace of the declaration holding it β the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/nub-launcher/src/main.rs:2656β crates/nub-launcher/src/main.rs:2656-2664 | crates/nub-launcher/src/main.rs:2969-2977 β 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 (9 lines × 2) crates/nub-tsconfig/src/lib.rs:606β crates/nub-tsconfig/src/lib.rs:606-614 | crates/nub-tsconfig/src/lib.rs:887-895 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-tsconfig/src/lib.rs:606` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) crates/nub-core/src/compile.rs:762β crates/nub-core/src/compile.rs:762-770 | crates/nub-core/src/compile.rs:801-809 β 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/nub-core/src/compile.rs:810` calls `from_le_bytes`, `take`, `try_into` and `crates/nub-core/src/compile.rs:773` does not β after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) crates/nub-core/src/pm/mod.rs:77β crates/nub-core/src/pm/mod.rs:77-85 | crates/nub-core/src/version_management/download.rs:642-650 β 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 (9 lines × 2) crates/nub-cli/src/cli.rs:11398β crates/nub-cli/src/cli.rs:11398-11406 | crates/nub-cli/src/cli.rs:11552-11563 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:11398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/nub-core/src/node/discovery.rs:1748β crates/nub-core/src/node/discovery.rs:1748-1756 | crates/nub-core/src/node/discovery.rs:1782-1790 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/node/discovery.rs:1748` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-cli/src/compile/mod.rs:3943β crates/nub-cli/src/compile/mod.rs:3943-3948 | crates/nub-cli/src/compile/native_layout.rs:779-784 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/mod.rs:3943` it runs out through the closing brace of the declaration holding it β the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-cli/src/env_owner.rs:586β crates/nub-cli/src/env_owner.rs:586-592 | crates/nub-cli/src/prefix.rs:131-136 β 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.
Duplicated block (6 lines × 2) crates/nub-cli/src/pm_engine/install_family.rs:745β crates/nub-cli/src/pm_engine/install_family.rs:745-752 | crates/nub-cli/src/pm_engine/install_family.rs:788-793 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/install_family.rs:745` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-core/src/version_management/mod.rs:386β crates/nub-core/src/version_management/mod.rs:386-391 | crates/nub-core/src/version_management/mod.rs:402-407 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/version_management/mod.rs:386` it runs out through the closing brace of the declaration holding it β the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-tsconfig/src/lib.rs:611β crates/nub-tsconfig/src/lib.rs:611-616 | crates/nub-tsconfig/src/lib.rs:643-648 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-tsconfig/src/lib.rs:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-cli/src/compile/assets.rs:424β crates/nub-cli/src/compile/assets.rs:424-429 | crates/nub-cli/src/compile/bundle.rs:1181-1186 β 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.
Duplicated block (6 lines × 2) crates/nub-cli/src/dynamic_phantom.rs:71β crates/nub-cli/src/dynamic_phantom.rs:71-76 | crates/nub-cli/src/pm_engine/vite_compat.rs:67-72 β 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) crates/nub-native/src/resolve.rs:382β crates/nub-native/src/resolve.rs:382-387 | crates/nub-tsconfig/src/lib.rs:1175-1180 β before extracting anything, compare `crates/nub-native/src/resolve.rs` and `crates/nub-tsconfig/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/nub-core/src/pm/shim.rs:1511β crates/nub-core/src/pm/shim.rs:1511-1516 | crates/nub-core/src/pm/shim.rs:1543-1548 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/pm/shim.rs:1511` it runs out through the closing brace of the declaration holding it β the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/nub-core/src/compile.rs:773β crates/nub-core/src/compile.rs:773-778 | crates/nub-core/src/compile.rs:811-816 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/compile.rs:773` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/nub-core/src/compile.rs:809` calls `from_le_bytes`, `take`, `try_into` and `crates/nub-core/src/compile.rs:769` does not β after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
nub_launcher::app_cache_tree_matches (cognitive 30) crates/nub-launcher/src/main.rs:1080β nub_launcher::app_cache_tree_matches has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 2 (4 pts), boolean chains 1, 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.
nub_launcher::cache::walk_unix_namespace (cognitive 29) crates/nub-launcher/src/cache.rs:595β nub_launcher::cache::walk_unix_namespace has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
nub_launcher::launch (cognitive 25) crates/nub-launcher/src/main.rs:201β nub_launcher::launch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 7 (8 pts), 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, 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.
nub_launcher::cache::walk_windows_namespace (cognitive 23) crates/nub-launcher/src/cache.rs:696β nub_launcher::cache::walk_windows_namespace has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_launcher::best_node_in (cognitive 20) crates/nub-launcher/src/main.rs:2020β nub_launcher::best_node_in has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, 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.
nub_launcher::embedded_node_cache_is_ready (cognitive 19) crates/nub-launcher/src/main.rs:854β nub_launcher::embedded_node_cache_is_ready has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, 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.
nub_launcher::app_cache_matches_payload (cognitive 17) crates/nub-launcher/src/main.rs:928β nub_launcher::app_cache_matches_payload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (5 pts), boolean chains 2, loops 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.
nub_launcher::collect_tree_paths (cognitive 17) crates/nub-launcher/src/main.rs:1005β nub_launcher::collect_tree_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 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.
Duplicated block (8 lines × 2) crates/nub-cli/src/cli.rs:11831β crates/nub-cli/src/cli.rs:11831-11838 | crates/nub-cli/src/cli.rs:11866-11873 β 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. 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 (8 lines × 2) crates/nub-cli/src/compile/inject.rs:331β crates/nub-cli/src/compile/inject.rs:331-338 | crates/nub-cli/src/compile/inject.rs:593-601 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/inject.rs:331` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/nub-cli/src/pm_engine/install_family.rs:605β crates/nub-cli/src/pm_engine/install_family.rs:605-612 | crates/nub-cli/src/pm_engine/install_family.rs:688-695 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/install_family.rs:605` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/nub-cli/src/pm_engine/unsupported_config.rs:498β crates/nub-cli/src/pm_engine/unsupported_config.rs:498-505 | crates/nub-cli/src/pm_engine/unsupported_config.rs:627-634 β 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 (8 lines × 2) crates/nub-cli/src/pm_engine/unsupported_config.rs:555β crates/nub-cli/src/pm_engine/unsupported_config.rs:555-562 | crates/nub-cli/src/pm_engine/unsupported_config.rs:578-585 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/unsupported_config.rs:555` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/nub-core/src/node/discovery.rs:283β crates/nub-core/src/node/discovery.rs:283-290 | crates/nub-core/src/node/discovery.rs:297-304 β 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. 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 (8 lines × 2) crates/nub-tsconfig/src/lib.rs:892β crates/nub-tsconfig/src/lib.rs:892-899 | crates/nub-tsconfig/src/lib.rs:911-918 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-tsconfig/src/lib.rs:892` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/nub-native/src/resolve.rs:390β crates/nub-native/src/resolve.rs:390-397 | crates/nub-tsconfig/src/lib.rs:526-533 β before extracting anything, compare `crates/nub-native/src/resolve.rs` and `crates/nub-tsconfig/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
SC1 Β· Supply-chain hygieneΒ· JavaScript dependencies are not locked Β· Γ8
JavaScript dependencies are not locked npm/nub-types/package.json:22β npm/nub-types/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked npm/nub-types/test/package.json:6β npm/nub-types/test/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked npm/nub/package.json:39β npm/nub/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked npm/runner/package.json:62β npm/runner/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked package.json:18β package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked tests/compile-native-islands/package.json:5β tests/compile-native-islands/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked tests/native-deps/package.json:4β tests/native-deps/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
JavaScript dependencies are not locked vendor/aube/docs/package.json:26β vendor/aube/docs/package.json declares dependencies that no committed lockfile resolves β there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it β so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory β never scored.
Duplicated block (7 lines × 2) crates/nub-cli/src/compile/native.rs:2577β crates/nub-cli/src/compile/native.rs:2577-2583 | crates/nub-cli/src/compile/native.rs:2585-2591 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/native.rs:2577` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) crates/nub-core/src/version_management/download.rs:410β crates/nub-core/src/version_management/download.rs:410-416 | crates/nub-core/src/version_management/download.rs:494-500 β 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) crates/nub-cli/src/cli.rs:11155β crates/nub-cli/src/cli.rs:11155-11161 | crates/nub-cli/src/cli.rs:11943-11949 β 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) crates/nub-core/src/version_management/download.rs:656β crates/nub-core/src/version_management/download.rs:656-662 | crates/nub-launcher/src/main.rs:2400-2406 β 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) crates/nub-cli/src/compile/mod.rs:1276β crates/nub-cli/src/compile/mod.rs:1276-1282 | crates/nub-cli/src/compile/native_layout.rs:807-813 β 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `bytes` to `u64` in one and `usize` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) crates/nub-core/src/node/discovery.rs:1301β crates/nub-core/src/node/discovery.rs:1301-1307 | crates/nub-launcher/src/main.rs:2193-2199 β 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 (7 lines × 2) crates/nub-core/src/version_management/node_index.rs:196β crates/nub-core/src/version_management/node_index.rs:196-202 | crates/nub-core/src/version_management/node_index.rs:227-233 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/version_management/node_index.rs:196` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
nub_tsconfig::normalize_compiler_options (cognitive 58) crates/nub-tsconfig/src/lib.rs:1211β nub_tsconfig::normalize_compiler_options has cognitive complexity 58 (threshold 15). Drivers by points: if/else 32 (53 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). Of this number, 57 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.
nub_tsconfig::parse_tsconfig (cognitive 50) crates/nub-tsconfig/src/lib.rs:585β nub_tsconfig::parse_tsconfig has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 5 (13 pts), match/switch 2 (5 pts) (nesting depth added 34). 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.
nub_tsconfig::resolve_extends_path (cognitive 38) crates/nub-tsconfig/src/lib.rs:954β nub_tsconfig::resolve_extends_path has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (36 pts), match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_tsconfig::inner_parse (cognitive 29) crates/nub-tsconfig/src/lib.rs:663β nub_tsconfig::inner_parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (5 pts), loops 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.
nub_tsconfig::resolve_extends (cognitive 29) crates/nub-tsconfig/src/lib.rs:857β nub_tsconfig::resolve_extends has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_tsconfig::merge_extends (cognitive 16) crates/nub-tsconfig/src/lib.rs:802β nub_tsconfig::merge_extends has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (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.
nub_core::node::spawn::spawn_node (cyclomatic 55) crates/nub-core/src/node/spawn.rs:828β nub_core::node::spawn::spawn_node has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nub_core::pm::shim::npm_install_route (cyclomatic 27) crates/nub-core/src/pm/shim.rs:259β nub_core::pm::shim::npm_install_route has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β the same kind of value, with no behaviour of its own β a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
nub_core::node::runtime_cache::walk_windows_base_under (cyclomatic 18) crates/nub-core/src/node/runtime_cache.rs:635β nub_core::node::runtime_cache::walk_windows_base_under 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.
nub_core::pm::registry::parse_npmrc_auth (cyclomatic 16) crates/nub-core/src/pm/registry.rs:336β nub_core::pm::registry::parse_npmrc_auth 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.
nub_core::workspace::env::parse_env (cyclomatic 16) crates/nub-core/src/workspace/env.rs:579β nub_core::workspace::env::parse_env 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.
NativeAddons::walk_closure (cognitive 45) crates/nub-cli/src/compile/native.rs:707β NativeAddons::walk_closure has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 3 (6 pts), match/switch 1 (2 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.
NativeAddons::transport_roots (cognitive 35) crates/nub-cli/src/compile/native.rs:983β NativeAddons::transport_roots has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 5 (8 pts), boolean chains 1 (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.
NativeAddons::materialise_unbundled (cognitive 24) crates/nub-cli/src/compile/native.rs:579β NativeAddons::materialise_unbundled has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 2, match/switch 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.
NativeAddons::classify_bare_specifier (cognitive 17) crates/nub-cli/src/compile/native.rs:1254β NativeAddons::classify_bare_specifier has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, match/switch 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, 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.
NativeAddons::plan_survivors (cognitive 16) crates/nub-cli/src/compile/native.rs:1138β NativeAddons::plan_survivors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (6 pts), match/switch 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.
Duplicated block (9 lines × 2 locations) runtime/polyfills.cjs:729β runtime/polyfills.cjs:729 · runtime/polyfills.cjs:767 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) runtime/polyfills.cjs:1689β runtime/polyfills.cjs:1689 · runtime/polyfills.cjs:1711 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) runtime/polyfills.cjs:1768β runtime/polyfills.cjs:1768 · runtime/polyfills.cjs:1799 β 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 (9 lines × 2 locations) scripts/mac-build.ts:279β scripts/mac-build.ts:279 · scripts/remote-build.ts:1190 β 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 (9 lines × 2 locations) scripts/soak/soak.mts:132β scripts/soak/soak.mts:132 · scripts/soak/soak.mts:148 β 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.
nub_tsconfig::normalize_compiler_options (cyclomatic 36) crates/nub-tsconfig/src/lib.rs:1211β nub_tsconfig::normalize_compiler_options has cyclomatic complexity 36 (threshold 15). Of this number, 35 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.
nub_tsconfig::resolve_extends_path (cyclomatic 21) crates/nub-tsconfig/src/lib.rs:954β nub_tsconfig::resolve_extends_path 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.
nub_tsconfig::parse_tsconfig (cyclomatic 17) crates/nub-tsconfig/src/lib.rs:585β nub_tsconfig::parse_tsconfig 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.
nub_tsconfig::inner_parse (cyclomatic 17) crates/nub-tsconfig/src/lib.rs:663β nub_tsconfig::inner_parse 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.
nub_native::resolve::try_resolve_file (cognitive 37) crates/nub-native/src/resolve.rs:270β nub_native::resolve::try_resolve_file has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth β most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
nub_native::detect::has_value_esm (cognitive 24) crates/nub-native/src/detect.rs:134β nub_native::detect::has_value_esm has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), boolean chains 2, 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.
nub_native::cache::match_empty_export_tail (cognitive 21) crates/nub-native/src/cache.rs:306β nub_native::cache::match_empty_export_tail has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6, loops 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
nub_native::resolve::resolve_ts (cognitive 18) crates/nub-native/src/resolve.rs:38β nub_native::resolve::resolve_ts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_phantom_scan::graph::walk_generic (cognitive 31) crates/nub-phantom-scan/src/graph.rs:154β nub_phantom_scan::graph::walk_generic has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_phantom_scan::manifest::collect_entry_points (cognitive 29) crates/nub-phantom-scan/src/manifest.rs:141β nub_phantom_scan::manifest::collect_entry_points has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 5 (8 pts), match/switch 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.
nub_phantom_scan::bin::scan-verdicts::enumerate (cognitive 23) crates/nub-phantom-scan/src/bin/scan-verdicts.rs:39β nub_phantom_scan::bin::scan-verdicts::enumerate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nub_phantom_scan::graph::drain (cognitive 23) crates/nub-phantom-scan/src/graph.rs:227β nub_phantom_scan::graph::drain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 pts), match/switch 1 (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.
TooManyFunctions: nub_cli::pm_engine::unsupported_config crates/nub-cli/src/pm_engine/unsupported_config.rs:56β TooManyFunctions β 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× 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.
TooManyFunctions: nub_core::workspace::env crates/nub-core/src/workspace/env.rs:75β TooManyFunctions β 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× 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.
TooManyFunctions: nub_cli::compile::inject crates/nub-cli/src/compile/inject.rs:33β TooManyFunctions β 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: nub_core::pm::registry crates/nub-core/src/pm/registry.rs:70β TooManyFunctions β 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 Β· Dependency VulnerabilitiesΒ· Medium CVE Β· Γ4
REDACTED
REDACTED
REDACTED
REDACTED
D4 Β· Code DuplicationΒ· Edited copy of a member (16 corresponding lines) Β· Γ4
Edited copy of a member (16 corresponding lines) crates/nub-cli/src/compile/assets.rs:353β crates/nub-cli/src/compile/assets.rs:353-372 | crates/nub-launcher/src/main.rs:2828-2843 β These two members are one piece of code written twice and then edited apart: 16 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 (16 corresponding lines) crates/nub-core/src/version_management/download.rs:376β crates/nub-core/src/version_management/download.rs:376-391 | crates/nub-core/src/version_management/download.rs:465-481 β These two members are one piece of code written twice and then edited apart: 16 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 (16 corresponding lines) crates/nub-cli/src/pm_engine/mod.rs:2895β crates/nub-cli/src/pm_engine/mod.rs:2895-2910 | crates/nub-core/src/pm/resolve.rs:1039-1061 β These two members are one piece of code written twice and then edited apart: 16 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 (16 corresponding lines) crates/nub-core/src/compile.rs:957β crates/nub-core/src/compile.rs:957-972 | crates/nub-cli/src/compile/mod.rs:2328-2343 β These two members are one piece of code written twice and then edited apart: 16 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 (10 corresponding lines) Β· Γ4
Edited copy of a member (10 corresponding lines) crates/nub-cli/src/compile/mod.rs:3939β crates/nub-cli/src/compile/mod.rs:3939-3948 | crates/nub-cli/src/compile/native_layout.rs:774-784 β These two members are one piece of code written twice and then edited apart: 10 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 (10 corresponding lines) crates/nub-core/src/node/discovery.rs:1300β crates/nub-core/src/node/discovery.rs:1300-1309 | crates/nub-launcher/src/main.rs:2192-2201 β These two members are one piece of code written twice and then edited apart: 10 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 (10 corresponding lines) crates/nub-cli/src/pm_engine/store_config_family.rs:1020β crates/nub-cli/src/pm_engine/store_config_family.rs:1020-1029 | crates/nub-cli/src/pm_engine/store_config_family.rs:1039-1054 β These two members are one piece of code written twice and then edited apart: 10 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 (10 corresponding lines) crates/nub-core/src/node/flags.rs:361β crates/nub-core/src/node/flags.rs:361-374 | crates/nub-core/src/node/flags.rs:376-385 β These two members are one piece of code written twice and then edited apart: 10 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 (7 corresponding lines) Β· Γ4
Edited copy of a member (7 corresponding lines) crates/nub-core/src/node/shim.rs:76β crates/nub-core/src/node/shim.rs:76-82 | crates/nub-core/src/pm/shim.rs:1589-1599 β 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) crates/nub-cli/src/compile/mod.rs:3871β crates/nub-cli/src/compile/mod.rs:3871-3877 | crates/nub-launcher/src/main.rs:2647-2653 β 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) crates/nub-cli/src/compile/native_layout.rs:444β crates/nub-cli/src/compile/native_layout.rs:444-450 | crates/nub-phantom-scan/src/manifest.rs:112-118 β 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) crates/nub-cli/src/pm_engine/min_release_age.rs:267β crates/nub-cli/src/pm_engine/min_release_age.rs:267-273 | crates/nub-cli/src/pm_engine/unsupported_config.rs:510-516 β 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.
D4 Β· Code DuplicationΒ· Edited copy of a member (6 corresponding lines) Β· Γ4
Edited copy of a member (6 corresponding lines) crates/nub-cli/src/pm_engine/phantom_closure.rs:590β crates/nub-cli/src/pm_engine/phantom_closure.rs:590-595 | crates/nub-phantom-scan/src/classify.rs:286-291 β 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.
Edited copy of a member (6 corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs:1280β crates/nub-cli/src/pm_engine/install_family.rs:1280-1285 | crates/nub-cli/src/pm_engine/mod.rs:633-643 β 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.
Edited copy of a member (6 corresponding lines) crates/nub-cli/src/compile/loaders.rs:297β crates/nub-cli/src/compile/loaders.rs:297-302 | crates/nub-cli/src/compile/native.rs:549-554 β 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.
Edited copy of a member (6 corresponding lines) crates/nub-cli/src/compile/mod.rs:2866β crates/nub-cli/src/compile/mod.rs:2866-2871 | crates/nub-core/src/version_management/mod.rs:393-398 β 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.
Duplicated block (12 lines × 2 locations) runtime/compile-bootstrap.cjs:162β runtime/compile-bootstrap.cjs:162 · runtime/compile-sea-loader.cjs:350 β 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 (12 lines × 2 locations) scripts/md-toc/index.mjs:23β scripts/md-toc/index.mjs:23 · scripts/todo/index.mjs:103 β the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (12 lines × 2 locations) scripts/soak/external-tools.mts:181β scripts/soak/external-tools.mts:181 · scripts/soak/external-tools.mts:213 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) scripts/soak/soak.mts:111β scripts/soak/soak.mts:111 · scripts/soak/soak.mts:204 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) runtime/nubr.mjs:218β runtime/nubr.mjs:218 · runtime/nubr.mjs:311 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) runtime/polyfills.cjs:814β runtime/polyfills.cjs:814 · runtime/polyfills.cjs:830 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) runtime/preload-common.cjs:852β runtime/preload-common.cjs:852 · runtime/preload-common.cjs:970 β 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 (8 lines × 2 locations) scripts/gen-extensions-table.mjs:59β scripts/gen-extensions-table.mjs:59 · scripts/gen-extensions-table.mjs:82 β 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.
nub_native::cache::match_empty_export_tail (cyclomatic 22) crates/nub-native/src/cache.rs:306β nub_native::cache::match_empty_export_tail has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
nub_native::resolve::try_resolve_file (cyclomatic 20) crates/nub-native/src/resolve.rs:270β nub_native::resolve::try_resolve_file 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.
nub_native::detect::has_value_esm (cyclomatic 16) crates/nub-native/src/detect.rs:134β nub_native::detect::has_value_esm 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.
NativeAddons::walk_closure (cyclomatic 19) crates/nub-cli/src/compile/native.rs:707β NativeAddons::walk_closure 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.
NativeAddons::materialise_unbundled (cyclomatic 18) crates/nub-cli/src/compile/native.rs:579β NativeAddons::materialise_unbundled 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.
NativeAddons::transport_roots (cyclomatic 17) crates/nub-cli/src/compile/native.rs:983β NativeAddons::transport_roots 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.
D31 Β· IaC & Container SecurityΒ· Medium IaC Β· Γ3
REDACTED
REDACTED
REDACTED
D4 Β· Code DuplicationΒ· Edited copy of a member (34 corresponding lines) Β· Γ3
Edited copy of a member (34 corresponding lines) crates/nub-core/src/node/runtime_cache.rs:1124β crates/nub-core/src/node/runtime_cache.rs:1124-1162 | crates/nub-launcher/src/main.rs:3267-3300 β These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) crates/nub-cli/src/cli.rs:11388β crates/nub-cli/src/cli.rs:11388-11421 | crates/nub-cli/src/cli.rs:11543-11577 β These two members are one piece of code written twice and then edited apart: 34 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 (34 corresponding lines) crates/nub-core/src/node/discovery.rs:1976β crates/nub-core/src/node/discovery.rs:1976-2009 | crates/nub-core/src/node/discovery.rs:2030-2066 β These two members are one piece of code written twice and then edited apart: 34 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 (13 corresponding lines) Β· Γ3
Edited copy of a member (13 corresponding lines) crates/nub-cli/src/compile/inject.rs:713β crates/nub-cli/src/compile/inject.rs:713-728 | crates/nub-cli/src/compile/inject.rs:744-756 β 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) crates/nub-tsconfig/src/lib.rs:462β crates/nub-tsconfig/src/lib.rs:462-474 | crates/nub-tsconfig/src/lib.rs:1161-1173 β 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) crates/nub-cli/src/cli.rs:254β crates/nub-cli/src/cli.rs:254-266 | crates/nub-cli/src/cli.rs:287-308 β 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Β· Edited copy of a member (8 corresponding lines) Β· Γ3
Edited copy of a member (8 corresponding lines) crates/nub-core/src/version_management/download.rs:655β crates/nub-core/src/version_management/download.rs:655-662 | crates/nub-launcher/src/main.rs:2399-2406 β These two members are one piece of code written twice and then edited apart: 8 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 (8 corresponding lines) crates/nub-core/src/version_management/mod.rs:768β crates/nub-core/src/version_management/mod.rs:768-775 | crates/nub-core/src/version_management/mod.rs:895-902 β These two members are one piece of code written twice and then edited apart: 8 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 (8 corresponding lines) crates/nub-core/src/version_management/mod.rs:384β crates/nub-core/src/version_management/mod.rs:384-391 | crates/nub-core/src/version_management/mod.rs:400-407 β These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below β the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain β factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) crates/nub-cli/src/compile/bundle.rs:3696β crates/nub-cli/src/compile/bundle.rs:3696-3709 | crates/nub-cli/src/compile/loaders.rs:418-431 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/bundle.rs:3696` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/nub-cli/src/compile/native.rs:195β crates/nub-cli/src/compile/native.rs:195-208 | crates/nub-cli/src/compile/native.rs:292-305 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/native.rs:195` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 2) crates/nub-cli/src/pm_engine/install_family.rs:1399β crates/nub-cli/src/pm_engine/install_family.rs:1399-1413 | crates/nub-cli/src/pm_engine/install_family.rs:1723-1736 β 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `flags` to `InstallFlags` in one and `CiFlags` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2 locations) runtime/polyfills.cjs:1125β runtime/polyfills.cjs:1125 · runtime/polyfills.cjs:2520 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) scripts/remote-build.ts:780β scripts/remote-build.ts:780 · scripts/remote-build.ts:827 β 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 locations) stats/download-counts/report.mjs:107β stats/download-counts/report.mjs:107 · stats/download-counts/report.mjs:141 β 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.
X2 Β· Cancellation propagationΒ· Async function without AbortSignal Β· Γ3
Async function without AbortSignal: getStarCount site/src/components/github-star-button.tsx:32β `getStarCount` 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: getStarCount site/src/components/github-star-pill.tsx:63β `getStarCount` 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: getStarCount site/src/app/stars.svg/route.ts:50β `getStarCount` 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 })`.
polyfills.installUint8ArrayBase64::fromBase64 (cyclomatic 28) runtime/polyfills.cjs:2010β polyfills.installUint8ArrayBase64::fromBase64 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. This shape REPEATS in the file: one other method here (polyfills.installUint8ArrayBase64::b64ToU8) 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.
polyfills.installUint8ArrayBase64::b64ToU8 (cyclomatic 17) runtime/polyfills.cjs:2100β polyfills.installUint8ArrayBase64::b64ToU8 has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (polyfills.installUint8ArrayBase64::fromBase64) 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.
polyfills.installUint8ArrayBase64::fromBase64 (cognitive 66) runtime/polyfills.cjs:2010β polyfills.installUint8ArrayBase64::fromBase64 has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (61 pts), boolean chains 4, loops 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth β most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (polyfills.installUint8ArrayBase64::hexToU8) 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.
polyfills.installUint8ArrayBase64::hexToU8 (cognitive 19) runtime/polyfills.cjs:2141β polyfills.installUint8ArrayBase64::hexToU8 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (polyfills.installUint8ArrayBase64::fromBase64) 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.
installPayloadContainer::constructor (cognitive 22) runtime/compile-sea-loader.cjs:334β installPayloadContainer::constructor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (2 pts), other 1, ternaries 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.
installPayloadContainer::withoutRefusedExecArgv (cognitive 18) runtime/compile-sea-loader.cjs:303β installPayloadContainer::withoutRefusedExecArgv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
withoutRefusedExecArgv (cognitive 18) runtime/worker-polyfill.mjs:45β withoutRefusedExecArgv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
withoutRefusedExecArgv (cognitive 18) runtime/compile-bootstrap.cjs:186β withoutRefusedExecArgv has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 Β· Code DuplicationΒ· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ2
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/nub-cli/src/compile/bundle.rs:3089β crates/nub-cli/src/compile/bundle.rs:3089-3206 | crates/nub-cli/src/compile/bundle.rs:3250-3370 | crates/nub-cli/src/compile/bundle.rs:3412-3459 | crates/nub-cli/src/compile/bundle.rs:3522-3542 β These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. 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. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/nub-cli/src/pm_engine/info_family.rs:322β crates/nub-cli/src/pm_engine/info_family.rs:322-339 | crates/nub-cli/src/pm_engine/info_family.rs:373-390 | crates/nub-cli/src/pm_engine/info_family.rs:424-441 | crates/nub-cli/src/pm_engine/info_family.rs:443-460 β These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. 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. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 Β· Code DuplicationΒ· Edited copy of a member (23 corresponding lines) Β· Γ2
Edited copy of a member (23 corresponding lines) crates/nub-core/src/node/discovery.rs:1734β crates/nub-core/src/node/discovery.rs:1734-1756 | crates/nub-core/src/node/discovery.rs:1768-1790 β 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.
Edited copy of a member (23 corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs:875β crates/nub-cli/src/pm_engine/install_family.rs:875-911 | crates/nub-cli/src/pm_engine/install_family.rs:992-1014 β 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 (12 corresponding lines) Β· Γ2
Edited copy of a member (12 corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs:462β crates/nub-cli/src/pm_engine/info_family.rs:462-473 | crates/nub-cli/src/pm_engine/info_family.rs:532-547 β These two members are one piece of code written twice and then edited apart: 12 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 (12 corresponding lines) crates/nub-cli/src/compile/bundle.rs:3785β crates/nub-cli/src/compile/bundle.rs:3785-3799 | crates/nub-cli/src/compile/loaders.rs:243-254 β These two members are one piece of code written twice and then edited apart: 12 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, 9+ corresponding lines) Β· Γ2
Edited copies of one member (3 members, 9+ corresponding lines) crates/nub-core/src/node/spawn.rs:2033β crates/nub-core/src/node/spawn.rs:2033-2041 | crates/nub-core/src/node/spawn.rs:2139-2147 | crates/nub-core/src/node/spawn.rs:2159-2167 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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, 9+ corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs:764β crates/nub-cli/src/pm_engine/install_family.rs:764-772 | crates/nub-cli/src/pm_engine/install_family.rs:1053-1062 | crates/nub-cli/src/pm_engine/install_family.rs:1064-1073 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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 (11 corresponding lines) Β· Γ2
Edited copy of a member (11 corresponding lines) crates/nub-cli/src/pm_engine/unsupported_config.rs:497β crates/nub-cli/src/pm_engine/unsupported_config.rs:497-507 | crates/nub-cli/src/pm_engine/unsupported_config.rs:626-640 β These two members are one piece of code written twice and then edited apart: 11 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 (11 corresponding lines) crates/nub-core/src/lib.rs:78β crates/nub-core/src/lib.rs:78-88 | crates/nub-core/src/pm/shim.rs:1918-1930 β These two members are one piece of code written twice and then edited apart: 11 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 (9 corresponding lines) Β· Γ2
Edited copy of a member (9 corresponding lines) crates/nub-cli/src/compile/mod.rs:3287β crates/nub-cli/src/compile/mod.rs:3287-3297 | crates/nub-cli/src/compile/mod.rs:3912-3920 β 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.
Edited copy of a member (9 corresponding lines) crates/nub-core/src/version_management/download.rs:670β crates/nub-core/src/version_management/download.rs:670-678 | crates/nub-launcher/src/main.rs:2386-2395 β 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.
Duplicated block (20 lines × 2) crates/nub-cli/src/cli.rs:3177β crates/nub-cli/src/cli.rs:3177-3196 | crates/nub-cli/src/cli.rs:3270-3289 β 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 (20 lines × 2) crates/nub-native/src/resolve.rs:401β crates/nub-native/src/resolve.rs:401-420 | crates/nub-tsconfig/src/lib.rs:538-557 β before extracting anything, compare `crates/nub-native/src/resolve.rs` and `crates/nub-tsconfig/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-native/src/resolve.rs:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/nub-core/src/node/spawn.rs:715β crates/nub-core/src/node/spawn.rs:715-726 | crates/nub-core/src/node/spawn.rs:1670-1683 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/nub-cli/src/cli.rs:9100β crates/nub-cli/src/cli.rs:9100-9112 | crates/nub-cli/src/cli.rs:9556-9567 β 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 (5 lines × 4) crates/nub-cli/src/compile/bundle.rs:3102β crates/nub-cli/src/compile/bundle.rs:3102-3106 | crates/nub-cli/src/compile/bundle.rs:3257-3262 | crates/nub-cli/src/compile/bundle.rs:3425-3429 | crates/nub-cli/src/compile/bundle.rs:3533-3537 β all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/bundle.rs:3102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) crates/nub-tsconfig/src/lib.rs:611β crates/nub-tsconfig/src/lib.rs:611-615 | crates/nub-tsconfig/src/lib.rs:643-647 | crates/nub-tsconfig/src/lib.rs:892-896 | crates/nub-tsconfig/src/lib.rs:911-915 β all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-tsconfig/src/lib.rs:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/nub-tsconfig/src/lib.rs:638` calls `normalize_compiler_options` and `crates/nub-tsconfig/src/lib.rs:906` does not β after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) crates/nub-cli/src/pm_engine/info_family.rs:324β crates/nub-cli/src/pm_engine/info_family.rs:324-328 | crates/nub-cli/src/pm_engine/info_family.rs:375-379 | crates/nub-cli/src/pm_engine/info_family.rs:445-449 β all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/info_family.rs:324` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 3) crates/nub-cli/src/compile/mod.rs:3964β crates/nub-cli/src/compile/mod.rs:3964-3968 | crates/nub-launcher/src/main.rs:3323-3327 | crates/nub-launcher/src/main.rs:3341-3345 β 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/nub-launcher/src/main.rs:3330` calls `Ok`, `set_app_file_executable` and `crates/nub-cli/src/compile/mod.rs:3964` does not β after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) crates/nub-core/src/version_management/node_index.rs:205β crates/nub-core/src/version_management/node_index.rs:205-209 | crates/nub-core/src/version_management/node_index.rs:236-240 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/version_management/node_index.rs:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/nub-cli/src/compile/assets.rs:356β crates/nub-cli/src/compile/assets.rs:356-364 | crates/nub-launcher/src/main.rs:2831-2835 β 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 (11 lines × 3) crates/nub-cli/src/jsonc.rs:28β crates/nub-cli/src/jsonc.rs:28-38 | crates/nub-data-formats/src/lib.rs:41-51 | crates/nub-tsconfig/src/lib.rs:50-60 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (11 lines × 3) crates/nub-cli/src/pm_engine/install_family.rs:609β crates/nub-cli/src/pm_engine/install_family.rs:609-619 | crates/nub-cli/src/pm_engine/install_family.rs:651-661 | crates/nub-cli/src/pm_engine/install_family.rs:692-702 β all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/install_family.rs:609` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
Off the main sequence: nub-core β nub-core: abstractness 0.00, instability 0.00, distance 1.00 β zone of pain β concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: nub-phantom-core β nub-phantom-core: abstractness 0.00, instability 0.00, distance 1.00 β zone of pain β concrete and depended on by 2 project(s), so it's rigid to change.
R10 Β· Code DuplicationΒ· Duplicated block with local edits (7 matched lines × 2 locations) Β· Γ2
Duplicated block with local edits (7 matched lines × 2 locations) runtime/navigator-shim.mjs:30β runtime/navigator-shim.mjs:30 · runtime/transform-core.mjs:90 β the two spans are one implementation copied and then locally edited β 53 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 (7 matched lines × 2 locations) runtime/navigator-shim.mjs:30β runtime/navigator-shim.mjs:30 · runtime/worker-polyfill.mjs:79 β the two spans are one implementation copied and then locally edited β 51 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 (5 lines × 2 locations) npm/nub/bin/launch.js:187β npm/nub/bin/launch.js:187 · npm/nub/bin/launch.js:213 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (5 lines × 2 locations) npm/nub/bin/launch.js:313β npm/nub/bin/launch.js:313 · npm/nub/bin/launch.js:336 β 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.
polyfills.installIteratorSurface (cyclomatic 176) runtime/polyfills.cjs:465β polyfills.installIteratorSurface has cyclomatic complexity 176 (threshold 15). Of this number, 65 points are the body's own statements and 111 belong to 29 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.
worker-polyfill.installWorkerPolyfill (cyclomatic 96) runtime/worker-polyfill.mjs:170β worker-polyfill.installWorkerPolyfill has cyclomatic complexity 96 (threshold 15). Of this number, 62 points are the body's own statements and 34 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.
navigator-locks.installNavigatorLocks (cyclomatic 63) runtime/navigator-locks.mjs:11β navigator-locks.installNavigatorLocks has cyclomatic complexity 63 (threshold 15). Of this number, 36 points are the body's own statements and 27 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
preload-common.makeHooks.loadInner (cyclomatic 53) runtime/preload-common.cjs:884β preload-common.makeHooks.loadInner has cyclomatic complexity 53 (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.
makeHooks.loadInner (cyclomatic 53) runtime/preload-common.cjs:884β makeHooks.loadInner has cyclomatic complexity 53 (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.
preload-common.installCjsRequireHooks (cyclomatic 51) runtime/preload-common.cjs:1190β preload-common.installCjsRequireHooks has cyclomatic complexity 51 (threshold 15). Of this number, 17 points are the body's own statements and 34 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.
polyfills.installSyncPolyfills (cyclomatic 51) runtime/polyfills.cjs:131β polyfills.installSyncPolyfills 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.
polyfills.installFloorBuiltins (cyclomatic 51) runtime/polyfills.cjs:1635β polyfills.installFloorBuiltins has cyclomatic complexity 51 (threshold 15). Of this number, 42 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.
throttle (cyclomatic 50) runtime/util/throttle.cjs:25β throttle has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 5 of the 50 points are its own statements and the rest belongs to 23 function items inside it that branch (hasImmediateCapacity, throttled, schedule, β¦). 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.
installPayloadContainer (cyclomatic 46) runtime/compile-sea-loader.cjs:159β installPayloadContainer has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 3 of the 46 points are its own statements and the rest belongs to 11 function items inside it that branch (withoutRefusedExecArgv, constructor, payloadWorker, β¦). 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.
polyfills.installSetMethods (cyclomatic 43) runtime/polyfills.cjs:1179β polyfills.installSetMethods has cyclomatic complexity 43 (threshold 15). Of this number, 28 points are the body's own statements and 15 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.
preload-common.wrapChildProcessCompileCache (cyclomatic 41) runtime/preload-common.cjs:1713β preload-common.wrapChildProcessCompileCache has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 7 of the 41 points are its own statements and the rest belongs to 6 function items inside it that branch (stripFromOptions, a function literal at line 1797, a function literal at line 1822, β¦). 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.
polyfills.installDisposableStacks (cyclomatic 37) runtime/polyfills.cjs:2228β polyfills.installDisposableStacks 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.
LockManager.request (cyclomatic 32) runtime/navigator-locks.mjs:150β LockManager.request has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
compile-bootstrap.installCompiledForkIdentity (cyclomatic 30) runtime/compile-bootstrap.cjs:235β compile-bootstrap.installCompiledForkIdentity has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 249, withBootstrapFirst). 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.
installNavigatorLocks::request (cyclomatic 29) runtime/navigator-locks.mjs:150β installNavigatorLocks::request has cyclomatic complexity 29 (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.
polyfills.installMathSumPrecise (cyclomatic 27) runtime/polyfills.cjs:1494β polyfills.installMathSumPrecise 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.
polyfills.installJsonParseOptions (cyclomatic 27) runtime/polyfills.cjs:1559β polyfills.installJsonParseOptions 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.
AnsiScreen.sgr (cyclomatic 27) site/src/lib/ansi-screen.ts:200β AnsiScreen.sgr 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.
AnsiScreen.csi (cyclomatic 27) site/src/lib/ansi-screen.ts:238β AnsiScreen.csi 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.
installCjsRequireHooks::_resolveFilename (cyclomatic 26) runtime/preload-common.cjs:1263β installCjsRequireHooks::_resolveFilename 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.
installMathSumPrecise::sumPrecise (cyclomatic 26) runtime/polyfills.cjs:1496β installMathSumPrecise::sumPrecise 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.
debounce (cyclomatic 26) runtime/util/debounce.cjs:23β debounce has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 14 function items inside it that branch (debounced, invoke, cancel, β¦). 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.
Worker.constructor (cyclomatic 25) runtime/worker-polyfill.mjs:231β Worker.constructor has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
installLazyEsmPolyfills (cyclomatic 24) runtime/preload.cjs:319β installLazyEsmPolyfills has cyclomatic complexity 24 (threshold 15). Of this number, 18 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.
installCompiledForkIdentity::fork (cyclomatic 24) runtime/compile-bootstrap.cjs:249β installCompiledForkIdentity::fork 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.
nub_launcher::launch (cyclomatic 23) crates/nub-launcher/src/main.rs:201β nub_launcher::launch has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β the same kind of value, with no behaviour of its own β a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
installAsyncTierCjsSource (cyclomatic 23) runtime/preload-common.cjs:471β installAsyncTierCjsSource has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (registerHooks::load, a function literal at line 479, registerHooks, β¦). 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.
loadTranspile (cyclomatic 23) runtime/transform-core.mjs:978β loadTranspile 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.
clean-shared-buckets.main (cyclomatic 22) .claude/skills/disk-reduction/scripts/clean-shared-buckets.py:144β clean-shared-buckets.main 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.
transform-core.resolveSpec (cyclomatic 22) runtime/transform-core.mjs:514β transform-core.resolveSpec 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.
installWorkerPolyfill::constructor (cyclomatic 22) runtime/worker-polyfill.mjs:231β installWorkerPolyfill::constructor 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.
internals.determineSpecificType (cyclomatic 21) runtime/util/internals.cjs:86β internals.determineSpecificType 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.
preload-common.phantomDepHint (cyclomatic 21) runtime/preload-common.cjs:683β preload-common.phantomDepHint has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: preload-common.installAsyncTierCjsSource (cyclomatic 23) is higher and carries no row of its own β it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
installJsonParseOptions::parse (cyclomatic 21) runtime/polyfills.cjs:1580β installJsonParseOptions::parse 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.
postinstall.refreshShimsIn (cyclomatic 20) npm/nub/postinstall.js:120β postinstall.refreshShimsIn 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.
nub_json_guard::check_nesting_depth (cyclomatic 19) crates/nub-json-guard/src/lib.rs:44β nub_json_guard::check_nesting_depth has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β the same kind of value, with no behaviour of its own β a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
nub_phantom_scan::manifest::collect_entry_points (cyclomatic 19) crates/nub-phantom-scan/src/manifest.rs:141β nub_phantom_scan::manifest::collect_entry_points 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.
polyfills.installKeyedPromiseCombinators (cyclomatic 19) runtime/polyfills.cjs:2499β polyfills.installKeyedPromiseCombinators has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (perform, install, perform::settle, β¦). 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.
ansi-player.AnsiPlayer (cyclomatic 19) site/src/components/ansi-player.tsx:41β ansi-player.AnsiPlayer has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 157, 105, 66, β¦). 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Β· main (cyclomatic 19) Β· Γ1
main (cyclomatic 19) runtime/nubr.mjs:323β main 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.
polyfills.installLocaleVariants (cyclomatic 18) runtime/polyfills.cjs:1410β polyfills.installLocaleVariants 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.
loader-entry.foreignAsyncLoaderPresent (cyclomatic 18) runtime/loader-entry.mjs:90β loader-entry.foreignAsyncLoaderPresent 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.
(anonymous) (cyclomatic 18) runtime/compile-sea-loader.cjs:34β (anonymous) 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.
Value::write_js (cyclomatic 17) crates/nub-data-formats/src/value.rs:53β Value::write_js has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β the same kind of value, with no behaviour of its own β a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clean-worktree-targets.main (cyclomatic 17) .claude/skills/cpu-reduction/scripts/clean-worktree-targets.py:177β clean-worktree-targets.main 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.
launch.leadsToUs (cyclomatic 17) npm/nub/bin/launch.js:147β launch.leadsToUs 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.
(anonymous) (cyclomatic 17) crates/nub-cli/src/compile/code_cache_install.cjs:4β (anonymous) 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.
YamlBuilder::on_event (cyclomatic 16) crates/nub-data-formats/src/lib.rs:312β YamlBuilder::on_event has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β the same kind of value, with no behaviour of its own β a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
preload-common.installThreadpoolPolicy (cyclomatic 16) runtime/preload-common.cjs:2036β preload-common.installThreadpoolPolicy 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. This is NOT this file's highest cyclomatic complexity: preload-common.installAsyncTierCjsSource (cyclomatic 23) is higher and carries no row of its own β it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
polyfills.installArrayFromAsync (cyclomatic 16) runtime/polyfills.cjs:1321β polyfills.installArrayFromAsync has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1324). 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.
transform-core.stripJsonComments (cyclomatic 16) runtime/transform-core.mjs:1143β transform-core.stripJsonComments 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.
loader-entry.arm (cyclomatic 16) runtime/loader-entry.mjs:124β loader-entry.arm has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AnsiScreen.write (cyclomatic 16) site/src/lib/ansi-screen.ts:307β AnsiScreen.write 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.
D10 Β· Test QualityΒ· Test project verifies nothing Β· Γ1
Test project verifies nothing: tests/fixtures/non-program-modes tests/fixtures/non-program-modes/counts.test.mjs:8β No conventional assertion call was detected in 2 of 2 tests in `tests/fixtures/non-program-modes` β the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
polyfills.installIteratorSurface (cognitive 279) runtime/polyfills.cjs:465β polyfills.installIteratorSurface has cognitive complexity 279 (threshold 15). Drivers by points: if/else 96 (171 pts), loops 32 (51 pts), boolean chains 27, error handling 10 (16 pts), ternaries 10 (14 pts) (nesting depth added 104). Of this number, 111 points are the body's own statements and 168 belong to 29 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.
worker-polyfill.installWorkerPolyfill (cognitive 175) runtime/worker-polyfill.mjs:170β worker-polyfill.installWorkerPolyfill has cognitive complexity 175 (threshold 15). Drivers by points: if/else 48 (100 pts), ternaries 18 (43 pts), boolean chains 21, loops 4 (8 pts), error handling 1 (3 pts) (nesting depth added 83). Of this number, 116 points are the body's own statements and 59 belong to 11 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth β most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
navigator-locks.installNavigatorLocks (cognitive 115) runtime/navigator-locks.mjs:11β navigator-locks.installNavigatorLocks has cognitive complexity 115 (threshold 15). Drivers by points: if/else 37 (78 pts), boolean chains 19, loops 6 (16 pts), ternaries 1 (2 pts) (nesting depth added 52). Of this number, 58 points are the body's own statements and 57 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installSyncPolyfills (cognitive 93) runtime/polyfills.cjs:131β installSyncPolyfills has cognitive complexity 93 (threshold 15). Drivers by points: if/else 24 (42 pts), boolean chains 27, ternaries 5 (11 pts), error handling 3 (8 pts), loops 2 (4 pts), other 1 (nesting depth added 31). Of this number, 50 points are the body's own statements and 43 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
polyfills.installFloorBuiltins (cognitive 85) runtime/polyfills.cjs:1635β polyfills.installFloorBuiltins has cognitive complexity 85 (threshold 15). Drivers by points: if/else 25 (43 pts), ternaries 10 (21 pts), boolean chains 13, error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 33). Of this number, 70 points are the body's own statements and 15 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.
polyfills.installDisposableStacks (cognitive 79) runtime/polyfills.cjs:2228β polyfills.installDisposableStacks has cognitive complexity 79 (threshold 15). Drivers by points: if/else 32 (66 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 40). 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.
polyfills.installSetMethods (cognitive 66) runtime/polyfills.cjs:1179β polyfills.installSetMethods has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (39 pts), loops 12 (18 pts), boolean chains 7, ternaries 2 (nesting depth added 20). Of this number, 51 points are the body's own statements and 15 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.
compile-sea-loader.installPayloadContainer (cognitive 54) runtime/compile-sea-loader.cjs:159β compile-sea-loader.installPayloadContainer has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 12, ternaries 7 (8 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 14). Of this number, 26 points are the body's own statements and 28 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wrapChildProcessCompileCache (cognitive 53) runtime/preload-common.cjs:1713β wrapChildProcessCompileCache has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 17, error handling 3 (5 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 13). Most of this is not in the body itself: 2 of the 53 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 1797, fork, stripFromOptions, β¦). 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.
makeHooks.loadInner (cognitive 51) runtime/preload-common.cjs:884β makeHooks.loadInner has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 21, error handling 3 (5 pts), 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.
throttle (cognitive 50) runtime/util/throttle.cjs:25β throttle has cognitive complexity 50 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 12, loops 4 (5 pts), ternaries 4 (5 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 4 of the 50 points are its own statements and the rest belongs to 23 function items inside it that branch (throttled, hasImmediateCapacity, pruneStrictTicks, β¦). 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.
preload-common.makeHooks.loadInner (cognitive 47) runtime/preload-common.cjs:884β preload-common.makeHooks.loadInner has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 17, error handling 3 (5 pts), 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.
polyfills.installJsonParseOptions (cognitive 40) runtime/polyfills.cjs:1559β polyfills.installJsonParseOptions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 3 (7 pts), boolean chains 6, error handling 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.
Worker.constructor (cognitive 37) runtime/worker-polyfill.mjs:231β Worker.constructor has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 6 (9 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 33 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnsiScreen.write (cognitive 36) site/src/lib/ansi-screen.ts:307β AnsiScreen.write has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 2 (9 pts), loops 1 (nesting depth added 21). Of this number, 31 points are the body's own statements and 5 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.
preload-common.installCjsRequireHooks (cognitive 35) runtime/preload-common.cjs:1190β preload-common.installCjsRequireHooks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 13, loops 4 (nesting depth added 7). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 8 function items inside it that branch (plainJsExtension, withoutNubAddedExtensions, transpileExtension, β¦). 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.
installJsonParseOptions::parse (cognitive 35) runtime/polyfills.cjs:1580β installJsonParseOptions::parse has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (7 pts), boolean chains 6 (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.
launch.leadsToUs (cognitive 34) npm/nub/bin/launch.js:147β launch.leadsToUs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 4 (9 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installCjsRequireHooks::_resolveFilename (cognitive 34) runtime/preload-common.cjs:1263β installCjsRequireHooks::_resolveFilename has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, ternaries 2 (4 pts), error handling 2, loops 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.
installWorkerPolyfill::constructor (cognitive 34) runtime/worker-polyfill.mjs:231β installWorkerPolyfill::constructor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 7 (9 pts), error handling 1 (2 pts), boolean chains 1, loops 1, other 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.
installCompiledForkIdentity::fork (cognitive 34) runtime/compile-bootstrap.cjs:249β installCompiledForkIdentity::fork has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, ternaries 4 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
debounce (cognitive 34) runtime/util/debounce.cjs:23β debounce has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 4 (6 pts), ternaries 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 14 function items inside it that branch (debounced, invoke, abort, β¦). 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.
LockManager.request (cognitive 33) runtime/navigator-locks.mjs:150β LockManager.request has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 14, ternaries 1 (nesting depth added 2). Of this number, 28 points are the body's own statements and 5 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.
installMathSumPrecise::sumPrecise (cognitive 33) runtime/polyfills.cjs:1496β installMathSumPrecise::sumPrecise has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, ternaries 3 (5 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.
postinstall.refreshShimsIn (cognitive 32) npm/nub/postinstall.js:120β postinstall.refreshShimsIn has cognitive complexity 32 (threshold 15). Drivers by points: error handling 8 (16 pts), if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), loops 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.
polyfills.installMathSumPrecise (cognitive 32) runtime/polyfills.cjs:1494β polyfills.installMathSumPrecise has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, ternaries 2 (3 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.
installLazyEsmPolyfills (cognitive 32) runtime/preload.cjs:319β installLazyEsmPolyfills has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, error handling 4 (6 pts), ternaries 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 12 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.
AnsiScreen.sgr (cognitive 31) site/src/lib/ansi-screen.ts:200β AnsiScreen.sgr has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 5, ternaries 1 (3 pts), loops 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.
AnsiScreen.csi (cognitive 31) site/src/lib/ansi-screen.ts:238β AnsiScreen.csi has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (9 pts), boolean chains 3, ternaries 2 (3 pts), match/switch 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.
resolveSpec (cognitive 31) runtime/transform-core.mjs:514β resolveSpec has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 3 (7 pts), boolean chains 6, 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.
clean-shared-buckets.main (cognitive 29) .claude/skills/disk-reduction/scripts/clean-shared-buckets.py:144β clean-shared-buckets.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 4 (6 pts), boolean chains 3, 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.
installLocaleVariants (cognitive 29) runtime/polyfills.cjs:1410β installLocaleVariants has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 5 function items inside it that branch (construct::get, variants, construct, β¦). 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.
transform-core.stripJsonComments (cognitive 28) runtime/transform-core.mjs:1143β transform-core.stripJsonComments has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clean-worktree-targets.main (cognitive 27) .claude/skills/cpu-reduction/scripts/clean-worktree-targets.py:177β clean-worktree-targets.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (3 pts), ternaries 2, 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.
installNavigatorLocks::request (cognitive 27) runtime/navigator-locks.mjs:150β installNavigatorLocks::request has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14, boolean chains 12, 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.
loader-entry.foreignAsyncLoaderPresent (cognitive 26) runtime/loader-entry.mjs:90β loader-entry.foreignAsyncLoaderPresent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 10). 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.
internals.determineSpecificType (cognitive 25) runtime/util/internals.cjs:86β internals.determineSpecificType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (5 pts), boolean chains 1, match/switch 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.
loadTranspile (cognitive 25) runtime/transform-core.mjs:978β loadTranspile has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (8 pts), if/else 5 (7 pts), other 1 (nesting depth added 4). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installMapGetOrInsert (cognitive 24) runtime/polyfills.cjs:1367β installMapGetOrInsert has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 12). Of this number, 15 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.
Seed::reached_packages (cognitive 23) crates/nub-cli/src/compile/native_layout.rs:273β Seed::reached_packages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (4 pts), loops 2 (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.
nub_json_guard::check_nesting_depth (cognitive 23) crates/nub-json-guard/src/lib.rs:44β nub_json_guard::check_nesting_depth has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 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.
polyfills.installKeyedPromiseCombinators (cognitive 23) runtime/polyfills.cjs:2499β polyfills.installKeyedPromiseCombinators has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 2 (4 pts), loops 2, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (perform, install, perform::settle, β¦). 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.
navigator-shim.navigatorPlatform (cognitive 23) runtime/navigator-shim.mjs:53β navigator-shim.navigatorPlatform has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 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.
phantomDepHint (cognitive 23) runtime/preload-common.cjs:683β phantomDepHint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 2 (4 pts), ternaries 3, loops 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.
(anonymous) (cognitive 23) runtime/compile-sea-loader.cjs:34β (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8, ternaries 3 (6 pts), boolean chains 4, error handling 2 (4 pts), loops 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.
ansi-player.AnsiPlayer (cognitive 22) site/src/components/ansi-player.tsx:41β ansi-player.AnsiPlayer has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 7, boolean chains 3, loops 2 (nesting depth added 3). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 157, 105, 66, β¦). 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.
shiki-console.stripPrompt (cognitive 21) site/src/lib/shiki-console.ts:66β shiki-console.stripPrompt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preload-common.makeHooks.resolve (cognitive 20) runtime/preload-common.cjs:799β preload-common.makeHooks.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (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.
Worker.constructor (cognitive 20) runtime/compile-sea-loader.cjs:334β Worker.constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts), ternaries 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.
makeHooks.resolve (cognitive 20) runtime/preload-common.cjs:799β makeHooks.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (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.
nub_phantom::cmd_scan (cognitive 19) crates/nub-phantom/src/main.rs:80β nub_phantom::cmd_scan has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). 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.
PathsMatcher::matches (cognitive 19) crates/nub-tsconfig/src/lib.rs:1509β PathsMatcher::matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cache-evict.sweepCompileCache (cognitive 19) runtime/cache-evict.mjs:120β cache-evict.sweepCompileCache has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 3 (6 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loader-entry.arm (cognitive 19) runtime/loader-entry.mjs:124β loader-entry.arm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). 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: 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.
SourceIndex::resolve (cognitive 18) crates/nub-cli/src/pm_engine/install_report.rs:290β SourceIndex::resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 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.
installAsyncTierCjsSource (cognitive 18) runtime/preload-common.cjs:471β installAsyncTierCjsSource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 9 function items inside it that branch (registerHooks::load, registerHooks, a function literal at line 479, β¦). 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.
installArrayFromAsync::fromAsync (cognitive 18) runtime/polyfills.cjs:1324β installArrayFromAsync::fromAsync has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, loops 2 (3 pts), if/else 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Β· main (cognitive 18) Β· Γ1
main (cognitive 18) runtime/nubr.mjs:323β main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 3, other 3, 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.
ProfileGrants::read (cognitive 17) crates/nub-core/src/windows_security.rs:335β ProfileGrants::read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (3 pts), boolean chains 2, 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.
Value::write_js (cognitive 17) crates/nub-data-formats/src/value.rs:53β Value::write_js has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction β a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
nub_data_formats::check_yaml_alias_expansion (cognitive 17) crates/nub-data-formats/src/lib.rs:179β nub_data_formats::check_yaml_alias_expansion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
launch.healPathEntry (cognitive 17) npm/nub/bin/launch.js:335β launch.healPathEntry has cognitive complexity 17 (threshold 15). Drivers by points: error handling 6 (10 pts), if/else 3 (5 pts), boolean chains 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.
code.BenchBars (cognitive 17) site/src/components/code.tsx:165β code.BenchBars has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (17 pts) (nesting depth added 7). Of this number, 12 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.
installCompiledWorkerScope::constructor (cognitive 17) runtime/compile-bootstrap.cjs:142β installCompiledWorkerScope::constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 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.
(anonymous) (cognitive 17) runtime/compile-inline-loader.cjs:16β (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4, boolean chains 3, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
postinstall.dropStaleWindowsExe (cognitive 16) npm/nub/postinstall.js:217β postinstall.dropStaleWindowsExe has cognitive complexity 16 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker.constructor (cognitive 16) runtime/compile-bootstrap.cjs:142β Worker.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (compile-bootstrap.installCompiledWorkerScope) 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.
compile-bootstrap.installCompiledWorkerScope (cognitive 16) runtime/compile-bootstrap.cjs:138β compile-bootstrap.installCompiledWorkerScope has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Worker.constructor) 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.
worker-blob-url.installBlobUrlSupport (cognitive 16) runtime/worker-blob-url.cjs:107β worker-blob-url.installBlobUrlSupport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nubr-escape.cmdEscape (cognitive 16) runtime/nubr-escape.mjs:31β nubr-escape.cmdEscape has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route.orderedDocPages::visit (cognitive 16) REDACTED:36β route.orderedDocPages::visit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installThreadpoolPolicy (cognitive 16) runtime/preload-common.cjs:2036β installThreadpoolPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClassTooLong: NativeAddons crates/nub-cli/src/compile/native.rs:464β ClassTooLong β 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code β #[cfg(test)] modules and bare #[test] functions β not counted), 18 methods, 3 blocks, lines 464-2106. The bar is 400 significant lines; this is 247 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 Β· Code DuplicationΒ· Edited copy of a member (50 corresponding lines) Β· Γ1
Edited copy of a member (50 corresponding lines) crates/nub-core/src/node/runtime_cache.rs:468β crates/nub-core/src/node/runtime_cache.rs:468-517 | crates/nub-launcher/src/cache.rs:595-652 β These two members are one piece of code written twice and then edited apart: 50 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 (60 corresponding lines) Β· Γ1
Edited copy of a member (60 corresponding lines) crates/nub-cli/src/compile/inject.rs:41β crates/nub-cli/src/compile/inject.rs:41-106 | crates/nub-cli/src/compile/sea.rs:295-354 β These two members are one piece of code written twice and then edited apart: 60 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 (37 corresponding lines) Β· Γ1
Edited copy of a member (37 corresponding lines) crates/nub-core/src/node/runtime_cache.rs:350β crates/nub-core/src/node/runtime_cache.rs:350-387 | crates/nub-launcher/src/cache.rs:478-514 β These two members are one piece of code written twice and then edited apart: 37 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 (46 corresponding lines) Β· Γ1
Edited copy of a member (46 corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs:601β crates/nub-cli/src/pm_engine/install_family.rs:601-646 | crates/nub-cli/src/pm_engine/install_family.rs:676-721 β These two members are one piece of code written twice and then edited apart: 46 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 (35 corresponding lines) Β· Γ1
Edited copy of a member (35 corresponding lines) crates/nub-phantom-scan/src/graph.rs:627β crates/nub-phantom-scan/src/graph.rs:627-676 | crates/nub-phantom-scan/src/graph.rs:787-821 β These two members are one piece of code written twice and then edited apart: 35 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 (39 corresponding lines) Β· Γ1
Edited copy of a member (39 corresponding lines) crates/nub-cli/src/cli.rs:6130β crates/nub-cli/src/cli.rs:6130-6168 | crates/nub-cli/src/cli.rs:6739-6806 β These two members are one piece of code written twice and then edited apart: 39 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, 20+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 20+ corresponding lines) crates/nub-cli/src/compile/inject.rs:315β crates/nub-cli/src/compile/inject.rs:315-338 | crates/nub-cli/src/compile/inject.rs:349-376 | crates/nub-cli/src/compile/inject.rs:582-601 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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 copies of one member (3 members, 13+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 13+ corresponding lines) crates/nub-core/src/node/shim.rs:171β crates/nub-core/src/node/shim.rs:171-183 | crates/nub-core/src/pm/shim.rs:1272-1285 | crates/nub-core/src/pm/shim.rs:1323-1337 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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 (32 corresponding lines) Β· Γ1
Edited copy of a member (32 corresponding lines) crates/nub-cli/src/compile/native.rs:192β crates/nub-cli/src/compile/native.rs:192-223 | crates/nub-cli/src/compile/native.rs:288-327 β These two members are one piece of code written twice and then edited apart: 32 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 (17 corresponding lines) Β· Γ1
Edited copy of a member (17 corresponding lines) crates/nub-cli/src/cli.rs:8155β crates/nub-cli/src/cli.rs:8155-8171 | crates/nub-core/src/workspace/scripts.rs:347-367 β These two members are one piece of code written twice and then edited apart: 17 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, 15+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 15+ corresponding lines) crates/nub-cli/src/pm_engine/install_family.rs:743β crates/nub-cli/src/pm_engine/install_family.rs:743-762 | crates/nub-cli/src/pm_engine/install_family.rs:786-800 | crates/nub-cli/src/pm_engine/install_family.rs:1018-1032 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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 (15 corresponding lines) Β· Γ1
Edited copy of a member (15 corresponding lines) crates/nub-core/src/compile.rs:913β crates/nub-core/src/compile.rs:913-927 | crates/nub-core/src/version_management/mod.rs:86-104 β These two members are one piece of code written twice and then edited apart: 15 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, 11+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 11+ corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs:475β crates/nub-cli/src/pm_engine/info_family.rs:475-489 | crates/nub-cli/src/pm_engine/info_family.rs:549-559 | crates/nub-cli/src/pm_engine/info_family.rs:561-575 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 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 copies of one member (3 members, 14+ corresponding lines) Β· Γ1
Edited copies of one member (3 members, 14+ corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs:179β crates/nub-cli/src/pm_engine/info_family.rs:179-192 | crates/nub-cli/src/pm_engine/install_family.rs:1371-1384 | crates/nub-cli/src/pm_engine/publish_family.rs:461-474 β These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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 (5 corresponding lines) Β· Γ1
Edited copy of a member (5 corresponding lines) crates/nub-launcher/src/cache.rs:396β crates/nub-launcher/src/cache.rs:396-400 | crates/nub-launcher/src/main.rs:1167-1171 β 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 (4 corresponding lines) Β· Γ1
Edited copy of a member (4 corresponding lines) crates/nub-cli/src/pm_engine/info_family.rs:527β crates/nub-cli/src/pm_engine/info_family.rs:527-530 | crates/nub-cli/src/pm_engine/install_family.rs:834-837 β 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.
Duplicated block (31β34 lines × 2) crates/nub-cli/src/cli.rs:11327β crates/nub-cli/src/cli.rs:11327-11360 | crates/nub-cli/src/cli.rs:11489-11519 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:11327` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14β20 lines × 2) crates/nub-core/src/version_management/mod.rs:583β crates/nub-core/src/version_management/mod.rs:583-596 | crates/nub-core/src/version_management/mod.rs:1168-1187 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/version_management/mod.rs:583` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) crates/nub-cli/src/cli.rs:6747β crates/nub-cli/src/cli.rs:6747-6765 | crates/nub-cli/src/cli.rs:6785-6803 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:6747` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16β17 lines × 2) crates/nub-core/src/pm/extract.rs:56β crates/nub-core/src/pm/extract.rs:56-72 | crates/nub-core/src/version_management/extract.rs:170-185 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/pm/extract.rs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13β16 lines × 2) crates/nub-core/src/windows_security.rs:230β crates/nub-core/src/windows_security.rs:230-245 | crates/nub-core/src/windows_security.rs:288-300 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/windows_security.rs:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11β13 lines × 2) crates/nub-cli/src/cli.rs:10943β crates/nub-cli/src/cli.rs:10943-10955 | crates/nub-cli/src/cli.rs:10970-10980 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:10943` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/nub-cli/src/pm_engine/info_family.rs:324β crates/nub-cli/src/pm_engine/info_family.rs:324-336 | crates/nub-cli/src/pm_engine/info_family.rs:375-387 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/info_family.rs:324` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9β12 lines × 2) crates/nub-core/src/pm/provision.rs:436β crates/nub-core/src/pm/provision.rs:436-444 | crates/nub-core/src/pm/provision.rs:523-534 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-core/src/pm/provision.rs:523` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9β11 lines × 3) crates/nub-core/src/node/shim.rs:173β crates/nub-core/src/node/shim.rs:173-181 | crates/nub-core/src/pm/shim.rs:1274-1282 | crates/nub-core/src/pm/shim.rs:1325-1335 β 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.
Duplicated block (11 lines × 2) crates/nub-cli/src/cli.rs:6552β crates/nub-cli/src/cli.rs:6552-6562 | crates/nub-cli/src/cli.rs:8347-8357 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/cli.rs:6552` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6β11 lines × 2) crates/nub-cli/src/pm_engine/phantom_closure.rs:223β crates/nub-cli/src/pm_engine/phantom_closure.rs:223-228 | crates/nub-cli/src/pm_engine/phantom_closure.rs:363-373 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/phantom_closure.rs:363` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/nub-cli/src/pm_engine/mod.rs:3431β crates/nub-cli/src/pm_engine/mod.rs:3431-3440 | crates/nub-cli/src/pm_engine/mod.rs:3587-3596 β 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. 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 (8β9 lines × 2) crates/nub-cli/src/cli.rs:5224β crates/nub-cli/src/cli.rs:5224-5232 | crates/nub-cli/src/cli.rs:5489-5496 β 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β8 lines × 3) crates/nub-cli/src/compile/native.rs:193β crates/nub-cli/src/compile/native.rs:193-200 | crates/nub-cli/src/compile/native.rs:290-297 | crates/nub-phantom-scan/src/bin/scan-verdicts.rs:42-48 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/compile/native.rs:193` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5β8 lines × 2) crates/nub-cli/src/pm_engine/mod.rs:3414β crates/nub-cli/src/pm_engine/mod.rs:3414-3421 | crates/nub-cli/src/pm_engine/mod.rs:3547-3551 β 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/mod.rs:3414` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/nub-cli/src/pm_engine/mod.rs:3551` calls `stdout`, `flush`, `stderr` and `crates/nub-cli/src/pm_engine/mod.rs:3421` does not β after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) crates/nub-cli/src/pm_engine/info_family.rs:477β crates/nub-cli/src/pm_engine/info_family.rs:477-486 | crates/nub-cli/src/pm_engine/info_family.rs:551-557 | crates/nub-cli/src/pm_engine/info_family.rs:563-572 β all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites β resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/nub-cli/src/pm_engine/info_family.rs:477` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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.
Low cohesion: AugmentationEnv (LCOM4 4) crates/nub-core/src/node/spawn.rs:2422β AugmentationEnv's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable β your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected β and which would otherwise dominate this list β are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D8 Β· Code CoverageΒ· Coverage not measured Β· Γ1
Coverage not measured β JavaScript/TypeScript suite β Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured β the vitest suite in benchmarks/pm/fixtures/workspace-descript/packages/tooling/ ran and not one test passed (RUN v1.6.1 benchmarks/pm/fixtures/workspace-descript/packages/tooling), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
P12 Β· CI test-gate honestyΒ· Coverage collected but not gated Β· Γ1
Coverage collected but not gated β CI collects a coverage report but no step enforces a minimum β coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration β the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited β matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Outbound HTTP without resilience runtime/preload-common.cjs:470β `got (` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own β or never, for a client with no default timeout.
Type Safety β 10 typed · 163 plain JS β the untyped files are crates/nub-cli/src/compile/code_cache.test.cjs, crates/nub-cli/src/compile/code_cache_generate.cjs, crates/nub-cli/src/compile/code_cache_install.cjs, npm/nub-types/test/run.mjs, npm/nub/platform.js, npm/nub/postinstall.js (+157 more).
R10 Β· Code DuplicationΒ· Duplicated block with local edits (84 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (84 matched lines × 2 locations) runtime/util/debounce.cjs:66β runtime/util/debounce.cjs:66 · runtime/util/throttle.cjs:110 β the two spans are one implementation copied and then locally edited β 382 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 (35 lines × 2 locations) runtime/polyfills.cjs:2317β runtime/polyfills.cjs:2317 · runtime/polyfills.cjs:2398 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (30 lines × 2 locations) runtime/compile-inline-loader.cjs:181β runtime/compile-inline-loader.cjs:181 · runtime/compile-sea-loader.cjs:470 β 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 (29 lines × 3 locations) runtime/compile-bootstrap.cjs:186β runtime/compile-bootstrap.cjs:186 · runtime/compile-sea-loader.cjs:303 · runtime/worker-polyfill.mjs:45 β 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.
Duplicated block (24 lines × 2 locations) runtime/polyfills.cjs:2290β runtime/polyfills.cjs:2290 · runtime/polyfills.cjs:2361 β 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 (23 lines × 2 locations) runtime/cache-evict.mjs:74β runtime/cache-evict.mjs:74 · runtime/cache-evict.mjs:140 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
R10 Β· Code DuplicationΒ· Duplicated block with local edits (15 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (15 matched lines × 2 locations) npm/nub/platform.js:16β npm/nub/platform.js:16 · runtime/loader-platform.cjs:18 β the two spans are one implementation copied and then locally edited β 101 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters β or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (15 lines × 2 locations) scripts/lib/download-stats.mjs:32β scripts/lib/download-stats.mjs:32 · scripts/lib/download-stats.mjs:78 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
R10 Β· Code DuplicationΒ· Duplicated block with local edits (12 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (12 matched lines × 2 locations) runtime/compile-bootstrap.cjs:249β runtime/compile-bootstrap.cjs:249 · runtime/preload-common.cjs:1822 β the two spans are one implementation copied and then locally edited β 81 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 (11 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (11 matched lines × 2 locations) runtime/preload-async-hooks.mjs:108β runtime/preload-async-hooks.mjs:108 · runtime/preload-common.cjs:799 β the two spans are one implementation copied and then locally edited β 77 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 (10 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (10 matched lines × 2 locations) runtime/transform-core.mjs:90β runtime/transform-core.mjs:90 · runtime/worker-polyfill.mjs:79 β the two spans are one implementation copied and then locally edited β 54 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 (10 lines × 2 locations) scripts/mac-build.ts:59β scripts/mac-build.ts:59 · scripts/remote-build.ts:170 β 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 (7 lines × 2 locations) runtime/polyfills.cjs:1092β runtime/polyfills.cjs:1092 · runtime/polyfills.cjs:1117 β all 2 copies are in the same file, and the CITED SPAN is not a self-contained block β it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead β the whole function, component or branch these lines sit in β and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 3 locations) scripts/mac-build.ts:60β scripts/mac-build.ts:60 · scripts/new-worktree.ts:87 · scripts/remote-build.ts:171 β the 3 copies are spread across 3 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 (5 matched lines × 2 locations) Β· Γ1
Duplicated block with local edits (5 matched lines × 2 locations) scripts/merge-cascade.ts:302β scripts/merge-cascade.ts:302 · scripts/merge-cascade.ts:340 β the two spans are one implementation copied and then locally edited β 50 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.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 53, cognitive 76) Β· Γ1
Complex function main (cyclomatic 53, cognitive 76) tests/cross-runtime/run.mjs:670β main has cyclomatic complexity 53 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function loadInner (cyclomatic 53, cognitive 51) runtime/preload-common.cjs:884β loadInner 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.
Complex function check (cyclomatic 35, cognitive 54) tests/npm-corpus/check-tree.mjs:189β check has cyclomatic complexity 35 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function installSyncPolyfills (cyclomatic 35, cognitive 50) runtime/polyfills.cjs:131β installSyncPolyfills has cyclomatic complexity 35 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseArgs (cyclomatic 31, cognitive 51) scripts/ci-watch.ts:145β parseArgs has cyclomatic complexity 31 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.
Complex function parseArgs (cyclomatic 29, cognitive 30) scripts/remote-build.ts:156β parseArgs has cyclomatic complexity 29 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function request (cyclomatic 29, cognitive 27) runtime/navigator-locks.mjs:150β request has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 28, cognitive 79) tests/worker-wpt/harness/run-wpt.mjs:167β (anonymous) has cyclomatic complexity 28 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fromBase64 (cyclomatic 28, cognitive 66) runtime/polyfills.cjs:2010β fromBase64 has cyclomatic complexity 28 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function catFor (cyclomatic 28, cognitive 16) tests/pnpm-conformance/gen-allowlist.mjs:48β catFor has cyclomatic complexity 28 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _resolveFilename (cyclomatic 26, cognitive 34) runtime/preload-common.cjs:1263β _resolveFilename has cyclomatic complexity 26 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function sumPrecise (cyclomatic 26, cognitive 33) runtime/polyfills.cjs:1496β sumPrecise has cyclomatic complexity 26 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 26, cognitive 31) Β· Γ1
Complex function main (cyclomatic 26, cognitive 31) scripts/mac-build.ts:121β main has cyclomatic complexity 26 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function fork (cyclomatic 24, cognitive 34) runtime/compile-bootstrap.cjs:249β fork has cyclomatic complexity 24 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 23, cognitive 24) Β· Γ1
Complex function main (cyclomatic 23, cognitive 24) tests/compile-native-islands/driver.mjs:240β main has cyclomatic complexity 23 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function extractPnpm (cyclomatic 22, cognitive 55) tests/mutation/extract-graph.mjs:76β extractPnpm has cyclomatic complexity 22 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 22, cognitive 35) Β· Γ1
Complex function main (cyclomatic 22, cognitive 35) scripts/soak/external-tools.mts:680β main has cyclomatic complexity 22 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function constructor (cyclomatic 22, cognitive 34) runtime/worker-polyfill.mjs:231β constructor has cyclomatic complexity 22 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveSpec (cyclomatic 22, cognitive 31) runtime/transform-core.mjs:514β resolveSpec has cyclomatic complexity 22 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function loadTranspile (cyclomatic 22, cognitive 24) runtime/transform-core.mjs:978β loadTranspile has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parse (cyclomatic 21, cognitive 35) runtime/polyfills.cjs:1580β parse has cyclomatic complexity 21 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 21, cognitive 26) Β· Γ1
Complex function main (cyclomatic 21, cognitive 26) scripts/release-notify.ts:184β main has cyclomatic complexity 21 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function determineSpecificType (cyclomatic 21, cognitive 25) runtime/util/internals.cjs:86β determineSpecificType has cyclomatic complexity 21 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function phantomDepHint (cyclomatic 21, cognitive 23) runtime/preload-common.cjs:683β phantomDepHint has cyclomatic complexity 21 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function installWorkerPolyfill (cyclomatic 20, cognitive 33) runtime/worker-polyfill.mjs:170β installWorkerPolyfill has cyclomatic complexity 20 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function refreshShimsIn (cyclomatic 20, cognitive 32) npm/nub/postinstall.js:120β refreshShimsIn has cyclomatic complexity 20 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildPlainCommand (cyclomatic 20, cognitive 28) tests/cross-runtime/run.mjs:378β buildPlainCommand has cyclomatic complexity 20 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function checkHandCopies (cyclomatic 19, cognitive 27) tests/cross-runtime/readme-table.mjs:94β checkHandCopies has cyclomatic complexity 19 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 19, cognitive 22) tests/npm-corpus/check-tree.mjs:98β (anonymous) has cyclomatic complexity 19 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function args (cyclomatic 19, cognitive 20) tests/compile-native-islands/driver.mjs:36β args has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 19, cognitive 18) Β· Γ1
Complex function main (cyclomatic 19, cognitive 18) runtime/nubr.mjs:323β main has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 Β· Cyclomatic ComplexityΒ· Complex function main (cyclomatic 18, cognitive 36) Β· Γ1
Complex function main (cyclomatic 18, cognitive 36) scripts/merge-cascade.ts:324β main has cyclomatic complexity 18 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function checkPins (cyclomatic 18, cognitive 33) scripts/soak/external-tools.mts:118β checkPins has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 18, cognitive 23) runtime/compile-sea-loader.cjs:34β (anonymous) has cyclomatic complexity 18 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function installFloorBuiltins (cyclomatic 18, cognitive 21) runtime/polyfills.cjs:1635β installFloorBuiltins has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function installLazyEsmPolyfills (cyclomatic 18, cognitive 20) runtime/preload.cjs:319β installLazyEsmPolyfills has cyclomatic complexity 18 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function leadsToUs (cyclomatic 17, cognitive 34) npm/nub/bin/launch.js:147β leadsToUs has cyclomatic complexity 17 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function classifyRollup (cyclomatic 17, cognitive 27) scripts/lib/ci-rollup.ts:83β classifyRollup has cyclomatic complexity 17 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function foreignAsyncLoaderPresent (cyclomatic 17, cognitive 25) runtime/loader-entry.mjs:90β foreignAsyncLoaderPresent has cyclomatic complexity 17 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side β extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function b64ToU8 (cyclomatic 17, cognitive 15) runtime/polyfills.cjs:2100β b64ToU8 has cyclomatic complexity 17 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth β arms side by side rather than stacked β and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 Β· Large FilesΒ· runtime/preload-common.cjs Β· Γ1
runtime/preload-common.cjs: 2572 lines of code runtime/preload-common.cjs:1β runtime/preload-common.cjs has 2572 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module.
runtime/polyfills.cjs: 2515 lines of code runtime/polyfills.cjs:1β runtime/polyfills.cjs has 2515 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Β· runtime/transform-core.mjs Β· Γ1
runtime/transform-core.mjs: 1175 lines of code runtime/transform-core.mjs:1β runtime/transform-core.mjs has 1175 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Β· scripts/remote-build.ts Β· Γ1
scripts/remote-build.ts: 1135 lines of code scripts/remote-build.ts:1β scripts/remote-build.ts has 1135 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module.
R3 Β· Large FilesΒ· runtime/worker-polyfill.mjs Β· Γ1
runtime/worker-polyfill.mjs: 795 lines of code runtime/worker-polyfill.mjs:1β runtime/worker-polyfill.mjs has 795 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Β· runtime/compile-sea-loader.cjs Β· Γ1
runtime/compile-sea-loader.cjs: 521 lines of code runtime/compile-sea-loader.cjs:1β runtime/compile-sea-loader.cjs has 521 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module.
runtime/preload.cjs: 443 lines of code runtime/preload.cjs:1β runtime/preload.cjs has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic β a file this long is usually several responsibilities in one module.
scripts/ci-watch.ts: 432 lines of code scripts/ci-watch.ts:1β scripts/ci-watch.ts has 432 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Β· The declared test suite includes a file that cannot be loaded Β· Γ1
The declared test suite includes a file that cannot be loaded npm/nub-types/test/fixtures/positive/index.ts:41β This repository declares test tooling, and the β above records that declaration β but npm/nub-types/test/fixtures/positive/index.ts and 13 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) β each one is reported with its failing import under Test Coverage β then the declared script exercises what it claims to.
Dead file (~13 LoC) scripts/lat-prompt.mjsβ no import path from any entry point (260 application, 70 tooling, 476 test roots considered), and no other file in the scanned tree imports it β nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'typescript-5-8' β Declared in npm/nub-types/test/package.json but never imported anywhere in that package or its workspace members β no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'typescript-5-9' β Declared in npm/nub-types/test/package.json but never imported anywhere in that package or its workspace members β no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'typescript-6-0' β Declared in npm/nub-types/test/package.json but never imported anywhere in that package or its workspace members β no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@anthropic-ai/sandbox-runtime' β Declared in tests/agent-sandbox/package.json but never imported anywhere in that package or its workspace members β no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@openai/codex' β Declared in tests/agent-sandbox/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.
Weak hash algorithm crates/nub-core/src/pm/registry.rs:866β MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything β a signature, an integrity or tamper check, a credential, or any value an attacker can influence β that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(β¦)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead β a non-cryptographic hash such as xxhash or murmurhash says it in code β since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Silent fallback default on Err crates/nub-cli/src/compile/native.rs:1426β `unreached_forced_unbundled` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-cli/src/cli.rs:12222β `resolution_source` turns every `Err` into `"package.json#devEngines.runtime (refused β non-Node runtime)".to_string()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-cli/src/compile/unbundlable.rs:524β `unreachable_dirs` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-cli/src/pm_engine/info_family.rs:675β `empty_list_json` turns every `Err` into `"[]".to_string()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-core/src/version_management/download.rs:615β `read` turns every `Err` into `Ok(0)` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-core/src/workspace/filter.rs:25β `discover_members` turns every `Err` into `vec![]` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/nub-phantom-scan/src/graph.rs:449β `config_roots` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/completion.rs:247β `dependency_candidates` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/completion.rs:271β `bin_candidates` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/config/mod.rs:481β `read_workspace_yaml_raw` turns every `Err` into `BTreeMap::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/config/aube_config.rs:227β `load_user_entries` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/global.rs:384β `scan_packages` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/run.rs:477β `script_completion_candidates` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube/src/commands/store.rs:1105β `legacy_project_records` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-linker/src/patches.rs:45β `read_applied_patches` turns every `Err` into `Default::default()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-lockfile/src/npm/write.rs:881β `preferred_root_placements` turns every `Err` into `BTreeMap::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-manifest/src/workspace/edits.rs:485β `read_workspace_yaml_string_list` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/osv_bloom_client.rs:431β `load_state` turns every `Err` into `LocalState::default()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/osv_mirror.rs:344β `load_or_default` turns every `Err` into `IndexFile::default()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/client/cache.rs:248β `read_cached_full_packument_typed_lookup` turns every `Err` into `CachedPackumentLookup::default()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/config/yarnrc.rs:174β `load_yarnrc_entries_from_path` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/config/yarnrc.rs:182β `translate_yarnrc_content` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-registry/src/config/yarnrc.rs:199β `load_classic_yarnrc_entries_from_path` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-runtime/src/discover.rs:82β `scan_install_dir` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err vendor/aube/crates/aube-runtime/src/self_install.rs:106β `scan_aube_dir` turns every `Err` into `Vec::new()` β a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Duplicated predicate runtime/compile-bootstrap.cjs:205β `!arg.includes("=") && next !== undefined && !next.startsWith("-")` appears character-identically in 3 files β runtime/compile-bootstrap.cjs, runtime/compile-sea-loader.cjs, runtime/worker-polyfill.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate scripts/soak/external-tools.mts:155β `!isValidIsoDate(published) || !isValidIsoDate(removable)` appears character-identically in 2 files β scripts/soak/external-tools.mts, scripts/soak/soak.mts. 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 .claude/hooks/gh-comment-guard.mjs:64β `/\bgh\b[\s\S]*?\b(issue|pr)\b[\s\S]*?\b(comment|create)\b/.test(cmd) && /\bgh\b\s+(issue|pr)\s+(comment|create)\b/.test(cmd.replace(/\s+/g, β¦` appears character-identically in 2 files β .claude/hooks/gh-comment-guard.mjs, .codex/hooks/gh-comment-guard.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate runtime/compile-bootstrap.cjs:198β `arg !== "" && report.startsWith(arg, cursor) && (end === report.length || report.startsWith(", ", end))` appears character-identically in 3 files β runtime/compile-bootstrap.cjs, runtime/compile-sea-loader.cjs, runtime/worker-polyfill.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate runtime/compile-bootstrap.cjs:213β `cursor === report.length && refused.length > 0` appears character-identically in 3 files β runtime/compile-bootstrap.cjs, runtime/compile-sea-loader.cjs, runtime/worker-polyfill.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate runtime/compile-bootstrap.cjs:167β `given !== undefined || error?.code !== "ERR_WORKER_INVALID_EXEC_ARGV"` appears character-identically in 2 files β runtime/compile-bootstrap.cjs, runtime/compile-sea-loader.cjs. 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 npm/nub/platform.js:44β `header && "glibcVersionRuntime" in header` appears character-identically in 2 files β npm/nub/platform.js, runtime/loader-platform.cjs. 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 runtime/preload-common.cjs:2626β `process.env.__NUB_RUNTIME_CONFIG || "{}"` appears character-identically in 2 files β runtime/preload-common.cjs, runtime/transform-core.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate runtime/compile-inline-loader.cjs:196β `settled || process.exitCode !== undefined` appears character-identically in 2 files β runtime/compile-inline-loader.cjs, runtime/compile-sea-loader.cjs. 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 scripts/ci-watch.ts:255β `st.terminal && !st.failed && !st.skipped` appears character-identically in 2 files β scripts/ci-watch.ts, scripts/lib/ci-rollup.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate site/src/lib/ansi-screen.ts:410β `trimmed === '$' || trimmed.startsWith('$ ')` appears character-identically in 2 files β site/src/lib/ansi-screen.ts, site/src/lib/shiki-console.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:170β `typeof value === "object" && value !== null` appears character-identically in 2 files β REDACTED, runtime/preload-common.cjs. 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 crates/nub-cli/src/compile/external.rs:495β `!parsed.panicked && parsed.diagnostics.is_empty()` appears character-identically in 2 files β crates/nub-cli/src/compile/external.rs, crates/nub-cli/src/compile/native.rs. 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 crates/nub-core/src/node/discovery.rs:1305β `a.dev() == b.dev() && a.ino() == b.ino()` appears character-identically in 2 files β crates/nub-core/src/node/discovery.rs, crates/nub-launcher/src/main.rs. 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 crates/nub-cli/src/compile/bundle.rs:3702β `c.is_ascii_alphanumeric() || c == '-' || c == '_'` appears character-identically in 2 files β crates/nub-cli/src/compile/bundle.rs, crates/nub-cli/src/compile/loaders.rs. 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 crates/nub-cli/src/compile/unbundlable.rs:677β `end > 0 && (bytes[end - 1] == b' ' || bytes[end - 1] == b'\t')` appears character-identically in 2 files β crates/nub-cli/src/compile/unbundlable.rs, crates/nub-native/src/cache.rs. 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 crates/nub-core/src/pm/extract.rs:275β `err.to_lowercase().contains("cap") || err.to_lowercase().contains("decompress")` appears character-identically in 2 files β crates/nub-core/src/pm/extract.rs, crates/nub-core/src/version_management/extract.rs. 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 crates/nub-cli/src/pm_engine/unsupported_config.rs:478β `line.is_empty() || line.starts_with('#') || line.starts_with(';')` appears character-identically in 3 files β crates/nub-cli/src/pm_engine/unsupported_config.rs, crates/nub-cli/src/pm_engine/use_nub.rs, crates/nub-core/src/pm/registry.rs. 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 crates/nub-cli/src/compile/bundle.rs:3120β `meta.meta.name == "import" && meta.property.name == "meta"` appears character-identically in 2 files β crates/nub-cli/src/compile/bundle.rs, crates/nub-cli/src/compile/native.rs. 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 crates/nub-cli/src/compile/unbundlable.rs:613β `name.ends_with(".d.ts") || name.ends_with(".d.mts") || name.ends_with(".d.cts")` appears character-identically in 2 files β crates/nub-cli/src/compile/unbundlable.rs, crates/nub-cli/src/phantom_scan.rs. 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 crates/nub-core/src/node/runtime_cache.rs:533β `parent.uid() != euid && parent.uid() != 0` appears character-identically in 2 files β crates/nub-core/src/node/runtime_cache.rs, crates/nub-launcher/src/cache.rs. 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 crates/nub-cli/src/pm_engine/install_family.rs:1373β `self.recursive && filters.is_empty() && self.filter_prod.is_empty()` appears character-identically in 2 files β crates/nub-cli/src/pm_engine/install_family.rs, crates/nub-cli/src/pm_engine/publish_family.rs. 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.
README/code drift npm/nub-types/README.md:17β npm/nub-types/README.md names TypeScript 6, but the manifest declares `typescript` ^5.3.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tests/compile-corpus/README.md:11β tests/compile-corpus/README.md names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tests/bench/runtime/README.md:8β tests/bench/runtime/README.md names Fastify 5, but the manifest declares `fastify` ^4.28.1. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift site/content/docs/runtime/loaders.mdx:34β site/content/docs/runtime/loaders.mdx names TypeScript 7, but the manifest declares `typescript` ^5.3.3. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift site/content/docs/runtime/modern-apis.mdx:281β site/content/docs/runtime/modern-apis.mdx names Node.js 24, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift site/content/docs/runtime/modern-apis.mdx:581β site/content/docs/runtime/modern-apis.mdx names Node.js 26, but the repository declares engines `>=22.15.0`, engines `>=18.19.0`, engines `>=18.19.0`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=18`, engines `>=14`, pinned 22. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Interpolated log message defeats structured logging crates/nub-core/src/node/runtime_cache.rs:155β `debug!` at line 155 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/nub-core/src/node/runtime_cache.rs:213β `debug!` at line 213 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/nub-core/src/node/runtime_cache.rs:229β `debug!` at line 229 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/nub-cli/src/pm_engine/mod.rs:2137β `warn!` at line 2137 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/nub-cli/src/pm_engine/phantom_closure.rs:478β `warn!` at line 478 is handed a format string with `{β¦}` values in it, so tracing records one finished `message` field β the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
redundant comment tests/worker-wpt/wpt/resources/testharness.js:2022β "Test if a string (actual) matches a regexp (expected)" repeats the code it sits on: 5 of its 6 words (test, actual, matches, regexp, expected) are already in `assert(expected.test(actual),`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/worker-wpt/wpt/web-locks/signal.https.any.js:161β "Make a promise that resolves when the lock is acquired." repeats the code it sits on: 4 of its 5 words (make, promise, resolves, acquired) are already in `const [acquired_promise, acquired_func] = makePromiseAndResolveFunc();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/worker-wpt/wpt/web-locks/signal.https.any.js:195β "Make a promise that resolves when the lock is acquired." repeats the code it sits on: 4 of its 5 words (make, promise, resolves, acquired) are already in `const [acquired_promise, acquired_func] = makePromiseAndResolveFunc();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tests/workspace-filter/make-fixtures.mjs:121β "REDACTED for pnpm β identical globs." repeats the code it sits on: 4 of its 5 words (pnpm, workspace, yaml, globs) are already in `writeFileSync(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Silent fallback default in catch site/src/app/schema/page.tsx:39β `readEntries` swallows every exception into `return []` β a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch tests/cross-runtime/run.mjs:942β `capture` 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.
No ADRs found crates/nub-phantom-scan/src/bin/scan-verdicts.rs:1β No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these β unnumbered files outside any recognised directory, without those headings β is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `crates/nub-phantom-scan/src/bin/scan-verdicts.rs` makes this repository a deployable product (line 1).
D26 Β· Project CohesionΒ· Projects may be oversized for their cohesion Β· Γ1
Projects may be oversized for their cohesion β 3 of 16 project(s) overshoot their size bounds, lowering Project Cohesion to 6.3/10. The most over is `crates/nub-cli` (81868 LoC, 146 module-visible types across 4 directories). 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.
No ADRs β No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 Β· ObservabilityΒ· Logging is not universal Β· Γ1
Logging is not universal β Only 2/9 runnable modules use logging (modules with no entry point or server are excluded β they are libraries a runnable module hosts). Silent: `.`, `crates/nub-alias`, `crates/nub-launcher`, `crates/nub-phantom`, `crates/nub-phantom-scan` and 2 more.
P4 Β· Deployment & RollbackΒ· No rollback/health safety Β· Γ1
No rollback/health safety β Deployment automation exists but no readiness/liveness probes, rolling-update strategy, lifecycle hooks or migration job were evidenced β a bad release is harder to detect and reverse.
No changelog β No CHANGELOG/HISTORY/RELEASES file β what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Unused export 'isDay' scripts/lib/download-stats.mjs:15β Nothing imports this binding β it is safe to review for removal.
R7 Β· Dead CodeΒ· Unused module-local declaration 'TOOLS' Β· Γ1
Unused module-local declaration 'TOOLS' tests/conformance/registry/main.mjs:7β This top-level declaration is not exported and its name occurs nowhere else in its module β not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
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 1/4 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.
X5 Β· Nullable reference typesΒ· Strict null checking is not enabled everywhere the repository type-checks Β· Γ1
Strict null checking is not enabled everywhere the repository type-checks β 8/24 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) override strict null checking β ~0.3 `!` null assertions per 1k TypeScript source lines β 2 assertion(s) across the 7969 source line(s) of the 63 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: site/src/components/code.tsx (1), site/src/lib/ansi-screen.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Subsumed condition operand crates/nub-cli/tests/abort_eagerly.rs:177β `flat.contains("exotic")` can never decide this `&&` β every value satisfying `flat.contains("foo@exotic:bar")` also satisfies `flat.contains("exotic")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Outdated: blake3 β `blake3` is locked at 1.8.5 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-cache-key/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
Outdated: camino β `camino` is locked at 1.2.2 but 1.2.6 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-core/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p camino` and commit the updated REDACTED.
Outdated: clx β `clx` is locked at 3.0.2 but 3.0.5 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p clx` and commit the updated REDACTED.
Outdated: console β `console` is locked at 0.16.3 but 0.16.6 is the current stable release on crates.io, and it already satisfies the `"0.16"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p console` and commit the updated REDACTED.
Outdated: demand β `demand` is locked at 2.0.2 but 2.4.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p demand` and commit the updated REDACTED.
Outdated: flate2 β `flate2` is locked at 1.1.9 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-core/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: libc β `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: liblzma β `liblzma` is locked at 0.4.6 but 0.4.9 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/nub-core/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p liblzma` and commit the updated REDACTED.
Outdated: reqwest β `reqwest` is locked at 0.13.4 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13"` requirement declared in crates/nub-core/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p reqwest` and commit the updated REDACTED.
Outdated: serde β `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
Outdated: serde_json β `serde_json` is locked at 1.0.150 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: sha2 β `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
Outdated: thiserror β `thiserror` is locked at 2.0.18 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/nub-core/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
Outdated: tokio β `tokio` is locked at 1.52.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: toml β `toml` is locked at 1.1.2+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
Outdated: unicode-normalization β `unicode-normalization` is locked at 0.1.25 but 0.1.26 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/nub-cli/Cargo.toml β so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-normalization` and commit the updated REDACTED.
Skipped (documented): the repo Dockerfile prebake (when present) matches the tracked pins scripts/soak/external-tools.test.mts:134β Skipped with a documented reason β a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): installTool resolves the sfw flavor from SOCKET_SECURITY_KEY scripts/soak/external-tools.test.mts:342β Skipped with a documented reason β a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): writeShims never clobbers a rack binary and embeds its path scripts/soak/rack.test.mts:54β Skipped with a documented reason β a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): writeShims is idempotent: a re-run keeps the rack pin embedded scripts/soak/rack.test.mts:71β Skipped with a documented reason β a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
doc comments repeat the names tests/worker-wpt/wpt/resources/testharness.js:1583β 2 of 141 documented parameters and 1 of 117 summaries in `nub` only repeat the member or parameter name (e.g. "Expected value." for `expected`). Delete the restating tags, or add what the name does not say.
Appendix B β Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension β the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative β never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json β kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable β No personal data was found crossing a boundary the PII/GDPR ruleset checks β nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) β `npm/nub-types/common.d.ts` β so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1dbe4-6db9-7bbc-b644-0ee85b5d3e9b Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 55 Β· Warnings: 760 Β· Recommendations: 79 Β· Info: 21 β Appendix A Β· all findings Β· full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 21:09 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric β drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.