Public report of moonrepo/moon, 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:59 UTC · Survey ID cd_d9d4d0e13bab462ea40f981ec4abe1ff
moonrepo/moon
Measured 14 November 2026, 21:46 UTC, at code version 4858317
CAI scoreAt riskUp 1 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 medium codebase: 70,173 lines of product code in 94 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Security and Compliance, 27
Findings by how serious they are
142 critical509 serious92 minor
13 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:46 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 ▸
63of 63 dimensions measured by tools.
680of 743 findings point to an exact file and line, so you can open each one in the code. The other 63 concern the repository as a whole, such as missing documentation.
63dimensions across 8 lenses, read from 70,173 lines of product code in 94 projects.
moonrepo/moon is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back because we found no access checks on the code's endpoints or handlers and two of the dependencies have a known vulnerability. It scores 43 out of 100, which the At risk rating leaves unchanged.
Security and Compliance, at 27, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 13 points. Replacing the weak hashes comes next, worth about 7 points. Raising Security and Compliance to 70 would lift the score to about 57.
Seventy pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Forty-three known security holes in the packages the code depends on can be used by attackers, and ten secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. Correcting the flagged pipeline settings would fix the six weaknesses in the build pipeline's configuration, and the five pipeline steps that run downloads without checking them need each download checked against a known checksum first. The two inner parts of the code that depend on an outer part need turning around so they point inward.
The product code is 70,173 lines, about €110,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 Security and Compliance rose from 27 to 70, the lowest score rated Strong, the score would rise from 43 to about 57.
Code composition: what the lines of code are
Product code 55%Tests 45%
New since the last survey: 118 findings
These 118 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.
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: 31 findings
These 31 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one.
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [CVE redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · High CVE: REDACTED REDACTED
Dependency Vulnerabilities · Medium CVE: RUSTSEC-2026-0222 REDACTED
Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0367 REDACTED
Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €110,000 · Estimate
Cost to rebuild
€37,000 to €180,000, for 610 to 1,934 hours of work, about 0.8 person-years for 1 to 2 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 43. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 70,173 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
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 13 points · Medium effort · Access Controls
2
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `crates/api/src/launchpad.rs:58` (`md5::compute`), `crates/daemon-utils/src/endpoint.rs:21` (`md5::compute`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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 €110,000 to build again, about 0.8 person-years of work. Its weakest lens is Security and Compliance, at 27 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 13 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 27,444 lines over the last 90 days, which is about 111,301 lines a year. At that pace, the extra work comes to an estimated 7.2 to 43 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.
455 modules, with 690 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 415 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.
moon_action.action uses moon_action.action_node, so a change to moon_action.action_node can break moon_action.action, while a change to moon_action.action can't break moon_action.action_node.
Position
Below the diagonal: moon_action.action uses a module listed above it, which is the healthy direction.
moon_action_context uses moon_affected.affected, so a change to moon_affected.affected can break moon_action_context, while a change to moon_action_context can't break moon_affected.affected.
Position
Below the diagonal: moon_action_context uses a module listed above it, which is the healthy direction.
moon_blob.blob uses moon_hash.digest, so a change to moon_hash.digest can break moon_blob.blob, while a change to moon_blob.blob can't break moon_hash.digest.
Position
Below the diagonal: moon_blob.blob uses a module listed above it, which is the healthy direction.
moon_graph_utils.graph_context uses moon_config.extensions_config, so a change to moon_config.extensions_config can break moon_graph_utils.graph_context, while a change to moon_graph_utils.graph_context can't break moon_config.extensions_config.
Position
Below the diagonal: moon_graph_utils.graph_context uses a module listed above it, which is the healthy direction.
moon_graph_utils.graph_context uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_graph_utils.graph_context, while a change to moon_graph_utils.graph_context can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_graph_utils.graph_context uses a module listed above it, which is the healthy direction.
moon_task.task uses moon_config.task_config, so a change to moon_config.task_config can break moon_task.task, while a change to moon_task.task can't break moon_config.task_config.
Position
Below the diagonal: moon_task.task uses a module listed above it, which is the healthy direction.
moon_toolchain_plugin.toolchain_registry uses moon_config.project_config, so a change to moon_config.project_config can break moon_toolchain_plugin.toolchain_registry, while a change to moon_toolchain_plugin.toolchain_registry can't break moon_config.project_config.
Position
Below the diagonal: moon_toolchain_plugin.toolchain_registry uses a module listed above it, which is the healthy direction.
moon_toolchain_plugin.toolchain_registry uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_toolchain_plugin.toolchain_registry, while a change to moon_toolchain_plugin.toolchain_registry can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_toolchain_plugin.toolchain_registry uses a module listed above it, which is the healthy direction.
moon_action.operation uses moon_action.action, so a change to moon_action.action can break moon_action.operation, while a change to moon_action.operation can't break moon_action.action.
Position
Below the diagonal: moon_action.operation uses a module listed above it, which is the healthy direction.
moon_manifest.task_manifest uses moon_hash.digest, so a change to moon_hash.digest can break moon_manifest.task_manifest, while a change to moon_manifest.task_manifest can't break moon_hash.digest.
Position
Below the diagonal: moon_manifest.task_manifest uses a module listed above it, which is the healthy direction.
moon_manifest.task_manifest uses moon_blob.blob, so a change to moon_blob.blob can break moon_manifest.task_manifest, while a change to moon_manifest.task_manifest can't break moon_blob.blob.
Position
Below the diagonal: moon_manifest.task_manifest uses a module listed above it, which is the healthy direction.
moon_project.project uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_project.project, while a change to moon_project.project can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_project.project uses a module listed above it, which is the healthy direction.
moon_project.project uses moon_config.project_config, so a change to moon_config.project_config can break moon_project.project, while a change to moon_project.project can't break moon_config.project_config.
Position
Below the diagonal: moon_project.project uses a module listed above it, which is the healthy direction.
moon_project.project uses moon_task.task, so a change to moon_task.task can break moon_project.project, while a change to moon_project.project can't break moon_task.task.
Position
Below the diagonal: moon_project.project uses a module listed above it, which is the healthy direction.
moon_task_builder.tasks_builder uses moon_config.project_config, so a change to moon_config.project_config can break moon_task_builder.tasks_builder, while a change to moon_task_builder.tasks_builder can't break moon_config.project_config.
Position
Below the diagonal: moon_task_builder.tasks_builder uses a module listed above it, which is the healthy direction.
moon_task_builder.tasks_builder uses moon_config.task_config, so a change to moon_config.task_config can break moon_task_builder.tasks_builder, while a change to moon_task_builder.tasks_builder can't break moon_config.task_config.
Position
Below the diagonal: moon_task_builder.tasks_builder uses a module listed above it, which is the healthy direction.
moon_task_builder.tasks_builder uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_task_builder.tasks_builder, while a change to moon_task_builder.tasks_builder can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_task_builder.tasks_builder uses a module listed above it, which is the healthy direction.
moon_task_builder.tasks_builder uses moon_task.task, so a change to moon_task.task can break moon_task_builder.tasks_builder, while a change to moon_task_builder.tasks_builder can't break moon_task.task.
Position
Below the diagonal: moon_task_builder.tasks_builder uses a module listed above it, which is the healthy direction.
moon_task_builder.tasks_builder uses moon_toolchain_plugin.toolchain_registry, so a change to moon_toolchain_plugin.toolchain_registry can break moon_task_builder.tasks_builder, while a change to moon_task_builder.tasks_builder can't break moon_toolchain_plugin.toolchain_registry.
Position
Below the diagonal: moon_task_builder.tasks_builder uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage uses moon_hash.digest, so a change to moon_hash.digest can break moon_cache_storage.storage, while a change to moon_cache_storage.storage can't break moon_hash.digest.
Position
Below the diagonal: moon_cache_storage.storage uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage uses moon_blob.blob, so a change to moon_blob.blob can break moon_cache_storage.storage, while a change to moon_cache_storage.storage can't break moon_blob.blob.
Position
Below the diagonal: moon_cache_storage.storage uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage uses moon_manifest.task_manifest, so a change to moon_manifest.task_manifest can break moon_cache_storage.storage, while a change to moon_cache_storage.storage can't break moon_manifest.task_manifest.
Position
Below the diagonal: moon_cache_storage.storage uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage_backend uses moon_hash.digest, so a change to moon_hash.digest can break moon_cache_storage.storage_backend, while a change to moon_cache_storage.storage_backend can't break moon_hash.digest.
Position
Below the diagonal: moon_cache_storage.storage_backend uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage_backend uses moon_blob.blob, so a change to moon_blob.blob can break moon_cache_storage.storage_backend, while a change to moon_cache_storage.storage_backend can't break moon_blob.blob.
Position
Below the diagonal: moon_cache_storage.storage_backend uses a module listed above it, which is the healthy direction.
moon_cache_storage.storage_backend uses moon_manifest.task_manifest, so a change to moon_manifest.task_manifest can break moon_cache_storage.storage_backend, while a change to moon_cache_storage.storage_backend can't break moon_manifest.task_manifest.
Position
Below the diagonal: moon_cache_storage.storage_backend uses a module listed above it, which is the healthy direction.
moon_console.reporter uses moon_action.action, so a change to moon_action.action can break moon_console.reporter, while a change to moon_console.reporter can't break moon_action.action.
Position
Below the diagonal: moon_console.reporter uses a module listed above it, which is the healthy direction.
moon_console.reporter uses moon_action.operation, so a change to moon_action.operation can break moon_console.reporter, while a change to moon_console.reporter can't break moon_action.operation.
Position
Below the diagonal: moon_console.reporter uses a module listed above it, which is the healthy direction.
moon_daemon_client.daemon_client uses moon_hash.digest, so a change to moon_hash.digest can break moon_daemon_client.daemon_client, while a change to moon_daemon_client.daemon_client can't break moon_hash.digest.
Position
Below the diagonal: moon_daemon_client.daemon_client uses a module listed above it, which is the healthy direction.
moon_daemon_client.daemon_client uses moon_manifest.task_manifest, so a change to moon_manifest.task_manifest can break moon_daemon_client.daemon_client, while a change to moon_daemon_client.daemon_client can't break moon_manifest.task_manifest.
Position
Below the diagonal: moon_daemon_client.daemon_client uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_config.project_config, so a change to moon_config.project_config can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_config.project_config.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_config.task_config, so a change to moon_config.task_config can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_config.task_config.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_toolchain_plugin.toolchain_registry, so a change to moon_toolchain_plugin.toolchain_registry can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_toolchain_plugin.toolchain_registry.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_builder.project_builder uses moon_project.project, so a change to moon_project.project can break moon_project_builder.project_builder, while a change to moon_project_builder.project_builder can't break moon_project.project.
Position
Below the diagonal: moon_project_builder.project_builder uses a module listed above it, which is the healthy direction.
moon_project_graph.project_graph uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_project_graph.project_graph, while a change to moon_project_graph.project_graph can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_project_graph.project_graph uses a module listed above it, which is the healthy direction.
moon_project_graph.project_graph uses moon_graph_utils.graph_context, so a change to moon_graph_utils.graph_context can break moon_project_graph.project_graph, while a change to moon_project_graph.project_graph can't break moon_graph_utils.graph_context.
Position
Below the diagonal: moon_project_graph.project_graph uses a module listed above it, which is the healthy direction.
moon_project_graph.project_graph uses moon_project.project, so a change to moon_project.project can break moon_project_graph.project_graph, while a change to moon_project_graph.project_graph can't break moon_project.project.
Position
Below the diagonal: moon_project_graph.project_graph uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_config.extensions_config, so a change to moon_config.extensions_config can break moon_token.contexts, while a change to moon_token.contexts can't break moon_config.extensions_config.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_token.contexts, while a change to moon_token.contexts can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_config.project_config, so a change to moon_config.project_config can break moon_token.contexts, while a change to moon_token.contexts can't break moon_config.project_config.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_config.task_config, so a change to moon_config.task_config can break moon_token.contexts, while a change to moon_token.contexts can't break moon_config.task_config.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_token.contexts, while a change to moon_token.contexts can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_graph_utils.graph_context, so a change to moon_graph_utils.graph_context can break moon_token.contexts, while a change to moon_token.contexts can't break moon_graph_utils.graph_context.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_task.task, so a change to moon_task.task can break moon_token.contexts, while a change to moon_token.contexts can't break moon_task.task.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_token.contexts uses moon_project.project, so a change to moon_project.project can break moon_token.contexts, while a change to moon_token.contexts can't break moon_project.project.
Position
Below the diagonal: moon_token.contexts uses a module listed above it, which is the healthy direction.
moon_cache.cache_engine uses moon_cache_storage.storage, so a change to moon_cache_storage.storage can break moon_cache.cache_engine, while a change to moon_cache.cache_engine can't break moon_cache_storage.storage.
Position
Below the diagonal: moon_cache.cache_engine uses a module listed above it, which is the healthy direction.
moon_cache_remote.grpc_remote_storage uses moon_hash.digest, so a change to moon_hash.digest can break moon_cache_remote.grpc_remote_storage, while a change to moon_cache_remote.grpc_remote_storage can't break moon_hash.digest.
Position
Below the diagonal: moon_cache_remote.grpc_remote_storage uses a module listed above it, which is the healthy direction.
moon_cache_remote.grpc_remote_storage uses moon_blob.blob, so a change to moon_blob.blob can break moon_cache_remote.grpc_remote_storage, while a change to moon_cache_remote.grpc_remote_storage can't break moon_blob.blob.
Position
Below the diagonal: moon_cache_remote.grpc_remote_storage uses a module listed above it, which is the healthy direction.
moon_cache_remote.grpc_remote_storage uses moon_manifest.task_manifest, so a change to moon_manifest.task_manifest can break moon_cache_remote.grpc_remote_storage, while a change to moon_cache_remote.grpc_remote_storage can't break moon_manifest.task_manifest.
Position
Below the diagonal: moon_cache_remote.grpc_remote_storage uses a module listed above it, which is the healthy direction.
moon_cache_remote.grpc_remote_storage uses moon_cache_storage.storage, so a change to moon_cache_storage.storage can break moon_cache_remote.grpc_remote_storage, while a change to moon_cache_remote.grpc_remote_storage can't break moon_cache_storage.storage.
Position
Below the diagonal: moon_cache_remote.grpc_remote_storage uses a module listed above it, which is the healthy direction.
moon_cache_remote.grpc_remote_storage uses moon_cache_storage.storage_backend, so a change to moon_cache_storage.storage_backend can break moon_cache_remote.grpc_remote_storage, while a change to moon_cache_remote.grpc_remote_storage can't break moon_cache_storage.storage_backend.
Position
Below the diagonal: moon_cache_remote.grpc_remote_storage uses a module listed above it, which is the healthy direction.
moon_workspace_graph uses moon_task.task, so a change to moon_task.task can break moon_workspace_graph, while a change to moon_workspace_graph can't break moon_task.task.
Position
Below the diagonal: moon_workspace_graph uses a module listed above it, which is the healthy direction.
moon_workspace_graph uses moon_project.project, so a change to moon_project.project can break moon_workspace_graph, while a change to moon_workspace_graph can't break moon_project.project.
Position
Below the diagonal: moon_workspace_graph uses a module listed above it, which is the healthy direction.
moon_workspace_graph uses moon_project_graph.project_graph, so a change to moon_project_graph.project_graph can break moon_workspace_graph, while a change to moon_workspace_graph can't break moon_project_graph.project_graph.
Position
Below the diagonal: moon_workspace_graph uses a module listed above it, which is the healthy direction.
moon_action_pipeline.job_context uses moon_action_pipeline.event_emitter, so a change to moon_action_pipeline.event_emitter can break moon_action_pipeline.job_context, while a change to moon_action_pipeline.job_context can't break moon_action_pipeline.event_emitter.
Position
Below the diagonal: moon_action_pipeline.job_context uses a module listed above it, which is the healthy direction.
moon_action_pipeline.job_context uses moon_action.action, so a change to moon_action.action can break moon_action_pipeline.job_context, while a change to moon_action_pipeline.job_context can't break moon_action.action.
Position
Below the diagonal: moon_action_pipeline.job_context uses a module listed above it, which is the healthy direction.
moon_action_pipeline.job_context uses moon_daemon_client.daemon_client, so a change to moon_daemon_client.daemon_client can break moon_action_pipeline.job_context, while a change to moon_action_pipeline.job_context can't break moon_daemon_client.daemon_client.
Position
Below the diagonal: moon_action_pipeline.job_context uses a module listed above it, which is the healthy direction.
moon_action_pipeline.job_context uses moon_workspace_graph, so a change to moon_workspace_graph can break moon_action_pipeline.job_context, while a change to moon_action_pipeline.job_context can't break moon_workspace_graph.
Position
Below the diagonal: moon_action_pipeline.job_context uses a module listed above it, which is the healthy direction.
moon_app_context.app_context uses moon_config.extensions_config, so a change to moon_config.extensions_config can break moon_app_context.app_context, while a change to moon_app_context.app_context can't break moon_config.extensions_config.
Position
Below the diagonal: moon_app_context.app_context uses a module listed above it, which is the healthy direction.
moon_app_context.app_context uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_app_context.app_context, while a change to moon_app_context.app_context can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_app_context.app_context uses a module listed above it, which is the healthy direction.
moon_app_context.app_context uses moon_toolchain_plugin.toolchain_registry, so a change to moon_toolchain_plugin.toolchain_registry can break moon_app_context.app_context, while a change to moon_app_context.app_context can't break moon_toolchain_plugin.toolchain_registry.
Position
Below the diagonal: moon_app_context.app_context uses a module listed above it, which is the healthy direction.
moon_app_context.app_context uses moon_cache.cache_engine, so a change to moon_cache.cache_engine can break moon_app_context.app_context, while a change to moon_app_context.app_context can't break moon_cache.cache_engine.
Position
Below the diagonal: moon_app_context.app_context uses a module listed above it, which is the healthy direction.
moon_workspace.workspace_builder uses moon_config.extensions_config, so a change to moon_config.extensions_config can break moon_workspace.workspace_builder, while a change to moon_workspace.workspace_builder can't break moon_config.extensions_config.
Position
Below the diagonal: moon_workspace.workspace_builder uses a module listed above it, which is the healthy direction.
moon_workspace.workspace_builder uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_workspace.workspace_builder, while a change to moon_workspace.workspace_builder can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_workspace.workspace_builder uses a module listed above it, which is the healthy direction.
moon_workspace.workspace_builder uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_workspace.workspace_builder, while a change to moon_workspace.workspace_builder can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_workspace.workspace_builder uses a module listed above it, which is the healthy direction.
moon_workspace.workspace_builder uses moon_toolchain_plugin.toolchain_registry, so a change to moon_toolchain_plugin.toolchain_registry can break moon_workspace.workspace_builder, while a change to moon_workspace.workspace_builder can't break moon_toolchain_plugin.toolchain_registry.
Position
Below the diagonal: moon_workspace.workspace_builder uses a module listed above it, which is the healthy direction.
moon_workspace.workspace_builder uses moon_cache.cache_engine, so a change to moon_cache.cache_engine can break moon_workspace.workspace_builder, while a change to moon_workspace.workspace_builder can't break moon_cache.cache_engine.
Position
Below the diagonal: moon_workspace.workspace_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_action.action_node, so a change to moon_action.action_node can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_action.action_node.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_affected.affected, so a change to moon_affected.affected can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_affected.affected.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_config.task_config, so a change to moon_config.task_config can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_config.task_config.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_task.task, so a change to moon_task.task can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_task.task.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_project.project, so a change to moon_project.project can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_project.project.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_workspace_graph, so a change to moon_workspace_graph can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_workspace_graph.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_graph.action_graph_builder uses moon_app_context.app_context, so a change to moon_app_context.app_context can break moon_action_graph.action_graph_builder, while a change to moon_action_graph.action_graph_builder can't break moon_app_context.app_context.
Position
Below the diagonal: moon_action_graph.action_graph_builder uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_action.action_node, so a change to moon_action.action_node can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_action.action_node.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_action_pipeline.event_emitter, so a change to moon_action_pipeline.event_emitter can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_action_pipeline.event_emitter.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_action.action, so a change to moon_action.action can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_action.action.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_action_context, so a change to moon_action_context can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_action_context.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_console.reporter, so a change to moon_console.reporter can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_console.reporter.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_daemon_client.daemon_client, so a change to moon_daemon_client.daemon_client can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_daemon_client.daemon_client.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_workspace_graph, so a change to moon_workspace_graph can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_workspace_graph.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_action_pipeline.job_context, so a change to moon_action_pipeline.job_context can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_action_pipeline.job_context.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_action_pipeline.action_pipeline uses moon_app_context.app_context, so a change to moon_app_context.app_context can break moon_action_pipeline.action_pipeline, while a change to moon_action_pipeline.action_pipeline can't break moon_app_context.app_context.
Position
Below the diagonal: moon_action_pipeline.action_pipeline uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_action.action_node, so a change to moon_action.action_node can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_action.action_node.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_toolchain_plugin.toolchain_plugin, so a change to moon_toolchain_plugin.toolchain_plugin can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_toolchain_plugin.toolchain_plugin.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_action.action, so a change to moon_action.action can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_action.action.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_action_context, so a change to moon_action_context can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_action_context.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_project.project, so a change to moon_project.project can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_project.project.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_workspace_graph, so a change to moon_workspace_graph can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_workspace_graph.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_actions.actions.install_dependencies uses moon_app_context.app_context, so a change to moon_app_context.app_context can break moon_actions.actions.install_dependencies, while a change to moon_actions.actions.install_dependencies can't break moon_app_context.app_context.
Position
Below the diagonal: moon_actions.actions.install_dependencies uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_action.action_node, so a change to moon_action.action_node can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_action.action_node.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_config.project.dep_config, so a change to moon_config.project.dep_config can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_config.project.dep_config.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_config.project_config, so a change to moon_config.project_config can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_config.project_config.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_config.task_config, so a change to moon_config.task_config can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_config.task_config.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_toolchain_plugin.toolchain_plugin, so a change to moon_toolchain_plugin.toolchain_plugin can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_toolchain_plugin.toolchain_plugin.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_action_context, so a change to moon_action_context can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_action_context.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_task.task, so a change to moon_task.task can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_task.task.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_project.project, so a change to moon_project.project can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_project.project.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_hasher.task_hashing uses moon_app_context.app_context, so a change to moon_app_context.app_context can break moon_task_hasher.task_hashing, while a change to moon_task_hasher.task_hashing can't break moon_app_context.app_context.
Position
Below the diagonal: moon_task_hasher.task_hashing uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_action.action_node, so a change to moon_action.action_node can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_action.action_node.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_action_context, so a change to moon_action_context can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_action_context.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_task.task, so a change to moon_task.task can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_task.task.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_action.operation, so a change to moon_action.operation can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_action.operation.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_project.project, so a change to moon_project.project can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_project.project.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_console.reporter, so a change to moon_console.reporter can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_console.reporter.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_daemon_client.daemon_client, so a change to moon_daemon_client.daemon_client can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_daemon_client.daemon_client.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_task_runner.task_runner uses moon_app_context.app_context, so a change to moon_app_context.app_context can break moon_task_runner.task_runner, while a change to moon_task_runner.task_runner can't break moon_app_context.app_context.
Position
Below the diagonal: moon_task_runner.task_runner uses a module listed above it, which is the healthy direction.
moon_app.session uses moon_config.extensions_config, so a change to moon_config.extensions_config can break moon_app.session, while a change to moon_app.session can't break moon_config.extensions_config.
Position
Below the diagonal: moon_app.session uses a module listed above it, which is the healthy direction.
moon_app.session uses moon_config.toolchains_config, so a change to moon_config.toolchains_config can break moon_app.session, while a change to moon_app.session can't break moon_config.toolchains_config.
Position
Below the diagonal: moon_app.session uses a module listed above it, which is the healthy direction.
moon_app.session uses moon_action_graph.action_graph_builder, so a change to moon_action_graph.action_graph_builder can break moon_app.session, while a change to moon_app.session can't break moon_action_graph.action_graph_builder.
Position
Below the diagonal: moon_app.session uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 50% · Adequate · gated by X5 ·
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
108
High / Critical
A05:2025 — Injection
96
High / Critical
A02:2025 — Security Misconfiguration
6
High / Critical
Roadmap
Top priorities: Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `crates/api/src/launchpad.rs:58` (`md5::compute`), `crates/daemon-utils/src/endpoint.rs:21` (`md5::compute`). Each is a separate decision — fixing only the line this row cites leaves the others in place; Resolve the 34 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (34).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `crates/api/src/launchpad.rs:58` (`md5::compute`), `crates/daemon-utils/src/endpoint.rs:21` (`md5::compute`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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 — 142
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 — 509
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 — 92
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
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 63 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 — 63 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, 680 of 743 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a coverage step in CI (`codecov/codecov-action`) shows coverage is measured in your own CI.
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 22 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 131 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 source is present (.ts, .rs) and this repository declares a Cargo test suite (repository root, 148 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
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 (99 contributor(s) across 2337 commit(s) sampled, automation and bot accounts excluded). One of them holds 94% of the history; the other 98 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.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
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. `website/docusaurus.config.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
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 (start). the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / 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 Go, Python, 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 Go, Python, 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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.
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.
X24 Document value interpolated into markup unescaped — 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.
X4 Structured logging — 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. 103 further occurrence(s) are not listed individually; the score already reflects all 143.
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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
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.
31 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TasksBuilder::build_task at 60. A further 3 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 TokenExpander::replace_variable at 33 — 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/config-loader/src/toolchains_config_ext.rs (ToolchainsConfigExt::get_plugin_locator at 18), crates/action-pipeline/src/event_emitter.rs (Event::get_type 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.
+ 14 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with TasksBuilder::build_task (cyclomatic 60), moon_cli::shared::run_cli (cyclomatic 57), TasksBuilder::build_task_options (cyclomatic 40). — 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 5 together lifts Cyclomatic Complexity from 6.5 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 44 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with TasksBuilder::build_task (cognitive 90), TasksBuilder::parse_command_line (cognitive 77), moon_app::commands::generate::gather_variables (cognitive 65). — 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 4.9 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 15 FunctionTooLong finding(s) in God Classes — start with generate.rs (3), task.rs, project.rs. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 10 ClassTooLong finding(s) in God Classes — start with action_graph_builder.rs, tasks_builder.rs, workspace_builder.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 FileTooLong finding(s) in God Classes — start with action_graph_builder.rs, tasks_builder.rs, workspace_builder.rs. — One of this dimension's main actionable groups (9 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.
90 duplicated block group(s) detected. 7.4 % of the production lines (5,176 of 70,173) are in a reported copy. A further 83 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 11 of the 173 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
Edited copy of a member (32 corresponding lines) · ×6crates/affected/src/affected_tracker.rs:549
+ 76 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with affected_tracker.rs (3), extension_wrapper.rs (2), generate.rs. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 10 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with projects_builder.rs (2), file.rs, info.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with affected_tracker.rs, add.rs, projects.rs. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.1 / 10Strong✓ 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.
94 production modules (Cargo+npm+Python), 0 dependency cycle(s), 18 unstable depended-on module(s). Read from the build's own module declarations; 12 module(s) off the main sequence, with abstractness counted on 66 of the 94 (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: moon_daemon_utils · ×12
Unstable project moon_action_graph
Unstable project moon_action_pipeline
Unstable project moon_actions
Unstable project moon_cache_local
+ 14 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 1 Unstable project moon_action_graph finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project moon_action_pipeline finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with toolchain_registry.rs, extension_registry.rs, session.rs. — One of this dimension's main actionable groups (5 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 Quality10.0 / 10Exemplary✓ 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.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 22 tests. Measured on the JavaScript/TypeScript suite only — at least 131 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
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.
14 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: async-compression · ×14
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 973 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares 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.
Top hotspots: crates/task-builder/src/tasks_builder.rs (4×60=240); crates/action-pipeline/src/action_pipeline.rs (7×22=154); crates/task-runner/src/task_runner.rs (8×17=136) Repeated repair below the complexity floor: crates/toolchain-plugin/src/toolchain_plugin.rs (4 of 6 changes were fixes); crates/config-loader/src/toolchains_config_ext.rs (3 of 5 changes were fixes); crates/daemon-server/src/daemon_server.rs (3 of 4 changes were fixes)
Resolve the 6 Hotspot finding(s) in Churn × Complexity Hotspots — start with tasks_builder.rs, action_pipeline.rs, task_runner.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with toolchain_plugin.rs, toolchains_config_ext.rs, daemon_server.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
9 deducted task-comment markers across 70173 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 9 TodoComment finding(s) in Explicit Debt — start with projects_builder.rs (2), tasks_builder.rs (2), funcs.rs. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F2 example. 246 document(s) read across 14 unit(s).
Documentation: no build, run or usage example · ×10packages/core-linux-arm64-gnu/README.md:1
What to do
Resolve the 10 Documentation finding(s) in Documentation Quality — start with README.md (10). — One of this dimension's main actionable groups (10 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with input.go. — 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.
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).
96 finding(s): 0 critical, 95 high, 1 medium, 0 low. 70 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 3 file(s) — `website/docusaurus.config.ts` (line 58, line 217), `REDACTED` (lines 7–76), `REDACTED` (lines 7–105) — 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 2 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
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
No action in Static Analysis (SAST) — all 70 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (70 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 34 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (34). — One of this dimension's main actionable groups (34 issue-level).
Resolve the 7 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (7 issue-level).
Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — 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 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 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.
2 of 245 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/graph-utils/src/lib.rs. Counted over 245 of the 483 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×2crates/graph-utils/src/lib.rs:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 3 Change coupling finding(s) in Change Coupling — start with check.rs, command_builder.rs, output_archiver.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 0 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.
AC2 · Forms & labels1.0 / 10Critical✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — packages/visualizer/src/app.tsx:42
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
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.
`moon_app` is a Application project but references `moon_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
`moon_app` is a Application project but references `moon_pdk_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
This repository serves requests — a server (Server::builder()) (crates/daemon-server/src/daemon_server.rs:614) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — crates/daemon-server/src/daemon_server.rs:614
What to do
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability8.8 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 39/42 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/config-schema`, `packages/cli`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
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.
`reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — crates/api/src/launchpad.rs:214, crates/notifier/src/webhooks.rs:35
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) 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.
`fs.existsSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/vscode-extension/src/commands.ts:124, packages/vscode-extension/src/commands.ts:154
`fs.readFileSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/vscode-extension/src/commands.ts:124
`fs.mkdirSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/vscode-extension/src/commands.ts:155
`fs.writeFileSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/vscode-extension/src/commands.ts:158
`fs.existsSync` in `viewProject` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:470
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 Safety7.9 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
REDACTED:166 · REDACTED:249 — all 2 copies are in the same file, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited. — REDACTED:166
packages/vscode-extension/src/commands.ts:28 · packages/vscode-extension/src/commands.ts:61 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/vscode-extension/src/commands.ts:28
packages/vscode-extension/src/lastRunView.ts:21 · REDACTED:312 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/vscode-extension/src/lastRunView.ts:21
packages/vscode-extension/src/commands.ts:96 · packages/vscode-extension/src/commands.ts:108 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/vscode-extension/src/commands.ts:96
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.
constructor has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:178
getActionType has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/visualizer/src/helpers/render.ts:42
findRoot has cyclomatic complexity 13 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. — packages/vscode-extension/src/workspace.ts:98
findMoonBin has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/vscode-extension/src/workspace.ts:193
getActionLabel has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/visualizer/src/helpers/render.ts:11
canShowTask has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:61
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ 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.
Do you agree with this assessment?
R4 · Test Coverage1.5 / 10Critical✓ 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.
vite.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 2 unreached component module(s) can be tested as written, however the suite is authored: packages/visualizer/src/app.tsx, packages/visualizer/src/components/Graph.tsx. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each. — vite.config.ts:1
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×15) — REDACTED:1, packages/vscode-extension/src/workspace.ts:1, packages/visualizer/src/helpers/render.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each 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.
Do you agree with this assessment?
R7 · Dead Code9.5 / 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.
Unreachable from the 7 application, 8 tooling and 11 test entry point(s) detected in this repo. Gate removals on `yarn run build` — an undetected custom entry would make these reachable.
no import path from any entry point (7 application, 8 tooling, 11 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 (×5) — scenarios/signals/ctrlc.mjs, scenarios/signals/signals.mjs, scenarios/deno-signals/main.ts, …
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.
Declared in packages/vscode-extension/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.
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 HTTP itself (`Server::builder()` (crates/daemon-server/src/daemon_server.rs:614)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.
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. (×2) — crates/api/src/launchpad.rs:58, crates/daemon-utils/src/endpoint.rs:21
This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `Server::builder()` (crates/daemon-server/src/daemon_server.rs:614).
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `Server::builder()` (crates/daemon-server/src/daemon_server.rs:614).
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `crates/api/src/launchpad.rs:58` (`md5::compute`), `crates/daemon-utils/src/endpoint.rs:21` (`md5::compute`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether 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 0/1 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.
`loadToolsData` 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 })`. — website/src/data/proto-tools.tsx:35
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
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 42 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`. (×2) — crates/workspace-graph/src/query_projects.rs:42, crates/task-expander/src/task_expander.rs:42
`debug!` at line 57 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/workspace-graph/src/query_projects.rs:57
`debug!` at line 43 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/workspace-graph/src/query_tasks.rs:43
`debug!` at line 58 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/workspace-graph/src/query_tasks.rs:58
`debug!` at line 448 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/workspace/src/projects_builder.rs:448
`debug!` at line 724 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/workspace/src/projects_builder.rs:724
`debug!` at line 777 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/workspace/src/projects_builder.rs:777
`debug!` at line 834 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/workspace/src/projects_builder.rs:834
`debug!` at line 848 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/workspace/src/projects_builder.rs:848
`debug!` at line 860 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/workspace/src/projects_builder.rs:860
`debug!` at line 879 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/workspace/src/projects_builder.rs:879
`debug!` at line 909 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/workspace/src/projects_builder.rs:909
`warn!` at line 128 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/workspace/src/projects_locator.rs:128
`debug!` at line 214 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/workspace/src/workspace_builder.rs:214
`debug!` at line 232 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/workspace/src/workspace_builder.rs:232
`debug!` at line 527 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/workspace/src/workspace_builder.rs:527
`debug!` at line 957 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/workspace/src/workspace_builder.rs:957
`debug!` at line 982 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/workspace/src/workspace_builder.rs:982
`debug!` at line 1027 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/workspace/src/workspace_builder.rs:1027
`debug!` at line 1042 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/workspace/src/workspace_builder.rs:1042
`debug!` at line 1158 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/workspace/src/workspace_builder.rs:1158
`debug!` at line 1170 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/workspace/src/workspace_builder.rs:1170
`debug!` at line 1189 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/workspace/src/workspace_builder.rs:1189
`debug!` at line 104 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/workspace/src/workspace_builder_async.rs:104
`debug!` at line 123 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/workspace/src/workspace_builder_async.rs:123
`debug!` at line 65 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/vcs-hooks/src/hooks_generator.rs:65
`warn!` at line 127 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/vcs-hooks/src/hooks_generator.rs:127
`debug!` at line 132 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/vcs-hooks/src/hooks_generator.rs:132
`debug!` at line 147 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/vcs-hooks/src/hooks_generator.rs:147
`debug!` at line 219 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/vcs-hooks/src/hooks_generator.rs:219
`debug!` at line 227 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/vcs-hooks/src/hooks_generator.rs:227
`debug!` at line 332 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/vcs-hooks/src/hooks_generator.rs:332
`debug!` at line 338 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/vcs-hooks/src/hooks_generator.rs:338
`warn!` at line 334 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/task-runner/src/output_archiver.rs:334
`warn!` at line 230 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/task-runner/src/output_hydrater.rs:230
`debug!` at line 100 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/task-runner/src/task_executor.rs:100
`warn!` at line 257 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/task-hasher/src/task_hasher.rs:257
`debug!` at line 269 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/task-hasher/src/task_hasher.rs:269
`warn!` at line 278 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/task-hasher/src/task_hasher.rs:278
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.
0/9 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.
~1.0 `!` null assertions per 1k TypeScript source lines — 8 assertion(s) across the 8075 source line(s) of the 85 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: REDACTED (4), packages/visualizer/src/main.tsx (1), packages/vscode-extension/src/commands.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 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 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 — 4 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
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 — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X10 Duplicated predicate — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 62 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. 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 10% of this repository's production lines — rust (63,080 lines), go (23 lines), python (3 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 start`) exited before it served a page. Likely cause (the repository): package.json has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / 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.
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 included — the .rs suite was found but not re-run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 2 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
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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 — Rust suite
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 7 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Fold determinism — not applicable — the code was read and holds no event-replay fold, so there is nothing for this check to judge
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 — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a bun lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
X12 Unreachable branch — X12 reached only 10% of this repository's production lines — rust (63,080 lines), go (23 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 10% of this repository's production lines — rust (63,080 lines), go (23 lines), python (3 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 10% of this repository's production lines — rust (63,080 lines), go (23 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — 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 10% of this repository's production lines — rust (63,080 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Dependency-rule violation: moon_app (Application) → moon_api (Web) — `moon_app` is a Application project but references `moon_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dependency-rule violation: moon_app (Application) → moon_pdk_api (Web) — `moon_app` is a Application project but references `moon_pdk_api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
D30 · Dependency Vulnerabilities· High vulnerability · ×2
REDACTED
REDACTED
AC2 · Forms & labels· <select> without a programmatic label · ×1
<select> without a programmatic label packages/visualizer/src/app.tsx:42— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
FunctionTooLong: moon_app::commands::task::task crates/app/src/commands/task.rs:30— FunctionTooLong — moon_app::commands::task::task runs 246 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 146 over it, 2.46× 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: moon_app::commands::generate::gather_variables crates/app/src/commands/generate.rs:528— FunctionTooLong — moon_app::commands::generate::gather_variables runs 204 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 104 over it, 2.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: moon_app::commands::project::project crates/app/src/commands/project.rs:27— FunctionTooLong — moon_app::commands::project::project runs 197 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 97 over it, 1.97× 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: moon_app::commands::docker::file::file crates/app/src/commands/docker/file.rs:55— FunctionTooLong — moon_app::commands::docker::file::file runs 170 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 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_action_pipeline::action_runner::run_action crates/action-pipeline/src/action_runner.rs:12— FunctionTooLong — moon_action_pipeline::action_runner::run_action runs 169 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 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_app::commands::toolchain::info::info crates/app/src/commands/toolchain/info.rs:23— FunctionTooLong — moon_app::commands::toolchain::info::info runs 169 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 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_app::commands::generate::generate crates/app/src/commands/generate.rs:53— FunctionTooLong — moon_app::commands::generate::generate runs 156 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 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_actions::actions::install_dependencies::install_dependencies crates/actions/src/actions/install_dependencies.rs:38— FunctionTooLong — moon_actions::actions::install_dependencies::install_dependencies runs 141 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 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ContactForm.ContactForm website/src/theme/Footer/Layout/ContactForm.tsx:15— FunctionTooLong — ContactForm runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_cli::shared::run_cli crates/cli/src/shared.rs:168— FunctionTooLong — moon_cli::shared::run_cli runs 127 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 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.Home website/src/pages/index.tsx:10— FunctionTooLong — Home runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: moon_app::commands::generate::parse_args_into_variables crates/app/src/commands/generate.rs:326— FunctionTooLong — moon_app::commands::generate::parse_args_into_variables runs 120 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 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_app::commands::template::template crates/app/src/commands/template.rs:24— FunctionTooLong — moon_app::commands::template::template runs 120 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 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: moon_app_macros::with_affected_args crates/app-macros/src/lib.rs:168— FunctionTooLong — moon_app_macros::with_affected_args runs 110 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 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: LangGraph.LangGraph website/src/components/Docs/LangGraph.tsx:5— FunctionTooLong — LangGraph runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
R4 · Test Coverage· No test reaches this file · ×15
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/vscode-extension/src/workspace.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/visualizer/src/helpers/render.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/vscode-extension/src/commands.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/vscode-extension/src/lastRunView.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/vscode-extension/src/graphVisualizerView.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/vscode-extension/src/index.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/cli/utils.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 scenarios/signals/ctrlc.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 scenarios/signals/signals.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 scenarios/deno-signals/main.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/cli/moon.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/cli/moonx.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 scenarios/interactive/input.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 scenarios/signals/exitCode.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.
moon_app::commands::generate::gather_variables (cognitive 65) crates/app/src/commands/generate.rs:528— moon_app::commands::generate::gather_variables has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (40 pts), match/switch 5 (16 pts), boolean chains 8, loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::commands::generate::parse_args_into_variables (cognitive 60) crates/app/src/commands/generate.rs:326— moon_app::commands::generate::parse_args_into_variables has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 4 (10 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::commands::migrate::v2::migrate_project_config_files (cognitive 35) crates/app/src/commands/migrate/v2.rs:521— moon_app::commands::migrate::v2::migrate_project_config_files has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (9 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.
moon_app::commands::docker::file::file (cognitive 30) crates/app/src/commands/docker/file.rs:55— moon_app::commands::docker::file::file has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26 (30 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
moon_app::commands::generate::generate (cognitive 30) crates/app/src/commands/generate.rs:53— moon_app::commands::generate::generate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::queries::projects::load_with_regex (cognitive 30) crates/app/src/queries/projects.rs:38— moon_app::queries::projects::load_with_regex has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, 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.
moon_app::commands::hash::diff_hashes (cognitive 27) crates/app/src/commands/hash.rs:104— moon_app::commands::hash::diff_hashes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::queries::tasks::load_with_regex (cognitive 21) crates/app/src/queries/tasks.rs:40— moon_app::queries::tasks::load_with_regex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, 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.
moon_app::commands::migrate::v2::migrate_task_setting (cognitive 20) crates/app/src/commands/migrate/v2.rs:134— moon_app::commands::migrate::v2::migrate_task_setting has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::commands::migrate::v2::migrate_tasks_config_files (cognitive 19) crates/app/src/commands/migrate/v2.rs:233— moon_app::commands::migrate::v2::migrate_tasks_config_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::commands::upgrade::upgrade (cognitive 17) crates/app/src/commands/upgrade.rs:59— moon_app::commands::upgrade::upgrade has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::commands::migrate::v2::migrate_toolchain_config_file (cognitive 16) crates/app/src/commands/migrate/v2.rs:399— moon_app::commands::migrate::v2::migrate_toolchain_config_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::prompts::evaluate_prompts (cognitive 16) crates/app/src/prompts.rs:340— moon_app::prompts::evaluate_prompts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_app::systems::startup::find_workspace_root (cognitive 16) crates/app/src/systems/startup.rs:32— moon_app::systems::startup::find_workspace_root has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×14
Duplicated block (13 lines × 2) crates/affected/src/affected_tracker.rs:197— crates/affected/src/affected_tracker.rs:197-209 | crates/affected/src/project_tracker.rs:31-43 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/project_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:197` 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 (13 lines × 2) crates/affected/src/affected_tracker.rs:233— crates/affected/src/affected_tracker.rs:233-245 | crates/affected/src/project_tracker.rs:50-62 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/project_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/affected/src/affected_tracker.rs:550— crates/affected/src/affected_tracker.rs:550-562 | crates/affected/src/task_tracker.rs:96-108 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/task_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/app/src/commands/generate.rs:552— crates/app/src/commands/generate.rs:552-564 | crates/app/src/commands/generate.rs:656-668 — 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/app/src/commands/generate.rs:552` 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 lines × 2) crates/app/src/commands/projects.rs:20— crates/app/src/commands/projects.rs:20-32 | crates/app/src/commands/tasks.rs:46-58 — 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/app/src/commands/projects.rs:20` 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 lines × 2) crates/cache-remote/src/http_remote_storage.rs:315— crates/cache-remote/src/http_remote_storage.rs:315-327 | crates/cache-remote/src/http_remote_storage.rs:361-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/cache-remote/src/http_remote_storage.rs:315` 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/config/src/patterns.rs:49— crates/config/src/patterns.rs:49-61 | crates/config/src/patterns.rs:72-84 — 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. 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 (13 lines × 2) crates/config/src/shapes/input.rs:308— crates/config/src/shapes/input.rs:308-320 | crates/config/src/shapes/output.rs:102-114 — 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. 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 (13 lines × 2) crates/task-expander/src/token_expander.rs:474— crates/task-expander/src/token_expander.rs:474-486 | crates/task-expander/src/token_expander.rs:514-526 — 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/task-expander/src/token_expander.rs:474` 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 (13 lines × 2) crates/pdk/src/extension.rs:31— crates/pdk/src/extension.rs:31-43 | crates/pdk/src/toolchain.rs:33-45 — 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/pdk/src/extension.rs:31` 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 lines × 2) crates/pdk-test-utils/src/extension_wrapper.rs:81— crates/pdk-test-utils/src/extension_wrapper.rs:81-93 | crates/pdk-test-utils/src/toolchain_wrapper.rs:82-94 — before extracting anything, compare `crates/pdk-test-utils/src/extension_wrapper.rs` and `crates/pdk-test-utils/src/toolchain_wrapper.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/pdk-test-utils/src/extension_wrapper.rs:81` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/pdk-test-utils/src/toolchain_wrapper.rs:80` calls `to_virtual_path` and `crates/pdk-test-utils/src/extension_wrapper.rs:79` 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 (13 lines × 2) crates/pdk-test-utils/src/extension_wrapper.rs:101— crates/pdk-test-utils/src/extension_wrapper.rs:101-113 | crates/pdk-test-utils/src/toolchain_wrapper.rs:106-118 — before extracting anything, compare `crates/pdk-test-utils/src/extension_wrapper.rs` and `crates/pdk-test-utils/src/toolchain_wrapper.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/pdk-test-utils/src/extension_wrapper.rs:101` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/pdk-test-utils/src/toolchain_wrapper.rs:104` calls `to_virtual_path` and `crates/pdk-test-utils/src/extension_wrapper.rs:99` 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.
Off the main sequence: moon_daemon_utils — moon_daemon_utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: moon_feature_flags — moon_feature_flags: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: moon_env_var — moon_env_var: abstractness 0.00, instability 0.05, distance 0.95 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: moon_config — moon_config: abstractness 0.01, instability 0.04, distance 0.95 — zone of pain — concrete and depended on by 49 project(s), so it's rigid to change.
Off the main sequence: moon_env — moon_env: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: moon_pdk_api — moon_pdk_api: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
Off the main sequence: moon_project — moon_project: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
Off the main sequence: moon_task — moon_task: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: moon_cache_item — moon_cache_item: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: moon_blob — moon_blob: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: moon_toolchain — moon_toolchain: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: moon_config_loader — moon_config_loader: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
ClassTooLong: ActionGraphBuilder crates/action-graph/src/action_graph_builder.rs:145— ClassTooLong — 1150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 3 blocks, lines 145-2135. The bar is 400 significant lines; this is 750 over it, 2.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TasksBuilder crates/task-builder/src/tasks_builder.rs:97— ClassTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 2 blocks, lines 97-1347. The bar is 400 significant lines; this is 362 over it, 1.91× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WorkspaceBuilder crates/workspace/src/workspace_builder.rs:78— ClassTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 2 blocks, lines 78-1219. The bar is 400 significant lines; this is 253 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TaskRunner crates/task-runner/src/task_runner.rs:33— ClassTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 33-1112. The bar is 400 significant lines; this is 209 over it, 1.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TokenExpander crates/task-expander/src/token_expander.rs:57— ClassTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 2 blocks, lines 57-908. The bar is 400 significant lines; this is 173 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ToolchainPlugin crates/toolchain-plugin/src/toolchain_plugin.rs:34— ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 5 blocks, lines 34-811. The bar is 400 significant lines; this is 60 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Git crates/vcs/src/git/git_client.rs:44— ClassTooLong — 459 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 3 blocks, lines 44-855. The bar is 400 significant lines; this is 59 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GrpcRemoteStorage crates/cache-remote/src/grpc_remote_storage.rs:49— ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 5 blocks, lines 49-767. The bar is 400 significant lines; this is 38 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AffectedTracker crates/affected/src/affected_tracker.rs:18— ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 18-701. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WorkspaceProjectsBuilder crates/workspace/src/projects_builder.rs:213— ClassTooLong — 425 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 3 blocks, lines 213-933. The bar is 400 significant lines; this is 25 over it, 1.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×10
Duplicated block (14 lines × 2) crates/app/src/commands/docker/file.rs:165— crates/app/src/commands/docker/file.rs:165-178 | crates/app/src/commands/docker/file.rs:218-231 — 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/app/src/commands/docker/file.rs:165` 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 (14 lines × 2) crates/app/src/commands/extension/info.rs:119— crates/app/src/commands/extension/info.rs:119-132 | crates/app/src/commands/toolchain/info.rs:263-276 — 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 (14 lines × 2) crates/config-loader/src/config_loader.rs:157— crates/config-loader/src/config_loader.rs:157-170 | crates/config-loader/src/config_loader.rs:270-283 — 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/config-loader/src/config_loader.rs:157` 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 (14 lines × 2) crates/project-graph/src/project_graph.rs:372— crates/project-graph/src/project_graph.rs:372-385 | crates/task-graph/src/task_graph.rs:120-133 — 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/project-graph/src/project_graph.rs:372` 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/workspace/src/projects_builder.rs:548— crates/workspace/src/projects_builder.rs:548-561 | crates/workspace/src/workspace_builder.rs:766-779 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:548` 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 lines × 2) crates/workspace/src/projects_builder.rs:570— crates/workspace/src/projects_builder.rs:570-583 | crates/workspace/src/workspace_builder.rs:789-802 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) crates/app/src/commands/extension/download.rs:16— crates/app/src/commands/extension/download.rs:16-29 | crates/app/src/commands/toolchain/download.rs:16-29 — 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/app/src/commands/extension/download.rs:16` 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 (14 lines × 2) crates/cache-storage/src/storage_backend.rs:407— crates/cache-storage/src/storage_backend.rs:407-420 | crates/cache-storage/src/storage_backend.rs:453-466 — 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/cache-storage/src/storage_backend.rs:407` 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 (14 lines × 2) crates/actions/src/actions/install_dependencies.rs:77— crates/actions/src/actions/install_dependencies.rs:77-90 | crates/actions/src/actions/setup_environment.rs:45-58 — 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/actions/src/actions/install_dependencies.rs:77` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/actions/src/actions/setup_environment.rs:44` calls `symbol` and `crates/actions/src/actions/install_dependencies.rs:75` 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 (14 lines × 2) crates/cache-remote/src/grpc_remote_storage.rs:469— crates/cache-remote/src/grpc_remote_storage.rs:469-482 | crates/cache-remote/src/grpc_remote_storage.rs:562-575 — 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/cache-remote/src/grpc_remote_storage.rs:469` 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.
TodoComment crates/workspace/src/projects_builder.rs:73— // TODO deprecated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/workspace/src/tasks_builder.rs:60— // TODO deprecated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/workspace/src/projects_builder.rs:396— // TODO switch to filter_map_owned — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/workspace/src/tasks_builder.rs:158— // TODO switch to filter_map_owned — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/token/src/funcs.rs:8— // TODO? changed_files, affected_files — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/task-builder/tests/tasks_builder_test.rs:909— // TODO: temp disabled in the typescript plugin — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/config/tests/task_config_test.rs:167— // TODO fix null handling in schematic — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/action-pipeline/src/action_pipeline.rs:718— // TODO: Disabled for now as we've hit the posthog limit! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment crates/action-graph/src/action_graph_builder.rs:261— // TODO switch to map_owned — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: src/action_graph_builder.rs crates/action-graph/src/action_graph_builder.rs— FileTooLong — 1248 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: ActionGraphBuilder (3 blocks, 145-2135). The bar is 500 significant lines; this is 748 over it, 2.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/tasks_builder.rs crates/task-builder/src/tasks_builder.rs— FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: TasksBuilder (2 blocks, 97-1347). The bar is 500 significant lines; this is 345 over it, 1.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/workspace_builder.rs crates/workspace/src/workspace_builder.rs— FileTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: WorkspaceBuilder (2 blocks, 78-1219). The bar is 500 significant lines; this is 218 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/task_runner.rs crates/task-runner/src/task_runner.rs— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: TaskRunner (2 blocks, 33-1112). The bar is 500 significant lines; this is 161 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/token_expander.rs crates/task-expander/src/token_expander.rs— FileTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: TokenExpander (2 blocks, 57-908). The bar is 500 significant lines; this is 120 over it, 1.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/projects_builder.rs crates/workspace/src/projects_builder.rs— FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: WorkspaceProjectsBuilder (3 blocks, 213-933). The bar is 500 significant lines; this is 71 over it, 1.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/grpc_remote_storage.rs crates/cache-remote/src/grpc_remote_storage.rs— FileTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: GrpcRemoteStorage (5 blocks, 49-767). The bar is 500 significant lines; this is 65 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: commands/generate.rs crates/app/src/commands/generate.rs— FileTooLong — 536 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 36 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: src/action_pipeline.rs crates/action-pipeline/src/action_pipeline.rs— FileTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: ActionPipeline (2 blocks, 38-729). The bar is 500 significant lines; this is 34 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (9 lines × 2) crates/affected/src/affected_tracker.rs:248— crates/affected/src/affected_tracker.rs:248-256 | crates/affected/src/project_tracker.rs:65-73 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/project_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:248` 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/app/src/commands/extension/add.rs:43— crates/app/src/commands/extension/add.rs:43-51 | crates/app/src/commands/toolchain/add.rs:43-51 — 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/app/src/commands/extension/add.rs:43` 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 first that the copies are not typed on the same thing: the declarations holding them bind `args` to `ExtensionAddArgs` in one and `ToolchainAddArgs` 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 (9 lines × 2) crates/app/src/commands/query/projects.rs:87— crates/app/src/commands/query/projects.rs:87-95 | crates/app/src/commands/query/tasks.rs:84-92 — 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/app/src/commands/query/projects.rs:87` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `args` to `QueryProjectsArgs` in one and `QueryTasksArgs` 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 (9 lines × 2) crates/cache-remote/src/grpc_remote_storage.rs:455— crates/cache-remote/src/grpc_remote_storage.rs:455-463 | crates/cache-remote/src/grpc_remote_storage.rs:548-556 — 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/cache-remote/src/grpc_remote_storage.rs:455` 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/pdk/src/extension.rs:17— crates/pdk/src/extension.rs:17-25 | crates/pdk/src/toolchain.rs:19-27 — 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 (9 lines × 2) crates/project-graph/src/project_graph.rs:143— crates/project-graph/src/project_graph.rs:143-151 | crates/task-graph/src/task_graph.rs:75-83 — 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/task-runner/src/task_runner.rs:786— crates/task-runner/src/task_runner.rs:786-794 | crates/task-runner/src/task_runner.rs:802-813 — 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/task-runner/src/task_runner.rs:786` 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/config/src/shapes/input.rs:109— crates/config/src/shapes/input.rs:109-117 | crates/config/src/shapes/input.rs:193-201 — 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/config/src/shapes/input.rs:109` 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/app/src/commands/exec.rs:125— crates/app/src/commands/exec.rs:125-133 | crates/app/src/commands/task.rs:34-42 — 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/app/src/commands/exec.rs:125` 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.
ActionGraphBuilder::run_tasks (cognitive 37) crates/action-graph/src/action_graph_builder.rs:655— ActionGraphBuilder::run_tasks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionGraphBuilder::internal_run_task_dependencies (cognitive 36) crates/action-graph/src/action_graph_builder.rs:824— ActionGraphBuilder::internal_run_task_dependencies has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionGraphBuilder::internal_run_task (cognitive 34) crates/action-graph/src/action_graph_builder.rs:1166— ActionGraphBuilder::internal_run_task has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 9 (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.
ActionGraphBuilder::internal_resolve_tasks_from_target_locator (cognitive 31) crates/action-graph/src/action_graph_builder.rs:1059— ActionGraphBuilder::internal_resolve_tasks_from_target_locator has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). 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.
ActionGraphBuilder::internal_resolve_tasks_from_target (cognitive 26) crates/action-graph/src/action_graph_builder.rs:963— ActionGraphBuilder::internal_resolve_tasks_from_target has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionGraphBuilder::internal_setup_toolchain (cognitive 23) crates/action-graph/src/action_graph_builder.rs:1511— ActionGraphBuilder::internal_setup_toolchain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, loops 1 (2 pts), match/switch 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.
ActionGraphBuilder::internal_setup_environment (cognitive 21) crates/action-graph/src/action_graph_builder.rs:1370— ActionGraphBuilder::internal_setup_environment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (2 pts), match/switch 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.
ActionGraphBuilder::link_serial_required_edges (cognitive 18) crates/action-graph/src/action_graph_builder.rs:1835— ActionGraphBuilder::link_serial_required_edges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: TasksBuilder.build_task crates/task-builder/src/tasks_builder.rs:284— MethodTooLong — build_task runs 228 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 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TaskExecutor.execute crates/task-runner/src/task_executor.rs:70— MethodTooLong — execute runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TokenExpander.replace_function crates/task-expander/src/token_expander.rs:407— MethodTooLong — replace_function runs 129 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 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TaskDepsBuilder.build crates/task-builder/src/task_deps_builder.rs:42— MethodTooLong — build runs 121 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 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ActionGraphBuilder.internal_run_task crates/action-graph/src/action_graph_builder.rs:1166— MethodTooLong — internal_run_task runs 116 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 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TasksBuilder.build_task_options crates/task-builder/src/tasks_builder.rs:665— MethodTooLong — build_task_options 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.
MethodTooLong: ActionPipeline.dispatch_jobs crates/action-pipeline/src/action_pipeline.rs:377— MethodTooLong — dispatch_jobs runs 108 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 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ActionPipeline.internal_run crates/action-pipeline/src/action_pipeline.rs:174— MethodTooLong — internal_run 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.
moon_app::commands::generate::parse_args_into_variables (cyclomatic 31) crates/app/src/commands/generate.rs:326— moon_app::commands::generate::parse_args_into_variables has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
moon_app::commands::generate::gather_variables (cyclomatic 31) crates/app/src/commands/generate.rs:528— moon_app::commands::generate::gather_variables has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
moon_app::queries::projects::load_with_regex (cyclomatic 19) crates/app/src/queries/projects.rs:38— moon_app::queries::projects::load_with_regex 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.
moon_app::commands::generate::generate (cyclomatic 17) crates/app/src/commands/generate.rs:53— moon_app::commands::generate::generate 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.
moon_app::commands::docker::file::file (cyclomatic 16) crates/app/src/commands/docker/file.rs:55— moon_app::commands::docker::file::file 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.
moon_app::commands::upgrade::upgrade (cyclomatic 16) crates/app/src/commands/upgrade.rs:59— moon_app::commands::upgrade::upgrade 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.
moon_app::queries::tasks::load_with_regex (cyclomatic 16) crates/app/src/queries/tasks.rs:40— moon_app::queries::tasks::load_with_regex 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.
Duplicated block (11 lines × 2) crates/app-macros/src/lib.rs:118— crates/app-macros/src/lib.rs:118-128 | crates/app-macros/src/lib.rs:280-290 — 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/app-macros/src/lib.rs:118` 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 (11 lines × 2) crates/app/src/commands/check.rs:50— crates/app/src/commands/check.rs:50-60 | crates/app/src/commands/project.rs:33-43 — 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/app/src/commands/check.rs:50` 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 (11 lines × 2) crates/process-augment/src/augmented_command.rs:265— crates/process-augment/src/augmented_command.rs:265-275 | crates/process-augment/src/augmented_command.rs:300-310 — 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/process-augment/src/augmented_command.rs:265` 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 (11 lines × 2) crates/extension-plugin/src/extension_plugin.rs:89— crates/extension-plugin/src/extension_plugin.rs:89-99 | crates/toolchain-plugin/src/toolchain_plugin.rs:417-427 — before extracting anything, compare `crates/extension-plugin/src/extension_plugin.rs` and `crates/toolchain-plugin/src/toolchain_plugin.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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/extension-plugin/src/extension_plugin.rs:89` 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 lines × 2) crates/extension-plugin/src/extension_plugin.rs:105— crates/extension-plugin/src/extension_plugin.rs:105-115 | crates/toolchain-plugin/src/toolchain_plugin.rs:433-443 — before extracting anything, compare `crates/extension-plugin/src/extension_plugin.rs` and `crates/toolchain-plugin/src/toolchain_plugin.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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/extension-plugin/src/extension_plugin.rs:105` 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 lines × 2) crates/extension-plugin/src/extension_plugin.rs:162— crates/extension-plugin/src/extension_plugin.rs:162-172 | crates/toolchain-plugin/src/toolchain_plugin.rs:747-757 — before extracting anything, compare `crates/extension-plugin/src/extension_plugin.rs` and `crates/toolchain-plugin/src/toolchain_plugin.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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 (11 lines × 2) crates/extension-plugin/src/extension_plugin.rs:175— crates/extension-plugin/src/extension_plugin.rs:175-185 | crates/toolchain-plugin/src/toolchain_plugin.rs:760-770 — before extracting anything, compare `crates/extension-plugin/src/extension_plugin.rs` and `crates/toolchain-plugin/src/toolchain_plugin.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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.
Hotspot: crates/task-builder/src/tasks_builder.rs crates/task-builder/src/tasks_builder.rs:284— crates/task-builder/src/tasks_builder.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in TasksBuilder::build_task at line 284. 2 of those changes were fix/bug commits, and the other 2 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/task-builder/src/tasks_builder.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/action-pipeline/src/action_pipeline.rs crates/action-pipeline/src/action_pipeline.rs:174— crates/action-pipeline/src/action_pipeline.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ActionPipeline::internal_run at line 174. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/action-pipeline/src/action_pipeline.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/task-runner/src/task_runner.rs crates/task-runner/src/task_runner.rs:275— crates/task-runner/src/task_runner.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TaskRunner::is_cached at line 275. 4 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/task-runner/src/task_runner.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/task-runner/src/task_executor.rs crates/task-runner/src/task_executor.rs:70— crates/task-runner/src/task_executor.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in TaskExecutor::execute at line 70. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/task-runner/src/task_executor.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/task-runner/src/output_hydrater.rs crates/task-runner/src/output_hydrater.rs:63— crates/task-runner/src/output_hydrater.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in OutputHydrater::hydrate at line 63. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/task-runner/src/output_hydrater.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/actions/src/actions/install_dependencies.rs crates/actions/src/actions/install_dependencies.rs:38— crates/actions/src/actions/install_dependencies.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in moon_actions::actions::install_dependencies::install_dependencies at line 38. 1 of those changes was a fix/bug commit, and the other 1 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/actions/src/actions/install_dependencies.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.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×6
Edited copy of a member (32 corresponding lines) crates/affected/src/affected_tracker.rs:549— crates/affected/src/affected_tracker.rs:549-580 | crates/affected/src/task_tracker.rs:95-126 — 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.
Edited copy of a member (32 corresponding lines) crates/config/src/shapes/input.rs:347— crates/config/src/shapes/input.rs:347-378 | crates/config/src/shapes/output.rs:144-175 — 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.
Edited copy of a member (32 corresponding lines) crates/plugin/src/host.rs:100— crates/plugin/src/host.rs:100-131 | crates/plugin/src/host.rs:181-218 — 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.
Edited copy of a member (32 corresponding lines) crates/task-expander/src/task_expander.rs:247— crates/task-expander/src/task_expander.rs:247-280 | crates/task-expander/src/task_expander.rs:283-314 — 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.
Edited copy of a member (32 corresponding lines) crates/app/src/commands/project_graph.rs:41— crates/app/src/commands/project_graph.rs:41-75 | crates/app/src/commands/task_graph.rs:41-72 — 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.
Edited copy of a member (32 corresponding lines) crates/config/src/merging.rs:30— crates/config/src/merging.rs:30-61 | crates/config/src/merging.rs:74-105 — 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.
Sync-over-async blocking packages/vscode-extension/src/commands.ts:124— `fs.existsSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/vscode-extension/src/commands.ts:124— `fs.readFileSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/vscode-extension/src/commands.ts:154— `fs.existsSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/vscode-extension/src/commands.ts:155— `fs.mkdirSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking packages/vscode-extension/src/commands.ts:158— `fs.writeFileSync` in `appendSchemasConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking REDACTED:470— `fs.existsSync` in `viewProject` 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.
Repeated repair: crates/toolchain-plugin/src/toolchain_plugin.rs crates/toolchain-plugin/src/toolchain_plugin.rs:339— crates/toolchain-plugin/src/toolchain_plugin.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ToolchainPlugin::detect_project_usage at line 339), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(toolchain): link bins and shims when tool is already installed (#2737)”; “fix: Audit 09/26 (#2731)”; “fix: Audit 09/02 (#2694)”; “fix: Audit 08/15 (#2670)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/toolchain-plugin/src/toolchain_plugin.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/config-loader/src/toolchains_config_ext.rs crates/config-loader/src/toolchains_config_ext.rs:51— crates/config-loader/src/toolchains_config_ext.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is ToolchainsConfigExt::inherit_proto_versions_for_plugins at line 51), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Audit 10/14 (#2764)”; “fix: Audit 09/02 (#2694)”; “fix: Audit 08/21 (#2689)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/config-loader/src/toolchains_config_ext.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/daemon-server/src/daemon_server.rs crates/daemon-server/src/daemon_server.rs:386— crates/daemon-server/src/daemon_server.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is moon_daemon_server::daemon_server::start_daemon_server at line 386), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Affected dependency installs, repos without commits, and daemon watcher (#2792)”; “fix: Hasher ignore patterns and SIGHUP handling (#2783)”; “fix: Daemon RPC size limit and dev container/CI detection (#2780)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/daemon-server/src/daemon_server.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/task-runner/src/output_archiver.rs crates/task-runner/src/output_archiver.rs:45— crates/task-runner/src/output_archiver.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is OutputArchiver::archive at line 45), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Daemon RPC size limit and dev container/CI detection (#2780)”; “fix: Audit 10/21 (#2776)”; “fix: Audit 09/26 (#2731)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/task-runner/src/output_archiver.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/cache-storage/src/storage.rs crates/cache-storage/src/storage.rs:523— crates/cache-storage/src/storage.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is Storage::hydrate_task_manifest at line 523), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: Stop an unresponsive HTTP remote cache from stalling every task (#2743)”; “fix: Wait for remote storage to connect before reading or writing the cache (#2715)”; “fix: Audit 08/18 (#2681)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 16:22:36 -08:00' --until='2026-11-13 16:22:36 -08:00' --full-history --no-merges -- crates/cache-storage/src/storage.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.
TasksBuilder::build_task (cognitive 90) crates/task-builder/src/tasks_builder.rs:284— TasksBuilder::build_task has cognitive complexity 90 (threshold 15). Drivers by points: if/else 50 (75 pts), boolean chains 11, loops 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TasksBuilder::parse_command_line (cognitive 77) crates/task-builder/src/tasks_builder.rs:1068— TasksBuilder::parse_command_line has cognitive complexity 77 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 4 (18 pts), match/switch 4 (11 pts), boolean chains 3 (nesting depth added 50). 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.
TasksBuilder::build_task_options (cognitive 51) crates/task-builder/src/tasks_builder.rs:665— TasksBuilder::build_task_options has cognitive complexity 51 (threshold 15). Drivers by points: if/else 37 (47 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TasksBuilder::inherit_global_tasks (cognitive 26) crates/task-builder/src/tasks_builder.rs:144— TasksBuilder::inherit_global_tasks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TasksBuilder::resolve_task_inputs (cognitive 23) crates/task-builder/src/tasks_builder.rs:905— TasksBuilder::resolve_task_inputs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskRunner::hydrate (cognitive 25) crates/task-runner/src/task_runner.rs:893— TaskRunner::hydrate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 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.
TaskRunner::hash_checks (cognitive 23) crates/task-runner/src/task_runner.rs:480— TaskRunner::hash_checks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (4 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskRunner::is_cached (cognitive 19) crates/task-runner/src/task_runner.rs:275— TaskRunner::is_cached has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TaskRunner::execute (cognitive 18) crates/task-runner/src/task_runner.rs:552— TaskRunner::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 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.
TaskRunner::execute_checks (cognitive 16) crates/task-runner/src/task_runner.rs:691— TaskRunner::execute_checks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×5
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) crates/affected/src/affected_tracker.rs:232— crates/affected/src/affected_tracker.rs:232-256 | crates/affected/src/project_tracker.rs:49-73 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/workspace/src/projects_builder.rs:542— crates/workspace/src/projects_builder.rs:542-566 | crates/workspace/src/workspace_builder.rs:760-784 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/task-runner/src/command_builder.rs:60— crates/task-runner/src/command_builder.rs:60-89 | crates/task-runner/src/command_builder.rs:92-116 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/manifest/src/task_manifest.rs:198— crates/manifest/src/task_manifest.rs:198-225 | crates/manifest/src/task_manifest.rs:227-251 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) crates/affected/src/affected.rs:109— crates/affected/src/affected.rs:109-133 | crates/affected/src/affected.rs:158-185 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) crates/app/src/queries/projects.rs:130— crates/app/src/queries/projects.rs:130-141 | crates/app/src/queries/tasks.rs:110-121 — 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/app/src/queries/projects.rs:130` 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 first that the copies are not typed on the same thing: the declarations holding them bind `options` to `&QueryProjectsOptions` in one and `&QueryTasksOptions` 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 (12 lines × 2) crates/cas/src/gc.rs:61— crates/cas/src/gc.rs:61-72 | crates/cas/src/gc.rs:202-213 — 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/cas/src/gc.rs:61` 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 (12 lines × 2) crates/task-hasher/src/task_hashing.rs:291— crates/task-hasher/src/task_hashing.rs:291-302 | crates/task-hasher/src/task_hashing.rs:312-323 — 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/task-hasher/src/task_hashing.rs:291` 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/config/src/shapes/output.rs:36— crates/config/src/shapes/output.rs:36-47 | crates/config/src/shapes/output.rs:74-85 — 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/config/src/shapes/output.rs:36` 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 (12 lines × 2) crates/pdk-test-utils/src/sandbox.rs:75— crates/pdk-test-utils/src/sandbox.rs:75-86 | crates/pdk-test-utils/src/sandbox.rs:116-127 — 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.
Low cohesion: ToolchainRegistry (LCOM4 18) crates/toolchain-plugin/src/toolchain_registry.rs:70— ToolchainRegistry's methods fall into 18 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 18 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ExtensionRegistry (LCOM4 6) crates/extension-plugin/src/extension_registry.rs:64— ExtensionRegistry's methods fall into 6 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 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MoonSession (LCOM4 5) crates/app/src/session.rs:46— MoonSession's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ActionContext (LCOM4 4) crates/action-context/src/lib.rs:47— ActionContext's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MoonSandbox (LCOM4 4) crates/test-utils/src/sandbox.rs:15— MoonSandbox'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.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) crates/affected/src/affected_tracker.rs:192— crates/affected/src/affected_tracker.rs:192-209 | crates/affected/src/project_tracker.rs:30-43 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) crates/config-loader/src/lib.rs:22— crates/config-loader/src/lib.rs:22-35 | crates/config-loader/src/lib.rs:37-50 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) wasm/ext-sync/src/lib.rs:33— wasm/ext-sync/src/lib.rs:33-46 | wasm/tc-tier1/src/lib.rs:97-110 — These two members are one piece of code written twice and then edited apart: 14 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 (14 corresponding lines) crates/test-utils/src/workspace_mocker.rs:386— crates/test-utils/src/workspace_mocker.rs:386-399 | crates/test-utils/src/workspace_mocker.rs:401-414 — These two members are one piece of code written twice and then edited apart: 14 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 (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) crates/actions/src/utils.rs:62— crates/actions/src/utils.rs:62-76 | crates/actions/src/utils.rs:83-109 — 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.
Edited copy of a member (15 corresponding lines) crates/action-graph/src/action_graph_builder.rs:617— crates/action-graph/src/action_graph_builder.rs:617-631 | crates/action-graph/src/action_graph_builder.rs:638-652 — 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.
Edited copy of a member (15 corresponding lines) crates/config/src/shapes/input.rs:306— crates/config/src/shapes/input.rs:306-320 | crates/config/src/shapes/output.rs:100-114 — 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.
Edited copy of a member (15 corresponding lines) crates/pdk/src/toolchain.rs:90— crates/pdk/src/toolchain.rs:90-104 | crates/pdk/src/toolchain.rs:114-128 — 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.
Duplicated block (15 lines × 2) crates/cache-remote/src/grpc_remote_storage.rs:225— crates/cache-remote/src/grpc_remote_storage.rs:225-239 | crates/cache-remote/src/http_remote_storage.rs:130-144 — 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/cache-remote/src/grpc_remote_storage.rs:225` 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 (15 lines × 2) crates/task-runner/src/check_executor.rs:138— crates/task-runner/src/check_executor.rs:138-152 | crates/task-runner/src/task_executor.rs:320-334 — 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/task-runner/src/check_executor.rs:138` 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 (15 lines × 2) crates/app/src/commands/extension/add.rs:53— crates/app/src/commands/extension/add.rs:53-67 | crates/app/src/commands/toolchain/add.rs:53-67 — 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/app/src/commands/extension/add.rs:53` 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 (15 lines × 2) crates/pdk-test-utils/src/toolchain_wrapper.rs:76— crates/pdk-test-utils/src/toolchain_wrapper.rs:76-90 | crates/pdk-test-utils/src/toolchain_wrapper.rs:100-114 — 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/affected/src/affected_tracker.rs:565— crates/affected/src/affected_tracker.rs:565-572 | crates/affected/src/task_tracker.rs:111-118 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/task_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:565` 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/config-schema/src/typescript_types.rs:175— crates/config-schema/src/typescript_types.rs:175-182 | crates/config-schema/src/typescript_types.rs:192-199 — 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/config-schema/src/typescript_types.rs:175` 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 (8 lines × 2) crates/plugin/src/host.rs:149— crates/plugin/src/host.rs:149-156 | crates/plugin/src/host.rs:236-243 — 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/plugin/src/host.rs:149` 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/action/src/action.rs:124— crates/action/src/action.rs:124-131 | crates/action/src/operation.rs:127-134 — 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.
TasksBuilder::build_task (cyclomatic 60) crates/task-builder/src/tasks_builder.rs:284— TasksBuilder::build_task has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TasksBuilder::build_task_options (cyclomatic 40) crates/task-builder/src/tasks_builder.rs:665— TasksBuilder::build_task_options has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TasksBuilder::parse_command_line (cyclomatic 28) crates/task-builder/src/tasks_builder.rs:1068— TasksBuilder::parse_command_line 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.
JobDispatcher::find_next_index (cognitive 23) crates/action-pipeline/src/job_dispatcher.rs:598— JobDispatcher::find_next_index has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JobDispatcher::can_cleanup_after_abort (cognitive 17) crates/action-pipeline/src/job_dispatcher.rs:413— JobDispatcher::can_cleanup_after_abort has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JobDispatcher::take_cleanups_after_abort (cognitive 16) crates/action-pipeline/src/job_dispatcher.rs:306— JobDispatcher::take_cleanups_after_abort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspaceBuilder::internal_load_project (cognitive 22) crates/workspace/src/workspace_builder.rs:411— WorkspaceBuilder::internal_load_project has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3, 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.
WorkspaceBuilder::internal_load_task (cognitive 18) crates/workspace/src/workspace_builder.rs:628— WorkspaceBuilder::internal_load_task has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspaceBuilder::load_project_build_data (cognitive 16) crates/workspace/src/workspace_builder.rs:943— WorkspaceBuilder::load_project_build_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoonReporter::print_operation_output (cognitive 20) crates/console/src/reporter.rs:310— MoonReporter::print_operation_output has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, 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.
MoonReporter::print_pipeline_stats (cognitive 20) crates/console/src/reporter.rs:414— MoonReporter::print_pipeline_stats has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MoonReporter::print_task_checkpoint (cognitive 18) crates/console/src/reporter.rs:238— MoonReporter::print_task_checkpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
TooManyMethods: ActionGraphBuilder crates/action-graph/src/action_graph_builder.rs:145— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Operation crates/action/src/operation.rs:14— TooManyMethods — 37 methods, declared across 2 files: src/operation.rs (32), src/context.rs (5). The bar is 30 methods; this is 7 over it, 1.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ToolchainPlugin crates/toolchain-plugin/src/toolchain_plugin.rs:34— TooManyMethods — 34 methods. The bar is 30 methods; 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.
Change coupling: check.rs ↔ run.rs crates/app/src/commands/check.rs:1— `crates/app/src/commands/check.rs` and `crates/app/src/commands/run.rs` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7c9e3a8d` breaking: Revamp CLI output. Add levels to `--summary`. (#2252); `9d5c681c` new: add environment variables for a few run arguments (#1977); `7865ed27` new: Update `moon dep-graph` to support task by path. (#1084) (at that commit the files were still `crates/cli/src/commands/check.rs` and `crates/cli/src/commands/run.rs`) — run `git show` on any of them.
Change coupling: command_builder.rs ↔ toolchain_registry_actions.rs crates/task-runner/src/command_builder.rs:1— `crates/task-runner/src/command_builder.rs` and `crates/toolchain-plugin/src/toolchain_registry_actions.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `473cd973` new: Add `extend_command` plugin API. (#2225); `c19e89a8` fix: Audit 09/02 (#2100); `b5d96d9f` new: Include toolchain executable dirs in task command `PATH`. (#2092) (at that commit the file was still `crates/toolchain-plugin/src/toolchain_actions.rs`) — run `git show` on any of them.
Change coupling: output_archiver.rs ↔ output_hydrater.rs crates/task-runner/src/output_archiver.rs:1— `crates/task-runner/src/output_archiver.rs` and `crates/task-runner/src/output_hydrater.rs` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a37c7825` fix: Daemon RPC size limit and dev container/CI detection (#2780); `ab3dc070` security: Harden remote cache output hydration against undeclared pat…; `ab039daf` docs: Add v1.41 blog post. (#2142) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) crates/app/src/commands/migrate/v2.rs:344— crates/app/src/commands/migrate/v2.rs:344-373 | crates/app/src/commands/migrate/v2.rs:375-397 — 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/app/src/commands/upgrade.rs:227— crates/app/src/commands/upgrade.rs:227-249 | crates/app/src/commands/upgrade.rs:256-280 — 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/action-graph/src/action_graph_builder.rs:526— crates/action-graph/src/action_graph_builder.rs:526-549 | crates/action-graph/src/action_graph_builder.rs:1468-1490 — 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 (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) crates/workspace/src/projects_builder.rs:275— crates/workspace/src/projects_builder.rs:275-290 | crates/workspace/src/tasks_builder.rs:94-109 — 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/toolchain-plugin/src/toolchain_plugin.rs:449— crates/toolchain-plugin/src/toolchain_plugin.rs:449-464 | crates/toolchain-plugin/src/toolchain_plugin.rs:470-485 — 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) wasm/ext-sync/src/lib.rs:15— wasm/ext-sync/src/lib.rs:15-30 | wasm/tc-tier1/src/lib.rs:79-94 — 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.
Duplicated block (16 lines × 2) crates/cache-remote/src/grpc_remote_storage.rs:241— crates/cache-remote/src/grpc_remote_storage.rs:241-256 | crates/cache-remote/src/http_remote_storage.rs:146-161 — 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/cache-remote/src/grpc_remote_storage.rs:241` 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) crates/daemon-server/src/daemon_server.rs:126— crates/daemon-server/src/daemon_server.rs:126-141 | crates/daemon-server/src/daemon_server.rs:173-188 — 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 `request` to `Request<ArchiveTaskOutputsRequest>` in one and `Request<HydrateTaskOutputsRequest>` 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 (16 lines × 2) crates/workspace/src/projects_builder.rs:801— crates/workspace/src/projects_builder.rs:801-816 | crates/workspace/src/workspace_builder.rs:1113-1128 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:801` 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 (10 lines × 2) crates/action-graph/src/action_graph_builder.rs:1405— crates/action-graph/src/action_graph_builder.rs:1405-1414 | crates/action-graph/src/action_graph_builder.rs:1545-1555 — 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/action-graph/src/action_graph_builder.rs:1405` 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 (10 lines × 2) crates/config-schema/src/api_docs.rs:10— crates/config-schema/src/api_docs.rs:10-19 | crates/config-schema/src/pkl_schemas.rs:6-15 — 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 (10 lines × 2) crates/workspace/src/projects_builder.rs:752— crates/workspace/src/projects_builder.rs:752-761 | crates/workspace/src/workspace_builder.rs:1000-1009 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/workspace/src/workspace_builder.rs:1012` calls `Some` and `crates/workspace/src/projects_builder.rs:763` 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 (7 lines × 2) crates/workspace/src/projects_builder.rs:679— crates/workspace/src/projects_builder.rs:679-685 | crates/workspace/src/workspace_builder.rs:917-923 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:679` 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 (7 lines × 2) crates/config/src/project/overrides_config.rs:58— crates/config/src/project/overrides_config.rs:58-64 | crates/config/src/toolchains_config.rs:117-123 — 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/config-schema/src/json_schemas.rs:39— crates/config-schema/src/json_schemas.rs:39-45 | crates/config-schema/src/json_schemas.rs:98-104 — 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/config-schema/src/json_schemas.rs:39` 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.
ActionGraphBuilder::internal_run_task (cyclomatic 26) crates/action-graph/src/action_graph_builder.rs:1166— ActionGraphBuilder::internal_run_task 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.
ActionGraphBuilder::run_tasks (cyclomatic 19) crates/action-graph/src/action_graph_builder.rs:655— ActionGraphBuilder::run_tasks 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.
ActionPipeline::internal_run (cyclomatic 22) crates/action-pipeline/src/action_pipeline.rs:174— ActionPipeline::internal_run 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.
ActionPipeline::dispatch_jobs (cyclomatic 20) crates/action-pipeline/src/action_pipeline.rs:377— ActionPipeline::dispatch_jobs 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.
WorkspaceGraph::does_project_match_criteria (cyclomatic 22) crates/workspace-graph/src/query_projects.rs:74— WorkspaceGraph::does_project_match_criteria 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.
WorkspaceGraph::does_task_match_criteria (cyclomatic 16) crates/workspace-graph/src/query_tasks.rs:84— WorkspaceGraph::does_task_match_criteria 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.
moon_actions::actions::install_dependencies::install_dependencies (cyclomatic 19) crates/actions/src/actions/install_dependencies.rs:38— moon_actions::actions::install_dependencies::install_dependencies 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.
moon_actions::plugins::commands::gather_cache_inputs (cyclomatic 16) crates/actions/src/plugins/commands.rs:278— moon_actions::plugins::commands::gather_cache_inputs 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.
TaskDepsBuilder::build (cognitive 42) crates/task-builder/src/task_deps_builder.rs:42— TaskDepsBuilder::build has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 5 (16 pts), boolean chains 4, 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.
TaskDepsBuilder::check_and_create_dep (cognitive 19) crates/task-builder/src/task_deps_builder.rs:228— TaskDepsBuilder::check_and_create_dep has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionPipeline::internal_run (cognitive 38) crates/action-pipeline/src/action_pipeline.rs:174— ActionPipeline::internal_run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 3, match/switch 1 (3 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.
ActionPipeline::dispatch_jobs (cognitive 30) crates/action-pipeline/src/action_pipeline.rs:377— ActionPipeline::dispatch_jobs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, 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.
Git::load (cognitive 33) crates/vcs/src/git/git_client.rs:73— Git::load has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Git::get_changed_files_between_revisions (cognitive 20) crates/vcs/src/git/git_client.rs:585— Git::get_changed_files_between_revisions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), match/switch 2 (4 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.
moon_actions::plugins::commands::gather_cache_inputs (cognitive 31) crates/actions/src/plugins/commands.rs:278— moon_actions::plugins::commands::gather_cache_inputs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (5 pts), match/switch 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.
moon_actions::actions::install_dependencies::install_dependencies (cognitive 22) crates/actions/src/actions/install_dependencies.rs:38— moon_actions::actions::install_dependencies::install_dependencies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CommandBuilder::inherit_affected (cognitive 31) crates/task-runner/src/command_builder.rs:341— CommandBuilder::inherit_affected has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (30 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.
CommandBuilder::inject_env (cognitive 25) crates/task-runner/src/command_builder.rs:148— CommandBuilder::inject_env has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspaceGraph::does_project_match_criteria (cognitive 29) crates/workspace-graph/src/query_projects.rs:74— WorkspaceGraph::does_project_match_criteria has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), match/switch 2 (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.
WorkspaceGraph::does_task_match_criteria (cognitive 27) crates/workspace-graph/src/query_tasks.rs:84— WorkspaceGraph::does_task_match_criteria has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskHasher::aggregate_inputs (cognitive 25) crates/task-hasher/src/task_hasher.rs:105— TaskHasher::aggregate_inputs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskHasher::process_inputs (cognitive 23) crates/task-hasher/src/task_hasher.rs:215— TaskHasher::process_inputs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, match/switch 1 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecWorkflow::execute (cognitive 22) crates/app/src/commands/exec.rs:214— ExecWorkflow::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 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.
ExecWorkflow::load_changed_files (cognitive 19) crates/app/src/commands/exec.rs:333— ExecWorkflow::load_changed_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_cas::gc::gc (cognitive 20) crates/cas/src/gc.rs:14— moon_cas::gc::gc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_cas::gc::retain_with_released (cognitive 18) crates/cas/src/gc.rs:123— moon_cas::gc::retain_with_released has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_task_hasher::task_hashing::apply_toolchain_dependencies_by_scope (cognitive 20) crates/task-hasher/src/task_hashing.rs:442— moon_task_hasher::task_hashing::apply_toolchain_dependencies_by_scope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 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.
moon_task_hasher::task_hashing::apply_toolchain_dependencies (cognitive 16) crates/task-hasher/src/task_hashing.rs:243— moon_task_hasher::task_hashing::apply_toolchain_dependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_config::shapes::portable_path::is_glob_like (cognitive 19) crates/config/src/shapes/portable_path.rs:11— moon_config::shapes::portable_path::is_glob_like has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_config::task_config::validate_deps (cognitive 16) crates/config/src/task_config.rs:37— moon_config::task_config::validate_deps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 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.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×2
Edited copy of a member (56 corresponding lines) crates/workspace/src/projects_builder.rs:569— crates/workspace/src/projects_builder.rs:569-624 | crates/workspace/src/workspace_builder.rs:788-843 — These two members are one piece of code written twice and then edited apart: 56 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 (56 corresponding lines) crates/workspace/src/projects_builder.rs:845— crates/workspace/src/projects_builder.rs:845-900 | crates/workspace/src/workspace_builder.rs:1155-1210 — These two members are one piece of code written twice and then edited apart: 56 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 (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) crates/cache-remote/src/http_remote_storage.rs:278— crates/cache-remote/src/http_remote_storage.rs:278-327 | crates/cache-remote/src/http_remote_storage.rs:333-373 — These two members are one piece of code written twice and then edited apart: 41 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 (41 corresponding lines) crates/cache-storage/src/storage_backend.rs:380— crates/cache-storage/src/storage_backend.rs:380-420 | crates/cache-storage/src/storage_backend.rs:426-466 — These two members are one piece of code written twice and then edited apart: 41 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 (47 corresponding lines) · ×2
Edited copy of a member (47 corresponding lines) crates/affected/src/affected_tracker.rs:316— crates/affected/src/affected_tracker.rs:316-362 | crates/affected/src/project_tracker.rs:133-179 — These two members are one piece of code written twice and then edited apart: 47 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 (47 corresponding lines) crates/affected/src/affected_tracker.rs:640— crates/affected/src/affected_tracker.rs:640-686 | crates/affected/src/task_tracker.rs:186-232 — These two members are one piece of code written twice and then edited apart: 47 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 (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) crates/workspace/src/projects_builder.rs:390— crates/workspace/src/projects_builder.rs:390-423 | crates/workspace/src/tasks_builder.rs:154-189 — 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/app/src/commands/extension/download.rs:11— crates/app/src/commands/extension/download.rs:11-44 | crates/app/src/commands/toolchain/download.rs:11-44 — 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 (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) crates/app/src/queries/projects.rs:127— crates/app/src/queries/projects.rs:127-154 | crates/app/src/queries/tasks.rs:107-134 — These two members are one piece of code written twice and then edited apart: 28 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 (28 corresponding lines) crates/action-graph/src/action_graph_builder.rs:2062— crates/action-graph/src/action_graph_builder.rs:2062-2089 | crates/action-graph/src/action_graph_builder.rs:2091-2118 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) crates/config/src/shapes/input.rs:190— crates/config/src/shapes/input.rs:190-216 | crates/config/src/shapes/input.rs:240-271 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/workspace/src/workspace_builder.rs:1048— crates/workspace/src/workspace_builder.rs:1048-1074 | crates/workspace/src/workspace_builder.rs:1077-1103 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) crates/config-schema/src/api_docs.rs:9— crates/config-schema/src/api_docs.rs:9-31 | crates/config-schema/src/pkl_schemas.rs:5-26 — These two members are one piece of code written twice and then edited apart: 22 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 (22 corresponding lines) crates/test-utils/src/sandbox.rs:82— crates/test-utils/src/sandbox.rs:82-103 | crates/test-utils/src/workspace_mocker.rs:146-170 — These two members are one piece of code written twice and then edited apart: 22 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 (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) crates/toolchain-plugin/src/toolchain_plugin.rs:116— crates/toolchain-plugin/src/toolchain_plugin.rs:116-137 | crates/toolchain-plugin/src/toolchain_plugin.rs:142-162 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/pdk/src/extension.rs:30— crates/pdk/src/extension.rs:30-50 | crates/pdk/src/toolchain.rs:32-52 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) crates/config-loader/src/config_loader.rs:151— crates/config-loader/src/config_loader.rs:151-170 | crates/config-loader/src/config_loader.rs:263-283 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/cache-remote/src/compressable_blob.rs:43— crates/cache-remote/src/compressable_blob.rs:43-62 | crates/cache-remote/src/compressable_blob.rs:75-95 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) crates/mcp/src/tools/project_tools.rs:78— crates/mcp/src/tools/project_tools.rs:78-94 | crates/mcp/src/tools/task_tools.rs:83-104 — 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.
Edited copy of a member (17 corresponding lines) crates/extension-plugin/src/extension_registry.rs:23— crates/extension-plugin/src/extension_registry.rs:23-39 | crates/toolchain-plugin/src/toolchain_registry.rs:23-45 — 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, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) crates/config-loader/src/config_loader.rs:49— crates/config-loader/src/config_loader.rs:49-62 | crates/config-loader/src/config_loader.rs:115-128 | crates/config-loader/src/config_loader.rs:133-146 — 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.
Edited copies of one member (3 members, 14+ corresponding lines) crates/pdk-test-utils/src/toolchain_wrapper.rs:155— crates/pdk-test-utils/src/toolchain_wrapper.rs:155-171 | crates/pdk-test-utils/src/toolchain_wrapper.rs:228-241 | crates/pdk-test-utils/src/toolchain_wrapper.rs:246-266 — 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 (1 corresponding lines) · ×2
Edited copy of a member (1 corresponding lines) crates/config/src/shapes/input.rs:146— crates/config/src/shapes/input.rs:146-146 | crates/config/src/shapes/output.rs:64-64 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) crates/config/src/shapes/input.rs:43— crates/config/src/shapes/input.rs:43-43 | crates/config/src/shapes/output.rs:26-26 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) crates/pdk/src/extension.rs:6— crates/pdk/src/extension.rs:6-14 | crates/pdk/src/toolchain.rs:8-16 — 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/task-graph/src/task_graph.rs:92— crates/task-graph/src/task_graph.rs:92-100 | crates/workspace-graph/src/lib.rs:79-87 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) crates/extension-plugin/src/extension_plugin.rs:197— crates/extension-plugin/src/extension_plugin.rs:197-203 | crates/toolchain-plugin/src/toolchain_plugin.rs:804-810 — 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/config-loader/src/extensions_config_ext.rs:31— crates/config-loader/src/extensions_config_ext.rs:31-37 | crates/config-loader/src/toolchains_config_ext.rs:90-103 — 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 (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) crates/extension-plugin/src/extension_plugin.rs:61— crates/extension-plugin/src/extension_plugin.rs:61-70 | crates/toolchain-plugin/src/toolchain_plugin.rs:280-289 — 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/cache/src/cache_engine.rs:201— crates/cache/src/cache_engine.rs:201-210 | crates/cache/src/state_engine.rs:87-96 — 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.
Duplicated block (24 lines × 2) crates/action-graph/src/action_graph_builder.rs:1379— crates/action-graph/src/action_graph_builder.rs:1379-1402 | crates/action-graph/src/action_graph_builder.rs:1519-1542 — 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 (24 lines × 2) crates/workspace/src/workspace_builder.rs:267— crates/workspace/src/workspace_builder.rs:267-290 | crates/workspace/src/workspace_builder_async.rs:205-228 — 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 (22 lines × 2) crates/workspace/src/projects_builder.rs:399— crates/workspace/src/projects_builder.rs:399-420 | crates/workspace/src/workspace_builder.rs:300-321 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:399` 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 (22 lines × 2) wasm/ext-task/src/lib.rs:66— wasm/ext-task/src/lib.rs:66-87 | wasm/tc-tier2/src/lib.rs:138-159 — before extracting anything, compare `wasm/ext-task/src/lib.rs` and `wasm/tc-tier2/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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. 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 (18 lines × 2) crates/config-loader/src/extensions_config_ext.rs:69— crates/config-loader/src/extensions_config_ext.rs:69-86 | crates/config-loader/src/toolchains_config_ext.rs:157-174 — 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/config-loader/src/extensions_config_ext.rs:69` 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 (18 lines × 2) crates/mcp/src/tools/action_tools.rs:69— crates/mcp/src/tools/action_tools.rs:69-86 | crates/mcp/src/tools/action_tools.rs:136-153 — 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/mcp/src/tools/action_tools.rs:69` 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 (11 lines × 3) crates/task-expander/src/token_expander.rs:133— crates/task-expander/src/token_expander.rs:133-143 | crates/task-expander/src/token_expander.rs:180-190 | crates/task-expander/src/token_expander.rs:228-238 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/task-expander/src/token_expander.rs:130` calls `Some` and `crates/task-expander/src/token_expander.rs:178` 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.
Duplicated block (11 lines × 3) crates/pdk-test-utils/src/extension_wrapper.rs:79— crates/pdk-test-utils/src/extension_wrapper.rs:79-89 | crates/pdk-test-utils/src/extension_wrapper.rs:99-109 | crates/pdk-test-utils/src/toolchain_wrapper.rs:124-134 — before extracting anything, compare `crates/pdk-test-utils/src/extension_wrapper.rs` and `crates/pdk-test-utils/src/toolchain_wrapper.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (47 lines × 2) crates/affected/src/affected_tracker.rs:263— crates/affected/src/affected_tracker.rs:263-309 | crates/affected/src/project_tracker.rs:80-126 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/project_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:263` 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 (47 lines × 2) crates/affected/src/affected_tracker.rs:587— crates/affected/src/affected_tracker.rs:587-633 | crates/affected/src/task_tracker.rs:133-179 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/task_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:587` 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/project-graph/src/project_graph.rs:523— crates/project-graph/src/project_graph.rs:523-528 | crates/task-graph/src/task_graph.rs:193-198 — 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/pdk-test-utils/src/extension_wrapper.rs:13— crates/pdk-test-utils/src/extension_wrapper.rs:13-18 | crates/pdk-test-utils/src/toolchain_wrapper.rs:17-22 — before extracting anything, compare `crates/pdk-test-utils/src/extension_wrapper.rs` and `crates/pdk-test-utils/src/toolchain_wrapper.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Outbound HTTP without resilience crates/api/src/launchpad.rs:214— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/notifier/src/webhooks.rs:35— `reqwest::Client::new(` 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.
Dead file (~23 LoC) scenarios/signals/ctrlc.mjs— no import path from any entry point (7 application, 8 tooling, 11 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~23 LoC) scenarios/signals/signals.mjs— no import path from any entry point (7 application, 8 tooling, 11 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
Weak hash algorithm crates/api/src/launchpad.rs:58— 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.
Weak hash algorithm crates/daemon-utils/src/endpoint.rs:21— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`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.
No authorization crates/daemon-server/src/daemon_server.rs:614— This repository serves requests — a server (Server::builder()) (crates/daemon-server/src/daemon_server.rs:614) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
moon_cli::shared::run_cli (cyclomatic 57) crates/cli/src/shared.rs:168— moon_cli::shared::run_cli has cyclomatic complexity 57 (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.
TaskDepsBuilder::build (cyclomatic 26) crates/task-builder/src/task_deps_builder.rs:42— TaskDepsBuilder::build has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
MoonReporter::print_pipeline_stats (cyclomatic 19) crates/console/src/reporter.rs:414— MoonReporter::print_pipeline_stats 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.
TokenExpander::replace_function (cyclomatic 19) crates/task-expander/src/token_expander.rs:407— TokenExpander::replace_function 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. This is NOT this file's highest cyclomatic complexity: TokenExpander::replace_variable (cyclomatic 33) 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 function is counted neither in this dimension's figures nor in its score.
moon_query::builder::build_criteria (cyclomatic 18) crates/query/src/builder.rs:131— moon_query::builder::build_criteria has cyclomatic complexity 18 (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.
GitTree::exec_status (cyclomatic 18) crates/vcs/src/git/tree.rs:419— GitTree::exec_status has cyclomatic complexity 18 (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.
OutputHydrater::hydrate (cyclomatic 17) crates/task-runner/src/output_hydrater.rs:63— OutputHydrater::hydrate 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.
TaskRunner::is_cached (cyclomatic 17) crates/task-runner/src/task_runner.rs:275— TaskRunner::is_cached 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.
ExecWorkflow::load_changed_files (cyclomatic 16) crates/app/src/commands/exec.rs:333— ExecWorkflow::load_changed_files 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.
AugmentedCommand::inherit_from_toolchains (cyclomatic 16) crates/process-augment/src/augmented_command.rs:333— AugmentedCommand::inherit_from_toolchains 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.
TaskExecutor::execute (cyclomatic 16) crates/task-runner/src/task_executor.rs:70— TaskExecutor::execute has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
moon_workspace::projects_locator::locate_projects_with_globs (cyclomatic 16) crates/workspace/src/projects_locator.rs:43— moon_workspace::projects_locator::locate_projects_with_globs 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.
ProjectCategoryItem.constructor (cyclomatic 16) REDACTED:178— ProjectCategoryItem.constructor 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.
TaskExecutor::execute (cognitive 35) crates/task-runner/src/task_executor.rs:70— TaskExecutor::execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 18). Of this number, 33 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.
WatcherThread::watch_tree (cognitive 30) crates/daemon-server/src/daemon_watcher.rs:218— WatcherThread::watch_tree has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OutputHydrater::hydrate (cognitive 28) crates/task-runner/src/output_hydrater.rs:63— OutputHydrater::hydrate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
moon_workspace::projects_locator::locate_projects_with_globs (cognitive 26) crates/workspace/src/projects_locator.rs:43— moon_workspace::projects_locator::locate_projects_with_globs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Workspace.findRoot (cognitive 26) packages/vscode-extension/src/workspace.ts:98— Workspace.findRoot has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AffectedTracker::is_task_affected (cognitive 24) crates/affected/src/affected_tracker.rs:467— AffectedTracker::is_task_affected has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AugmentedCommand::inherit_from_toolchains (cognitive 24) crates/process-augment/src/augmented_command.rs:333— AugmentedCommand::inherit_from_toolchains has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskTracker::is_task_affected (cognitive 23) crates/affected/src/task_tracker.rs:34— TaskTracker::is_task_affected has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_cli::shared::run_cli (cognitive 23) crates/cli/src/shared.rs:168— moon_cli::shared::run_cli has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (17 pts), if/else 5, boolean chains 1 (nesting depth added 8). 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.
CodeownersGenerator::add_project_entry (cognitive 22) crates/codeowners/src/codeowners_generator.rs:40— CodeownersGenerator::add_project_entry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), match/switch 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.
FileGroup::walk_absolute (cognitive 22) crates/file-group/src/file_group.rs:169— FileGroup::walk_absolute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_action_pipeline::action_pipeline::drain_cleanup_jobs (cognitive 20) crates/action-pipeline/src/action_pipeline.rs:793— moon_action_pipeline::action_pipeline::drain_cleanup_jobs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (5 pts), loops 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.
TemplateLocator::from_str (cognitive 20) crates/config/src/template/template_locator.rs:66— TemplateLocator::from_str has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkspaceTasksQuerent::query_tasks (cognitive 20) crates/workspace/src/tasks_querent.rs:89— WorkspaceTasksQuerent::query_tasks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 2 (4 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.
moon_async_utils::run_pooled_tasks (cognitive 20) crates/async-utils/src/lib.rs:5— moon_async_utils::run_pooled_tasks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), loops 2 (4 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.
Estimate::calculate (cognitive 19) crates/action-pipeline/src/reports/estimate.rs:45— Estimate::calculate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_cache_local::local_storage::evict_manifests (cognitive 19) crates/cache-local/src/local_storage.rs:260— moon_cache_local::local_storage::evict_manifests has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpRemoteStorage::retrieve_blobs (cognitive 19) crates/cache-remote/src/http_remote_storage.rs:274— HttpRemoteStorage::retrieve_blobs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenerateTool::call_tool (cognitive 19) crates/mcp/src/tools/codegen_tools.rs:87— GenerateTool::call_tool has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProjectGraph::internal_search (cognitive 19) crates/project-graph/src/project_graph.rs:458— ProjectGraph::internal_search has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OutputArchiver::archive (cognitive 19) crates/task-runner/src/output_archiver.rs:45— OutputArchiver::archive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ToolchainPlugin::setup_toolchain (cognitive 19) crates/toolchain-plugin/src/toolchain_plugin.rs:651— ToolchainPlugin::setup_toolchain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_daemon_server::daemon_watcher::start_file_listener (cognitive 18) crates/daemon-server/src/daemon_watcher.rs:378— moon_daemon_server::daemon_watcher::start_file_listener has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PruneWorkflow::gather_workspaces (cognitive 17) crates/app/src/commands/docker/prune.rs:46— PruneWorkflow::gather_workspaces has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoonSession::get_cache_engine (cognitive 17) crates/app/src/session.rs:200— MoonSession::get_cache_engine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). 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.
CodeGenerator::resolve_template_locations (cognitive 17) crates/codegen/src/codegen.rs:198— CodeGenerator::resolve_template_locations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
moon_env_var::dotenv::find_trailing_comment (cognitive 17) crates/env-var/src/dotenv.rs:203— moon_env_var::dotenv::find_trailing_comment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, 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.
moon_graph_utils::graph_traits::traverse_deep (cognitive 17) crates/graph-utils/src/graph_traits.rs:14— moon_graph_utils::graph_traits::traverse_deep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GrpcRemoteStorage::store_blobs (cognitive 16) crates/cache-remote/src/grpc_remote_storage.rs:496— GrpcRemoteStorage::store_blobs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CasStore::find_objects_by_prefix (cognitive 16) crates/cas/src/cas.rs:353— CasStore::find_objects_by_prefix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenExpander::expand_inputs (cognitive 16) crates/task-expander/src/token_expander.rs:256— TokenExpander::expand_inputs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: TaskOptions crates/task/src/task_options.rs:21— TooManyFields — 33 stored fields. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) wasm/ext-task/src/lib.rs:18— wasm/ext-task/src/lib.rs:18-60 | wasm/ext-task/src/lib.rs:65-87 | wasm/tc-tier2/src/lib.rs:94-132 | wasm/tc-tier2/src/lib.rs:137-159 — 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 (96 corresponding lines) · ×1
Edited copy of a member (96 corresponding lines) crates/app/src/commands/projects.rs:15— crates/app/src/commands/projects.rs:15-110 | crates/app/src/commands/tasks.rs:19-139 — These two members are one piece of code written twice and then edited apart: 96 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 (97 corresponding lines) · ×1
Edited copy of a member (97 corresponding lines) crates/workspace/src/workspace_builder.rs:162— crates/workspace/src/workspace_builder.rs:162-258 | crates/workspace/src/workspace_builder_async.rs:43-147 — These two members are one piece of code written twice and then edited apart: 97 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 (73 corresponding lines) · ×1
Edited copy of a member (73 corresponding lines) crates/action-graph/src/action_graph_builder.rs:1376— crates/action-graph/src/action_graph_builder.rs:1376-1448 | crates/action-graph/src/action_graph_builder.rs:1516-1595 — These two members are one piece of code written twice and then edited apart: 73 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 (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) crates/workspace/src/projects_builder.rs:629— crates/workspace/src/projects_builder.rs:629-706 | crates/workspace/src/workspace_builder.rs:867-941 — These two members are one piece of code written twice and then edited apart: 75 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 (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) crates/workspace/src/projects_builder.rs:712— crates/workspace/src/projects_builder.rs:712-780 | crates/workspace/src/workspace_builder.rs:946-1033 — These two members are one piece of code written twice and then edited apart: 69 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 (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) crates/workspace/src/projects_builder.rs:154— crates/workspace/src/projects_builder.rs:154-210 | crates/workspace/src/workspace_builder.rs:526-596 — These two members are one piece of code written twice and then edited apart: 57 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) crates/project-graph/src/project_graph.rs:366— crates/project-graph/src/project_graph.rs:366-427 | crates/task-graph/src/task_graph.rs:114-156 — These two members are one piece of code written twice and then edited apart: 43 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) crates/app/src/commands/query/projects.rs:73— crates/app/src/commands/query/projects.rs:73-116 | crates/app/src/commands/query/tasks.rs:71-130 — These two members are one piece of code written twice and then edited apart: 44 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/plugin/src/host.rs:139— crates/plugin/src/host.rs:139-173 | crates/plugin/src/host.rs:226-267 — 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 (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) crates/config-loader/src/extensions_config_ext.rs:45— crates/config-loader/src/extensions_config_ext.rs:45-86 | crates/config-loader/src/toolchains_config_ext.rs:126-174 — These two members are one piece of code written twice and then edited apart: 42 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 (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) crates/app/src/commands/extension/add.rs:32— crates/app/src/commands/extension/add.rs:32-71 | crates/app/src/commands/toolchain/add.rs:32-71 — These two members are one piece of code written twice and then edited apart: 40 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) crates/config-schema/src/json_schemas.rs:26— crates/config-schema/src/json_schemas.rs:26-61 | crates/config-schema/src/json_schemas.rs:85-126 — These two members are one piece of code written twice and then edited apart: 36 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 (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) crates/app/src/session.rs:280— crates/app/src/session.rs:280-297 | crates/app/src/session.rs:315-332 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) crates/mcp/src/tools/project_tools.rs:29— crates/mcp/src/tools/project_tools.rs:29-54 | crates/mcp/src/tools/task_tools.rs:30-56 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) crates/config-schema/src/typescript_types.rs:151— crates/config-schema/src/typescript_types.rs:151-165 | crates/config-schema/src/typescript_types.rs:167-182 | crates/config-schema/src/typescript_types.rs:184-199 — 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 copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) crates/app/src/watchers/workspace_watcher.rs:171— crates/app/src/watchers/workspace_watcher.rs:171-194 | crates/app/src/watchers/workspace_watcher.rs:204-225 | crates/app/src/watchers/workspace_watcher.rs:227-250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) crates/config/src/shapes/input.rs:149— crates/config/src/shapes/input.rs:149-167 | crates/config/src/shapes/output.rs:29-47 | crates/config/src/shapes/output.rs:67-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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 (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) crates/daemon-client/src/daemon_client.rs:217— crates/daemon-client/src/daemon_client.rs:217-235 | crates/daemon-client/src/daemon_client.rs:246-265 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 1+ corresponding lines) · ×1
Edited copies of one member (4 members, 1+ corresponding lines) crates/config/src/task/checks_config.rs:60— crates/config/src/task/checks_config.rs:60-60 | crates/config/src/task_options_config.rs:62-62 | crates/config/src/task_options_config.rs:125-125 | crates/config/src/task_options_config.rs:225-225 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) crates/task-runner/src/task_runner.rs:783— crates/task-runner/src/task_runner.rs:783-794 | crates/task-runner/src/task_runner.rs:799-813 | crates/task-runner/src/task_runner.rs:816-832 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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 (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) crates/app/src/systems/startup.rs:168— crates/app/src/systems/startup.rs:168-180 | crates/app/src/systems/startup.rs:188-205 — 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 (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) crates/action-graph/src/action_graph_builder.rs:510— crates/action-graph/src/action_graph_builder.rs:510-520 | crates/query/src/parser.rs:90-100 — 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 (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) crates/config/src/shapes/output.rs:183— crates/config/src/shapes/output.rs:183-189 | crates/config/src/task/checks_config.rs:142-147 — 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 (58 lines × 2) crates/affected/src/affected_tracker.rs:473— crates/affected/src/affected_tracker.rs:473-530 | crates/affected/src/task_tracker.rs:36-93 — before extracting anything, compare `crates/affected/src/affected_tracker.rs` and `crates/affected/src/task_tracker.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/affected/src/affected_tracker.rs:473` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/affected/src/affected_tracker.rs:468` calls `is_task_marked_ignoring_relations`, `Ok`, `Some` and `crates/affected/src/task_tracker.rs:34` 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 (44 lines × 2) crates/workspace/src/projects_builder.rs:630— crates/workspace/src/projects_builder.rs:630-673 | crates/workspace/src/workspace_builder.rs:868-911 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (29–32 lines × 2) crates/cache-storage/src/storage_backend.rs:213— crates/cache-storage/src/storage_backend.rs:213-241 | crates/cache-storage/src/storage_backend.rs:302-333 — 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/cache-storage/src/storage_backend.rs:213` 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 (26 lines × 2) crates/workspace/src/tasks_builder.rs:161— crates/workspace/src/tasks_builder.rs:161-186 | crates/workspace/src/workspace_builder.rs:330-355 — 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/workspace/src/tasks_builder.rs:161` 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 (25 lines × 2) crates/app-macros/src/lib.rs:173— crates/app-macros/src/lib.rs:173-197 | crates/app-macros/src/lib.rs:230-254 — 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/app-macros/src/lib.rs:173` 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 (23 lines × 2) crates/app/src/commands/docker/file.rs:180— crates/app/src/commands/docker/file.rs:180-202 | crates/app/src/commands/docker/file.rs:233-255 — 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/app/src/commands/docker/file.rs:180` 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 (17–20 lines × 2) crates/app/src/commands/project_graph.rs:45— crates/app/src/commands/project_graph.rs:45-64 | crates/app/src/commands/task_graph.rs:45-61 — 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/app/src/commands/project_graph.rs:45` 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. 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `args` to `ProjectGraphArgs` in one and `TaskGraphArgs` 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 (20 lines × 2) crates/workspace/src/projects_builder.rs:605— crates/workspace/src/projects_builder.rs:605-624 | crates/workspace/src/workspace_builder.rs:824-843 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:605` 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–19 lines × 2) crates/vcs/src/git/tree.rs:157— crates/vcs/src/git/tree.rs:157-172 | crates/vcs/src/git/tree.rs:433-451 — 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/vcs/src/git/tree.rs:157` 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 (17 lines × 2) crates/workspace/src/workspace_builder.rs:176— crates/workspace/src/workspace_builder.rs:176-192 | crates/workspace/src/workspace_builder_async.rs:55-71 — 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/workspace/src/workspace_builder.rs:176` 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 (30 lines × 2) wasm/ext-task/src/lib.rs:19— wasm/ext-task/src/lib.rs:19-48 | wasm/tc-tier2/src/lib.rs:95-124 — before extracting anything, compare `wasm/ext-task/src/lib.rs` and `wasm/tc-tier2/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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 `wasm/ext-task/src/lib.rs:19` 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–14 lines × 2) crates/app/src/commands/generate.rs:89— crates/app/src/commands/generate.rs:89-102 | crates/app/src/commands/template.rs:31-43 — 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/app/src/commands/generate.rs:89` 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 (13 lines × 3) crates/app/src/commands/action_graph.rs:71— crates/app/src/commands/action_graph.rs:71-86 | crates/app/src/commands/project_graph.rs:51-66 | crates/app/src/commands/task_graph.rs:51-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/app/src/commands/action_graph.rs:71` 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 first that the copies are not typed on the same thing: the declarations holding them bind `args` to `ActionGraphArgs` in one and `ProjectGraphArgs` 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 (11 lines × 4) wasm/ext-task/src/lib.rs:37— wasm/ext-task/src/lib.rs:37-47 | wasm/ext-task/src/lib.rs:69-79 | wasm/tc-tier2/src/lib.rs:113-123 | wasm/tc-tier2/src/lib.rs:141-151 — before extracting anything, compare `wasm/ext-task/src/lib.rs` and `wasm/tc-tier2/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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 (9–11 lines × 2) crates/task-runner/src/output_archiver.rs:313— crates/task-runner/src/output_archiver.rs:313-323 | crates/task-runner/src/output_hydrater.rs:218-226 — 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/task-runner/src/output_archiver.rs:313` 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 (10 lines × 4) crates/workspace/src/projects_builder.rs:398— crates/workspace/src/projects_builder.rs:398-407 | crates/workspace/src/tasks_builder.rs:160-169 | crates/workspace/src/workspace_builder.rs:299-308 | crates/workspace/src/workspace_builder.rs:329-338 — before extracting anything, compare `crates/workspace/src/projects_builder.rs` and `crates/workspace/src/workspace_builder.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — 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/workspace/src/projects_builder.rs:398` 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 × 3) crates/app/src/commands/generate.rs:552— crates/app/src/commands/generate.rs:552-560 | crates/app/src/commands/generate.rs:656-664 | crates/app/src/commands/generate.rs:704-712 — 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/app/src/commands/generate.rs:552` 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/app/src/session.rs:203— crates/app/src/session.rs:203-207 | crates/test-utils/src/workspace_mocker.rs:362-366 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/pdk-test-utils/src/extension_wrapper.rs:78— crates/pdk-test-utils/src/extension_wrapper.rs:78-93 | crates/pdk-test-utils/src/extension_wrapper.rs:98-113 | crates/pdk-test-utils/src/toolchain_wrapper.rs:75-94 | crates/pdk-test-utils/src/toolchain_wrapper.rs:99-118 | crates/pdk-test-utils/src/toolchain_wrapper.rs:123-138 — These 5 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 5 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 5 times.
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/test-utils/src/sandbox.rs:40— crates/test-utils/src/sandbox.rs:40-52 | crates/test-utils/src/sandbox.rs:54-66 | crates/test-utils/src/sandbox.rs:68-80 — 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.
Unstable project tc_tier3 — tc_tier3 has instability 0.86 with 1 dependents.
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.
Duplicated block (14 lines × 2 locations) REDACTED:166— REDACTED:166 · REDACTED:249 — all 2 copies are in the same file, and each CITED SPAN is a SPECIALISATION DECLARATION — a type whose `extends` clause names a base and whose body hands that base its own values through `super(…)`. The shared module this dimension usually asks you to extract already exists: it is that base, every one of these sites already reaches it, and the `super(…)` call this row matched on is where each site passes its differences in. So do not read this as an extract-a-helper row — there is no missing helper, and what is left at each site is the declaration of one distinct specialisation, which cannot be deleted without deleting the thing it declares. Read what actually differs between the spans, because two different answers follow. Where the sites differ only in the values they hand the base — a type argument, a service, an alias, a cache — the repetition is a TEMPLATE, and the only moves that collapse it are to generate these declarations from the set they enumerate or to replace the repeated construction with one factory each site calls with its own values; where that set is the point, each site pinning one distinct thing, the repetition IS the enumeration and there is nothing to remove. Where instead a span carries logic OUTSIDE the delegation that is the same at every site, that logic is the part to move, and its home is the base type rather than a new module. Reported because the copies still drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2 locations) packages/vscode-extension/src/commands.ts:28— packages/vscode-extension/src/commands.ts:28 · packages/vscode-extension/src/commands.ts:61 — 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) packages/vscode-extension/src/lastRunView.ts:21— packages/vscode-extension/src/lastRunView.ts:21 · REDACTED:312 — 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 (8 lines × 2 locations) packages/vscode-extension/src/commands.ts:96— packages/vscode-extension/src/commands.ts:96 · packages/vscode-extension/src/commands.ts:108 — 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.
Complex function constructor (cyclomatic 16, cognitive 12) REDACTED:178— constructor has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 getActionType (cyclomatic 14, cognitive 13) packages/visualizer/src/helpers/render.ts:42— getActionType has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 findRoot (cyclomatic 13, cognitive 26) packages/vscode-extension/src/workspace.ts:98— findRoot has cyclomatic complexity 13 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 findMoonBin (cyclomatic 13, cognitive 13) packages/vscode-extension/src/workspace.ts:193— findMoonBin has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 getActionLabel (cyclomatic 13, cognitive 11) packages/visualizer/src/helpers/render.ts:11— getActionLabel has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 canShowTask (cyclomatic 12, cognitive 14) REDACTED:61— canShowTask has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R4 · Test Coverage· No test rig can mount a component in this workspace · ×1
No test rig can mount a component in this workspace vite.config.ts:1— vite.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 2 unreached component module(s) can be tested as written, however the suite is authored: packages/visualizer/src/app.tsx, packages/visualizer/src/components/Graph.tsx. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each.
Dead file (~20 LoC) scenarios/deno-signals/main.ts— no import path from any entry point (7 application, 8 tooling, 11 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~10 LoC) scenarios/interactive/input.mjs— no import path from any entry point (7 application, 8 tooling, 11 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~6 LoC) scenarios/signals/exitCode.mjs— no import path from any entry point (7 application, 8 tooling, 11 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 '@vscode/test-electron' — Declared in packages/vscode-extension/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene· Go module dependencies are not locked · ×1
Go module dependencies are not locked — There is a go.mod but no go.sum — module versions aren't pinned to a verified hash, so builds aren't reproducible (SSDF PW.4.4). Run `go mod tidy` and commit go.sum; keep `GOFLAGS=-mod=readonly` in CI so a build fails rather than silently resolving a new version. Advisory — never scored.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: loadToolsData website/src/data/proto-tools.tsx:35— `loadToolsData` 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 })`.
Interpolated log message defeats structured logging crates/workspace-graph/src/query_projects.rs:42— `debug!` at line 42 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/workspace-graph/src/query_projects.rs:57— `debug!` at line 57 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/workspace-graph/src/query_tasks.rs:43— `debug!` at line 43 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/workspace-graph/src/query_tasks.rs:58— `debug!` at line 58 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/workspace/src/projects_builder.rs:448— `debug!` at line 448 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/workspace/src/projects_builder.rs:724— `debug!` at line 724 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/workspace/src/projects_builder.rs:777— `debug!` at line 777 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/workspace/src/projects_builder.rs:834— `debug!` at line 834 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/workspace/src/projects_builder.rs:848— `debug!` at line 848 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/workspace/src/projects_builder.rs:860— `debug!` at line 860 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/workspace/src/projects_builder.rs:879— `debug!` at line 879 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/workspace/src/projects_builder.rs:909— `debug!` at line 909 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/workspace/src/projects_locator.rs:128— `warn!` at line 128 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/workspace/src/workspace_builder.rs:214— `debug!` at line 214 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/workspace/src/workspace_builder.rs:232— `debug!` at line 232 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/workspace/src/workspace_builder.rs:527— `debug!` at line 527 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/workspace/src/workspace_builder.rs:957— `debug!` at line 957 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/workspace/src/workspace_builder.rs:982— `debug!` at line 982 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/workspace/src/workspace_builder.rs:1027— `debug!` at line 1027 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/workspace/src/workspace_builder.rs:1042— `debug!` at line 1042 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/workspace/src/workspace_builder.rs:1158— `debug!` at line 1158 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/workspace/src/workspace_builder.rs:1170— `debug!` at line 1170 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/workspace/src/workspace_builder.rs:1189— `debug!` at line 1189 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/workspace/src/workspace_builder_async.rs:104— `debug!` at line 104 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/workspace/src/workspace_builder_async.rs:123— `debug!` at line 123 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`.
Documentation: no build, run or usage example packages/core-linux-arm64-gnu/README.md:1— `core-linux-arm64-gnu` is a published package (`package.json` without `"private": true`) and neither `packages/core-linux-arm64-gnu/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-linux-arm64-musl/README.md:1— `core-linux-arm64-musl` is a published package (`package.json` without `"private": true`) and neither `packages/core-linux-arm64-musl/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-linux-x64-gnu/README.md:1— `core-linux-x64-gnu` is a published package (`package.json` without `"private": true`) and neither `packages/core-linux-x64-gnu/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-linux-x64-musl/README.md:1— `core-linux-x64-musl` is a published package (`package.json` without `"private": true`) and neither `packages/core-linux-x64-musl/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-macos-arm64/README.md:1— `core-macos-arm64` is a published package (`package.json` without `"private": true`) and neither `packages/core-macos-arm64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-macos-x64/README.md:1— `core-macos-x64` is a published package (`package.json` without `"private": true`) and neither `packages/core-macos-x64/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/core-windows-x64-msvc/README.md:1— `core-windows-x64-msvc` is a published package (`package.json` without `"private": true`) and neither `packages/core-windows-x64-msvc/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/report/README.md:1— `report` is a published package (`package.json` without `"private": true`) and neither `packages/report/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/types/README.md:1— `types` is a published package (`package.json` without `"private": true`) and neither `packages/types/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example packages/visualizer/README.md:1— `visualizer` is a published package (`package.json` without `"private": true`) and neither `packages/visualizer/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Duplicated predicate crates/workspace/src/projects_builder.rs:579— `!layer_relationships && tag_relationships.is_empty()` appears character-identically in 2 files — crates/workspace/src/projects_builder.rs, crates/workspace/src/workspace_builder.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/affected/src/project_tracker.rs:169— `depth == 0 && self.downstream == DownstreamScope::Direct` appears character-identically in 2 files — crates/affected/src/project_tracker.rs, crates/affected/src/task_tracker.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/affected/src/project_tracker.rs:116— `depth == 0 && self.upstream == UpstreamScope::Direct` appears character-identically in 2 files — crates/affected/src/project_tracker.rs, crates/affected/src/task_tracker.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/workspace/src/workspace_builder.rs:204— `digest.hash == state.data.last_hash && cache_path.exists()` appears character-identically in 2 files — crates/workspace/src/workspace_builder.rs, crates/workspace/src/workspace_builder_async.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/app/src/commands/check.rs:87— `targets.is_empty() && args.plan.is_none()` appears character-identically in 2 files — crates/app/src/commands/check.rs, crates/app/src/commands/ci.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/config/src/shapes/input.rs:349— `value.starts_with('@') && patterns::TOKEN_FUNC_DISTINCT.is_match(value)` appears character-identically in 2 files — crates/config/src/shapes/input.rs, crates/config/src/shapes/output.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.
Orphaned file crates/graph-utils/src/lib.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file crates/cli/src/stdio.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
No ADRs found scenarios/interactive/input.go: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 `scenarios/interactive/input.go` 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 — 1 of 87 project(s) overshoot their size bounds, lowering Project Cohesion to 9.8/10. The most over is `crates/app` (10063 LoC, 138 module-visible types across 15 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 2 of 245 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 245 of the 483 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: crates/graph-utils/src/lib.rs, crates/cli/src/stdio.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
Logging is not universal — Only 39/42 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/config-schema`, `packages/cli`.
No app-layer HTTPS enforcement detected — This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `Server::builder()` (crates/daemon-server/src/daemon_server.rs:614).
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `Server::builder()` (crates/daemon-server/src/daemon_server.rs:614).
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 0/1 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 — 0/9 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 — ~1.0 `!` null assertions per 1k TypeScript source lines — 8 assertion(s) across the 8075 source line(s) of the 85 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: REDACTED (4), packages/visualizer/src/main.tsx (1), packages/vscode-extension/src/commands.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.
Silent fallback default on Err crates/time/src/lib.rs:17— `to_millis` turns every `Err` into `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 in catch packages/vscode-extension/src/workspace.ts:261— `getMoonVersion` swallows every exception into `return '0.0.0'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Outdated: async-compression — `async-compression` is locked at 0.4.51 but 0.4.52 is the current stable release on crates.io, and it already satisfies the `"0.4.50"` requirement declared in crates/cache-remote/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-compression` and commit the updated REDACTED.
Outdated: ignore — `ignore` is locked at 0.4.33 but 0.4.34 is the current stable release on crates.io, and it already satisfies the `"0.4.33"` requirement declared in crates/vcs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ignore` and commit the updated REDACTED.
Outdated: notify-rust — `notify-rust` is locked at 4.18.2 but 4.19.0 is the current stable release on crates.io, and it already satisfies the `"4.18.1"` requirement declared in crates/notifier/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify-rust` and commit the updated REDACTED.
Outdated: notify-types — `notify-types` is locked at 2.1.0 but 2.3.0 is the current stable release on crates.io, and it already satisfies the `"2.1.0"` requirement declared in crates/file-watcher/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify-types` and commit the updated REDACTED.
Outdated: pest — `pest` is locked at 2.9.4 but 2.9.6 is the current stable release on crates.io, and it already satisfies the `"2.9.2"` requirement declared in crates/query/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pest` and commit the updated REDACTED.
Outdated: pest_derive — `pest_derive` is locked at 2.9.4 but 2.9.6 is the current stable release on crates.io, and it already satisfies the `"2.9.2"` requirement declared in crates/query/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pest_derive` and commit the updated REDACTED.
Outdated: prost — `prost` is locked at 0.14.4 but 0.14.6 is the current stable release on crates.io, and it already satisfies the `"0.14.4"` requirement declared in crates/daemon-proto/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p prost` and commit the updated REDACTED.
Outdated: syn — `syn` is locked at 3.0.9 but 3.0.10 is the current stable release on crates.io, and it already satisfies the `"3.0.6"` requirement declared in crates/app-macros/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
Outdated: system_env — `system_env` is locked at 0.10.5 but 0.10.7 is the current stable release on crates.io, and it already satisfies the `"0.10.4"` requirement declared in crates/notifier/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p system_env` and commit the updated REDACTED.
Outdated: tonic — `tonic` is locked at 0.14.6 but 0.14.9 is the current stable release on crates.io, and it already satisfies the `"0.14.6"` requirement declared in crates/cache-remote/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic` and commit the updated REDACTED.
Outdated: tonic-prost — `tonic-prost` is locked at 0.14.6 but 0.14.9 is the current stable release on crates.io, and it already satisfies the `"0.14.6"` requirement declared in crates/daemon-proto/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic-prost` and commit the updated REDACTED.
Outdated: tonic-prost-build — `tonic-prost-build` is locked at 0.14.6 but 0.14.9 is the current stable release on crates.io, and it already satisfies the `"0.14.6"` requirement declared in crates/daemon-proto/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic-prost-build` and commit the updated REDACTED.
Outdated: uuid — `uuid` is locked at 1.28.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.27.0"` requirement declared in crates/api/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
Outdated: version_spec — `version_spec` is locked at 0.11.7 but 0.11.8 is the current stable release on crates.io, and it already satisfies the `"0.11.5"` requirement declared in crates/app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p version_spec` and commit the updated REDACTED.
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) — `website/docusaurus.config.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1dc06-9105-7c8a-bd55-3ae02ad9db8d · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 142 · Warnings: 509 · Recommendations: 78 · Info: 14 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 21:46 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.