Public report of vercel/turborepo, published 12 October 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.10.5). Watchdog 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, 12 October 2026, 04:00 UTC · Survey ID cd_2448cea3f1ac4463a87e0b810a694464
Large · 314,554 LoC · 116 projects · rebuild ~2.6 person-years · weakest lens: Readiness (48%)
Findings by grade
86 critical1033 serious90 minor7 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
12 October 2026, 03:30 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
1148findings with an exact file:lineof 1209 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
93/139dimensions across the health lenses314554 LoC · 116 projects — wide & deep
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
The system is a large, valuable asset currently rated at risk, with a health score of 54%. While the core domain logic is sound, the overall standing indicates significant operational fragility that threatens delivery speed and reliability. With over 300,000 lines of production code and a rebuild cost estimated at €370,000, the business has substantial value tied up here that requires careful stewardship rather than immediate replacement.
The most critical vulnerability lies in operational readiness, which scores poorly at 48%. This weakness creates a high risk of outages and slow incident response, directly impacting customer trust and revenue stability. For a system of this size, poor readiness means that every change carries a higher probability of causing unplanned downtime, making the platform unreliable for critical business functions.
A hidden velocity tax is also eroding efficiency. Code quality signals suggest that every modification costs 2–5% more effort than it should, compounding as the codebase grows. This inefficiency translates to roughly 69 to 413 engineer-days of wasted time annually, a significant cost that drains resources from new feature development and innovation.
Despite these risks, the domain modeling is excellent, and the architecture is generally coherent. The codebase is not boilerplate-heavy, indicating that the core business logic is well-captured and maintainable by the current team. This strong foundation provides a stable base for remediation efforts without requiring a complete rewrite.
The highest-leverage action is to enable automated dependency management and review gates. This single step pays for itself within one to two months by preventing security exposures and reducing maintenance drag. It is the most cost-effective way to stabilize the system and should be prioritized above all other technical debt items.
Note that event-driven patterns and test reliability were not measured, so the full picture of operational risk is incomplete. Leadership should treat the current assessment as a partial view that highlights urgent needs while acknowledging gaps in data.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
249 finding(s) are new versus the previous scan (2026-09-27) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
Rebuild cost & value ~ Modeled — €120,000–€620,000
0.8× (at 54% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~2.6 person-years of build effort (about ~€370,000 to rebuild). Its weakest lens is Readiness at 48% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Enable Dependabot/Renovate or a dependency-review gate.
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.
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 68.8–412.6 engineer-days every year, paid as drag on the ~1,160,854 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–5% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 286,238 line(s) changed over a 90-day window ⇒ ~1,160,854/year · D1/D2/D4/D6 code quality: averaging 7.1/10 ⇒ a 2–5% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~2.6 person-years to rebuild), and its weakest lens is Readiness at 48%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Enable Dependabot/Renovate or a dependency-review gate. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Enable Dependabot/Renovate or a dependency-review gate.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.1/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 7.1/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
895 modules, 1903 dependencies. 4 dependency cycles across 185 modules, marked above the diagonal.
Showing the 40 most-connected modules; 855 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
turbopath.absolute_system_path_buf uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turbopath.absolute_system_path_buf, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
4→9 turbopath.anchored_system_path_buf depends on turbopath.anchored_system_pathcycle✕
Type pairs
1 distinct (type in turbopath.anchored_system_path_buf → type in turbopath.anchored_system_path) reference.
turbopath.anchored_system_path_buf uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turbopath.anchored_system_path_buf, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
4→10 turbopath.anchored_system_path_buf depends on turbopath.absolute_system_pathcycle✕
Type pairs
1 distinct (type in turbopath.anchored_system_path_buf → type in turbopath.absolute_system_path) reference.
turbopath.anchored_system_path_buf uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turbopath.anchored_system_path_buf, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
5→35 turbopath.relative_unix_path_buf depends on libghostty_vt_sys.bindingscycle✕
Type pairs
1 distinct (type in turbopath.relative_unix_path_buf → type in libghostty_vt_sys.bindings) reference.
turbopath.relative_unix_path_buf uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turbopath.relative_unix_path_buf, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
6→35 turborepo_cli.cli.args depends on libghostty_vt_sys.bindingscycle✕
Type pairs
10 distinct (type in turborepo_cli.cli.args → type in libghostty_vt_sys.bindings) references.
turbopath.anchored_system_path uses turbopath.anchored_system_path_buf. Changing turbopath.anchored_system_path_buf can break turbopath.anchored_system_path, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
9→5 turbopath.anchored_system_path depends on turbopath.relative_unix_path_buf✕
Type pairs
1 distinct (type in turbopath.anchored_system_path → type in turbopath.relative_unix_path_buf) reference.
turbopath.anchored_system_path uses turbopath.relative_unix_path_buf. Changing turbopath.relative_unix_path_buf can break turbopath.anchored_system_path, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
9→10 turbopath.anchored_system_path depends on turbopath.absolute_system_pathcycle✕
Type pairs
1 distinct (type in turbopath.anchored_system_path → type in turbopath.absolute_system_path) reference.
turbopath.anchored_system_path uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turbopath.anchored_system_path, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
10→3 turbopath.absolute_system_path depends on turbopath.absolute_system_path_buf✕
Type pairs
1 distinct (type in turbopath.absolute_system_path → type in turbopath.absolute_system_path_buf) reference.
turbopath.absolute_system_path uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turbopath.absolute_system_path, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
10→9 turbopath.absolute_system_path depends on turbopath.anchored_system_path✕
Type pairs
1 distinct (type in turbopath.absolute_system_path → type in turbopath.anchored_system_path) reference.
turbopath.absolute_system_path uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turbopath.absolute_system_path, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
11→2 turborepo_run_summary.execution depends on turborepo_ui✕
Type pairs
1 distinct (type in turborepo_run_summary.execution → type in turborepo_ui) reference.
turborepo_run_summary.execution uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_run_summary.execution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
11→9 turborepo_run_summary.execution depends on turbopath.anchored_system_path✕
Type pairs
1 distinct (type in turborepo_run_summary.execution → type in turbopath.anchored_system_path) reference.
turborepo_run_summary.execution uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_run_summary.execution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
11→34 turborepo_run_summary.execution depends on turborepo_task_idcycle✕
Type pairs
4 distinct (type in turborepo_run_summary.execution → type in turborepo_task_id) references.
turborepo_run_summary.execution uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_run_summary.execution, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
12→3 turborepo_config depends on turbopath.absolute_system_path_buf✕
Type pairs
3 distinct (type in turborepo_config → type in turbopath.absolute_system_path_buf) references.
turborepo_repository.package_json uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.package_json, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→35 turborepo_repository.package_json depends on libghostty_vt_sys.bindingscycle✕
Type pairs
1 distinct (type in turborepo_repository.package_json → type in libghostty_vt_sys.bindings) reference.
turborepo_repository.package_json uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_repository.package_json, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
14→7 turborepo_turbo_json depends on turborepo_errors✕
Type pairs
2 distinct (type in turborepo_turbo_json → type in turborepo_errors) references.
turborepo_cli.commands uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_cli.commands, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→10 turborepo_cli.commands depends on turbopath.absolute_system_path✕
Type pairs
1 distinct (type in turborepo_cli.commands → type in turbopath.absolute_system_path) reference.
turborepo_filewatch.hash_watcher uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_filewatch.hash_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→4 turborepo_filewatch.hash_watcher depends on turbopath.anchored_system_path_buf✕
Type pairs
1 distinct (type in turborepo_filewatch.hash_watcher → type in turbopath.anchored_system_path_buf) reference.
turborepo_filewatch.hash_watcher uses turbopath.anchored_system_path_buf. Changing turbopath.anchored_system_path_buf can break turborepo_filewatch.hash_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→9 turborepo_filewatch.hash_watcher depends on turbopath.anchored_system_path✕
Type pairs
1 distinct (type in turborepo_filewatch.hash_watcher → type in turbopath.anchored_system_path) reference.
turborepo_filewatch.hash_watcher uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_filewatch.hash_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→11 turborepo_filewatch.hash_watcher depends on turborepo_run_summary.execution✕
Type pairs
1 distinct (type in turborepo_filewatch.hash_watcher → type in turborepo_run_summary.execution) reference.
turborepo_filewatch.hash_watcher uses turborepo_run_summary.execution. Changing turborepo_run_summary.execution can break turborepo_filewatch.hash_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→18 turborepo_filewatch.hash_watcher depends on turborepo_scm✕
Type pairs
2 distinct (type in turborepo_filewatch.hash_watcher → type in turborepo_scm) references.
turborepo_filewatch.hash_watcher uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_filewatch.hash_watcher, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
21→16 turborepo_query.package_graph depends on turborepo_query✕
Type pairs
2 distinct (type in turborepo_query.package_graph → type in turborepo_query) references.
turborepo_query.package_graph uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_query.package_graph, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
22→3 turborepo_types depends on turbopath.absolute_system_path_buf✕
Type pairs
1 distinct (type in turborepo_types → type in turbopath.absolute_system_path_buf) reference.
turborepo_run_cache uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_run_cache, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→4 turborepo_run_cache depends on turbopath.anchored_system_path_buf✕
Type pairs
2 distinct (type in turborepo_run_cache → type in turbopath.anchored_system_path_buf) references.
turborepo_run_cache uses turbopath.anchored_system_path_buf. Changing turbopath.anchored_system_path_buf can break turborepo_run_cache, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→10 turborepo_run_cache depends on turbopath.absolute_system_path✕
Type pairs
3 distinct (type in turborepo_run_cache → type in turbopath.absolute_system_path) references.
turborepo_run_cache uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_run_cache, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
24→34 turborepo_run_cache depends on turborepo_task_idcycle✕
Type pairs
2 distinct (type in turborepo_run_cache → type in turborepo_task_id) references.
turborepo_run.builder uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_run.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→5 turborepo_run.builder depends on turbopath.relative_unix_path_buf✕
Type pairs
1 distinct (type in turborepo_run.builder → type in turbopath.relative_unix_path_buf) reference.
turborepo_run.builder uses turbopath.relative_unix_path_buf. Changing turbopath.relative_unix_path_buf can break turborepo_run.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→10 turborepo_run.builder depends on turbopath.absolute_system_path✕
Type pairs
2 distinct (type in turborepo_run.builder → type in turbopath.absolute_system_path) references.
turborepo_run.builder uses turborepo_repository.package_json. Changing turborepo_repository.package_json can break turborepo_run.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→14 turborepo_run.builder depends on turborepo_turbo_json✕
Type pairs
5 distinct (type in turborepo_run.builder → type in turborepo_turbo_json) references.
turborepo_run.builder uses turborepo_repository.package_graph.builder. Changing turborepo_repository.package_graph.builder can break turborepo_run.builder, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
26→32 turborepo_run.builder depends on turborepo_repository.package_graphcycle✕
Type pairs
2 distinct (type in turborepo_run.builder → type in turborepo_repository.package_graph) references.
turborepo_run.builder uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_run.builder, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
26→34 turborepo_run.builder depends on turborepo_task_idcycle✕
Type pairs
1 distinct (type in turborepo_run.builder → type in turborepo_task_id) reference.
turborepo_repository.package_manager uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_repository.package_manager, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→7 turborepo_repository.package_manager depends on turborepo_errors✕
Type pairs
1 distinct (type in turborepo_repository.package_manager → type in turborepo_errors) reference.
turborepo_repository.package_manager uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.package_manager, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→13 turborepo_repository.package_manager depends on turborepo_repository.package_json✕
Type pairs
1 distinct (type in turborepo_repository.package_manager → type in turborepo_repository.package_json) reference.
turborepo_repository.package_manager uses turborepo_repository.package_json. Changing turborepo_repository.package_json can break turborepo_repository.package_manager, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→15 turborepo_repository.package_manager depends on wax✕
Type pairs
1 distinct (type in turborepo_repository.package_manager → type in wax) reference.
turborepo_repository.package_manager uses turborepo_filewatch.hash_watcher. Changing turborepo_filewatch.hash_watcher can break turborepo_repository.package_manager, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→28 turborepo_repository.package_manager depends on turborepo_analytics✕
Type pairs
3 distinct (type in turborepo_repository.package_manager → type in turborepo_analytics) references.
turborepo_repository.package_manager uses turborepo_analytics. Changing turborepo_analytics can break turborepo_repository.package_manager, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→3 turborepo_repository.toolchain depends on turbopath.absolute_system_path_buf✕
Type pairs
6 distinct (type in turborepo_repository.toolchain → type in turbopath.absolute_system_path_buf) references.
turborepo_repository.toolchain uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_repository.toolchain, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→7 turborepo_repository.toolchain depends on turborepo_errors✕
Type pairs
2 distinct (type in turborepo_repository.toolchain → type in turborepo_errors) references.
turborepo_repository.toolchain uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.toolchain, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→13 turborepo_repository.toolchain depends on turborepo_repository.package_json✕
Type pairs
3 distinct (type in turborepo_repository.toolchain → type in turborepo_repository.package_json) references.
turborepo_repository.toolchain uses turborepo_repository.package_json. Changing turborepo_repository.package_json can break turborepo_repository.toolchain, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→29 turborepo_repository.toolchain depends on turborepo_repository.package_manager✕
Type pairs
2 distinct (type in turborepo_repository.toolchain → type in turborepo_repository.package_manager) references.
turborepo_repository.toolchain uses turborepo_repository.package_manager. Changing turborepo_repository.package_manager can break turborepo_repository.toolchain, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→32 turborepo_repository.toolchain depends on turborepo_repository.package_graphcycle✕
Type pairs
1 distinct (type in turborepo_repository.toolchain → type in turborepo_repository.package_graph) reference.
turborepo_repository.toolchain uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_repository.toolchain, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
30→35 turborepo_repository.toolchain depends on libghostty_vt_sys.bindingscycle✕
Type pairs
8 distinct (type in turborepo_repository.toolchain → type in libghostty_vt_sys.bindings) references.
turborepo_repository.toolchain uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_repository.toolchain, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
31→3 turborepo_repository.package_graph.builder depends on turbopath.absolute_system_path_buf✕
Type pairs
2 distinct (type in turborepo_repository.package_graph.builder → type in turbopath.absolute_system_path_buf) references.
turborepo_repository.package_graph.builder uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→9 turborepo_repository.package_graph.builder depends on turbopath.anchored_system_path✕
Type pairs
2 distinct (type in turborepo_repository.package_graph.builder → type in turbopath.anchored_system_path) references.
turborepo_repository.package_graph.builder uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→10 turborepo_repository.package_graph.builder depends on turbopath.absolute_system_path✕
Type pairs
4 distinct (type in turborepo_repository.package_graph.builder → type in turbopath.absolute_system_path) references.
turborepo_repository.package_graph.builder uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→13 turborepo_repository.package_graph.builder depends on turborepo_repository.package_json✕
Type pairs
5 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_repository.package_json) references.
turborepo_repository.package_graph.builder uses turborepo_repository.package_json. Changing turborepo_repository.package_json can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→21 turborepo_repository.package_graph.builder depends on turborepo_query.package_graph✕
Type pairs
2 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_query.package_graph) references.
turborepo_repository.package_graph.builder uses turborepo_query.package_graph. Changing turborepo_query.package_graph can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→28 turborepo_repository.package_graph.builder depends on turborepo_analytics✕
Type pairs
2 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_analytics) references.
turborepo_repository.package_graph.builder uses turborepo_analytics. Changing turborepo_analytics can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→29 turborepo_repository.package_graph.builder depends on turborepo_repository.package_manager✕
Type pairs
4 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_repository.package_manager) references.
turborepo_repository.package_graph.builder uses turborepo_repository.package_manager. Changing turborepo_repository.package_manager can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→30 turborepo_repository.package_graph.builder depends on turborepo_repository.toolchain✕
Type pairs
5 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_repository.toolchain) references.
turborepo_repository.package_graph.builder uses turborepo_repository.toolchain. Changing turborepo_repository.toolchain can break turborepo_repository.package_graph.builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→32 turborepo_repository.package_graph.builder depends on turborepo_repository.package_graphcycle✕
Type pairs
2 distinct (type in turborepo_repository.package_graph.builder → type in turborepo_repository.package_graph) references.
turborepo_repository.package_graph.builder uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_repository.package_graph.builder, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
32→3 turborepo_repository.package_graph depends on turbopath.absolute_system_path_buf✕
Type pairs
3 distinct (type in turborepo_repository.package_graph → type in turbopath.absolute_system_path_buf) references.
turborepo_repository.package_graph uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→4 turborepo_repository.package_graph depends on turbopath.anchored_system_path_buf✕
Type pairs
1 distinct (type in turborepo_repository.package_graph → type in turbopath.anchored_system_path_buf) reference.
turborepo_repository.package_graph uses turbopath.anchored_system_path_buf. Changing turbopath.anchored_system_path_buf can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→7 turborepo_repository.package_graph depends on turborepo_errors✕
Type pairs
1 distinct (type in turborepo_repository.package_graph → type in turborepo_errors) reference.
turborepo_repository.package_graph uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→10 turborepo_repository.package_graph depends on turbopath.absolute_system_path✕
Type pairs
2 distinct (type in turborepo_repository.package_graph → type in turbopath.absolute_system_path) references.
turborepo_repository.package_graph uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→13 turborepo_repository.package_graph depends on turborepo_repository.package_json✕
Type pairs
1 distinct (type in turborepo_repository.package_graph → type in turborepo_repository.package_json) reference.
turborepo_repository.package_graph uses turborepo_repository.package_json. Changing turborepo_repository.package_json can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→29 turborepo_repository.package_graph depends on turborepo_repository.package_manager✕
Type pairs
1 distinct (type in turborepo_repository.package_graph → type in turborepo_repository.package_manager) reference.
turborepo_repository.package_graph uses turborepo_repository.package_manager. Changing turborepo_repository.package_manager can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→30 turborepo_repository.package_graph depends on turborepo_repository.toolchain✕
Type pairs
6 distinct (type in turborepo_repository.package_graph → type in turborepo_repository.toolchain) references.
turborepo_repository.package_graph uses turborepo_repository.toolchain. Changing turborepo_repository.toolchain can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→31 turborepo_repository.package_graph depends on turborepo_repository.package_graph.builder✕
Type pairs
1 distinct (type in turborepo_repository.package_graph → type in turborepo_repository.package_graph.builder) reference.
turborepo_repository.package_graph uses turborepo_repository.package_graph.builder. Changing turborepo_repository.package_graph.builder can break turborepo_repository.package_graph, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→35 turborepo_repository.package_graph depends on libghostty_vt_sys.bindingscycle✕
Type pairs
4 distinct (type in turborepo_repository.package_graph → type in libghostty_vt_sys.bindings) references.
turborepo_repository.package_graph uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_repository.package_graph, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
33→3 turborepo_package_watcher.package_changes_watcher depends on turbopath.absolute_system_path_buf✕
Type pairs
3 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turbopath.absolute_system_path_buf) references.
turborepo_package_watcher.package_changes_watcher uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→4 turborepo_package_watcher.package_changes_watcher depends on turbopath.anchored_system_path_buf✕
Type pairs
1 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turbopath.anchored_system_path_buf) reference.
turborepo_package_watcher.package_changes_watcher uses turbopath.anchored_system_path_buf. Changing turbopath.anchored_system_path_buf can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→9 turborepo_package_watcher.package_changes_watcher depends on turbopath.anchored_system_path✕
Type pairs
1 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turbopath.anchored_system_path) reference.
turborepo_package_watcher.package_changes_watcher uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→14 turborepo_package_watcher.package_changes_watcher depends on turborepo_turbo_json✕
Type pairs
1 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turborepo_turbo_json) reference.
turborepo_package_watcher.package_changes_watcher uses turborepo_turbo_json. Changing turborepo_turbo_json can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→20 turborepo_package_watcher.package_changes_watcher depends on turborepo_filewatch.hash_watcher✕
Type pairs
2 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turborepo_filewatch.hash_watcher) references.
turborepo_package_watcher.package_changes_watcher uses turborepo_filewatch.hash_watcher. Changing turborepo_filewatch.hash_watcher can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→21 turborepo_package_watcher.package_changes_watcher depends on turborepo_query.package_graph✕
Type pairs
3 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turborepo_query.package_graph) references.
turborepo_package_watcher.package_changes_watcher uses turborepo_query.package_graph. Changing turborepo_query.package_graph can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→30 turborepo_package_watcher.package_changes_watcher depends on turborepo_repository.toolchain✕
Type pairs
2 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turborepo_repository.toolchain) references.
turborepo_package_watcher.package_changes_watcher uses turborepo_repository.toolchain. Changing turborepo_repository.toolchain can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→32 turborepo_package_watcher.package_changes_watcher depends on turborepo_repository.package_graph✕
Type pairs
1 distinct (type in turborepo_package_watcher.package_changes_watcher → type in turborepo_repository.package_graph) reference.
turborepo_package_watcher.package_changes_watcher uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_package_watcher.package_changes_watcher, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→32 turborepo_task_id depends on turborepo_repository.package_graph✕
Type pairs
1 distinct (type in turborepo_task_id → type in turborepo_repository.package_graph) reference.
turborepo_repository.uv uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_repository.uv, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→6 turborepo_repository.uv depends on turborepo_cli.cli.args✕
Type pairs
1 distinct (type in turborepo_repository.uv → type in turborepo_cli.cli.args) reference.
turborepo_repository.uv uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_repository.uv, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→20 turborepo_repository.uv depends on turborepo_filewatch.hash_watcher✕
Type pairs
2 distinct (type in turborepo_repository.uv → type in turborepo_filewatch.hash_watcher) references.
turborepo_repository.uv uses turborepo_filewatch.hash_watcher. Changing turborepo_filewatch.hash_watcher can break turborepo_repository.uv, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→30 turborepo_repository.uv depends on turborepo_repository.toolchain✕
Type pairs
7 distinct (type in turborepo_repository.uv → type in turborepo_repository.toolchain) references.
turborepo_repository.uv uses turborepo_repository.toolchain. Changing turborepo_repository.toolchain can break turborepo_repository.uv, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→32 turborepo_repository.uv depends on turborepo_repository.package_graph✕
Type pairs
2 distinct (type in turborepo_repository.uv → type in turborepo_repository.package_graph) references.
turborepo_repository.uv uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_repository.uv, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→35 turborepo_repository.uv depends on libghostty_vt_sys.bindings✕
Type pairs
13 distinct (type in turborepo_repository.uv → type in libghostty_vt_sys.bindings) references.
turborepo_run_summary.tracker uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→9 turborepo_run_summary.tracker depends on turbopath.anchored_system_path✕
Type pairs
1 distinct (type in turborepo_run_summary.tracker → type in turbopath.anchored_system_path) reference.
turborepo_run_summary.tracker uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→10 turborepo_run_summary.tracker depends on turbopath.absolute_system_path✕
Type pairs
2 distinct (type in turborepo_run_summary.tracker → type in turbopath.absolute_system_path) references.
turborepo_run_summary.tracker uses turbopath.absolute_system_path. Changing turbopath.absolute_system_path can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→11 turborepo_run_summary.tracker depends on turborepo_run_summary.execution✕
Type pairs
4 distinct (type in turborepo_run_summary.tracker → type in turborepo_run_summary.execution) references.
turborepo_run_summary.tracker uses turborepo_run_summary.execution. Changing turborepo_run_summary.execution can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→18 turborepo_run_summary.tracker depends on turborepo_scm✕
Type pairs
1 distinct (type in turborepo_run_summary.tracker → type in turborepo_scm) reference.
turborepo_run_summary.tracker uses turborepo_query.package_graph. Changing turborepo_query.package_graph can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→22 turborepo_run_summary.tracker depends on turborepo_types✕
Type pairs
3 distinct (type in turborepo_run_summary.tracker → type in turborepo_types) references.
turborepo_run_summary.tracker uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→34 turborepo_run_summary.tracker depends on turborepo_task_id✕
Type pairs
1 distinct (type in turborepo_run_summary.tracker → type in turborepo_task_id) reference.
turborepo_run_summary.tracker uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_run_summary.tracker, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→35 turborepo_setup.lock depends on libghostty_vt_sys.bindings✕
Type pairs
3 distinct (type in turborepo_setup.lock → type in libghostty_vt_sys.bindings) references.
turborepo_ui.tui.app uses turbopath.absolute_system_path_buf. Changing turbopath.absolute_system_path_buf can break turborepo_ui.tui.app, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→8 turborepo_ui.tui.app depends on turborepo_log.event✕
Type pairs
1 distinct (type in turborepo_ui.tui.app → type in turborepo_log.event) reference.
turborepo_task_graph.visitor uses turbopath.anchored_system_path. Changing turbopath.anchored_system_path can break turborepo_task_graph.visitor, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→15 turborepo_task_graph.visitor depends on wax✕
Type pairs
1 distinct (type in turborepo_task_graph.visitor → type in wax) reference.
turborepo_task_graph.visitor uses turborepo_filewatch.hash_watcher. Changing turborepo_filewatch.hash_watcher can break turborepo_task_graph.visitor, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→22 turborepo_task_graph.visitor depends on turborepo_types✕
Type pairs
1 distinct (type in turborepo_task_graph.visitor → type in turborepo_types) reference.
turborepo_task_graph.visitor uses turborepo_repository.package_graph. Changing turborepo_repository.package_graph can break turborepo_task_graph.visitor, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→34 turborepo_task_graph.visitor depends on turborepo_task_id✕
Type pairs
2 distinct (type in turborepo_task_graph.visitor → type in turborepo_task_id) references.
turborepo_task_graph.visitor uses libghostty_vt_sys.bindings. Changing libghostty_vt_sys.bindings can break turborepo_task_graph.visitor, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→37 turborepo_task_graph.visitor depends on turborepo_run_summary.tracker✕
Type pairs
1 distinct (type in turborepo_task_graph.visitor → type in turborepo_run_summary.tracker) reference.
turborepo_task_graph.visitor uses turborepo_run_summary.tracker. Changing turborepo_run_summary.tracker can break turborepo_task_graph.visitor, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
At a glance — Code Health · 63% · Adequate · gated by D2, X4 ·
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
63
High / Critical
A05:2025 — Injection
46
High / Critical
A02:2025 — Security Misconfiguration
9
Medium
Roadmap
First, enable automated security and dependency review tooling to catch vulnerabilities early, and remove unused dependencies to streamline the codebase. Next, enforce strict timeouts and retry logic on all outbound HTTP calls to prevent system hangs, while adding tests for currently unreached modules to improve coverage. Finally, extend structured logging across all runnable modules to ensure full observability and diagnosability in production.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Enable Dependabot/Renovate or a dependency-review gate.
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.
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 — 86
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 — 1033
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 — 90
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
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
Watchdog 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. 89 of 93 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 93 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, 1148 of 1209 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 — Watchdog 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: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 87.4% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 949 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 143 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `pnpm install --frozen-lockfile --ignore-scripts` in apps/factory/ (143 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/kitchen-sink/apps/api/; jest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/kitchen-sink/packages/jest-presets/ (0 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/kitchen-sink/packages/logger/; jest via `pnpm install --frozen-lockfile --ignore-scripts` in examples/kitchen-sink/packages/ui/; jest via `yarn install --frozen-lockfile --ignore-scripts` in examples/with-docker/apps/api/ (2 tests); jest via `yarn install --frozen-lockfile --ignore-scripts` in examples/with-docker/packages/jest-presets/ (0 tests); jest via `yarn install --frozen-lockfile --ignore-scripts` in examples/with-docker/packages/logger/ (1 tests); node:test via `pnpm install --frozen-lockfile --ignore-scripts` in examples/with-mcp-servers/packages/mcp-calculator/): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in examples/kitchen-sink/apps/api/ was NOT MEASURED: the jest run in examples/kitchen-sink/apps/api/ produced no per-test report (● Validation Error:). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in examples/kitchen-sink/packages/logger/ was NOT MEASURED: the jest run in examples/kitchen-sink/packages/logger/ produced no per-test report (● Validation Error:). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jest suite in examples/kitchen-sink/packages/ui/ was NOT MEASURED: the jest run in examples/kitchen-sink/packages/ui/ produced no per-test report (● Validation Error:). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in examples/with-mcp-servers/packages/mcp-calculator/ was NOT MEASURED: the node:test run in examples/with-mcp-servers/packages/mcp-calculator/ produced no per-test report (> @repo/mcp-calculator@1.0.0 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D12 Dependency Hygiene — not measured this run — Watchdog 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. Not scored — 4 direct Go requirement(s) out of 4 in 3 go.mod were read for PINNING discipline and checksum coverage (0 defect(s) reported), but the outdated/deprecated signal needs the Go module proxy, which had no direct requirement to be asked about, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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.
D27 Navigability — not measured this run — Watchdog 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 — Watchdog 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. `apps/docs/components/diagram/flow-diagram.tsx`, `apps/docs/components/diagram/parse-flowchart.ts`, `apps/docs/geistdocs.tsx`, `apps/docs/scripts/generate-openapi-docs.ts`, `apps/factory/agent/lib/factory-image.ts`, … (+3 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang and Go source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang or Go was found in this repository, 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.
X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 401 further occurrence(s) are not listed individually; the score already reflects all 441.
Repo exclusion declarations: 60 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
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
119 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BunLockfile::subgraph at 130. A further 8 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 turborepo_ui::tui::app::update at 39 — 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/turborepo-query/src/lib.rs (RepositoryQuery::convert_change_reason at 16), crates/turborepo-setup/src/execution_identity.rs (ExecutionContext::new 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.
+ 83 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 Cyclomatic Complexity — start with BunLockfile::subgraph (cyclomatic 130), devtools-client.DevtoolsContent (cyclomatic 79), turborepo_ui::tui::input::encode_key (cyclomatic 70). — 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 Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 143 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with BunLockfile::subgraph (cognitive 375). — Refactoring it lifts Cognitive Complexity from 2.8 to about 4.7/10.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.6 / 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 49 FileTooLong finding(s) in God Classes — start with lib.rs (16), mod.rs (5), builder.rs (3). — One of this dimension's main actionable groups (49 warning-level).
Resolve the 39 FunctionTooLong finding(s) in God Classes — start with lib.rs (4), uv.rs (3), workspace-client.tsx (2). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 37 MethodTooLong finding(s) in God Classes — start with builder.rs (9), lib.rs (5), mod.rs (2). — One of this dimension's main actionable groups (37 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
+ 40 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 16 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with lib.rs (4), create.rs (2), fast_parse.rs (2). — One of this dimension's main actionable groups (16 warning-level).
Resolve the 13 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with lib.rs (3), mod.rs, tags.rs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), lib.rs (2), data_fast_parse.rs (2). — One of this dimension's main actionable groups (12 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.6 / 10Adequategated by 1 critical finding✓ 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.
116 production modules (Cargo+npm), 1 dependency cycle(s), 6 unstable depended-on module(s). Read from the build's own module declarations; 23 module(s) off the main sequence, with abstractness counted on 88 of the 116 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Circular dependency
Off the main sequence: turborepo-ci · ×23
Unstable project turborepo-prune
Unstable project turborepo-run
Unstable project turborepo-task-access
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 23 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 1 Unstable project turborepo-prune finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (2), task_contracts.rs, parser.rs. — One of this dimension's main actionable groups (4 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
5338 test methods: 4698 unit, 638 integration, 0 BDD, 2 e2e. The JavaScript/TypeScript suite contributes 949 `it`/`test` case(s) across 139 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 4389 `#[test]` function(s) across 464 file(s) declaring at least one; its unit/integration split is Cargo's own — 95 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Stronggated by 11 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
10 skipped (10 with a documented reason), 10 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 949 tests. Measured on the JavaScript/TypeScript suite only — at least 143 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: renders without crashing · ×10examples/kitchen-sink/packages/ui/src/counter-button/index.test.tsx:6
Test project verifies nothing: examples/kitchen-sink/packages/uiexamples/kitchen-sink/packages/ui/src/counter-button/index.test.tsx:6
Skipped (documented): installs the latest stable standalone archive after verifying its manifest digest · ×10scripts/install.test.mjs:128
What to do
Resolve the 10 No assertions finding(s) in Test Quality — start with page.svelte.spec.ts (4), validate-ci-summary.test.mjs (3), index.test.tsx (2). — One of this dimension's main actionable groups (10 warning-level).
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with index.test.tsx. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_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 778 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. A further 2 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. ★ 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/turborepo-run/src/builder.rs (67×21=1407); crates/turborepo-repository/src/cargo.rs (52×25=1300); crates/turborepo-package-watcher/src/package_changes_watcher.rs (28×43=1204) Repeated repair below the complexity floor: crates/turborepo-types/src/task_input_matching.rs (4 of 6 changes were fixes); crates/turborepo-cli/src/cli/agent_guidance.rs (3 of 3 changes were fixes)
Resolve the 40 Hotspot finding(s) in Churn × Complexity Hotspots — start with builder.rs (3), mod.rs (3), lib.rs (3). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with task_input_matching.rs, agent_guidance.rs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor6.9 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
174 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/turborepo-repository/src/cargo.rs. Counted over 557 of the 802 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_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.
42 deducted task-comment markers across 314554 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 40 TodoComment finding(s) in Explicit Debt — start with lib.rs (11), fsevent.rs (3), mod.rs (2). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with package_deps.rs, git.rs. — One of this dimension's main actionable groups (2 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README is excellent: it states what Turborepo does (the build system for coding agents), gives a clear overview of the Getting Started, Contributing, Community, and Who-is-using sections, and links to the full docs. The .github/workflows/README documents that directory with Rust workflows, signing, versioned-docs aliases, and a dry-run release path; it is focused on workflows rather than the repository's root. Each apps/factory/README.md through packages/turbo-vsc/README.md document their own directories (e.g., factory pull requests, codemods, telemetry) without mentioning the repository as a whole, so they are not flagged for missing overview or installation guidance. The READMEs all show clear headings and are well-structured. The repository's READMEs are mostly focused on the packages/turbo-workspaces and packages/turbo directories (each documenting their own directory rather than the root repo), with a few package-specific repros for lockfile pruning bugs. The root README is missing from this list; it would cover installation, usage, contribution, and licensing, which are not shown here. A single architecture/design doc appears in the middle of the document set (the visible portion) but is clipped before any of its sections can be flagged as missing.
What to do
Improve Documentation Quality — currently 8.4/10. — The repository's root README is excellent: it states what Turborepo does (the build system for coding agents), gives a clear overview of the Getting Started, Contributing, Community, and Who-is-using sections, and links to the full docs. The .github/workflows/README documents that directory with Rust workflows, signing, versioned-docs aliases, and a dry-run release path; it is focused on workflows rather than the repository's root. Each apps/factory/README.md through packages/turbo-vsc/README.md document their own directories (e.g., factory pull requests, codemods, telemetry) without mentioning the repository as a whole, so they are not flagged for missing overview or installation guidance. The READMEs all show clear headings and are well-structured. The repository's READMEs are mostly focused on the packages/turbo-workspaces and packages/turbo directories (each documenting their own directory rather than the root repo), with a few package-specific repros for lockfile pruning bugs. The root README is missing from this list; it would cover installation, usage, contribution, and licensing, which are not shown here. A single architecture/design doc appears in the middle of the document set (the visible portion) but is clipped before any of its sections can be flagged as missing.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyExemplary◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
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).
46 finding(s): 0 critical, 37 high, 9 medium, 0 low. semgrep hit a parse error in 33 file(s) — `apps/docs/components/diagram/flow-diagram.tsx` (line 146), `apps/docs/components/diagram/parse-flowchart.ts` (lines 245–298), `apps/docs/geistdocs.tsx` (line 116), `apps/docs/scripts/generate-openapi-docs.ts` (line 15), `apps/factory/agent/lib/factory-image.ts` (lines 725–734), … (+28 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 11 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
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 20 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (20). — One of this dimension's main actionable groups (20 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 24 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (21), REDACTED (3). — One of this dimension's main actionable groups (24 issue-level).
Resolve the 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
24 of 557 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/turborepo-wax/src/walk/filter.rs. Counted over 557 of the 802 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 2 Orphaned knowledge finding(s) in Knowledge Freshness — start with filter.rs, parse.rs. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
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 4 Change coupling finding(s) in Change Coupling — start with lib.rs, env.rs, async_cache.rs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with devtools.rs. — One of this dimension's main actionable groups (1 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.
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing. — 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 (2). — 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 the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.
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 14 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.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels6.3 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×2) — apps/docs/app/[lang]/devtools/devtools-client.tsx:1194, apps/factory/app/workspace-client.tsx:1041
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — apps/factory/app/model-picker.tsx:55
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.
A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — apps/docs/app/[lang]/layout.tsx:30
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — crates/turborepo-query/src/query_ide.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — apps/docs/app/[lang]/(home)/graphics/remote-cache-gauge.tsx:119
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 86 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Accessibility linting is already configured — assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The projects ws → @repo/shared (lockfile-tests/fixtures/bun-v2-issue-14048/packages/shared) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`NodePlopAPI` declares 25 required operations: `setGenerator`, `setPrompt`, `setWelcomeMessage`, `getWelcomeMessage`, `getGenerator`, `getGeneratorList`, `setPartial`, `getPartial`, `getPartialList`, `setHelper`, `getHelper`, `getHelperList`, `setActionType`, `getActionType`, `getActionTypeList`, `setPlopfilePath`, `getPlopfilePath`, `getDestBasePath`, `load`, `setDefaultInclude`, `getDefaultInclude`, `renderString`, `addPrompt`, `addPartial`, `addHelper`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/turbo-gen/src/types.ts:184
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation0.0 / 10Critical✓ 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.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12653/apps/api)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12653/packages/audit)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12653/packages/database)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12653/packages/metrics)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12744/apps/api)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12744/packages/audit)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12744/packages/database)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12744/packages/metrics)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@foobar/analytics-endpoint (lockfile-tests/fixtures/issue-12493/apps/analytics-endpoint)` (production) references the test project `@foobar/utils (lockfile-tests/fixtures/issue-12493/packages/utils)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`@foobar/analytics-endpoint (lockfile-tests/fixtures/npm-shallow-install/apps/analytics-endpoint)` (production) references the test project `@foobar/utils (lockfile-tests/fixtures/npm-shallow-install/packages/utils)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
What to do
Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Other · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether domain identifiers are strongly typed (a newtype wrapper) rather than raw primitives — consistency once an idiom exists.
Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.
Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
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 repo and its projects have a README, and whether it's substantive and current.
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 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 903 of 1094 project(s) that lack one — worth up to 1.7 pts.
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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
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 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.2 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 53/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/docs`, `apps/factory`, `crates/libghostty-vt-sys`, `crates/turborepo`, `crates/turborepo-download` and 13 more.
`packages/turbo-codemod/src/utils/logger.ts` reports through `console.*` at 1 site(s) (first at line 15) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/turbo-codemod/src/utils/logger.ts:15
`packages/turbo-utils/src/logger.ts` reports through `console.*` at 3 site(s) (first at line 59) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/turbo-utils/src/logger.ts:59
`packages/turbo-workspaces/src/logger.ts` reports through `console.*` at 2 site(s) (first at line 23) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/turbo-workspaces/src/logger.ts:23
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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. — crates/turborepo-cli/src/commands/docs.rs:77
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 · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
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 the language 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.
`wait_for_file` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — crates/turborepo-daemon/src/connector.rs:369
`transform` is async and calls existsSync, rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/create-turbo/src/transforms/official-starter.ts:19
`transform` is async and calls existsSync, writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/create-turbo/src/transforms/git-ignore.ts:12
`transform` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/create-turbo/src/transforms/update-commands-in-readme.ts:33
`migrate` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-codemod/src/commands/migrate/index.ts:57
`generate` is async and calls mkdirSync, writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-gen/src/generators/empty.ts:8
`generate` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-gen/src/generators/copy.ts:14
`streamingExtract` is async and calls mkdirSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-utils/src/examples.ts:320
`downloadAndExtractExample` is async and calls cpSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-utils/src/examples.ts:556
`createProject` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-utils/src/create-project.ts:37
`findInstalledTurboLsp` is async and calls realpathSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-vsc/src/turbo-discovery.ts:166
`findLocalTurbo` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-vsc/src/turbo-discovery.ts:248
`activate` holds an async function that calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-vsc/src/extension.ts:37
`bunLockToYarnLock` is async and calls existsSync, rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-workspaces/src/utils.ts:629
`detect` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — packages/turbo-workspaces/src/managers/npm.ts:41, packages/turbo-workspaces/src/managers/pnpm.ts:43, packages/turbo-workspaces/src/managers/yarn.ts:42, …
`clean` is async and calls rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×6) — packages/turbo-workspaces/src/managers/npm.ts:218, packages/turbo-workspaces/src/managers/pnpm.ts:218, packages/turbo-workspaces/src/managers/yarn.ts:219, …
`create` is async and calls writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-workspaces/src/managers/pnpm.ts:96
`remove` is async and calls rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-workspaces/src/managers/pnpm.ts:160
`convertLock` is async and calls existsSync, rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/turbo-workspaces/src/managers/pnpm.ts:234
What to do
Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
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 Safety8.7 / 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.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.
9 duplicated blocks under packages/ have copies in at least two of the sibling directories create-turbo, eslint-plugin-turbo, turbo-codemod, turbo-gen, turbo-ignore, turbo-workspaces — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/turbo-codemod/src/commands/migrate/index.ts:66
packages/turbo-workspaces/src/managers/aube.ts:1 · packages/turbo-workspaces/src/managers/nub.ts:1 — these 2 files are line-for-line copies of one another — 109 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/turbo-workspaces/src/managers/aube.ts:1
packages/turbo-workspaces/src/managers/bun.ts:1 · packages/turbo-workspaces/src/managers/npm.ts:1 · packages/turbo-workspaces/src/managers/yarn.ts:1 — these 3 files are line-for-line copies of one another — 109 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/turbo-workspaces/src/managers/bun.ts:1
packages/turbo-workspaces/src/managers/pnpm.ts:80 · packages/turbo-workspaces/src/managers/yarn.ts:79 — the two spans are one implementation copied and then locally edited — 566 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/turbo-workspaces/src/managers/pnpm.ts:80
packages/turbo-types/schemas/schema.ts:1 · packages/turbo-types/src/types/config-v2.ts:1 — these 2 files are line-for-line copies of one another — 95 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/turbo-types/schemas/schema.ts:1
packages/turbo-workspaces/src/managers/aube.ts:95 · packages/turbo-workspaces/src/managers/npm.ts:73 · packages/turbo-workspaces/src/managers/nub.ts:99 · packages/turbo-workspaces/src/managers/yarn.ts:74 — the 4 copies are spread across 4 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/turbo-workspaces/src/managers/aube.ts:95
packages/turbo-codemod/src/transforms/rename-output-mode.ts:29 · packages/turbo-codemod/src/transforms/stabilize-env-mode.ts:103 · packages/turbo-codemod/src/transforms/transform-env-literals-to-wildcards.ts:67 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/turbo-codemod/src/transforms/rename-output-mode.ts:29
packages/turbo-codemod/src/transforms/migrate-dot-env.ts:43 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:33 · packages/turbo-codemod/src/transforms/set-default-outputs.ts:42 · packages/turbo-codemod/src/transforms/stabilize-env-mode.ts:107 · +1 more site(s) not listed — the 5 copies are spread across 5 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/turbo-codemod/src/transforms/migrate-dot-env.ts:43
packages/turbo-gen/src/templates/simple-js/config.js:10 · packages/turbo-gen/src/templates/simple-ts/config.ts:12 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/turbo-gen/src/templates/simple-js/config.js:10
packages/turbo-codemod/src/transforms/update-schema-json-url.ts:33 · packages/turbo-codemod/src/transforms/update-versioned-schema-json.ts:163 — the two spans are one implementation copied and then locally edited — 151 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/turbo-codemod/src/transforms/update-schema-json-url.ts:33
packages/turbo-codemod/src/transforms/clean-globs.ts:23 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:64 · packages/turbo-codemod/src/transforms/set-default-outputs.ts:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/turbo-codemod/src/transforms/clean-globs.ts:23
packages/turbo-workspaces/src/commands/convert/index.ts:39 · packages/turbo-workspaces/src/commands/summary/index.ts:11 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/turbo-workspaces/src/commands/convert/index.ts:39
apps/factory/agent/tools/run_example_script.ts:24 · apps/factory/agent/tools/run_example_turbo_tasks.ts:29 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/factory/agent/tools/run_example_script.ts:24
packages/turbo-ignore/src/check-commit.ts:70 · packages/turbo-ignore/src/check-commit.ts:100 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/turbo-ignore/src/check-commit.ts:70
packages/turbo-codemod/src/commands/migrate/index.ts:66 · packages/turbo-workspaces/src/commands/convert/index.ts:42 · packages/turbo-workspaces/src/commands/summary/index.ts:14 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/turbo-codemod/src/commands/migrate/index.ts:66
packages/turbo-utils/src/get-turbo-configs.ts:151 · packages/turbo-utils/src/get-turbo-configs.ts:240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/turbo-utils/src/get-turbo-configs.ts:151
packages/turbo-vsc/src/extension.ts:131 · packages/turbo-vsc/src/extension.ts:158 — 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. — packages/turbo-vsc/src/extension.ts:131
apps/factory/agent/tools/audit_example_tasks.ts:15 · apps/factory/agent/tools/inspect_example.ts:20 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/factory/agent/tools/audit_example_tasks.ts:15
apps/factory/agent/tools/read_examples_file.ts:20 · apps/factory/agent/tools/write_examples_file.ts:17 — 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. — apps/factory/agent/tools/read_examples_file.ts:20
apps/factory/agent/lib/example-validation.ts:32 · apps/factory/agent/lib/performance-validation.ts:168 — 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. — apps/factory/agent/lib/example-validation.ts:32
apps/factory/agent/tools/find_package_versions.ts:20 · apps/factory/agent/tools/update_example_lockfile.ts:12 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/factory/agent/tools/find_package_versions.ts:20
packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:75 · packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:95 — 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/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:75
packages/turbo-codemod/src/transforms/migrate-dot-env.ts:96 · packages/turbo-codemod/src/transforms/migrate-env-var-dependencies.ts:180 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:86 · packages/turbo-codemod/src/transforms/rename-pipeline.ts:63 · +2 more site(s) not listed — the 6 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/turbo-codemod/src/transforms/migrate-dot-env.ts:96
apps/factory/agent/lib/create-pull-request.ts:421 · apps/factory/agent/lib/create-pull-request.ts:487 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/factory/agent/lib/create-pull-request.ts:421
apps/factory/app/model-picker.tsx:76 · apps/factory/app/model-picker.tsx:123 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/factory/app/model-picker.tsx:76
packages/create-turbo/src/transforms/git-ignore.ts:9 · packages/create-turbo/src/transforms/update-commands-in-readme.ts:27 — the two spans are one implementation copied and then locally edited — 77 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/create-turbo/src/transforms/git-ignore.ts:9
packages/turbo-codemod/src/transforms/rename-pipeline.ts:29 · packages/turbo-codemod/src/transforms/stabilize-ui.ts:32 · packages/turbo-codemod/src/transforms/update-schema-json-url.ts:28 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/turbo-codemod/src/transforms/rename-pipeline.ts:29
packages/turbo-releaser/src/stage.ts:17 · packages/turbo-releaser/src/tag.ts:12 — 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/turbo-releaser/src/stage.ts:17
apps/factory/agent/lib/create-pull-request.ts:151 · apps/factory/agent/lib/pull-request.ts:101 — the two spans are one implementation copied and then locally edited — 58 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/factory/agent/lib/create-pull-request.ts:151
apps/factory/agent/lib/factory-image-types.ts:339 · apps/factory/agent/lib/factory-image-types.ts:357 — 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. — apps/factory/agent/lib/factory-image-types.ts:339
apps/factory/agent/tools/audit_example_versions.ts:82 · REDACTED:60 — 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. — apps/factory/agent/tools/audit_example_versions.ts:82
apps/factory/app/run-maintenance.tsx:154 · apps/factory/app/run-performance.tsx:18 — 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. — apps/factory/app/run-maintenance.tsx:154
packages/create-turbo/src/cli.ts:26 · packages/turbo-ignore/src/cli.ts:22 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/create-turbo/src/cli.ts:26
packages/turbo-codemod/src/cli.ts:95 · packages/turbo-workspaces/src/cli.ts:35 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/turbo-codemod/src/cli.ts:95
scripts/validate-release-pr.mjs:241 · scripts/validate-review-gate.mjs:19 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/validate-release-pr.mjs:241
apps/factory/agent/lib/factory-image-registry.ts:113 · apps/factory/agent/lib/factory-image-registry.ts:126 — 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. — apps/factory/agent/lib/factory-image-registry.ts:113
apps/factory/agent/lib/factory-image-types.ts:207 · apps/factory/agent/lib/factory-image-types.ts:236 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — apps/factory/agent/lib/factory-image-types.ts:207
packages/turbo-workspaces/src/logger.ts:82 · packages/turbo-workspaces/src/logger.ts:96 — 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/turbo-workspaces/src/logger.ts:82
apps/factory/agent/lib/factory-image-types.ts:221 · apps/factory/agent/lib/factory-image-types.ts:248 — 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. — apps/factory/agent/lib/factory-image-types.ts:221
apps/factory/app/api/workspaces/[workspaceId]/diff/route.ts:11 · apps/factory/app/api/workspaces/[workspaceId]/terminal/route.ts:18 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — apps/factory/app/api/workspaces/[workspaceId]/diff/route.ts:11
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.
validateReviewCI has cyclomatic complexity 34 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/validate-review-ci.mjs:14
create has cyclomatic complexity 31 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/create-turbo/src/commands/create/index.ts:69
createPullRequest has cyclomatic complexity 30 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/factory/agent/lib/create-pull-request.ts:209
getWorkspacePackageManager has cyclomatic complexity 30 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-workspaces/src/utils.ts:83
isWorkspaceRecord has cyclomatic complexity 30 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — apps/factory/agent/lib/workspace.ts:144
migrate has cyclomatic complexity 28 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-codemod/src/commands/migrate/index.ts:57
createProject has cyclomatic complexity 22 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-utils/src/create-project.ts:37
main has cyclomatic complexity 21 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lockfile-tests/check-lockfiles.ts:302
parseArgs has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/create-github-api-commit.mjs:44
parseGitHubPush has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/factory/agent/lib/github-push.ts:50
getWorkspaceConfigs has cyclomatic complexity 19 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-utils/src/get-turbo-configs.ts:235
execute has cyclomatic complexity 19 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/factory/agent/tools/audit_example_versions.ts:81
latestRun has cyclomatic complexity 19 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/validate-review-ci.mjs:151
validateDirectory has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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/turbo-utils/src/validate-directory.ts:6
request has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:73
lookupPackage has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-releaser/src/npm.ts:129
parseCreateWorkspaceInput has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — apps/factory/agent/lib/workspace.ts:58
getLocalUpgradeCommand has cyclomatic complexity 19 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/turbo-codemod/src/commands/migrate/steps/get-turbo-upgrade-command.ts:53
runFixtureGroup has cyclomatic complexity 17 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lockfile-tests/runners/local.ts:391
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files8.7 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
apps/factory/app/workspace-client.tsx has 1193 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/factory/app/workspace-client.tsx
packages/turbo-types/src/types/config-v2.ts has 772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/turbo-types/src/types/config-v2.ts
apps/factory/agent/lib/factory-image.ts has 720 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/factory/agent/lib/factory-image.ts
packages/turbo-types/schemas/schema.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/turbo-types/schemas/schema.ts
apps/factory/agent/lib/create-pull-request.ts has 633 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/factory/agent/lib/create-pull-request.ts
packages/turbo-workspaces/src/utils.ts has 607 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/turbo-workspaces/src/utils.ts
packages/turbo-utils/src/examples.ts has 545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/turbo-utils/src/examples.ts
lockfile-tests/runners/local.ts has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lockfile-tests/runners/local.ts
REDACTED has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED
packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage7.3 / 10Strong✓ 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.
turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts:1 imports './index', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts
packages/create-turbo/jest.config.js 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 6 unreached component module(s) can be tested as written, however the suite is authored: apps/factory/app/factory-image.tsx, apps/factory/app/workspace-list.tsx, apps/factory/app/page.tsx, apps/factory/app/factory-image/page.tsx, apps/factory/app/workspaces/[id]/page.tsx, apps/factory/app/work/layout.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. — packages/create-turbo/jest.config.js
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. (×38) — packages/turbo-types/schemas/schema.ts, packages/turbo-vsc/src/extension.ts, apps/factory/agent/tools/audit_example_versions.ts, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts
Do you agree with this assessment?
R7 · Dead Code8.0 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
7 file(s) (~1031 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — lockfile-tests
1 file(s) (~43 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/turbo-gen/src/templates/simple-js
1 file(s) (~45 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/turbo-gen/src/templates/simple-ts
Unreachable from the 76 application, 42 tooling and 175 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (76 application, 42 tooling, 175 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 (×34) — packages/turbo-types/schemas/schema.ts, apps/factory/agent/tools/audit_example_versions.ts, apps/factory/agent/channels/operator.ts, …
no import path from any entry point (76 application, 42 tooling, 175 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/factory/agent/channels/operator.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/factory/agent/channels/workspace.ts
no import path from any entry point (76 application, 42 tooling, 175 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/factory/agent/hooks/workspace-status.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/factory/agent/tools/create_pull_request.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 the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in apps/factory/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. This repository serves HTTP itself (`Server::builder()` (crates/turborepo-daemon/src/server.rs:325)), 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. — crates/turborepo-scm/src/crlf.rs:296
`https://unpkg.com/react@18/umd/react.development.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 3 such include(s) across the repository's markup. — crates/turborepo-query/src/query_ide.html:23
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.
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 11/29 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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.
`fetchDownloads` 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 })`. — apps/docs/app/[lang]/(home)/open-source-metrics.tsx:28
`fetchRepositoryMetrics` 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 })`. — apps/docs/app/[lang]/(home)/open-source-metrics.tsx:55
`fetchOpenIssues` 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 })`. — apps/docs/app/[lang]/(home)/open-source-metrics.tsx:73
`fetchDistTags` 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 })`. — apps/docs/app/api/binaries/version/route.ts:19
`getRemoteCacheSavedMinutes` 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 })`. — apps/docs/app/api/remote-cache-minutes-saved/route.ts:28
`fetchData` 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 })`. — apps/docs/components/remote-cache-counter/use-turborepo-minutes-saved.tsx:15
`trackMdRequest` 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 })`. — apps/docs/lib/md-tracking.ts:21
`refreshPullRequest` 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 })`. — apps/factory/agent/lib/workspace-pull-request.ts:108
`fetchMainCommit` 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 })`. — apps/factory/agent/lib/github.ts:23
`getGitHubToken` 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 })`. — apps/factory/agent/lib/github.ts:52
`fetchGatewayModels` 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 })`. — apps/factory/agent/lib/gateway-models.ts:46
`github` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×3) — apps/factory/agent/lib/create-pull-request.ts:141, scripts/validate-review-gate.mjs:19, scripts/validate-release-pr.mjs:241
`fetchLatestNpmVersion` 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 })`. — apps/factory/agent/tools/audit_example_versions.ts:210
`fetchLatestNodeLts` 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 })`. — apps/factory/agent/tools/audit_example_versions.ts:238
`pollRun` 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 })`. — apps/factory/app/operator-run.tsx:114
`getPackageDetails` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/turbo-codemod/src/commands/migrate/steps/get-latest-version.ts:13
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug!` at line 256 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/turbo-trace/src/tracer.rs:256
`debug!` at line 263 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/turbo-trace/src/tracer.rs:263
`debug!` at line 273 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/turbo-trace/src/tracer.rs:273
`debug!` 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: `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/turbo-trace/src/tracer.rs:278
`debug!` at line 292 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/turbo-trace/src/tracer.rs:292
`debug!` at line 307 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/turbo-trace/src/tracer.rs:307
`debug!` at line 91 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/turborepo-analytics/src/lib.rs:91
`debug!` at line 144 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/turborepo-analytics/src/lib.rs:144
`debug!` at line 155 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/turborepo-analytics/src/lib.rs:155
`debug!` at line 177 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/turborepo-analytics/src/lib.rs:177
`warn!` at line 63 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/turborepo-api-client/src/shared_http_client.rs:63
`warn!` at line 80 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/turborepo-api-client/src/shared_http_client.rs:80
`warn!` at line 787 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/turborepo-api-client/src/lib.rs:787
`debug!` at line 808 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/turborepo-api-client/src/lib.rs:808
`debug!` at line 849 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/turborepo-api-client/src/lib.rs:849
`debug!` at line 858 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/turborepo-api-client/src/lib.rs:858
`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/turborepo-api-client/src/lib.rs:879
`debug!` at line 881 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/turborepo-api-client/src/lib.rs:881
`warn!` at line 64 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/turborepo-auth/src/auth/sso.rs:64
`warn!` at line 212 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/turborepo-auth/src/auth/sso.rs:212
`warn!` at line 262 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/turborepo-auth/src/auth/sso.rs:262
`warn!` at line 359 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/turborepo-auth/src/auth/sso.rs:359
`warn!` at line 465 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/turborepo-auth/src/auth/sso.rs:465
`warn!` at line 240 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/turborepo-auth/src/auth/mod.rs:240
`warn!` at line 310 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/turborepo-auth/src/auth/mod.rs:310
`warn!` at line 407 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/turborepo-auth/src/auth/mod.rs:407
`warn!` at line 417 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/turborepo-auth/src/auth/mod.rs:417
`warn!` at line 422 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/turborepo-auth/src/auth/mod.rs:422
`warn!` at line 431 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/turborepo-auth/src/auth/mod.rs:431
`warn!` at line 437 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/turborepo-auth/src/auth/mod.rs:437
`warn!` at line 462 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/turborepo-auth/src/auth/mod.rs:462
`warn!` at line 470 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/turborepo-auth/src/auth/mod.rs:470
`error!` at line 15 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: `error!(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/turborepo-auth/src/auth/logout.rs:15
`warn!` at line 223 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/turborepo-auth/src/auth/login.rs:223
`warn!` at line 276 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/turborepo-auth/src/auth/login.rs:276
`warn!` at line 325 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/turborepo-auth/src/auth/login.rs:325
`warn!` at line 423 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/turborepo-auth/src/auth/login.rs:423
`warn!` at line 517 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/turborepo-auth/src/auth/login.rs:517
`debug!` at line 56 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/turborepo-cache/src/multiplexer.rs:56
`debug!` at line 352 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/turborepo-cache/src/multiplexer.rs:352
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.
135/143 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.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 42 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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 function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: node:24.21.0-alpine: failed to resolve source metadata for docker.io/library/node:24.21.0-alpine: failed to do request: Head "https://registry-1.docker.io/v2/library/node/manifests/24.21.0-alpine": Forbidden; runtime evidence skipped 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 scored — polyglot repository, one half's runner produced no measurement
D12 Dependency Hygiene — Not scored — 4 direct Go requirement(s) out of 4 in 3 go.mod were read for PINNING discipline and checksum coverage (0 defect(s) reported), but the outdated/deprecated signal needs the Go module proxy, which had no direct requirement to be asked about, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
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.
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. Aggregate roots were found in only one source directory (turborepo-lockfiles), which is a layered codebase, not two contexts. 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"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
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) — 8 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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 — polyglot repository, one half has no runner
DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
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
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
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P9 Domain vs controller coverage — coverage data present for 31 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X3 Exception handling — 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AX8 · Test isolation· Production project references a test project · ×10
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot) → @eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12653/apps/api) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12653/apps/api)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot) → @eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12653/packages/audit) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12653/packages/audit)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot) → @eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12653/packages/database) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12653/packages/database)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot) → @eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12653/packages/metrics) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12653/apps/bot)` (production) references the test project `@eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12653/packages/metrics)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot) → @eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12744/apps/api) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/api (lockfile-tests/fixtures/bun-v1-issue-12744/apps/api)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot) → @eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12744/packages/audit) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/audit (lockfile-tests/fixtures/bun-v1-issue-12744/packages/audit)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot) → @eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12744/packages/database) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/database (lockfile-tests/fixtures/bun-v1-issue-12744/packages/database)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot) → @eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12744/packages/metrics) — `@eventmate/bot (lockfile-tests/fixtures/bun-v1-issue-12744/apps/bot)` (production) references the test project `@eventmate/metrics (lockfile-tests/fixtures/bun-v1-issue-12744/packages/metrics)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @foobar/analytics-endpoint (lockfile-tests/fixtures/issue-12493/apps/analytics-endpoint) → @foobar/utils (lockfile-tests/fixtures/issue-12493/packages/utils) — `@foobar/analytics-endpoint (lockfile-tests/fixtures/issue-12493/apps/analytics-endpoint)` (production) references the test project `@foobar/utils (lockfile-tests/fixtures/issue-12493/packages/utils)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: @foobar/analytics-endpoint (lockfile-tests/fixtures/npm-shallow-install/apps/analytics-endpoint) → @foobar/utils (lockfile-tests/fixtures/npm-shallow-install/packages/utils) — `@foobar/analytics-endpoint (lockfile-tests/fixtures/npm-shallow-install/apps/analytics-endpoint)` (production) references the test project `@foobar/utils (lockfile-tests/fixtures/npm-shallow-install/packages/utils)`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label apps/docs/app/[lang]/devtools/devtools-client.tsx:1194— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label apps/factory/app/model-picker.tsx:55— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label apps/factory/app/workspace-client.tsx:1041— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D11 · Test Reliability· Test suite declares a test script but contains no test files · ×2
Test suite declares a test script but contains no test files: examples/kitchen-sink/packages/jest-presets/ — The jest suite in examples/kitchen-sink/packages/jest-presets/ was installed and launched successfully, and the runner then found no test files to run — No tests found, exiting with code 1. The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL — there are none.
Test suite declares a test script but contains no test files: examples/with-docker/packages/jest-presets/ — The jest suite in examples/with-docker/packages/jest-presets/ was installed and launched successfully, and the runner then found no test files to run — No tests found, exiting with code 1. The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL — there are none.
Orphaned knowledge crates/turborepo-wax/src/walk/filter.rs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge crates/turborepo-wax/src/token/parse.rs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> apps/docs/app/[lang]/layout.tsx:30— A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×1
Click handler on a non-interactive <div> apps/docs/app/[lang]/(home)/graphics/remote-cache-gauge.tsx:119— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Project dependency cycle — The projects ws → @repo/shared (lockfile-tests/fixtures/bun-v2-issue-14048/packages/shared) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
FileTooLong: src/uv.rs crates/turborepo-repository/src/uv.rs— FileTooLong — 2487 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 54 free functions. The bar is 500 significant lines; this is 1987 over it, 4.97× 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/cargo.rs crates/turborepo-repository/src/cargo.rs— FileTooLong — 1949 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 66 free functions. The bar is 500 significant lines; this is 1449 over it, 3.90× 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/builder.rs crates/turborepo-run/src/builder.rs— FileTooLong — 1836 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: RunBuilder (2 blocks, 377-2682). The bar is 500 significant lines; this is 1336 over it, 3.67× 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/go.rs crates/turborepo-repository/src/go.rs— FileTooLong — 1550 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 42 free functions. The bar is 500 significant lines; this is 1050 over it, 3.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: package_graph/builder.rs crates/turborepo-repository/src/package_graph/builder.rs— FileTooLong — 1477 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 977 over it, 2.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/turborepo-filewatch/src/lib.rs— FileTooLong — 1425 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 925 over it, 2.85× 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: tui/app.rs crates/turborepo-ui/src/tui/app.rs— FileTooLong — 1282 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 782 over it, 2.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/turborepo-run/src/lib.rs— FileTooLong — 1255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: Run (3 blocks, 162-1805). The bar is 500 significant lines; this is 755 over it, 2.51× 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: package_graph/mod.rs crates/turborepo-repository/src/package_graph/mod.rs— FileTooLong — 1106 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: PackageGraph (2 blocks, 103-1947). The bar is 500 significant lines; this is 606 over it, 2.21× 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: cli/args.rs crates/turborepo-cli/src/cli/args.rs— FileTooLong — 1098 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 598 over it, 2.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: devtools/devtools-client.tsx apps/docs/app/[lang]/devtools/devtools-client.tsx— FileTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 549 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: app/workspace-client.tsx apps/factory/app/workspace-client.tsx— FileTooLong — 1036 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 536 over it, 2.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: package_manager/mod.rs crates/turborepo-repository/src/package_manager/mod.rs— FileTooLong — 962 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: PackageManager (2 blocks, 69-1399). The bar is 500 significant lines; this is 462 over it, 1.92× 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/repo_index.rs crates/turborepo-scm/src/repo_index.rs— FileTooLong — 933 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 433 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/turborepo-api-client/src/lib.rs— FileTooLong — 911 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: APIClient (6 blocks, 151-1250). The bar is 500 significant lines; this is 411 over it, 1.82× 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/lib.rs crates/turborepo-prune/src/lib.rs— FileTooLong — 902 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 402 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pnpm/data.rs crates/turborepo-lockfiles/src/pnpm/data.rs— FileTooLong — 863 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: PnpmLockfile (3 blocks, 28-1179). The bar is 500 significant lines; this is 363 over it, 1.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: visitor/mod.rs crates/turborepo-task-graph/src/visitor/mod.rs— FileTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: Visitor (2 blocks, 50-1174). The bar is 500 significant lines; this is 356 over it, 1.71× 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/lib.rs crates/turborepo-task-hash/src/lib.rs— FileTooLong — 784 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 284 over it, 1.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/turborepo-query/src/lib.rs— FileTooLong — 778 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 278 over it, 1.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/globwatcher.rs crates/turborepo-filewatch/src/globwatcher.rs— FileTooLong — 770 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 270 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/turborepo-lsp/src/lib.rs— FileTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: Backend (3 blocks, 312-1135). The bar is 500 significant lines; this is 268 over it, 1.54× 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: bun/subgraph.rs crates/turborepo-lockfiles/src/bun/subgraph.rs— FileTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 98% of them inside a single declaration: BunLockfile (21-1277). The bar is 500 significant lines; this is 247 over it, 1.49× 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: child/handle.rs crates/turborepo-process/src/child/handle.rs— FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: ChildHandle (2 blocks, 18-1107). The bar is 500 significant lines; this is 212 over it, 1.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs crates/turborepo-watch/src/lib.rs— FileTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: WatchClient (2 blocks, 139-1020). The bar is 500 significant lines; this is 180 over it, 1.36× 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.
Hotspot: crates/turborepo-run/src/builder.rs crates/turborepo-run/src/builder.rs:905— crates/turborepo-run/src/builder.rs changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RunBuilder::discover_repo at line 905. 3 of those changes were fix/bug commits, and the other 64 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-run/src/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/turborepo-repository/src/cargo.rs crates/turborepo-repository/src/cargo.rs:1109— crates/turborepo-repository/src/cargo.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in turborepo_repository::cargo::cargo_output_arguments at line 1109. 10 of those changes were fix/bug commits, and the other 42 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-repository/src/cargo.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/turborepo-package-watcher/src/package_changes_watcher.rs crates/turborepo-package-watcher/src/package_changes_watcher.rs:710— crates/turborepo-package-watcher/src/package_changes_watcher.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in Subscriber::watch at line 710. 1 of those changes was a fix/bug commit, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-package-watcher/src/package_changes_watcher.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/turborepo-repository/src/package_graph/builder.rs crates/turborepo-repository/src/package_graph/builder.rs:1274— crates/turborepo-repository/src/package_graph/builder.rs changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in BuildState::parse_package_jsons at line 1274. 5 of those changes were fix/bug commits, and the other 49 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-repository/src/package_graph/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/turborepo-cli/src/cli/mod.rs crates/turborepo-cli/src/cli/mod.rs:417— crates/turborepo-cli/src/cli/mod.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in turborepo_cli::cli::run_main at line 417. 3 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-cli/src/cli/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/factory/app/workspace-client.tsx apps/factory/app/workspace-client.tsx:194— apps/factory/app/workspace-client.tsx changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in workspace-client.WorkspaceChat at line 194. 7 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- apps/factory/app/workspace-client.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/turborepo-engine/src/builder/definitions.rs crates/turborepo-engine/src/builder/definitions.rs:294— crates/turborepo-engine/src/builder/definitions.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in EngineBuilder::task_definition_cached at line 294. 8 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-engine/src/builder/definitions.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/turborepo-task-graph/src/visitor/mod.rs crates/turborepo-task-graph/src/visitor/mod.rs:695— crates/turborepo-task-graph/src/visitor/mod.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Visitor::visit at line 695. 1 of those changes was a fix/bug commit, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-task-graph/src/visitor/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/turborepo-repository/src/go.rs crates/turborepo-repository/src/go.rs:1190— crates/turborepo-repository/src/go.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in turborepo_repository::go::discover_workspace at line 1190. 8 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-repository/src/go.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/turborepo-repository/src/external_resolution.rs crates/turborepo-repository/src/external_resolution.rs:573— crates/turborepo-repository/src/external_resolution.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ExternalResolutionGeneration::build at line 573. 2 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-repository/src/external_resolution.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/turborepo-engine/src/builder.rs crates/turborepo-engine/src/builder.rs:283— crates/turborepo-engine/src/builder.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in EngineBuilder::build_inner at line 283. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-engine/src/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/turborepo-lockfiles/src/bun/subgraph.rs crates/turborepo-lockfiles/src/bun/subgraph.rs:76— crates/turborepo-lockfiles/src/bun/subgraph.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in BunLockfile::subgraph at line 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-lockfiles/src/bun/subgraph.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/turborepo-task-executor/src/command.rs crates/turborepo-task-executor/src/command.rs:247— crates/turborepo-task-executor/src/command.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ToolchainCommandProvider::command at line 247. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-task-executor/src/command.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/turbo-repository/rust/src/internal.rs packages/turbo-repository/rust/src/internal.rs:320— packages/turbo-repository/rust/src/internal.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Workspace::find_with_mode at line 320. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- packages/turbo-repository/rust/src/internal.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/turborepo-cli/src/cli/args.rs crates/turborepo-cli/src/cli/args.rs:657— crates/turborepo-cli/src/cli/args.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Args::new at line 657. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-cli/src/cli/args.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: apps/factory/agent/lib/create-pull-request.ts apps/factory/agent/lib/create-pull-request.ts:209— apps/factory/agent/lib/create-pull-request.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in create-pull-request.createPullRequest at line 209. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- apps/factory/agent/lib/create-pull-request.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/turborepo-query/src/affected_tasks.rs crates/turborepo-query/src/affected_tasks.rs:71— crates/turborepo-query/src/affected_tasks.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in turborepo_query::affected_tasks::calculate_affected_tasks_with_packages at line 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-query/src/affected_tasks.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/turborepo-scope/src/filter.rs crates/turborepo-scope/src/filter.rs:419— crates/turborepo-scope/src/filter.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in FilterResolver::filter_graph_with_selectors at line 419. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-scope/src/filter.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/turborepo-lockfiles/src/berry/mod.rs crates/turborepo-lockfiles/src/berry/mod.rs:439— crates/turborepo-lockfiles/src/berry/mod.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in BerryLockfile::subgraph at line 439. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-lockfiles/src/berry/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/factory/agent/lib/workspace.ts apps/factory/agent/lib/workspace.ts:144— apps/factory/agent/lib/workspace.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in workspace.isWorkspaceRecord at line 144. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- apps/factory/agent/lib/workspace.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/turborepo-lsp/src/lib.rs crates/turborepo-lsp/src/lib.rs:940— crates/turborepo-lsp/src/lib.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Backend::handle_file_update at line 940. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-lsp/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/turborepo-lockfiles/src/pnpm/data.rs crates/turborepo-lockfiles/src/pnpm/data.rs:918— crates/turborepo-lockfiles/src/pnpm/data.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in PnpmLockfile::subgraph at line 918. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-lockfiles/src/pnpm/data.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/turborepo-engine/src/validate_engine.rs crates/turborepo-engine/src/validate_engine.rs:111— crates/turborepo-engine/src/validate_engine.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Engine::validate at line 111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-engine/src/validate_engine.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/turborepo-setup/src/node_provision.rs crates/turborepo-setup/src/node_provision.rs:123— crates/turborepo-setup/src/node_provision.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in NodePlan::from_lock at line 123. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-setup/src/node_provision.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: apps/factory/app/run-maintenance.tsx apps/factory/app/run-maintenance.tsx:66— apps/factory/app/run-maintenance.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in run-maintenance.RunMaintenance at line 66. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- apps/factory/app/run-maintenance.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
TodoComment crates/turborepo-auth/src/lib.rs:186— // TODO(voz): This should do a `get_user` or `get_teams` instead of the caller — 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/turborepo-auth/src/lib.rs:318— // TODO: In the future this response should include something that tells us what actions — 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/turborepo-cli/src/cli/mod.rs:160— // TODO: this calculation can probably be wrapped into the path library — 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/turborepo-daemon/src/endpoint.rs:96— // todo: make sure we fall back and handle this — 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/turborepo-daemon/src/endpoint.rs:820— // todo: update this test. we should delete the socket file first, remove the — 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/turborepo-daemon/src/client.rs:103— // todo(arlyon): add session id — 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/turborepo-engine/src/validate_engine.rs:118— // TODO(olszewski) once this is hooked up to a real run, we should — 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/turborepo-env/src/lib.rs:105— // TODO: Consider using immutable data structures here — 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/turborepo-filewatch/src/lib.rs:1936— // TODO: should this be passed in? Currently the caller guarantees that the — 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/turborepo-filewatch/src/hash_watcher.rs:915— // TODO: further qualification. Which sets of inputs? Is this file .gitignored? — 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/turborepo-filewatch/src/fsevent.rs:187— // to figure out if it was a removal some way later (TODO). To denote the — 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/turborepo-filewatch/src/fsevent.rs:489— // TODO: Reconstruct and add paths to error — 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/turborepo-filewatch/src/fsevent.rs:670— // TODO: precise — 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/turborepo-globwatch/src/lib.rs:532— // todo handle brackets — 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/turborepo-globwatch/src/lib.rs:534— // todo handle braces — 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/turborepo-lockfiles/src/berry/mod.rs:700— // TODO Could we dedupe and wrap in Rc? — 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/turborepo-lockfiles/src/bun/ser.rs:9— // registry (TODO: remove if default), — 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/turborepo-lockfiles/src/bun/de.rs:11— // registry (TODO: remove if default), — 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/turborepo-lockfiles/src/pnpm/dep_path.rs:23— // todo we possibly keep the full string here for 0-cost serialization — 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/turborepo-lsp/src/lib.rs:507— // todo: port these from JS land — 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/turborepo-lsp/src/lib.rs:662— // todo: do we error here? — 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/turborepo-microfrontends-config/src/lib.rs:248— // TODO: Move this to only apply to packages that are part of the — 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/turborepo-paths/src/anchored_system_path_buf.rs:68— // TODO: perhaps we ought to be converting to a unix path? — 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/turborepo-paths/src/anchored_system_path_buf.rs:237— // TODO reorder — 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/turborepo-paths/src/absolute_system_path.rs:408— // TODO: consider consolidating with `relation_to_path` below — 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.
FunctionTooLong: devtools-client.DevtoolsContent apps/docs/app/[lang]/devtools/devtools-client.tsx:646— FunctionTooLong — DevtoolsContent runs 562 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 462 over it, 5.62× 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: turborepo_ci::vendors::get_vendors crates/turborepo-ci/src/vendors.rs:30— FunctionTooLong — turborepo_ci::vendors::get_vendors runs 541 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 441 over it, 5.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: turborepo_cli::cli::run_main crates/turborepo-cli/src/cli/mod.rs:417— FunctionTooLong — turborepo_cli::cli::run_main runs 352 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 252 over it, 3.52× 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: workspace-client.WorkspaceChat apps/factory/app/workspace-client.tsx:194— FunctionTooLong — WorkspaceChat runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.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: turborepo_vercel_api_mock::start_test_server crates/turborepo-vercel-api-mock/src/lib.rs:77— FunctionTooLong — turborepo_vercel_api_mock::start_test_server runs 292 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 192 over it, 2.92× 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: remote-cache-gauge.RemoteCacheGauge apps/docs/app/[lang]/(home)/graphics/remote-cache-gauge.tsx:99— FunctionTooLong — RemoteCacheGauge runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: turborepo_scm::repo_index::find_untracked_files crates/turborepo-scm/src/repo_index.rs:939— FunctionTooLong — turborepo_scm::repo_index::find_untracked_files runs 202 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 102 over it, 2.02× 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: validate-review-ci.validateReviewCI scripts/validate-review-ci.mjs:14— FunctionTooLong — validateReviewCI runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: turborepo_filewatch::watch_events crates/turborepo-filewatch/src/lib.rs:895— FunctionTooLong — turborepo_filewatch::watch_events runs 194 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 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: workspace-client.ChatComposer apps/factory/app/workspace-client.tsx:646— FunctionTooLong — ChatComposer runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: factory-image.FactoryImage apps/factory/app/factory-image.tsx:104— FunctionTooLong — FactoryImage runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: turborepo_repository::uv::assemble_uv_contribution crates/turborepo-repository/src/uv.rs:3285— FunctionTooLong — turborepo_repository::uv::assemble_uv_contribution runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.migrate packages/turbo-codemod/src/commands/migrate/index.ts:57— FunctionTooLong — migrate runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: extension.activate packages/turbo-vsc/src/extension.ts:37— FunctionTooLong — activate runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: turborepo_repository::go::discover_workspace crates/turborepo-repository/src/go.rs:1190— FunctionTooLong — turborepo_repository::go::discover_workspace 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: turborepo_prune::prune crates/turborepo-prune/src/lib.rs:271— FunctionTooLong — turborepo_prune::prune runs 160 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 60 over it, 1.60× 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: turborepo_cli::commands::setup::provision::run crates/turborepo-cli/src/commands/setup/provision.rs:172— FunctionTooLong — turborepo_cli::commands::setup::provision::run runs 152 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 52 over it, 1.52× 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: turborepo_lockfiles::closure_dp::all_transitive_closures_dp crates/turborepo-lockfiles/src/closure_dp.rs:56— FunctionTooLong — turborepo_lockfiles::closure_dp::all_transitive_closures_dp runs 152 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 52 over it, 1.52× 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.create packages/create-turbo/src/commands/create/index.ts:69— FunctionTooLong — create runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: model-picker.ModelPicker apps/factory/app/model-picker.tsx:19— FunctionTooLong — ModelPicker runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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: turborepo_scm::manual::get_package_file_hashes_without_git crates/turborepo-scm/src/manual.rs:144— FunctionTooLong — turborepo_scm::manual::get_package_file_hashes_without_git runs 137 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 37 over it, 1.37× 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: turborepo_ui::tui::input::encode_key crates/turborepo-ui/src/tui/input.rs:182— FunctionTooLong — turborepo_ui::tui::input::encode_key runs 133 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 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: create-project.createProject packages/turbo-utils/src/create-project.ts:37— FunctionTooLong — createProject runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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: run-maintenance.RunMaintenance apps/factory/app/run-maintenance.tsx:66— FunctionTooLong — RunMaintenance runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: page.HomePage apps/docs/app/[lang]/(home)/page.tsx:139— FunctionTooLong — HomePage 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.
+ 14 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×38
No test reaches this file packages/turbo-types/schemas/schema.ts— 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/turbo-vsc/src/extension.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/audit_example_versions.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/channels/operator.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/channels/workspace.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED— 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/turbo-gen/src/cli.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/run_performance_command.ts— 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/turbo-codemod/src/cli.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/channels/github.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/run_example_turbo_tasks.ts— 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/create-turbo/src/cli.ts— 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/turbo-gen/scripts/embed-templates.mjs— 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/turbo-releaser/src/index.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/inspect_example.ts— 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/turbo-ignore/src/cli.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/record_issue_assessment.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/hooks/workspace-status.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/scripts/factory.mjs— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/find_package_versions.ts— 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/turbo-types/scripts/generate-schema.ts— 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/turbo-repository/scripts/publish.mjs— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/run_example_script.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/app/api/factory-image/route.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/factory/agent/tools/create_pull_request.ts— 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.
MethodTooLong: BunLockfile.subgraph crates/turborepo-lockfiles/src/bun/subgraph.rs:76— MethodTooLong — subgraph runs 515 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 415 over it, 5.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: EngineBuilder.build_inner crates/turborepo-engine/src/builder.rs:283— MethodTooLong — build_inner runs 272 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 172 over it, 2.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RunSummary.format_and_print_text crates/turborepo-run-summary/src/tracker.rs:477— MethodTooLong — format_and_print_text runs 259 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 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Visitor.visit crates/turborepo-task-graph/src/visitor/mod.rs:695— MethodTooLong — visit 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.
MethodTooLong: EngineBuilder.task_definition_cached crates/turborepo-engine/src/builder/definitions.rs:294— MethodTooLong — task_definition_cached runs 208 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 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CargoContributor.discover_packages crates/turborepo-repository/src/cargo.rs:1720— MethodTooLong — discover_packages runs 184 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 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Run.execute_visitor crates/turborepo-run/src/lib.rs:1056— MethodTooLong — execute_visitor runs 184 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 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RunBuilder.select_tasks crates/turborepo-run/src/builder.rs:1751— MethodTooLong — select_tasks runs 183 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 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShimArgs.parse_from_iter crates/turborepo-shim/src/parser.rs:99— MethodTooLong — parse_from_iter runs 172 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 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Subscriber.watch crates/turborepo-package-watcher/src/package_changes_watcher.rs:710— MethodTooLong — watch runs 165 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 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TaskExecutor.execute_inner crates/turborepo-task-executor/src/exec.rs:342— MethodTooLong — execute_inner runs 158 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 58 over it, 1.58× 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: EnvVars.get_configuration_options crates/turborepo-config/src/env.rs:128— MethodTooLong — get_configuration_options 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.
MethodTooLong: BuildState.build_inner crates/turborepo-repository/src/package_graph/builder.rs:1864— MethodTooLong — build_inner runs 155 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 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TaskCache.restore_outputs crates/turborepo-run-cache/src/lib.rs:554— MethodTooLong — restore_outputs runs 146 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 46 over it, 1.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.
MethodTooLong: RunBuilder.discover_repo crates/turborepo-run/src/builder.rs:905— MethodTooLong — discover_repo runs 145 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 45 over it, 1.45× 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: BerryLockfile.subgraph crates/turborepo-lockfiles/src/berry/mod.rs:439— MethodTooLong — subgraph runs 135 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 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuildState.parse_package_jsons crates/turborepo-repository/src/package_graph/builder.rs:1274— MethodTooLong — parse_package_jsons 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: RunBuilder.build crates/turborepo-run/src/builder.rs:2147— MethodTooLong — build 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: Backend.initialize crates/turborepo-lsp/src/lib.rs:349— MethodTooLong — initialize 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: RepoGitIndex.new_from_gix_index crates/turborepo-scm/src/repo_index.rs:91— MethodTooLong — new_from_gix_index 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: Backend.handle_file_update crates/turborepo-lsp/src/lib.rs:940— MethodTooLong — handle_file_update runs 128 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 28 over it, 1.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: RepositoryKnowledge.build crates/turborepo-repository/src/knowledge.rs:300— MethodTooLong — build runs 124 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 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuildState.build_single_package_graph crates/turborepo-repository/src/package_graph/builder.rs:1460— MethodTooLong — build_single_package_graph runs 123 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 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.
MethodTooLong: RunBuilder.build_execution_context crates/turborepo-run/src/builder.rs:1162— MethodTooLong — build_execution_context runs 123 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 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.
MethodTooLong: Workspace.find_with_mode packages/turbo-repository/rust/src/internal.rs:320— MethodTooLong — find_with_mode runs 123 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 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.
Sync-over-async blocking crates/turborepo-daemon/src/connector.rs:369— `wait_for_file` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
Sync-over-async blocking packages/create-turbo/src/transforms/official-starter.ts:19— `transform` is async and calls existsSync, rmSync — 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/create-turbo/src/transforms/git-ignore.ts:12— `transform` is async and calls existsSync, writeFileSync — 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/create-turbo/src/transforms/update-commands-in-readme.ts:33— `transform` is async and calls existsSync — 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/turbo-codemod/src/commands/migrate/index.ts:57— `migrate` is async and calls execSync — 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/turbo-gen/src/generators/empty.ts:8— `generate` is async and calls mkdirSync, writeFileSync — 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/turbo-gen/src/generators/copy.ts:14— `generate` is async and calls existsSync — 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/turbo-utils/src/examples.ts:320— `streamingExtract` is async and calls mkdirSync — 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/turbo-utils/src/examples.ts:556— `downloadAndExtractExample` is async and calls cpSync — 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/turbo-utils/src/create-project.ts:37— `createProject` is async and calls existsSync — 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/turbo-vsc/src/turbo-discovery.ts:166— `findInstalledTurboLsp` is async and calls realpathSync — 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/turbo-vsc/src/turbo-discovery.ts:248— `findLocalTurbo` is async and calls existsSync — 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/turbo-vsc/src/extension.ts:37— `activate` holds an async function that calls existsSync — 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/turbo-workspaces/src/utils.ts:629— `bunLockToYarnLock` is async and calls existsSync, rmSync — 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/turbo-workspaces/src/managers/npm.ts:41— `detect` is async and calls existsSync — 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/turbo-workspaces/src/managers/npm.ts:218— `clean` is async and calls rmSync — 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/turbo-workspaces/src/managers/pnpm.ts:43— `detect` is async and calls existsSync — 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/turbo-workspaces/src/managers/pnpm.ts:96— `create` is async and calls writeFileSync — 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/turbo-workspaces/src/managers/pnpm.ts:160— `remove` is async and calls rmSync — 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/turbo-workspaces/src/managers/pnpm.ts:218— `clean` is async and calls rmSync — 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/turbo-workspaces/src/managers/pnpm.ts:234— `convertLock` is async and calls existsSync, rmSync — 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/turbo-workspaces/src/managers/yarn.ts:42— `detect` is async and calls existsSync — 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/turbo-workspaces/src/managers/yarn.ts:219— `clean` is async and calls rmSync — 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/turbo-workspaces/src/managers/bun.ts:42— `detect` is async and calls existsSync — 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/turbo-workspaces/src/managers/bun.ts:229— `clean` is async and calls rmSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Off the main sequence: turborepo-ci — turborepo-ci: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: turborepo-fixed-map — turborepo-fixed-map: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: turborepo-ghostty — turborepo-ghostty: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: turborepo-graph-utils — turborepo-graph-utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: turborepo-json-rewrite — turborepo-json-rewrite: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: turborepo-otel — turborepo-otel: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: turborepo-package-manager — turborepo-package-manager: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: turborepo-platform — turborepo-platform: 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: turborepo-profile-md — turborepo-profile-md: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: turborepo-signals — turborepo-signals: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: turborepo-tool-install — turborepo-tool-install: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: turborepo-unescape — turborepo-unescape: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: turborepo-log — turborepo-log: abstractness 0.05, instability 0.00, distance 0.95 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: turborepo-task-id — turborepo-task-id: abstractness 0.00, instability 0.06, distance 0.94 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
Off the main sequence: turborepo-vercel-api — turborepo-vercel-api: abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: eslint-plugin-turbo — eslint-plugin-turbo: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: globwalk — globwalk: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: turborepo-ui — turborepo-ui: abstractness 0.00, instability 0.21, distance 0.79 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
Off the main sequence: turborepo-env — turborepo-env: 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: turborepo-errors — turborepo-errors: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Off the main sequence: turborepo-repository — turborepo-repository: abstractness 0.04, instability 0.23, distance 0.74 — zone of pain — concrete and depended on by 31 project(s), so it's rigid to change.
Off the main sequence: turbopath — turbopath: abstractness 0.22, instability 0.04, distance 0.74 — zone of pain — concrete and depended on by 45 project(s), so it's rigid to change.
Off the main sequence: turborepo-lockfiles — turborepo-lockfiles: abstractness 0.03, instability 0.25, distance 0.72 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
ClassTooLong: RunBuilder crates/turborepo-run/src/builder.rs:377— ClassTooLong — 1534 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 2 blocks, lines 377-2682. The bar is 400 significant lines; this is 1134 over it, 3.84× 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: Run crates/turborepo-run/src/lib.rs:162— ClassTooLong — 912 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 3 blocks, lines 162-1805. The bar is 400 significant lines; this is 512 over it, 2.28× 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: PackageGraph crates/turborepo-repository/src/package_graph/mod.rs:103— ClassTooLong — 863 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 83 methods, 2 blocks, lines 103-1947. The bar is 400 significant lines; this is 463 over it, 2.16× 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: PackageManager crates/turborepo-repository/src/package_manager/mod.rs:69— ClassTooLong — 788 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 2 blocks, lines 69-1399. The bar is 400 significant lines; this is 388 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: App crates/turborepo-ui/src/tui/app.rs:61— ClassTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 50 methods, 3 blocks, lines 61-1172. The bar is 400 significant lines; this is 316 over it, 1.79× 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: BuildState crates/turborepo-repository/src/package_graph/builder.rs:829— ClassTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 5 blocks, lines 829-2050. The bar is 400 significant lines; this is 313 over it, 1.78× 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: APIClient crates/turborepo-api-client/src/lib.rs:151— ClassTooLong — 708 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, 6 blocks, lines 151-1250. The bar is 400 significant lines; this is 308 over it, 1.77× 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: Visitor crates/turborepo-task-graph/src/visitor/mod.rs:50— ClassTooLong — 655 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 2 blocks, lines 50-1174. The bar is 400 significant lines; this is 255 over it, 1.64× 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: PnpmLockfile crates/turborepo-lockfiles/src/pnpm/data.rs:28— ClassTooLong — 599 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 28-1179. The bar is 400 significant lines; this is 199 over it, 1.50× 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: ChildHandle crates/turborepo-process/src/child/handle.rs:18— ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 2 blocks, lines 18-1107. The bar is 400 significant lines; this is 140 over it, 1.35× 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: Backend crates/turborepo-lsp/src/lib.rs:312— ClassTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 312-1135. The bar is 400 significant lines; this is 120 over it, 1.30× 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: Prune crates/turborepo-prune/src/lib.rs:564— ClassTooLong — 472 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 564-1315. The bar is 400 significant lines; this is 72 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EngineBuilder crates/turborepo-engine/src/builder.rs:57— ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 2 blocks, lines 57-758. The bar is 400 significant lines; this is 32 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: HTTPCache crates/turborepo-cache/src/http.rs:39— ClassTooLong — 423 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 2 blocks, lines 39-648. The bar is 400 significant lines; this is 23 over it, 1.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Engine crates/turborepo-engine/src/lib.rs:174— ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 5 blocks, lines 174-906. The bar is 400 significant lines; this is 22 over it, 1.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BerryLockfile crates/turborepo-lockfiles/src/berry/mod.rs:148— ClassTooLong — 413 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 3 blocks, lines 148-861. The bar is 400 significant lines; this is 13 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WatchClient crates/turborepo-watch/src/lib.rs:139— ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 2 blocks, lines 139-1020. The bar is 400 significant lines; this is 10 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RepoGitIndex crates/turborepo-scm/src/repo_index.rs:18— ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 2 blocks, lines 18-739. The bar is 400 significant lines; this is 9 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X2 · Cancellation propagation· Async function without AbortSignal · ×18
Async function without AbortSignal: fetchDownloads apps/docs/app/[lang]/(home)/open-source-metrics.tsx:28— `fetchDownloads` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchRepositoryMetrics apps/docs/app/[lang]/(home)/open-source-metrics.tsx:55— `fetchRepositoryMetrics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchOpenIssues apps/docs/app/[lang]/(home)/open-source-metrics.tsx:73— `fetchOpenIssues` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchDistTags apps/docs/app/api/binaries/version/route.ts:19— `fetchDistTags` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getRemoteCacheSavedMinutes apps/docs/app/api/remote-cache-minutes-saved/route.ts:28— `getRemoteCacheSavedMinutes` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchData apps/docs/components/remote-cache-counter/use-turborepo-minutes-saved.tsx:15— `fetchData` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: trackMdRequest apps/docs/lib/md-tracking.ts:21— `trackMdRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshPullRequest apps/factory/agent/lib/workspace-pull-request.ts:108— `refreshPullRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchMainCommit apps/factory/agent/lib/github.ts:23— `fetchMainCommit` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getGitHubToken apps/factory/agent/lib/github.ts:52— `getGitHubToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchGatewayModels apps/factory/agent/lib/gateway-models.ts:46— `fetchGatewayModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: github apps/factory/agent/lib/create-pull-request.ts:141— `github` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchLatestNpmVersion apps/factory/agent/tools/audit_example_versions.ts:210— `fetchLatestNpmVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchLatestNodeLts apps/factory/agent/tools/audit_example_versions.ts:238— `fetchLatestNodeLts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: pollRun apps/factory/app/operator-run.tsx:114— `pollRun` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getPackageDetails packages/turbo-codemod/src/commands/migrate/steps/get-latest-version.ts:13— `getPackageDetails` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: github scripts/validate-review-gate.mjs:19— `github` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: github scripts/validate-release-pr.mjs:241— `github` 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 })`.
Duplicated block (8 lines × 2) crates/turborepo-auth/src/auth/login.rs:382— crates/turborepo-auth/src/auth/login.rs:382-389 | crates/turborepo-auth/src/auth/sso.rs:324-331 — before extracting anything, compare `crates/turborepo-auth/src/auth/login.rs` and `crates/turborepo-auth/src/auth/sso.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (8 lines × 2) crates/turborepo-cache/src/cache_archive/create.rs:218— crates/turborepo-cache/src/cache_archive/create.rs:218-225 | crates/turborepo-cache/src/cache_archive/create.rs:228-236 — 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/turborepo-cache/src/cache_archive/create.rs:519— crates/turborepo-cache/src/cache_archive/create.rs:519-526 | crates/turborepo-cache/src/cache_archive/create.rs:534-541 — 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/turborepo-cli/src/cli/args.rs:1693— crates/turborepo-cli/src/cli/args.rs:1693-1700 | crates/turborepo-shim/src/parser.rs:332-339 — 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 (8 lines × 2) crates/turborepo-engine/src/lib.rs:887— crates/turborepo-engine/src/lib.rs:887-894 | crates/turborepo-engine/src/lib.rs:898-905 — 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/turborepo-globwalk/src/lib.rs:365— crates/turborepo-globwalk/src/lib.rs:365-372 | crates/turborepo-globwalk/src/lib.rs:399-406 — 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/turborepo-globwalk/src/lib.rs:535— crates/turborepo-globwalk/src/lib.rs:535-542 | crates/turborepo-scm/src/hash_object.rs:20-27 — 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 (8 lines × 2) crates/turborepo-lockfiles/src/berry/fast_parse.rs:190— crates/turborepo-lockfiles/src/berry/fast_parse.rs:190-197 | crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:125-132 — `crates/turborepo-lockfiles/src/berry/fast_parse.rs` and `crates/turborepo-lockfiles/src/yarn1/fast_parse.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 35 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (8 lines × 2) crates/turborepo-lockfiles/src/pnpm/data.rs:1268— crates/turborepo-lockfiles/src/pnpm/data.rs:1268-1275 | crates/turborepo-lockfiles/src/pnpm/data.rs:1280-1287 — 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/turborepo-lockfiles/src/yarn1/fast_parse.rs:191— crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:191-198 | crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:202-209 — 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/turborepo-repository/src/cargo.rs:1376— crates/turborepo-repository/src/cargo.rs:1376-1383 | crates/turborepo-repository/src/uv.rs:2784-2791 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (8 lines × 2) crates/turborepo-repository/src/package_graph/builder.rs:1561— crates/turborepo-repository/src/package_graph/builder.rs:1561-1569 | crates/turborepo-repository/src/package_graph/builder.rs:1979-1986 — 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/turborepo-repository/src/package_manager/mod.rs:489— crates/turborepo-repository/src/package_manager/mod.rs:489-496 | crates/turborepo-repository/src/package_manager/mod.rs:716-723 — 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/turborepo-run/src/lib.rs:1485— crates/turborepo-run/src/lib.rs:1485-1492 | crates/turborepo-run/src/lib.rs:1512-1519 — 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/turborepo-repository/src/cargo.rs:157— crates/turborepo-repository/src/cargo.rs:157-164 | crates/turborepo-repository/src/uv.rs:2658-2665 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (8 lines × 2) crates/turbo-trace/src/tracer.rs:280— crates/turbo-trace/src/tracer.rs:280-287 | crates/turbo-trace/src/tracer.rs:297-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
turborepo_repository::go::discover_workspace (cognitive 51) crates/turborepo-repository/src/go.rs:1190— turborepo_repository::go::discover_workspace has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (35 pts), loops 5 (8 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::go::module_package_inputs (cognitive 50) crates/turborepo-repository/src/go.rs:614— turborepo_repository::go::module_package_inputs has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::go::scope_inventory::scan_directives (cognitive 45) crates/turborepo-repository/src/go/scope_inventory.rs:310— turborepo_repository::go::scope_inventory::scan_directives has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (44 pts), loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::go::scope_inventory::tokenize (cognitive 26) crates/turborepo-repository/src/go/scope_inventory.rs:454— turborepo_repository::go::scope_inventory::tokenize has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (9 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.
turborepo_repository::go::external_resolutions (cognitive 25) crates/turborepo-repository/src/go.rs:1113— turborepo_repository::go::external_resolutions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 5 (8 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::uv::static_package_dependencies (cognitive 24) crates/turborepo-repository/src/uv.rs:3030— turborepo_repository::uv::static_package_dependencies has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::uv::connect_packages (cognitive 23) crates/turborepo-repository/src/uv.rs:1191— turborepo_repository::uv::connect_packages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (8 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.
turborepo_repository::go::scope_inventory::logical_lines (cognitive 22) crates/turborepo-repository/src/go/scope_inventory.rs:390— turborepo_repository::go::scope_inventory::logical_lines has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (8 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::uv::reject_unsupported_local_sources (cognitive 22) crates/turborepo-repository/src/uv.rs:938— turborepo_repository::uv::reject_unsupported_local_sources has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (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.
turborepo_repository::uv::python_tasks_for_package (cognitive 22) crates/turborepo-repository/src/uv.rs:1590— turborepo_repository::uv::python_tasks_for_package has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), 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.
turborepo_repository::cargo::discover_crates_from_manifests (cognitive 20) crates/turborepo-repository/src/cargo.rs:2504— turborepo_repository::cargo::discover_crates_from_manifests has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::go::scope_inventory::parse_go_work (cognitive 18) crates/turborepo-repository/src/go/scope_inventory.rs:218— turborepo_repository::go::scope_inventory::parse_go_work has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::cargo::static_manifest_dependencies (cognitive 17) crates/turborepo-repository/src/cargo.rs:2385— turborepo_repository::cargo::static_manifest_dependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::cargo::connect_crates (cognitive 17) crates/turborepo-repository/src/cargo.rs:2846— turborepo_repository::cargo::connect_crates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (9 lines × 2) crates/turborepo-auth/src/auth/mod.rs:490— crates/turborepo-auth/src/auth/mod.rs:490-498 | crates/turborepo-auth/src/auth/mod.rs:570-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-boundaries/src/tags.rs:88— crates/turborepo-boundaries/src/tags.rs:88-96 | crates/turborepo-boundaries/src/tags.rs:121-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-hash/src/lib.rs:364— crates/turborepo-hash/src/lib.rs:364-372 | crates/turborepo-hash/src/lib.rs:473-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-lockfiles/src/berry/fast_parse.rs:136— crates/turborepo-lockfiles/src/berry/fast_parse.rs:136-144 | crates/turborepo-lockfiles/src/berry/fast_parse.rs:150-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-lockfiles/src/bun/subgraph.rs:11— crates/turborepo-lockfiles/src/bun/subgraph.rs:11-19 | crates/turborepo-prune/src/javascript.rs:16-24 — 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/turborepo-microfrontends/src/lib.rs:211— crates/turborepo-microfrontends/src/lib.rs:211-219 | crates/turborepo-microfrontends/src/lib.rs:367-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-repository/src/go.rs:1254— crates/turborepo-repository/src/go.rs:1254-1264 | crates/turborepo-repository/src/go/scope_inventory.rs:102-110 — 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/turborepo-repository/src/workspaces.rs:214— crates/turborepo-repository/src/workspaces.rs:214-222 | crates/turborepo-repository/src/workspaces.rs:249-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-run-summary/src/tracker.rs:661— crates/turborepo-run-summary/src/tracker.rs:661-671 | crates/turborepo-run-summary/src/tracker.rs:675-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-run/src/lib.rs:1481— crates/turborepo-run/src/lib.rs:1481-1489 | crates/turborepo-run/src/lib.rs:1494-1502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) crates/turborepo-repository/src/package_manager/npmrc.rs:32— crates/turborepo-repository/src/package_manager/npmrc.rs:32-40 | crates/turborepo-repository/src/package_manager/yarnrc.rs:68-76 — 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/turborepo-cli/src/commands/ls.rs:296— crates/turborepo-cli/src/commands/ls.rs:296-304 | crates/turborepo-cli/src/commands/ls.rs:315-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.
Duplicated block (9 lines × 2) crates/turborepo-turbo-json/src/processed.rs:275— crates/turborepo-turbo-json/src/processed.rs:275-283 | crates/turborepo-turbo-json/src/processed.rs:288-296 — 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.
turborepo_setup::source_policy::inspect_inputs (cognitive 39) crates/turborepo-setup/src/source_policy.rs:124— turborepo_setup::source_policy::inspect_inputs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (10 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_setup::lock::reconcile::reconcile_checked (cognitive 35) crates/turborepo-setup/src/lock/reconcile.rs:111— turborepo_setup::lock::reconcile::reconcile_checked has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_setup::version_request::next_prerelease (cognitive 32) crates/turborepo-setup/src/version_request.rs:210— turborepo_setup::version_request::next_prerelease has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 3 (6 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_setup::package_manager::discover_package_manager (cognitive 29) crates/turborepo-setup/src/package_manager.rs:253— turborepo_setup::package_manager::discover_package_manager has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_setup::lock::io::probe_native_with (cognitive 28) crates/turborepo-setup/src/lock/io.rs:149— turborepo_setup::lock::io::probe_native_with has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (9 pts), match/switch 1 (3 pts) (nesting depth added 17). 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.
turborepo_setup::bundled_npm::validate (cognitive 26) crates/turborepo-setup/src/bundled_npm.rs:80— turborepo_setup::bundled_npm::validate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (6 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.
turborepo_setup::node_resolution::resolve (cognitive 26) crates/turborepo-setup/src/node_resolution.rs:78— turborepo_setup::node_resolution::resolve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_setup::version_request::parse_branch (cognitive 22) crates/turborepo-setup/src/version_request.rs:413— turborepo_setup::version_request::parse_branch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, 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.
turborepo_setup::lock::validate_artifact (cognitive 20) crates/turborepo-setup/src/lock.rs:339— turborepo_setup::lock::validate_artifact has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
turborepo_setup::package_manager::request (cognitive 20) crates/turborepo-setup/src/package_manager.rs:139— turborepo_setup::package_manager::request has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 1 (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.
turborepo_setup::js_resolution::resolve (cognitive 16) crates/turborepo-setup/src/js_resolution.rs:97— turborepo_setup::js_resolution::resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
turborepo_setup::registry_metadata::parse_release (cognitive 16) crates/turborepo-setup/src/registry_metadata.rs:80— turborepo_setup::registry_metadata::parse_release has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (6 lines × 2) crates/turborepo-cache/src/cache_archive/restore_symlink.rs:19— crates/turborepo-cache/src/cache_archive/restore_symlink.rs:19-25 | crates/turborepo-cache/src/cache_archive/restore_symlink.rs:50-55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-cli/src/shim.rs:183— crates/turborepo-cli/src/shim.rs:183-188 | crates/turborepo-shim/src/run.rs:626-631 — 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/turborepo-lockfiles/src/berry/mod.rs:460— crates/turborepo-lockfiles/src/berry/mod.rs:460-465 | crates/turborepo-lockfiles/src/berry/mod.rs:485-490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-repository/src/go.rs:930— crates/turborepo-repository/src/go.rs:930-935 | crates/turborepo-repository/src/go.rs:1138-1143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) packages/turbo-repository/rust/src/lib.rs:240— packages/turbo-repository/rust/src/lib.rs:240-245 | packages/turbo-repository/rust/src/lib.rs:262-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-paths/src/absolute_system_path.rs:23— crates/turborepo-paths/src/absolute_system_path.rs:23-28 | crates/turborepo-paths/src/anchored_system_path.rs:9-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/turborepo-repository/src/cargo.rs:2005— crates/turborepo-repository/src/cargo.rs:2005-2010 | crates/turborepo-repository/src/uv.rs:203-208 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (6 lines × 2) crates/turborepo-engine/src/lib.rs:909— crates/turborepo-engine/src/lib.rs:909-914 | crates/turborepo-repository/src/package_graph/mod.rs:1959-1964 — 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/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:639— crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:639-644 | crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:979-984 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-cli/src/cli/mod.rs:541— crates/turborepo-cli/src/cli/mod.rs:541-546 | crates/turborepo-cli/src/cli/mod.rs:802-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:760— crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:760-765 | crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:1033-1038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/turborepo-scm/src/ls_tree.rs:208— crates/turborepo-scm/src/ls_tree.rs:208-213 | crates/turborepo-scm/src/ls_tree.rs:242-247 — 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.
D30 · Dependency Vulnerabilities· Medium CVE · ×11
Duplicated block (7 lines × 2) crates/turborepo-auth/src/lib.rs:483— crates/turborepo-auth/src/lib.rs:483-490 | crates/turborepo-auth/src/lib.rs:521-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/turborepo-engine/src/dot.rs:9— crates/turborepo-engine/src/dot.rs:9-15 | crates/turborepo-engine/src/mermaid.rs:39-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.
Duplicated block (7 lines × 2) crates/turborepo-engine/src/lib.rs:559— crates/turborepo-engine/src/lib.rs:559-565 | crates/turborepo-engine/src/lib.rs:585-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/turborepo-filewatch/src/globwatcher.rs:827— crates/turborepo-filewatch/src/globwatcher.rs:827-833 | crates/turborepo-filewatch/src/globwatcher.rs:900-906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/turborepo-run/src/lib.rs:1534— crates/turborepo-run/src/lib.rs:1534-1540 | crates/turborepo-run/src/lib.rs:1549-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.
Duplicated block (7 lines × 2) crates/turborepo-tool-install/src/lib.rs:683— crates/turborepo-tool-install/src/lib.rs:683-690 | crates/turborepo-tool-install/src/lib.rs:715-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/turborepo/src/main.rs:145— crates/turborepo/src/main.rs:145-151 | crates/turborepo/src/main.rs:171-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/turborepo-microfrontends/src/configv1.rs:226— crates/turborepo-microfrontends/src/configv1.rs:226-232 | crates/turborepo-microfrontends/src/schema.rs:135-141 — before extracting anything, compare `crates/turborepo-microfrontends/src/configv1.rs` and `crates/turborepo-microfrontends/src/schema.rs` as WHOLE FILES: this scan already matched 3 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 (7 lines × 2) crates/turborepo-paths/src/absolute_system_path.rs:298— crates/turborepo-paths/src/absolute_system_path.rs:298-304 | crates/turborepo-paths/src/absolute_system_path_buf.rs:165-171 — 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 (7 lines × 2) crates/turborepo-repository/src/cargo.rs:1707— crates/turborepo-repository/src/cargo.rs:1707-1713 | crates/turborepo-repository/src/uv.rs:3171-3177 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (7 lines × 2) crates/turborepo-profile-md/src/format.rs:187— crates/turborepo-profile-md/src/format.rs:187-193 | crates/turborepo-profile-md/src/format.rs:203-209 — 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.
No assertions: renders without crashing examples/kitchen-sink/packages/ui/src/counter-button/index.test.tsx:6— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders without crashing examples/kitchen-sink/packages/ui/src/link/index.test.tsx:6— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders the page title examples/with-svelte/apps/docs/src/routes/page.svelte.spec.ts:7— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders CounterView from @repo/ui examples/with-svelte/apps/docs/src/routes/page.svelte.spec.ts:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders the page title examples/with-svelte/apps/web/src/routes/page.svelte.spec.ts:7— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders CounterView from @repo/ui examples/with-svelte/apps/web/src/routes/page.svelte.spec.ts:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renders a count based on clicked buttons examples/with-svelte/packages/ui/src/CounterView.svelte.spec.ts:7— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts successful CI on ${eventName} scripts/validate-ci-summary.test.mjs:40— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: accepts validated release skips on ${eventName} scripts/validate-ci-summary.test.mjs:55— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: final summary accepts ${expected} code checks on ${eventName} scripts/validate-ci-summary.test.mjs:248— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
BunLockfile::subgraph (cognitive 375) crates/turborepo-lockfiles/src/bun/subgraph.rs:76— BunLockfile::subgraph has cognitive complexity 375 (threshold 15). Drivers by points: if/else 98 (292 pts), loops 26 (57 pts), boolean chains 22, match/switch 2 (4 pts) (nesting depth added 227). 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.
BunLockfile::subgraph (cognitive 39) crates/turborepo-lockfiles/src/bun/lockfile.rs:142— BunLockfile::subgraph has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 4 (7 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.
BunLockfile::write_packages (cognitive 36) crates/turborepo-lockfiles/src/bun/emit.rs:139— BunLockfile::write_packages has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 2 (7 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BunLockfile::include_duplicate_alias_children (cognitive 31) crates/turborepo-lockfiles/src/bun/subgraph.rs:22— BunLockfile::include_duplicate_alias_children has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BunLockfile::format_array (cognitive 22) crates/turborepo-lockfiles/src/bun/emit.rs:373— BunLockfile::format_array has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). 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.
BunLockfile::remove_unreachable_entries (cognitive 22) crates/turborepo-lockfiles/src/bun/subgraph.rs:1086— BunLockfile::remove_unreachable_entries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (9 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.
BunLockfile::format_array_content (cognitive 19) crates/turborepo-lockfiles/src/bun/emit.rs:414— BunLockfile::format_array_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BunLockfile::workspace_required_patched_idents (cognitive 19) crates/turborepo-lockfiles/src/bun/subgraph.rs:1165— BunLockfile::workspace_required_patched_idents has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (9 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BunLockfile::all_dependencies (cognitive 16) crates/turborepo-lockfiles/src/bun/lockfile.rs:78— BunLockfile::all_dependencies 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.
BunLockfile::from_str (cognitive 16) crates/turborepo-lockfiles/src/bun/parse.rs:58— BunLockfile::from_str has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: PackageGraph crates/turborepo-repository/src/package_graph/mod.rs:103— TooManyMethods — 83 methods, declared across 2 files: package_graph/mod.rs (81), package_graph/javascript.rs (2). The bar is 30 methods; this is 53 over it, 2.77× 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: App crates/turborepo-ui/src/tui/app.rs:61— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: AbsoluteSystemPath crates/turborepo-paths/src/absolute_system_path.rs:42— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Engine crates/turborepo-engine/src/lib.rs:174— TooManyMethods — 44 methods, declared across 5 files: src/lib.rs (39), src/validate_engine.rs (2), src/dot.rs (1), src/execute.rs (1), +1 more file(s). The bar is 30 methods; this is 14 over it, 1.47× 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: PackageManager crates/turborepo-repository/src/package_manager/mod.rs:69— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: ConfigurationOptions crates/turborepo-config/src/lib.rs:277— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: RunBuilder crates/turborepo-run/src/builder.rs:377— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: Run crates/turborepo-run/src/lib.rs:162— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: GitRepo crates/turborepo-scm/src/lib.rs:251— TooManyMethods — 34 methods, declared across 5 files: src/git.rs (17), src/package_deps.rs (9), src/ls_tree.rs (4), src/lib.rs (3), +1 more file(s). The bar is 30 methods; this is 4 over it, 1.13× 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: BunLockfile crates/turborepo-lockfiles/src/bun/data.rs:166— TooManyMethods — 31 methods, declared across 4 files: bun/emit.rs (13), bun/subgraph.rs (10), bun/resolve.rs (7), bun/parse.rs (1). The bar is 30 methods; this is 1 over it, 1.03× 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.
Duplicated block (12 lines × 2) crates/turborepo-process/src/child/handle.rs:803— crates/turborepo-process/src/child/handle.rs:803-814 | crates/turborepo-process/src/child/handle.rs:824-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/turborepo-process/src/child/handle.rs:855— crates/turborepo-process/src/child/handle.rs:855-866 | crates/turborepo-process/src/child/handle.rs:876-887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/turborepo-repository/src/package_graph/builder.rs:946— crates/turborepo-repository/src/package_graph/builder.rs:946-957 | crates/turborepo-repository/src/package_graph/builder.rs:959-970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/turborepo-scm/src/ls_tree.rs:71— crates/turborepo-scm/src/ls_tree.rs:71-82 | crates/turborepo-scm/src/ls_tree.rs:107-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/turborepo-telemetry/src/events/command.rs:104— crates/turborepo-telemetry/src/events/command.rs:104-115 | crates/turborepo-telemetry/src/events/generic.rs:163-174 — before extracting anything, compare `crates/turborepo-telemetry/src/events/command.rs` and `crates/turborepo-telemetry/src/events/generic.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 (12 lines × 2) crates/turborepo-telemetry/src/events/command.rs:117— crates/turborepo-telemetry/src/events/command.rs:117-128 | crates/turborepo-telemetry/src/events/generic.rs:176-187 — before extracting anything, compare `crates/turborepo-telemetry/src/events/command.rs` and `crates/turborepo-telemetry/src/events/generic.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 (12 lines × 2) crates/turborepo-telemetry/src/events/generic.rs:283— crates/turborepo-telemetry/src/events/generic.rs:283-294 | crates/turborepo-telemetry/src/events/task.rs:170-181 — before extracting anything, compare `crates/turborepo-telemetry/src/events/generic.rs` and `crates/turborepo-telemetry/src/events/task.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (12 lines × 2) crates/turborepo-run-cache/src/lib.rs:568— crates/turborepo-run-cache/src/lib.rs:568-582 | crates/turborepo-run-cache/src/lib.rs:657-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.
Duplicated block (12 lines × 2) crates/turborepo-repository/src/uv.rs:1628— crates/turborepo-repository/src/uv.rs:1628-1639 | crates/turborepo-repository/src/uv.rs:1684-1695 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/turborepo-ui/src/tui/input.rs:276— crates/turborepo-ui/src/tui/input.rs:276-287 | crates/turborepo-ui/src/tui/input.rs:298-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-boundaries/src/config.rs:128— crates/turborepo-boundaries/src/config.rs:128-137 | crates/turborepo-boundaries/src/config.rs:154-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-boundaries/src/config.rs:140— crates/turborepo-boundaries/src/config.rs:140-149 | crates/turborepo-boundaries/src/config.rs:166-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-cli/src/commands/run.rs:78— crates/turborepo-cli/src/commands/run.rs:78-87 | crates/turborepo-watch/src/lib.rs:525-534 — 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 (10 lines × 2) crates/turborepo-lockfiles/src/berry/fast_parse.rs:56— crates/turborepo-lockfiles/src/berry/fast_parse.rs:56-65 | crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:70-79 — `crates/turborepo-lockfiles/src/berry/fast_parse.rs` and `crates/turborepo-lockfiles/src/yarn1/fast_parse.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 35 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) crates/turborepo-lockfiles/src/berry/identifiers.rs:69— crates/turborepo-lockfiles/src/berry/identifiers.rs:69-78 | crates/turborepo-lockfiles/src/berry/identifiers.rs:92-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:271— crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:271-280 | crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:291-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-repository/src/package_manager/mod.rs:801— crates/turborepo-repository/src/package_manager/mod.rs:801-810 | crates/turborepo-repository/src/package_manager/mod.rs:836-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-scope/src/target_selector.rs:220— crates/turborepo-scope/src/target_selector.rs:220-229 | crates/turborepo-scope/src/target_selector.rs:233-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-turbo-json/src/validator.rs:139— crates/turborepo-turbo-json/src/validator.rs:139-148 | crates/turborepo-turbo-json/src/validator.rs:162-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/turborepo-microfrontends-proxy/src/websocket.rs:331— crates/turborepo-microfrontends-proxy/src/websocket.rs:331-340 | crates/turborepo-microfrontends-proxy/src/websocket.rs:368-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-cli/src/commands/login/mod.rs:60— crates/turborepo-cli/src/commands/login/mod.rs:60-64 | crates/turborepo-cli/src/commands/login/mod.rs:86-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-lockfiles/src/berry/mod.rs:560— crates/turborepo-lockfiles/src/berry/mod.rs:560-564 | crates/turborepo-lockfiles/src/berry/mod.rs:580-584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-repository/src/cargo.rs:1975— crates/turborepo-repository/src/cargo.rs:1975-1979 | crates/turborepo-repository/src/uv.rs:3191-3195 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (5 lines × 2) crates/turborepo-repository/src/go/scope_inventory.rs:324— crates/turborepo-repository/src/go/scope_inventory.rs:324-328 | crates/turborepo-repository/src/go/scope_inventory.rs:362-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-repository/src/package_manager/bun.rs:55— crates/turborepo-repository/src/package_manager/bun.rs:55-60 | crates/turborepo-repository/src/package_manager/npm.rs:51-55 — 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 (5 lines × 2) crates/turborepo-scm/src/status.rs:59— crates/turborepo-scm/src/status.rs:59-63 | crates/turborepo-scm/src/status.rs:83-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-cache/src/cache_archive/restore_symlink.rs:129— crates/turborepo-cache/src/cache_archive/restore_symlink.rs:129-133 | crates/turborepo-task-access/src/lib.rs:212-216 — 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 (5 lines × 2) crates/turborepo-repository/src/cargo.rs:670— crates/turborepo-repository/src/cargo.rs:670-674 | crates/turborepo-repository/src/uv.rs:2678-2682 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (5 lines × 2) crates/turborepo-lockfiles/src/bun/index.rs:68— crates/turborepo-lockfiles/src/bun/index.rs:68-72 | crates/turborepo-lockfiles/src/bun/index.rs:85-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/turborepo-microfrontends-proxy/src/http.rs:70— crates/turborepo-microfrontends-proxy/src/http.rs:70-74 | crates/turborepo-microfrontends-proxy/src/websocket.rs:123-127 — 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.
turborepo_lockfiles::closure_dp::all_transitive_closures_dp (cognitive 93) crates/turborepo-lockfiles/src/closure_dp.rs:56— turborepo_lockfiles::closure_dp::all_transitive_closures_dp has cognitive complexity 93 (threshold 15). Drivers by points: loops 20 (45 pts), if/else 13 (36 pts), match/switch 3 (10 pts), boolean chains 2 (nesting depth added 55). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
turborepo_lockfiles::closure_dp::tarjan_scc (cognitive 31) crates/turborepo-lockfiles/src/closure_dp.rs:304— turborepo_lockfiles::closure_dp::tarjan_scc has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_lockfiles::pnpm::data_fast_parse::parse_value (cognitive 22) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:518— turborepo_lockfiles::pnpm::data_fast_parse::parse_value has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 10). 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.
turborepo_lockfiles::pnpm::data_scanner::split_flow_members (cognitive 22) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:657— turborepo_lockfiles::pnpm::data_scanner::split_flow_members has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_lockfiles::berry::fast_parse::plain_scalar_ok (cognitive 19) crates/turborepo-lockfiles/src/berry/fast_parse.rs:265— turborepo_lockfiles::berry::fast_parse::plain_scalar_ok has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turborepo_lockfiles::pnpm::data_fast_parse::plain_scalar_to_value (cognitive 19) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:458— turborepo_lockfiles::pnpm::data_fast_parse::plain_scalar_to_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, match/switch 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.
turborepo_lockfiles::pnpm::data_scanner::split_key (cognitive 16) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:492— turborepo_lockfiles::pnpm::data_scanner::split_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
turborepo_lockfiles::yarn1::fast_parse::scan_pseudostring (cognitive 16) crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:379— turborepo_lockfiles::yarn1::fast_parse::scan_pseudostring has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::commands::setup::root::infer (cognitive 35) crates/turborepo-cli/src/commands/setup/root.rs:90— turborepo_cli::commands::setup::root::infer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::cli::run_main (cognitive 34) crates/turborepo-cli/src/cli/mod.rs:417— turborepo_cli::cli::run_main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::commands::boundaries::run (cognitive 31) crates/turborepo-cli/src/commands/boundaries.rs:14— turborepo_cli::commands::boundaries::run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::commands::setup::provision::run (cognitive 27) crates/turborepo-cli/src/commands/setup/provision.rs:172— turborepo_cli::commands::setup::provision::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 5, loops 1, match/switch 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.
turborepo_cli::commands::query::run (cognitive 26) crates/turborepo-cli/src/commands/query.rs:118— turborepo_cli::commands::query::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (6 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::commands::setup::root::check_nested_markers (cognitive 21) crates/turborepo-cli/src/commands/setup/root.rs:220— turborepo_cli::commands::setup::root::check_nested_markers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_cli::commands::ls::run (cognitive 20) crates/turborepo-cli/src/commands/ls.rs:89— turborepo_cli::commands::ls::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_repository::go::discover_workspace (cyclomatic 28) crates/turborepo-repository/src/go.rs:1190— turborepo_repository::go::discover_workspace 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.
turborepo_repository::cargo::cargo_output_arguments (cyclomatic 25) crates/turborepo-repository/src/cargo.rs:1109— turborepo_repository::cargo::cargo_output_arguments has cyclomatic complexity 25 (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.
turborepo_repository::go::module_package_inputs (cyclomatic 21) crates/turborepo-repository/src/go.rs:614— turborepo_repository::go::module_package_inputs has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_repository::go::scope_inventory::decode_escape (cyclomatic 19) crates/turborepo-repository/src/go/scope_inventory.rs:531— turborepo_repository::go::scope_inventory::decode_escape 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.
turborepo_repository::go::scope_inventory::scan_directives (cyclomatic 18) crates/turborepo-repository/src/go/scope_inventory.rs:310— turborepo_repository::go::scope_inventory::scan_directives has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_repository::go::scope_inventory::logical_lines (cyclomatic 16) crates/turborepo-repository/src/go/scope_inventory.rs:390— turborepo_repository::go::scope_inventory::logical_lines has cyclomatic complexity 16 (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.
turborepo_filewatch::watch_events (cognitive 98) crates/turborepo-filewatch/src/lib.rs:895— turborepo_filewatch::watch_events has cognitive complexity 98 (threshold 15). Drivers by points: if/else 15 (60 pts), loops 5 (19 pts), match/switch 4 (14 pts), boolean chains 5 (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_filewatch::fsevent::translate_flags (cognitive 41) crates/turborepo-filewatch/src/fsevent.rs:147— turborepo_filewatch::fsevent::translate_flags has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32 (39 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
turborepo_filewatch::explicit_watch_paths (cognitive 32) crates/turborepo-filewatch/src/lib.rs:1511— turborepo_filewatch::explicit_watch_paths has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_filewatch::globwatcher::invalidate_path_candidates (cognitive 23) crates/turborepo-filewatch/src/globwatcher.rs:1031— turborepo_filewatch::globwatcher::invalidate_path_candidates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_filewatch::wait_for_cookie (cognitive 22) crates/turborepo-filewatch/src/lib.rs:1927— turborepo_filewatch::wait_for_cookie has cognitive complexity 22 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (8 pts), match/switch 2 (5 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.
turborepo_filewatch::fsevent::callback_impl (cognitive 17) crates/turborepo-filewatch/src/fsevent.rs:619— turborepo_filewatch::fsevent::callback_impl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×6
Duplicated block (11 lines × 2) crates/turborepo-cli/src/commands/ls.rs:305— crates/turborepo-cli/src/commands/ls.rs:305-315 | crates/turborepo-cli/src/commands/ls.rs:324-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/turborepo-cli/src/commands/run.rs:180— crates/turborepo-cli/src/commands/run.rs:180-190 | crates/turborepo-watch/src/lib.rs:557-567 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/turborepo-daemon/src/package_changes_watcher.rs:117— crates/turborepo-daemon/src/package_changes_watcher.rs:117-127 | crates/turborepo-package-watcher/src/package_changes_watcher.rs:118-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/turborepo-engine/src/validate_engine.rs:53— crates/turborepo-engine/src/validate_engine.rs:53-63 | crates/turborepo-engine/src/validate_engine.rs:74-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.
Duplicated block (11 lines × 2) crates/turborepo-scm/src/worktree.rs:52— crates/turborepo-scm/src/worktree.rs:52-62 | crates/turborepo-scm/src/worktree.rs:124-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/turborepo-cache/src/cache_archive/restore_directory.rs:298— crates/turborepo-cache/src/cache_archive/restore_directory.rs:298-310 | crates/turborepo-cache/src/cache_archive/restore_regular.rs:105-115 — 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.
turborepo_setup::lock::reconcile::reconcile_checked (cyclomatic 24) crates/turborepo-setup/src/lock/reconcile.rs:111— turborepo_setup::lock::reconcile::reconcile_checked has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_setup::source_policy::inspect_inputs (cyclomatic 22) crates/turborepo-setup/src/source_policy.rs:124— turborepo_setup::source_policy::inspect_inputs 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.
turborepo_setup::lock::validate_artifact (cyclomatic 19) crates/turborepo-setup/src/lock.rs:339— turborepo_setup::lock::validate_artifact 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.
turborepo_setup::package_manager::request (cyclomatic 18) crates/turborepo-setup/src/package_manager.rs:139— turborepo_setup::package_manager::request has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_setup::package_manager::discover_package_manager (cyclomatic 17) crates/turborepo-setup/src/package_manager.rs:253— turborepo_setup::package_manager::discover_package_manager 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.
EngineBuilder::build_inner (cognitive 75) crates/turborepo-engine/src/builder.rs:283— EngineBuilder::build_inner has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (56 pts), loops 6 (10 pts), boolean chains 8, match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineBuilder::task_definition_cached (cognitive 36) crates/turborepo-engine/src/builder/definitions.rs:294— EngineBuilder::task_definition_cached has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 8, match/switch 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.
EngineBuilder::resolve_task_definitions_from_chain (cognitive 27) crates/turborepo-engine/src/builder/definitions.rs:630— EngineBuilder::resolve_task_definitions_from_chain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, loops 3 (4 pts), match/switch 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.
EngineBuilder::turbo_json_chain (cognitive 21) crates/turborepo-engine/src/builder/definitions.rs:732— EngineBuilder::turbo_json_chain has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), match/switch 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.
EngineBuilder::has_task_definition_in_run_inner (cognitive 19) crates/turborepo-engine/src/builder/definitions.rs:177— EngineBuilder::has_task_definition_in_run_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Subscriber::watch (cognitive 60) crates/turborepo-package-watcher/src/package_changes_watcher.rs:710— Subscriber::watch has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (37 pts), match/switch 9 (13 pts), boolean chains 5, loops 3 (5 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.
Subscriber::handle_file_event (cognitive 22) crates/turborepo-filewatch/src/hash_watcher.rs:895— Subscriber::handle_file_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Subscriber::watch (cognitive 20) crates/turborepo-filewatch/src/hash_watcher.rs:536— Subscriber::watch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Subscriber::handle_hash_update (cognitive 18) crates/turborepo-filewatch/src/hash_watcher.rs:751— Subscriber::handle_hash_update has cognitive complexity 18 (threshold 15). Drivers by points: loops 2 (8 pts), if/else 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Subscriber::handle_workspace_changes (cognitive 18) crates/turborepo-filewatch/src/package_watcher.rs:566— Subscriber::handle_workspace_changes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunBuilder::select_tasks (cognitive 27) crates/turborepo-run/src/builder.rs:1751— RunBuilder::select_tasks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, loops 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.
RunBuilder::command_task_entrypoints (cognitive 26) crates/turborepo-run/src/builder.rs:2440— RunBuilder::command_task_entrypoints has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunBuilder::discover_repo (cognitive 25) crates/turborepo-run/src/builder.rs:905— RunBuilder::discover_repo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 7 (8 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RunBuilder::settle_engine (cognitive 23) crates/turborepo-run/src/builder.rs:1431— RunBuilder::settle_engine has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunBuilder::calculate_filtered_packages_with_change_detector (cognitive 21) crates/turborepo-run/src/builder.rs:769— RunBuilder::calculate_filtered_packages_with_change_detector has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts), match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (13 lines × 2) crates/turborepo-api-client/src/lib.rs:1111— crates/turborepo-api-client/src/lib.rs:1111-1123 | crates/turborepo-api-client/src/lib.rs:1228-1240 — 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 (13 lines × 2) crates/turborepo-filewatch/src/lib.rs:1481— crates/turborepo-filewatch/src/lib.rs:1481-1493 | crates/turborepo-filewatch/src/lib.rs:1805-1817 — 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 (13 lines × 2) crates/turborepo-repository/src/package_graph/builder.rs:1547— crates/turborepo-repository/src/package_graph/builder.rs:1547-1559 | crates/turborepo-repository/src/package_graph/builder.rs:1963-1975 — 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 (13 lines × 2) crates/turborepo-watch/src/lib.rs:890— crates/turborepo-watch/src/lib.rs:890-902 | crates/turborepo-watch/src/lib.rs:974-986 — 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 (13 lines × 2) crates/turborepo-process/src/child/handle.rs:387— crates/turborepo-process/src/child/handle.rs:387-399 | crates/turborepo-process/src/child/handle.rs:515-527 — 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.
turborepo_lockfiles::closure_dp::all_transitive_closures_dp (cyclomatic 41) crates/turborepo-lockfiles/src/closure_dp.rs:56— turborepo_lockfiles::closure_dp::all_transitive_closures_dp has cyclomatic complexity 41 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
turborepo_lockfiles::berry::fast_parse::plain_scalar_ok (cyclomatic 21) crates/turborepo-lockfiles/src/berry/fast_parse.rs:265— turborepo_lockfiles::berry::fast_parse::plain_scalar_ok has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turborepo_lockfiles::pnpm::data_fast_parse::plain_scalar_to_value (cyclomatic 17) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:458— turborepo_lockfiles::pnpm::data_fast_parse::plain_scalar_to_value 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.
turborepo_lockfiles::pnpm::data_fast_parse::child_entry_starts (cyclomatic 16) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:191— turborepo_lockfiles::pnpm::data_fast_parse::child_entry_starts 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.
turborepo_scm::repo_index::find_untracked_files (cyclomatic 37) crates/turborepo-scm/src/repo_index.rs:939— turborepo_scm::repo_index::find_untracked_files has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_scm::manual::get_package_file_hashes_without_git (cyclomatic 35) crates/turborepo-scm/src/manual.rs:144— turborepo_scm::manual::get_package_file_hashes_without_git has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_scm::env_local::normalize_oidc_token (cyclomatic 19) crates/turborepo-scm/src/env_local.rs:17— turborepo_scm::env_local::normalize_oidc_token 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.
turborepo_scm::repo_index::verify_candidate (cyclomatic 17) crates/turborepo-scm/src/repo_index.rs:1526— turborepo_scm::repo_index::verify_candidate 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.
turborepo_archive::zip::extract_zip (cognitive 74) crates/turborepo-archive/src/zip.rs:76— turborepo_archive::zip::extract_zip has cognitive complexity 74 (threshold 15). Drivers by points: if/else 26 (50 pts), boolean chains 21, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_archive::extract_tar (cognitive 32) crates/turborepo-archive/src/lib.rs:463— turborepo_archive::extract_tar has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 3, 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.
turborepo_archive::link_target (cognitive 16) crates/turborepo-archive/src/lib.rs:413— turborepo_archive::link_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, 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.
turborepo_archive::zip::extras (cognitive 16) crates/turborepo-archive/src/zip.rs:29— turborepo_archive::zip::extras has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (4 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.
turborepo_scm::manual::get_package_file_hashes_without_git (cognitive 52) crates/turborepo-scm/src/manual.rs:144— turborepo_scm::manual::get_package_file_hashes_without_git has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 6 (8 pts), match/switch 3 (7 pts), boolean chains 6 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_scm::repo_index::find_untracked_files (cognitive 45) crates/turborepo-scm/src/repo_index.rs:939— turborepo_scm::repo_index::find_untracked_files has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 8, loops 4 (5 pts), match/switch 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_scm::env_local::normalize_oidc_token (cognitive 32) crates/turborepo-scm/src/env_local.rs:17— turborepo_scm::env_local::normalize_oidc_token has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_scm::repo_index::verify_candidate (cognitive 25) crates/turborepo-scm/src/repo_index.rs:1526— turborepo_scm::repo_index::verify_candidate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_auth::auth::sso::sso_login (cognitive 47) crates/turborepo-auth/src/auth/sso.rs:152— turborepo_auth::auth::sso::sso_login has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 6 (20 pts), boolean chains 3 (nesting depth added 27). 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.
turborepo_auth::auth::login::login (cognitive 41) crates/turborepo-auth/src/auth/login.rs:170— turborepo_auth::auth::login::login has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 2 (7 pts), boolean chains 5 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
turborepo_auth::auth::sso::wait_for_sso_redirect (cognitive 29) crates/turborepo-auth/src/auth/sso.rs:377— turborepo_auth::auth::sso::wait_for_sso_redirect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (7 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_auth::auth::exchange_auth_tokens (cognitive 25) crates/turborepo-auth/src/auth/mod.rs:375— turborepo_auth::auth::exchange_auth_tokens has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::scan_value (cognitive 32) crates/turborepo-repository/src/manifest_parser.rs:226— Parser::scan_value has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::parse_meta_map (cognitive 24) crates/turborepo-lockfiles/src/berry/fast_parse.rs:134— Parser::parse_meta_map has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::scan_string (cognitive 16) crates/turborepo-repository/src/manifest_parser.rs:308— Parser::scan_string has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::scan_number (cognitive 16) crates/turborepo-repository/src/manifest_parser.rs:362— Parser::scan_number has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (6 pts), match/switch 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.
Change coupling: lib.rs ↔ exec.rs crates/turborepo-run/src/lib.rs— `crates/turborepo-run/src/lib.rs` and `crates/turborepo-task-graph/src/visitor/exec.rs` change together 62% of the time (16 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 16 shared commits counted here, the most recent 3 are `d7e061b6` refactor: Promote task graph to dedicated crate (#14150) (at that commit the file was still `crates/turborepo-lib/src/run/mod.rs`); `a29a4194` refactor: Use RepoContext in task graph visitor (#14145) (at that commit the files were still `crates/turborepo-lib/src/run/mod.rs` and `crates/turborepo-lib/src/task_graph/visitor/exec.rs`); `c12b1f17` refactor: Extract task access into dedicated crate (#14128) (at that commit the files were still `crates/turborepo-lib/src/run/mod.rs` and `crates/turborepo-lib/src/task_graph/visitor/exec.rs`) — run `git show` on any of them.
Change coupling: env.rs ↔ turbo_json.rs crates/turborepo-config/src/env.rs— `crates/turborepo-config/src/env.rs` and `crates/turborepo-config/src/turbo_json.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 `14052727` feat: Add version-matched agent guidance (#14250); `7ca06013` feat: Add experimental structured logging with `--json` and `--log-fi…; `a73b4324` feat: Add `runAttributes` config to OTel metrics for cardinality cont… — run `git show` on any of them.
Change coupling: async_cache.rs ↔ fs.rs crates/turborepo-cache/src/async_cache.rs— `crates/turborepo-cache/src/async_cache.rs` and `crates/turborepo-cache/src/fs.rs` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 10 shared commits counted here, the most recent 3 are `275ac3e0` chore: Remove port_scanner dependency (#14267); `1112bda0` fix: Resolve git diff warning in fresh repos and make SCM state lazy …; `cc9d1f8e` feat: Add git SHA and dirty hash to cache metadata (#12288) — run `git show` on any of them.
Change coupling: run.rs ↔ terminal_sink.rs crates/turborepo-cli/src/commands/run.rs— `crates/turborepo-cli/src/commands/run.rs` and `crates/turborepo-ui/src/terminal_sink.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `7ca06013` feat: Add experimental structured logging with `--json` and `--log-fi… (at that commit the file was still `crates/turborepo-lib/src/commands/run.rs`); `187a588a` refactor: Replace `Source::turbo` string literals with `Subsystem` en… (at that commit the file was still `crates/turborepo-lib/src/commands/run.rs`); `4494e58c` refactor: Route `run`/`watch` output through unified `TerminalSink` (… (at that commit the file was still `crates/turborepo-lib/src/commands/run.rs`) — run `git show` on any of them.
Low cohesion: EnvironmentVariableMap (LCOM4 4) crates/turborepo-env/src/lib.rs:108— EnvironmentVariableMap'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: ScopeTaskContract (LCOM4 4) crates/turborepo-repository/src/task_contracts.rs:95— ScopeTaskContract'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: ShimArgs (LCOM4 4) crates/turborepo-shim/src/parser.rs:73— ShimArgs'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: TurboSubscriber (LCOM4 4) crates/turborepo-tracing/src/lib.rs:233— TurboSubscriber'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.
Duplicated block (13 lines × 2 locations) apps/factory/agent/tools/audit_example_versions.ts:82— apps/factory/agent/tools/audit_example_versions.ts:82 · REDACTED:60 — 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 (13 lines × 2 locations) apps/factory/app/run-maintenance.tsx:154— apps/factory/app/run-maintenance.tsx:154 · apps/factory/app/run-performance.tsx:18 — 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 (13 lines × 2 locations) packages/create-turbo/src/cli.ts:26— packages/create-turbo/src/cli.ts:26 · packages/turbo-ignore/src/cli.ts:22 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (13 lines × 2 locations) scripts/validate-release-pr.mjs:241— scripts/validate-release-pr.mjs:241 · scripts/validate-review-gate.mjs:19 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
EngineBuilder::build_inner (cyclomatic 43) crates/turborepo-engine/src/builder.rs:283— EngineBuilder::build_inner has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineBuilder::task_definition_cached (cyclomatic 27) crates/turborepo-engine/src/builder/definitions.rs:294— EngineBuilder::task_definition_cached has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineBuilder::resolve_task_definitions_from_chain (cyclomatic 21) crates/turborepo-engine/src/builder/definitions.rs:630— EngineBuilder::resolve_task_definitions_from_chain has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_cli::cli::run_main (cyclomatic 42) crates/turborepo-cli/src/cli/mod.rs:417— turborepo_cli::cli::run_main has cyclomatic complexity 42 (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.
turborepo_cli::commands::setup::provision::run (cyclomatic 20) crates/turborepo-cli/src/commands/setup/provision.rs:172— turborepo_cli::commands::setup::provision::run has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turborepo_cli::commands::setup::root::infer (cyclomatic 16) crates/turborepo-cli/src/commands/setup/root.rs:90— turborepo_cli::commands::setup::root::infer 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.
globwalk::walk_recursive_all (cyclomatic 24) crates/turborepo-globwalk/src/lib.rs:1080— globwalk::walk_recursive_all has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
globwalk::walk_compiled_globs (cyclomatic 18) crates/turborepo-globwalk/src/lib.rs:945— globwalk::walk_compiled_globs has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
globwalk::classify_simple_pattern (cyclomatic 16) crates/turborepo-globwalk/src/lib.rs:618— globwalk::classify_simple_pattern 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.
RunBuilder::discover_repo (cyclomatic 21) crates/turborepo-run/src/builder.rs:905— RunBuilder::discover_repo has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RunBuilder::calculate_filtered_packages_with_change_detector (cyclomatic 18) crates/turborepo-run/src/builder.rs:769— RunBuilder::calculate_filtered_packages_with_change_detector has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RunBuilder::select_tasks (cyclomatic 16) crates/turborepo-run/src/builder.rs:1751— RunBuilder::select_tasks 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.
Visitor::visit (cognitive 80) crates/turborepo-task-graph/src/visitor/mod.rs:695— Visitor::visit has cognitive complexity 80 (threshold 15). Drivers by points: if/else 19 (40 pts), match/switch 11 (35 pts), loops 3, boolean chains 2 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Visitor::precompute_unblocked_deferred_hashes (cognitive 38) crates/turborepo-task-graph/src/visitor/mod.rs:476— Visitor::precompute_unblocked_deferred_hashes has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 5 (10 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Visitor::precompute_task_hashes (cognitive 28) crates/turborepo-task-graph/src/visitor/mod.rs:567— Visitor::precompute_task_hashes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterResolver::filter_nodes_with_selector (cognitive 37) crates/turborepo-scope/src/filter.rs:657— FilterResolver::filter_nodes_with_selector has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterResolver::filter_graph_with_selectors (cognitive 33) crates/turborepo-scope/src/filter.rs:419— FilterResolver::filter_graph_with_selectors has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterResolver::filter_subtrees_with_selector (cognitive 21) crates/turborepo-scope/src/filter.rs:565— FilterResolver::filter_subtrees_with_selector has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
globwalk::walk_recursive_all (cognitive 30) crates/turborepo-globwalk/src/lib.rs:1080— globwalk::walk_recursive_all has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 5 (10 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
globwalk::classify_simple_pattern (cognitive 18) crates/turborepo-globwalk/src/lib.rs:618— globwalk::classify_simple_pattern has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
globwalk::walk_compiled_globs (cognitive 18) crates/turborepo-globwalk/src/lib.rs:945— globwalk::walk_compiled_globs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 3, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChildHandle::spawn_normal (cognitive 17) crates/turborepo-process/src/child/handle.rs:305— ChildHandle::spawn_normal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 6 (8 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChildHandle::send_graceful_interrupt (cognitive 17) crates/turborepo-process/src/child/handle.rs:653— ChildHandle::send_graceful_interrupt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ChildHandle::wait (cognitive 16) crates/turborepo-process/src/child/handle.rs:1040— ChildHandle::wait has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 3 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Duplicated block (22–23 lines × 2) crates/turborepo-auth/src/auth/login.rs:204— crates/turborepo-auth/src/auth/login.rs:204-225 | crates/turborepo-auth/src/auth/login.rs:257-279 — 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 (22–23 lines × 2) crates/turborepo-lockfiles/src/bun/subgraph.rs:171— crates/turborepo-lockfiles/src/bun/subgraph.rs:171-192 | crates/turborepo-lockfiles/src/bun/subgraph.rs:194-216 — 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 (22–23 lines × 2) crates/turborepo-repository/src/package_manager/mod.rs:384— crates/turborepo-repository/src/package_manager/mod.rs:384-406 | crates/turborepo-repository/src/package_manager/mod.rs:418-439 — 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 (15 lines × 2) crates/turborepo-api-client/src/telemetry.rs:29— crates/turborepo-api-client/src/telemetry.rs:29-43 | crates/turborepo-api-client/src/telemetry.rs:76-90 — 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 (15 lines × 2) crates/turborepo-process/src/child/shutdown.rs:74— crates/turborepo-process/src/child/shutdown.rs:74-88 | crates/turborepo-process/src/child/shutdown.rs:172-186 — 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 (15 lines × 2) crates/turborepo-turbo-json/src/processed.rs:817— crates/turborepo-turbo-json/src/processed.rs:817-831 | crates/turborepo-turbo-json/src/raw.rs:907-921 — 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 (14 lines × 2) crates/turborepo-auth/src/auth/sso.rs:189— crates/turborepo-auth/src/auth/sso.rs:189-202 | crates/turborepo-auth/src/auth/sso.rs:241-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.
Duplicated block (14 lines × 2) crates/turborepo-process/src/child/shutdown.rs:120— crates/turborepo-process/src/child/shutdown.rs:120-133 | crates/turborepo-process/src/child/shutdown.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.
Duplicated block (14 lines × 2) crates/turborepo-repository/src/cargo.rs:707— crates/turborepo-repository/src/cargo.rs:707-720 | crates/turborepo-repository/src/uv.rs:2717-2730 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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.
R10 · Code Duplication· Duplicated block with local edits (15 matched lines × 2 locations) · ×3
Duplicated block with local edits (15 matched lines × 2 locations) apps/factory/agent/lib/create-pull-request.ts:421— apps/factory/agent/lib/create-pull-request.ts:421 · apps/factory/agent/lib/create-pull-request.ts:487 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (15 matched lines × 2 locations) apps/factory/app/model-picker.tsx:76— apps/factory/app/model-picker.tsx:76 · apps/factory/app/model-picker.tsx:123 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (15 matched lines × 2 locations) packages/create-turbo/src/transforms/git-ignore.ts:9— packages/create-turbo/src/transforms/git-ignore.ts:9 · packages/create-turbo/src/transforms/update-commands-in-readme.ts:27 — the two spans are one implementation copied and then locally edited — 77 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (12 lines × 2 locations) apps/factory/agent/lib/factory-image-registry.ts:113— apps/factory/agent/lib/factory-image-registry.ts:113 · apps/factory/agent/lib/factory-image-registry.ts:126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2 locations) apps/factory/agent/lib/factory-image-types.ts:207— apps/factory/agent/lib/factory-image-types.ts:207 · apps/factory/agent/lib/factory-image-types.ts:236 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (12 lines × 2 locations) packages/turbo-workspaces/src/logger.ts:82— packages/turbo-workspaces/src/logger.ts:82 · packages/turbo-workspaces/src/logger.ts:96 — 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.
BunLockfile::subgraph (cyclomatic 130) crates/turborepo-lockfiles/src/bun/subgraph.rs:76— BunLockfile::subgraph has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BunLockfile::subgraph (cyclomatic 25) crates/turborepo-lockfiles/src/bun/lockfile.rs:142— BunLockfile::subgraph has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_ui::tui::input::encode_key (cyclomatic 70) crates/turborepo-ui/src/tui/input.rs:182— turborepo_ui::tui::input::encode_key has cyclomatic complexity 70 (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.
turborepo_ui::tui::app::run_app_inner (cyclomatic 22) crates/turborepo-ui/src/tui/app.rs:1330— turborepo_ui::tui::app::run_app_inner 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. This is NOT this file's highest cyclomatic complexity: turborepo_ui::tui::app::update (cyclomatic 39) 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.
turborepo_archive::zip::extract_zip (cyclomatic 48) crates/turborepo-archive/src/zip.rs:76— turborepo_archive::zip::extract_zip has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_archive::extract_tar (cyclomatic 18) crates/turborepo-archive/src/lib.rs:463— turborepo_archive::extract_tar has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_filewatch::watch_events (cyclomatic 29) crates/turborepo-filewatch/src/lib.rs:895— turborepo_filewatch::watch_events has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_filewatch::fsevent::translate_flags (cyclomatic 29) crates/turborepo-filewatch/src/fsevent.rs:147— turborepo_filewatch::fsevent::translate_flags has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LineScanner::block_scalar (cyclomatic 27) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:356— LineScanner::block_scalar has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LineScanner::advance (cyclomatic 24) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:98— LineScanner::advance has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_auth::auth::sso::sso_login (cyclomatic 23) crates/turborepo-auth/src/auth/sso.rs:152— turborepo_auth::auth::sso::sso_login has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_auth::auth::login::login (cyclomatic 21) crates/turborepo-auth/src/auth/login.rs:170— turborepo_auth::auth::login::login has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskCache::restore_outputs (cyclomatic 23) crates/turborepo-run-cache/src/lib.rs:554— TaskCache::restore_outputs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskCache::save_outputs (cyclomatic 16) crates/turborepo-run-cache/src/lib.rs:764— TaskCache::save_outputs 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.
Parser::scan_value (cyclomatic 19) crates/turborepo-repository/src/manifest_parser.rs:226— Parser::scan_value 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.
Parser::parse_entry (cyclomatic 18) crates/turborepo-lockfiles/src/berry/fast_parse.rs:49— Parser::parse_entry 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.
Repeated repair: crates/turborepo-types/src/task_input_matching.rs crates/turborepo-types/src/task_input_matching.rs:220— crates/turborepo-types/src/task_input_matching.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 8 (its worst body is turborepo_types::task_input_matching::check_compiled_globs at line 220), 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: Normalize task inputs consistently for affected detection and hashing (#14341)”; “fix: Normalize affected task input globs (#14140)”; “fix: Show invalid affected task glob (#13793)”; “fix: Match JIT inputs for affected tasks (#13426)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-types/src/task_input_matching.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/turborepo-cli/src/cli/agent_guidance.rs crates/turborepo-cli/src/cli/agent_guidance.rs:70— crates/turborepo-cli/src/cli/agent_guidance.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is turborepo_cli::cli::agent_guidance::upsert at line 70), 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: Preserve symlinked AGENTS.md when updating agent guidance (#14418)”; “fix: Deflake concurrent agent guidance updates (#14388)”; “fix: Restore Rust builds after agent guidance changes (#14319)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-13..2026-10-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-13 09:00:24 -06:00' --until='2026-10-11 09:00:24 -06:00' --full-history --no-merges -- crates/turborepo-cli/src/cli/agent_guidance.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.
FixmeComment crates/turborepo-scm/src/package_deps.rs:598— // FIXME: This test verifies a bug: we don't hash symlinks. — 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.
FixmeComment crates/turborepo-scm/src/git.rs:730— // FIXME: this is probably wrong. We should know the path to the lockfile — 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.
turborepo_ui::tui::app::run_app_inner (cognitive 56) crates/turborepo-ui/src/tui/app.rs:1330— turborepo_ui::tui::app::run_app_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (52 pts), boolean chains 3, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_ui::tui::input::encode_key (cognitive 51) crates/turborepo-ui/src/tui/input.rs:182— turborepo_ui::tui::input::encode_key has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (30 pts), match/switch 7 (14 pts), boolean chains 7 (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.
PnpmLockfile::subgraph (cognitive 48) crates/turborepo-lockfiles/src/pnpm/data.rs:918— PnpmLockfile::subgraph has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 5 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PnpmLockfile::merge_per_workspace_lockfiles (cognitive 17) crates/turborepo-lockfiles/src/pnpm/data.rs:373— PnpmLockfile::merge_per_workspace_lockfiles has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (8 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LineScanner::block_scalar (cognitive 45) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:356— LineScanner::block_scalar has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 3 (9 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineScanner::advance (cognitive 34) crates/turborepo-lockfiles/src/pnpm/data_scanner.rs:98— LineScanner::advance has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 4, loops 2 (3 pts), 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.
Tree::entry (cognitive 37) crates/turborepo-archive/src/lib.rs:256— Tree::entry has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 9, 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.
Tree::finish_links (cognitive 16) crates/turborepo-archive/src/lib.rs:346— Tree::finish_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskCache::restore_outputs (cognitive 35) crates/turborepo-run-cache/src/lib.rs:554— TaskCache::restore_outputs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (26 pts), match/switch 3 (5 pts), boolean chains 4 (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.
TaskCache::save_outputs (cognitive 19) crates/turborepo-run-cache/src/lib.rs:764— TaskCache::save_outputs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildState::parse_package_jsons (cognitive 31) crates/turborepo-repository/src/package_graph/builder.rs:1274— BuildState::parse_package_jsons has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts), match/switch 4 (10 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.
BuildState::build_inner (cognitive 16) crates/turborepo-repository/src/package_graph/builder.rs:1864— BuildState::build_inner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 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.
Tracer::reverse_trace (cognitive 28) crates/turbo-trace/src/tracer.rs:494— Tracer::reverse_trace has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 5 (9 pts), loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tracer::get_imports_from_file (cognitive 20) crates/turbo-trace/src/tracer.rs:228— Tracer::get_imports_from_file has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 3 (6 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.
NodeRequirements::read_with (cognitive 27) crates/turborepo-setup/src/node_discovery.rs:166— NodeRequirements::read_with has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (6 pts) (nesting depth added 16). 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.
NodeRequirements::push (cognitive 18) crates/turborepo-setup/src/node_discovery.rs:347— NodeRequirements::push has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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.
Args::new (cognitive 26) crates/turborepo-cli/src/cli/args.rs:657— Args::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Args::parse_args (cognitive 20) crates/turborepo-cli/src/cli/args.rs:774— Args::parse_args has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 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.
NpmLockfile::rehoist_packages (cognitive 26) crates/turborepo-lockfiles/src/npm.rs:416— NpmLockfile::rehoist_packages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NpmLockfile::relocate_stranded_closure (cognitive 24) crates/turborepo-lockfiles/src/npm.rs:550— NpmLockfile::relocate_stranded_closure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WatchClient::execute_run (cognitive 24) crates/turborepo-watch/src/lib.rs:880— WatchClient::execute_run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WatchClient::start (cognitive 20) crates/turborepo-watch/src/lib.rs:598— WatchClient::start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (6 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackageGraph::build_external_dependency_index (cognitive 23) crates/turborepo-repository/src/package_graph/mod.rs:1887— PackageGraph::build_external_dependency_index has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackageGraph::external_package_identities_for_packages (cognitive 17) crates/turborepo-repository/src/package_graph/mod.rs:1678— PackageGraph::external_package_identities_for_packages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoGitIndex::new_from_gix_index (cognitive 23) crates/turborepo-scm/src/repo_index.rs:91— RepoGitIndex::new_from_gix_index has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoGitIndex::get_package_hashes (cognitive 21) crates/turborepo-scm/src/repo_index.rs:624— RepoGitIndex::get_package_hashes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_devtools::graph::package_graph_to_data (cognitive 21) crates/turborepo-devtools/src/graph.rs:16— turborepo_devtools::graph::package_graph_to_data has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (11 pts), if/else 2 (6 pts), loops 2 (4 pts) (nesting depth added 14). 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.
turborepo_devtools::server::handle_socket (cognitive 17) crates/turborepo-devtools/src/server.rs:235— turborepo_devtools::server::handle_socket has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GlobTracker::handle_query (cognitive 21) crates/turborepo-filewatch/src/globwatcher.rs:802— GlobTracker::handle_query has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GlobTracker::handle_file_event (cognitive 16) crates/turborepo-filewatch/src/globwatcher.rs:917— GlobTracker::handle_file_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 10). 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.
ProxyServer::run_with_listener (cognitive 18) crates/turborepo-microfrontends-proxy/src/server.rs:116— ProxyServer::run_with_listener has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProxyServer::print_routes (cognitive 16) crates/turborepo-microfrontends-proxy/src/server.rs:209— ProxyServer::print_routes has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 3 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Prune::copy_file_dependencies (cognitive 18) crates/turborepo-prune/src/lib.rs:1082— Prune::copy_file_dependencies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Prune::copy_workspace (cognitive 17) crates/turborepo-prune/src/lib.rs:965— Prune::copy_workspace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×2
Duplicated block (31 lines × 2) crates/turborepo-auth/src/auth/login.rs:471— crates/turborepo-auth/src/auth/login.rs:471-501 | crates/turborepo-auth/src/auth/sso.rs:389-419 — before extracting anything, compare `crates/turborepo-auth/src/auth/login.rs` and `crates/turborepo-auth/src/auth/sso.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (31 lines × 2) crates/turborepo-scm/src/repo_index.rs:834— crates/turborepo-scm/src/repo_index.rs:834-864 | crates/turborepo-scm/src/repo_index.rs:1129-1159 — 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 (29 lines × 2) crates/turborepo-hash/src/lib.rs:251— crates/turborepo-hash/src/lib.rs:251-279 | crates/turborepo-hash/src/lib.rs:284-312 — 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 (29 lines × 2) crates/turborepo-process/src/child/shutdown.rs:90— crates/turborepo-process/src/child/shutdown.rs:90-118 | crates/turborepo-process/src/child/shutdown.rs:188-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) crates/turborepo-microfrontends/src/lib.rs:223— crates/turborepo-microfrontends/src/lib.rs:223-240 | crates/turborepo-microfrontends/src/lib.rs:379-396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) crates/turborepo-ui/src/tui/app.rs:660— crates/turborepo-ui/src/tui/app.rs:660-677 | crates/turborepo-ui/src/tui/app.rs:711-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–14 lines × 2) crates/turborepo-api-client/src/lib.rs:574— crates/turborepo-api-client/src/lib.rs:574-585 | crates/turborepo-api-client/src/lib.rs:632-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–14 lines × 2) crates/turborepo-engine/src/builder/inheritance.rs:146— crates/turborepo-engine/src/builder/inheritance.rs:146-159 | crates/turborepo-engine/src/builder/inheritance.rs:172-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) crates/turborepo-cli/src/commands/link.rs:255— crates/turborepo-cli/src/commands/link.rs:255-266 | crates/turborepo-cli/src/commands/unlink.rs:23-35 — 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 (12–13 lines × 2) crates/turborepo-repository/src/cargo.rs:672— crates/turborepo-repository/src/cargo.rs:672-684 | crates/turborepo-repository/src/uv.rs:2688-2699 — before extracting anything, compare `crates/turborepo-repository/src/cargo.rs` and `crates/turborepo-repository/src/uv.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 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 (22 lines × 2 locations) apps/factory/agent/tools/run_example_script.ts:24— apps/factory/agent/tools/run_example_script.ts:24 · apps/factory/agent/tools/run_example_turbo_tasks.ts:29 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (22 lines × 2 locations) packages/turbo-ignore/src/check-commit.ts:70— packages/turbo-ignore/src/check-commit.ts:70 · packages/turbo-ignore/src/check-commit.ts:100 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (20 lines × 2 locations) packages/turbo-utils/src/get-turbo-configs.ts:151— packages/turbo-utils/src/get-turbo-configs.ts:151 · packages/turbo-utils/src/get-turbo-configs.ts:240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2 locations) packages/turbo-vsc/src/extension.ts:131— packages/turbo-vsc/src/extension.ts:131 · packages/turbo-vsc/src/extension.ts:158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2 locations) apps/factory/agent/tools/audit_example_tasks.ts:15— apps/factory/agent/tools/audit_example_tasks.ts:15 · apps/factory/agent/tools/inspect_example.ts:20 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (18 lines × 2 locations) apps/factory/agent/tools/read_examples_file.ts:20— apps/factory/agent/tools/read_examples_file.ts:20 · apps/factory/agent/tools/write_examples_file.ts:17 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) apps/factory/agent/lib/factory-image-types.ts:221— apps/factory/agent/lib/factory-image-types.ts:221 · apps/factory/agent/lib/factory-image-types.ts:248 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) apps/factory/app/api/workspaces/[workspaceId]/diff/route.ts:11— apps/factory/app/api/workspaces/[workspaceId]/diff/route.ts:11 · apps/factory/app/api/workspaces/[workspaceId]/terminal/route.ts:18 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Dead file (~53 LoC) apps/factory/agent/tools/create_pull_request.ts— no import path from any entry point (76 application, 42 tooling, 175 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/factory/agent/hooks/workspace-status.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~53 LoC) apps/factory/agent/tools/read_examples_file.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~25 LoC) apps/factory/agent/channels/eve.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~25 LoC) apps/factory/agent/tools/record_performance_review.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~16 LoC) apps/factory/agent/tools/select_daily_example.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~16 LoC) packages/eslint-config-turbo/src/flat/index.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~9 LoC) apps/factory/agent/subagents/fable_performance_reviewer/agent.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~9 LoC) apps/factory/agent/subagents/gpt_performance_reviewer/agent.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~8 LoC) apps/factory/agent/schedules/daily_example_maintenance.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~8 LoC) apps/factory/agent/schedules/daily_performance_improvement.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~7 LoC) apps/factory/agent/channels/slack.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~7 LoC) apps/factory/agent/subagents/issue_security_triager/agent.ts— no import path from any entry point (76 application, 42 tooling, 175 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'typescript-7' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'typescript-7' — Declared in apps/factory/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.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark crates/turborepo-query/src/query_ide.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
devtools-client.DevtoolsContent (cyclomatic 79) apps/docs/app/[lang]/devtools/devtools-client.tsx:646— devtools-client.DevtoolsContent has cyclomatic complexity 79 (threshold 15). Most of this is not in the body itself: 12 of the 79 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 1046, 935, 712, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
workspace-client.WorkspaceChat (cyclomatic 44) apps/factory/app/workspace-client.tsx:194— workspace-client.WorkspaceChat has cyclomatic complexity 44 (threshold 15). Of this number, 16 points are the body's own statements and 28 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Subscriber::watch (cyclomatic 43) crates/turborepo-package-watcher/src/package_changes_watcher.rs:710— Subscriber::watch has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShimArgs::parse_from_iter (cyclomatic 40) crates/turborepo-shim/src/parser.rs:99— ShimArgs::parse_from_iter 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.
Lock::new (cyclomatic 37) crates/turborepo-setup/src/lock.rs:172— Lock::new has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
create-pull-request.createPullRequest (cyclomatic 34) apps/factory/agent/lib/create-pull-request.ts:209— create-pull-request.createPullRequest has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
index.create (cyclomatic 34) packages/create-turbo/src/commands/create/index.ts:69— index.create has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate-review-ci.validateReviewCI (cyclomatic 33) scripts/validate-review-ci.mjs:14— validate-review-ci.validateReviewCI has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (validate-review-ci.validateReviewCI::latestRun) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Visitor::visit (cyclomatic 32) crates/turborepo-task-graph/src/visitor/mod.rs:695— Visitor::visit has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.getWorkspacePackageManager (cyclomatic 30) packages/turbo-workspaces/src/utils.ts:83— utils.getWorkspacePackageManager has cyclomatic complexity 30 (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.
ExternalResolutionGeneration::build (cyclomatic 29) crates/turborepo-repository/src/external_resolution.rs:573— ExternalResolutionGeneration::build has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.migrate (cyclomatic 29) packages/turbo-codemod/src/commands/migrate/index.ts:57— index.migrate has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BerryLockfile::subgraph (cyclomatic 27) crates/turborepo-lockfiles/src/berry/mod.rs:439— BerryLockfile::subgraph has cyclomatic complexity 27 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TargetSelector::from_str (cyclomatic 27) crates/turborepo-scope/src/target_selector.rs:44— TargetSelector::from_str has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
App::handle_mouse_at (cyclomatic 27) crates/turborepo-ui/src/tui/app.rs:840— App::handle_mouse_at has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: turborepo_ui::tui::app::update (cyclomatic 39) 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.
TaskExecutor::execute_inner (cyclomatic 26) crates/turborepo-task-executor/src/exec.rs:342— TaskExecutor::execute_inner has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_prune::prune (cyclomatic 25) crates/turborepo-prune/src/lib.rs:271— turborepo_prune::prune has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_vercel_api_mock::start_test_server (cyclomatic 25) crates/turborepo-vercel-api-mock/src/lib.rs:77— turborepo_vercel_api_mock::start_test_server has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turbo_trace::import_finder::find_require_calls (cyclomatic 24) crates/turbo-trace/src/import_finder.rs:74— turbo_trace::import_finder::find_require_calls has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tree::entry (cyclomatic 24) crates/turborepo-archive/src/lib.rs:256— Tree::entry has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extension.activate (cyclomatic 24) packages/turbo-vsc/src/extension.ts:37— extension.activate has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 260, a function literal at line 135, a function literal at line 158, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
factory-image.FactoryImage (cyclomatic 23) apps/factory/app/factory-image.tsx:104— factory-image.FactoryImage has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
globwatch::glob_to_symbols (cyclomatic 22) crates/turborepo-globwatch/src/lib.rs:548— globwatch::glob_to_symbols has cyclomatic complexity 22 (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.
Workspace::find_with_mode (cyclomatic 22) packages/turbo-repository/rust/src/internal.rs:320— Workspace::find_with_mode has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ignore.turboIgnore (cyclomatic 22) packages/turbo-ignore/src/ignore.ts:32— ignore.turboIgnore has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
create-project.createProject (cyclomatic 22) packages/turbo-utils/src/create-project.ts:37— create-project.createProject 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.
turborepo_log::event::strip_control_chars (cyclomatic 21) crates/turborepo-log/src/event.rs:18— turborepo_log::event::strip_control_chars has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShutdownStyle::process (cyclomatic 21) crates/turborepo-process/src/child/shutdown.rs:55— ShutdownStyle::process has cyclomatic complexity 21 (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.
model-picker.ModelPicker (cyclomatic 21) apps/factory/app/model-picker.tsx:19— model-picker.ModelPicker has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 77, 124, 39, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
create-github-api-commit.parseArgs (cyclomatic 21) scripts/create-github-api-commit.mjs:44— create-github-api-commit.parseArgs has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Args::new (cyclomatic 20) crates/turborepo-cli/src/cli/args.rs:657— Args::new has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turborepo_fs::collect_entries (cyclomatic 20) crates/turborepo-fs/src/lib.rs:160— turborepo_fs::collect_entries 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.
TerminalWidget::render (cyclomatic 20) crates/turborepo-ghostty/src/widget.rs:64— TerminalWidget::render 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.
PnpmLockfile::subgraph (cyclomatic 20) crates/turborepo-lockfiles/src/pnpm/data.rs:918— PnpmLockfile::subgraph 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.
CargoTaskContract::derived_task_io (cyclomatic 20) crates/turborepo-repository/src/cargo.rs:847— CargoTaskContract::derived_task_io 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.
parse-flowchart.parseFlowchart (cyclomatic 20) apps/docs/components/diagram/parse-flowchart.ts:191— parse-flowchart.parseFlowchart 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.
github-push.parseGitHubPush (cyclomatic 20) apps/factory/agent/lib/github-push.ts:50— github-push.parseGitHubPush has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turbo::bin::echo_args::main (cyclomatic 19) crates/turborepo/src/bin/echo_args.rs:2— turbo::bin::echo_args::main 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.
Inputs::record (cyclomatic 19) crates/turborepo-cli/src/commands/setup/root/discovery/markers.rs:27— Inputs::record 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.
PackageEntry::serialize (cyclomatic 19) crates/turborepo-lockfiles/src/bun/ser.rs:22— PackageEntry::serialize 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.
run-maintenance.RunMaintenance (cyclomatic 19) apps/factory/app/run-maintenance.tsx:66— run-maintenance.RunMaintenance has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
workspace-client.ChatComposer (cyclomatic 19) apps/factory/app/workspace-client.tsx:646— workspace-client.ChatComposer has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
get-turbo-upgrade-command.getLocalUpgradeCommand (cyclomatic 19) packages/turbo-codemod/src/commands/migrate/steps/get-turbo-upgrade-command.ts:53— get-turbo-upgrade-command.getLocalUpgradeCommand has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
validate-directory.validateDirectory (cyclomatic 19) packages/turbo-utils/src/validate-directory.ts:6— validate-directory.validateDirectory has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
validate-review-ci.validateReviewCI::latestRun (cyclomatic 19) scripts/validate-review-ci.mjs:151— validate-review-ci.validateReviewCI::latestRun 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. This shape REPEATS in the file: one other method here (validate-review-ci.validateReviewCI) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
turborepo_api_client::retry::make_rate_limited_request (cyclomatic 18) crates/turborepo-api-client/src/retry.rs:46— turborepo_api_client::retry::make_rate_limited_request has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
turborepo_cache::fs::evict_cache_dir (cyclomatic 18) crates/turborepo-cache/src/fs.rs:373— turborepo_cache::fs::evict_cache_dir has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnvVars::get_configuration_options (cyclomatic 18) crates/turborepo-config/src/env.rs:128— EnvVars::get_configuration_options has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
turborepo_query::affected_tasks::calculate_affected_tasks_with_packages (cyclomatic 18) crates/turborepo-query/src/affected_tasks.rs:71— turborepo_query::affected_tasks::calculate_affected_tasks_with_packages 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.
GoTaskContract::derived_task_io (cyclomatic 18) crates/turborepo-repository/src/go.rs:1737— GoTaskContract::derived_task_io has cyclomatic complexity 18 (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.
RepoGitIndex::new_from_gix_index (cyclomatic 18) crates/turborepo-scm/src/repo_index.rs:91— RepoGitIndex::new_from_gix_index 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.
parse-sequence.parseSequenceDiagram (cyclomatic 18) apps/docs/components/diagram/parse-sequence.ts:74— parse-sequence.parseSequenceDiagram has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
layout.layoutFlowchart (cyclomatic 18) apps/docs/components/diagram/layout.ts:89— layout.layoutFlowchart has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
get-turbo-configs.getWorkspaceConfigs (cyclomatic 18) packages/turbo-utils/src/get-turbo-configs.ts:235— get-turbo-configs.getWorkspaceConfigs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Backend::handle_file_update (cyclomatic 17) crates/turborepo-lsp/src/lib.rs:940— Backend::handle_file_update 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.
PathPattern::parse (cyclomatic 17) crates/turborepo-microfrontends-proxy/src/http_router.rs:359— PathPattern::parse has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NodePlan::from_lock (cyclomatic 17) crates/turborepo-setup/src/node_provision.rs:123— NodePlan::from_lock 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.
turborepo_shim::managed_run::probe (cyclomatic 17) crates/turborepo-shim/src/managed_run.rs:146— turborepo_shim::managed_run::probe 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.
workspace.parseCreateWorkspaceInput (cyclomatic 17) apps/factory/agent/lib/workspace.ts:58— workspace.parseCreateWorkspaceInput has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: workspace.isWorkspaceRecord (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
operator-run.isRunStatus (cyclomatic 17) apps/factory/app/operator-run.tsx:39— operator-run.isRunStatus has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CacheMultiplexer::put (cyclomatic 16) crates/turborepo-cache/src/multiplexer.rs:129— CacheMultiplexer::put 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.
turborepo_engine::builder::validate_dependency_outputs_inputs (cyclomatic 16) crates/turborepo-engine/src/builder.rs:760— turborepo_engine::builder::validate_dependency_outputs_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.
NpmLockfile::rehoist_packages (cyclomatic 16) crates/turborepo-lockfiles/src/npm.rs:416— NpmLockfile::rehoist_packages 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.
NativeTaskKnowledge::build (cyclomatic 16) crates/turborepo-repository/src/native_tasks.rs:351— NativeTaskKnowledge::build 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.
BuildState::parse_package_jsons (cyclomatic 16) crates/turborepo-repository/src/package_graph/builder.rs:1274— BuildState::parse_package_jsons has cyclomatic complexity 16 (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.
turborepo_run::builder::map_api_error_to_status (cyclomatic 16) crates/turborepo-run/src/builder.rs:268— turborepo_run::builder::map_api_error_to_status 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.
GitRepo::get_package_file_hashes_from_inputs_and_index (cyclomatic 16) crates/turborepo-scm/src/package_deps.rs:383— GitRepo::get_package_file_hashes_from_inputs_and_index 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.
FilterResolver::filter_graph_with_selectors (cyclomatic 16) crates/turborepo-scope/src/filter.rs:419— FilterResolver::filter_graph_with_selectors 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.
ReleaseIndex::parse (cyclomatic 16) crates/turborepo-setup/src/node_metadata.rs:54— ReleaseIndex::parse has cyclomatic complexity 16 (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.
ToolchainCommandProvider::command (cyclomatic 16) crates/turborepo-task-executor/src/command.rs:247— ToolchainCommandProvider::command 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.
route-discovery.findPageFiles (cyclomatic 16) apps/docs/lib/sitemap/route-discovery.ts:40— route-discovery.findPageFiles 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.
validate-review-gate.run (cyclomatic 16) scripts/validate-review-gate.mjs:101— validate-review-gate.run has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D10 · Test Quality· Test project verifies nothing · ×1
Test project verifies nothing: examples/kitchen-sink/packages/ui examples/kitchen-sink/packages/ui/src/counter-button/index.test.tsx:6— No conventional assertion call was detected in 2 of 2 tests in `examples/kitchen-sink/packages/ui` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
devtools-client.DevtoolsContent (cognitive 86) apps/docs/app/[lang]/devtools/devtools-client.tsx:646— devtools-client.DevtoolsContent has cognitive complexity 86 (threshold 15). Drivers by points: if/else 44 (54 pts), boolean chains 21, ternaries 7, loops 4 (nesting depth added 10). Most of this is not in the body itself: 9 of the 86 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 1046, 757, 997, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Lock::new (cognitive 75) crates/turborepo-setup/src/lock.rs:172— Lock::new has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (46 pts), loops 7 (16 pts), boolean chains 10, match/switch 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TargetSelector::from_str (cognitive 56) crates/turborepo-scope/src/target_selector.rs:44— TargetSelector::from_str has cognitive complexity 56 (threshold 15). Drivers by points: if/else 32 (51 pts), boolean chains 3, match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShimArgs::parse_from_iter (cognitive 53) crates/turborepo-shim/src/parser.rs:99— ShimArgs::parse_from_iter has cognitive complexity 53 (threshold 15). Drivers by points: if/else 41 (50 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ShutdownStyle::process (cognitive 51) crates/turborepo-process/src/child/shutdown.rs:55— ShutdownStyle::process has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 12 (37 pts), if/else 5 (12 pts), loops 1 (2 pts) (nesting depth added 33). 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.
index.create (cognitive 51) packages/create-turbo/src/commands/create/index.ts:69— index.create has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 8, loops 3 (6 pts), error handling 3 (5 pts), ternaries 3 (5 pts) (nesting depth added 16). Of this number, 46 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::handle_file_update (cognitive 50) crates/turborepo-lsp/src/lib.rs:940— Backend::handle_file_update has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 3 (5 pts), match/switch 3 (4 pts) (nesting depth added 32). 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.
ExternalResolutionGeneration::build (cognitive 50) crates/turborepo-repository/src/external_resolution.rs:573— ExternalResolutionGeneration::build has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 6 (12 pts), boolean chains 7 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_log::event::strip_control_chars (cognitive 48) crates/turborepo-log/src/event.rs:18— turborepo_log::event::strip_control_chars has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (12 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parse-flowchart.parseFlowchart (cognitive 48) apps/docs/components/diagram/parse-flowchart.ts:191— parse-flowchart.parseFlowchart has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 4 (8 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-client.WorkspaceChat (cognitive 48) apps/factory/app/workspace-client.tsx:194— workspace-client.WorkspaceChat has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 18 (27 pts), if/else 9 (10 pts), boolean chains 6, error handling 4, loops 1 (nesting depth added 10). Of this number, 20 points are the body's own statements and 28 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BerryLockfile::subgraph (cognitive 46) crates/turborepo-lockfiles/src/berry/mod.rs:439— BerryLockfile::subgraph has cognitive complexity 46 (threshold 15). Drivers by points: loops 14 (26 pts), if/else 8 (16 pts), boolean chains 4 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
turbo_trace::import_finder::find_require_calls (cognitive 42) crates/turbo-trace/src/import_finder.rs:74— turbo_trace::import_finder::find_require_calls has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_prune::prune (cognitive 42) crates/turborepo-prune/src/lib.rs:271— turborepo_prune::prune has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 8 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turbo::bin::echo_args::main (cognitive 41) crates/turborepo/src/bin/echo_args.rs:2— turbo::bin::echo_args::main has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (36 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 27). 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.
turborepo_vercel_api_mock::start_test_server (cognitive 40) crates/turborepo-vercel-api-mock/src/lib.rs:77— turborepo_vercel_api_mock::start_test_server has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (36 pts), match/switch 2 (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.
create-pull-request.createPullRequest (cognitive 40) apps/factory/agent/lib/create-pull-request.ts:209— create-pull-request.createPullRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 6, ternaries 4 (5 pts), error handling 2 (nesting depth added 7). Of this number, 36 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
index.migrate (cognitive 40) packages/turbo-codemod/src/commands/migrate/index.ts:57— index.migrate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (30 pts), error handling 3 (5 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 39 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
create-project.createProject (cognitive 39) packages/turbo-utils/src/create-project.ts:37— create-project.createProject has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 4 (6 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
get-turbo-configs.getWorkspaceConfigs (cognitive 39) packages/turbo-utils/src/get-turbo-configs.ts:235— get-turbo-configs.getWorkspaceConfigs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (28 pts), error handling 2 (6 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 23). 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.
turborepo_cache::fs::evict_cache_dir (cognitive 38) crates/turborepo-cache/src/fs.rs:373— turborepo_cache::fs::evict_cache_dir has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 3 (5 pts), loops 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_fs::collect_entries (cognitive 38) crates/turborepo-fs/src/lib.rs:160— turborepo_fs::collect_entries has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (8 pts), match/switch 3 (7 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_api_client::retry::make_rate_limited_request (cognitive 37) crates/turborepo-api-client/src/retry.rs:46— turborepo_api_client::retry::make_rate_limited_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeTaskKnowledge::build (cognitive 37) crates/turborepo-repository/src/native_tasks.rs:351— NativeTaskKnowledge::build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (7 pts), match/switch 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitRepo::get_package_file_hashes_from_inputs_and_index (cognitive 37) crates/turborepo-scm/src/package_deps.rs:383— GitRepo::get_package_file_hashes_from_inputs_and_index has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (6 pts), match/switch 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parse-sequence.parseSequenceDiagram (cognitive 36) apps/docs/components/diagram/parse-sequence.ts:74— parse-sequence.parseSequenceDiagram has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_json_rewrite::find_all_paths (cognitive 35) crates/turborepo-json-rewrite/src/lib.rs:269— turborepo_json_rewrite::find_all_paths has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 20). 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.
App::handle_mouse_at (cognitive 35) crates/turborepo-ui/src/tui/app.rs:840— App::handle_mouse_at has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 7, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathPattern::parse (cognitive 34) crates/turborepo-microfrontends-proxy/src/http_router.rs:359— PathPattern::parse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TerminalWidget::render (cognitive 33) crates/turborepo-ghostty/src/widget.rs:64— TerminalWidget::render has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 3 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layout.layoutFlowchart (cognitive 33) apps/docs/components/diagram/layout.ts:89— layout.layoutFlowchart has cognitive complexity 33 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 9 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
run-maintenance.RunMaintenance (cognitive 33) apps/factory/app/run-maintenance.tsx:66— run-maintenance.RunMaintenance has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 15 (30 pts), boolean chains 1, error handling 1, if/else 1 (nesting depth added 15). Of this number, 27 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.getWorkspacePackageManager (cognitive 33) packages/turbo-workspaces/src/utils.ts:83— utils.getWorkspacePackageManager has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
turborepo_engine::builder::validate_dependency_outputs_inputs (cognitive 32) crates/turborepo-engine/src/builder.rs:760— turborepo_engine::builder::validate_dependency_outputs_inputs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
route-discovery.findPageFiles (cognitive 32) apps/docs/lib/sitemap/route-discovery.ts:40— route-discovery.findPageFiles has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 1 (4 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extension.activate (cognitive 32) packages/turbo-vsc/src/extension.ts:37— extension.activate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25 (28 pts), ternaries 3, boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 135, a function literal at line 158, a function literal at line 184, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TaskExecutor::execute_inner (cognitive 31) crates/turborepo-task-executor/src/exec.rs:342— TaskExecutor::execute_inner has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 6 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ignore.turboIgnore (cognitive 31) packages/turbo-ignore/src/ignore.ts:32— ignore.turboIgnore has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (25 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 14 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CargoTaskContract::derived_task_io (cognitive 30) crates/turborepo-repository/src/cargo.rs:847— CargoTaskContract::derived_task_io has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate-review-ci.validateReviewCI (cognitive 29) scripts/validate-review-ci.mjs:14— validate-review-ci.validateReviewCI has cognitive complexity 29 (threshold 15). Drivers by points: if/else 28 (55 pts), boolean chains 26, loops 4 (5 pts), ternaries 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (validate-review-ci.validateReviewCI::latestRun) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
AsyncCache::new (cognitive 28) crates/turborepo-cache/src/async_cache.rs:39— AsyncCache::new has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (10 pts), match/switch 2 (5 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.
RelationshipIndex::build (cognitive 28) crates/turborepo-repository/src/package_graph/projections.rs:59— RelationshipIndex::build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 4, loops 2 (3 pts), match/switch 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.
model-picker.ModelPicker (cognitive 28) apps/factory/app/model-picker.tsx:19— model-picker.ModelPicker has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (7 pts), boolean chains 4 (nesting depth added 10). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 124, 77, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
create-github-api-commit.parseArgs (cognitive 28) scripts/create-github-api-commit.mjs:44— create-github-api-commit.parseArgs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate-review-ci.validateReviewCI::latestRun (cognitive 28) scripts/validate-review-ci.mjs:151— validate-review-ci.validateReviewCI::latestRun has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (validate-review-ci.validateReviewCI) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ProcessedInputs::new (cognitive 27) crates/turborepo-turbo-json/src/processed.rs:246— ProcessedInputs::new has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
globwatch::glob_to_symbols (cognitive 26) crates/turborepo-globwatch/src/lib.rs:548— globwatch::glob_to_symbols has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (9 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.
factory-image.FactoryImage (cognitive 26) apps/factory/app/factory-image.tsx:104— factory-image.FactoryImage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 5 (6 pts), boolean chains 4, error handling 2 (nesting depth added 4). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (refresh, rebuild, a function literal at line 131, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
get-turbo-configs.getTurboConfigs (cognitive 26) packages/turbo-utils/src/get-turbo-configs.ts:149— get-turbo-configs.getTurboConfigs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProperTaskGraphBuilder::build_engine_task_graph (cognitive 25) crates/turborepo-cli/src/devtools.rs:77— ProperTaskGraphBuilder::build_engine_task_graph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackageEntry::serialize (cognitive 25) crates/turborepo-lockfiles/src/bun/ser.rs:22— PackageEntry::serialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8 (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.
Child::wait_with_piped_async_outputs (cognitive 25) crates/turborepo-process/src/child/io.rs:197— Child::wait_with_piped_async_outputs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 14). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TurboJsonLoader::uncached_load (cognitive 24) crates/turborepo-turbo-json/src/loader.rs:496— TurboJsonLoader::uncached_load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
generate-openapi-docs.main (cognitive 24) apps/docs/scripts/generate-openapi-docs.ts:43— generate-openapi-docs.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 10). Of this number, 15 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate-release-pr.validateReleaseFiles (cognitive 24) scripts/validate-release-pr.mjs:171— validate-release-pr.validateReleaseFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (6 pts), loops 4 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoTaskContract::derived_task_io (cognitive 23) crates/turborepo-repository/src/go.rs:1737— GoTaskContract::derived_task_io has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PackageGraphAssembler::project_relationships (cognitive 23) crates/turborepo-repository/src/package_graph/builder.rs:977— PackageGraphAssembler::project_relationships has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (8 pts), loops 3 (5 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.
PackageManager::get_configured_workspace_globs (cognitive 23) crates/turborepo-repository/src/package_manager/mod.rs:358— PackageManager::get_configured_workspace_globs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunSummary::format_and_print_text (cognitive 23) crates/turborepo-run-summary/src/tracker.rs:477— RunSummary::format_and_print_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_shim::managed_run::probe (cognitive 23) crates/turborepo-shim/src/managed_run.rs:146— turborepo_shim::managed_run::probe has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Workspace::find_with_mode (cognitive 23) packages/turbo-repository/rust/src/internal.rs:320— Workspace::find_with_mode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
official-starter.transform (cognitive 23) packages/create-turbo/src/transforms/official-starter.ts:19— official-starter.transform has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Vendor::infer_inner (cognitive 22) crates/turborepo-ci/src/lib.rs:62— Vendor::infer_inner has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (7 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.
UvTaskContract::derived_task_io (cognitive 22) crates/turborepo-repository/src/uv.rs:2125— UvTaskContract::derived_task_io has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, 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.
no-undeclared-env-vars.create.MemberExpression (cognitive 22) REDACTED:461— no-undeclared-env-vars.create.MemberExpression has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 1 (4 pts) (nesting depth added 10). 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.
Walker::new (cognitive 21) crates/turborepo-graph-utils/src/walker.rs:40— Walker::new has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turborepo_microfrontends_proxy::http_router::validate_path_expression (cognitive 21) crates/turborepo-microfrontends-proxy/src/http_router.rs:258— turborepo_microfrontends_proxy::http_router::validate_path_expression has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VersionRequest::intersects (cognitive 21) crates/turborepo-setup/src/version_request.rs:78— VersionRequest::intersects has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turbo_updater::ui::utils::render_message (cognitive 21) crates/turborepo-updater/src/ui/utils.rs:53— turbo_updater::ui::utils::render_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (8 pts), match/switch 1 (nesting depth added 10). 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.
Runner.finish (cognitive 21) packages/turbo-codemod/src/runner/runner.ts:46— Runner.finish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileHashes::drop_matching (cognitive 20) crates/turborepo-filewatch/src/hash_watcher.rs:397— FileHashes::drop_matching has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobWatcher::into_stream (cognitive 20) crates/turborepo-globwatch/src/lib.rs:186— GlobWatcher::into_stream has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 5 (9 pts), loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
turborepo_profile_md::analyze::assign_parents (cognitive 20) crates/turborepo-profile-md/src/analyze.rs:170— turborepo_profile_md::analyze::assign_parents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (7 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.
RepoState::infer_with_registry (cognitive 20) crates/turborepo-repository/src/inference.rs:117— RepoState::infer_with_registry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), boolean chains 1, 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.
Partial::parse (cognitive 20) crates/turborepo-setup/src/version_request.rs:298— Partial::parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
custom.generate (cognitive 20) packages/turbo-gen/src/generators/custom.ts:8— custom.generate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inputs::record (cognitive 19) crates/turborepo-cli/src/commands/setup/root/discovery/markers.rs:27— Inputs::record has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReleaseIndex::parse (cognitive 19) crates/turborepo-setup/src/node_metadata.rs:54— ReleaseIndex::parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 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.
turborepo_task_filter::task_filter::find_matching_packages (cognitive 19) crates/turborepo-task-filter/src/task_filter.rs:365— turborepo_task_filter::task_filter::find_matching_packages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devtools-client.getLayoutedElements (cognitive 19) apps/docs/app/[lang]/devtools/devtools-client.tsx:157— devtools-client.getLayoutedElements has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 5 (7 pts), ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
copy.generate (cognitive 19) packages/turbo-gen/src/generators/copy.ts:14— copy.generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 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.
EnvVars::get_configuration_options (cognitive 18) crates/turborepo-config/src/env.rs:128— EnvVars::get_configuration_options has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Debouncer::debounce (cognitive 18) crates/turborepo-filewatch/src/debouncer.rs:60— Debouncer::debounce has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Snapshot::load_matchers (cognitive 18) crates/turborepo-filewatch/src/repository_ignore.rs:298— Snapshot::load_matchers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (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.
PackageIndex::new (cognitive 18) crates/turborepo-lockfiles/src/bun/index.rs:44— PackageIndex::new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), 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.
turborepo_query::affected_tasks::calculate_affected_tasks_with_packages (cognitive 18) crates/turborepo-query/src/affected_tasks.rs:71— turborepo_query::affected_tasks::calculate_affected_tasks_with_packages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), match/switch 4 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Run::setup_cache_shutdown_handler (cognitive 18) crates/turborepo-run/src/lib.rs:876— Run::setup_cache_shutdown_handler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompiledOutputGlobs::new (cognitive 18) crates/turborepo-task-graph/src/visitor/mod.rs:1229— CompiledOutputGlobs::new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 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.
parse-flowchart.parseEdgeStatement (cognitive 18) apps/docs/components/diagram/parse-flowchart.ts:113— parse-flowchart.parseEdgeStatement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, ternaries 1 (2 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.
workspace-list.WorkspaceList (cognitive 18) apps/factory/app/workspace-list.tsx:23— workspace-list.WorkspaceList has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4, boolean chains 2, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 28, 105, 60, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
workspace-client.ChatComposer (cognitive 18) apps/factory/app/workspace-client.tsx:646— workspace-client.ChatComposer has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 6, if/else 4 (nesting depth added 2). Of this number, 12 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
validate-directory.validateDirectory (cognitive 18) packages/turbo-utils/src/validate-directory.ts:6— validate-directory.validateDirectory has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2 (5 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.
CargoContributor::discover_packages (cognitive 17) crates/turborepo-repository/src/cargo.rs:1720— CargoContributor::discover_packages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1, match/switch 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.
RepositoryKnowledge::build (cognitive 17) crates/turborepo-repository/src/knowledge.rs:300— RepositoryKnowledge::build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SCM::get_package_file_hashes (cognitive 17) crates/turborepo-scm/src/package_deps.rs:26— SCM::get_package_file_hashes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (3 pts) (nesting depth added 10). 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.
PackageInference::calculate (cognitive 17) crates/turborepo-scope/src/filter.rs:39— PackageInference::calculate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (3 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.
NodePlan::download (cognitive 17) crates/turborepo-setup/src/node_provision.rs:243— NodePlan::download has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
layout.calculateDepths (cognitive 17) apps/docs/components/diagram/layout.ts:26— layout.calculateDepths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
factory-image-trigger.reconcileFactoryImageBuilds (cognitive 17) apps/factory/agent/lib/factory-image-trigger.ts:174— factory-image-trigger.reconcileFactoryImageBuilds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github-push.parseGitHubPush (cognitive 17) apps/factory/agent/lib/github-push.ts:50— github-push.parseGitHubPush has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
plop.runCustomGenerator (cognitive 17) packages/turbo-gen/src/utils/plop.ts:340— plop.runCustomGenerator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turbo-discovery.findLocalTurbo (cognitive 17) packages/turbo-vsc/src/turbo-discovery.ts:248— turbo-discovery.findLocalTurbo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::start (cognitive 16) crates/turborepo-analytics/src/lib.rs:108— Worker::start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, match/switch 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.
CacheReader::restore_entries (cognitive 16) crates/turborepo-cache/src/cache_archive/restore.rs:87— CacheReader::restore_entries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine::validate (cognitive 16) crates/turborepo-engine/src/validate_engine.rs:111— Engine::validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackageGraphResult::new (cognitive 16) crates/turborepo-microfrontends-config/src/lib.rs:458— PackageGraphResult::new 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.
turborepo_package_watcher::package_changes_watcher::classify_changed_files (cognitive 16) crates/turborepo-package-watcher/src/package_changes_watcher.rs:312— turborepo_package_watcher::package_changes_watcher::classify_changed_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolchainCommandProvider::command (cognitive 16) crates/turborepo-task-executor/src/command.rs:247— ToolchainCommandProvider::command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PackageInputsHashes::calculate_file_hashes (cognitive 16) crates/turborepo-task-hash/src/lib.rs:133— PackageInputsHashes::calculate_file_hashes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3, match/switch 2 (3 pts), boolean chains 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.
add-package-names.transformer (cognitive 16) packages/turbo-codemod/src/transforms/add-package-names.ts:51— add-package-names.transformer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4, boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prompts.dependencies (cognitive 16) packages/turbo-gen/src/commands/workspace/prompts.ts:185— prompts.dependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
get-comparison.getComparison (cognitive 16) packages/turbo-ignore/src/get-comparison.ts:32— get-comparison.getComparison has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts) (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.
update-dependencies.updateDependencies (cognitive 16) packages/turbo-workspaces/src/update-dependencies.ts:52— update-dependencies.updateDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate-review-gate.hasValidApproval (cognitive 16) scripts/validate-review-gate.mjs:56— validate-review-gate.hasValidApproval has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: ConfigurationOptions crates/turborepo-config/src/lib.rs:277— TooManyFields — 37 stored fields beside 39 methods. The bar is 30 stored fields; this is 7 over it, 1.23× 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.
Change-coupling hub: devtools.rs → get_mfe_port.rs, package_changes_watcher.rs, builder.rs crates/turborepo-cli/src/devtools.rs— `crates/turborepo-cli/src/devtools.rs` changes together with 3 other files — `crates/turborepo-cli/src/commands/get_mfe_port.rs`, `crates/turborepo-package-watcher/src/package_changes_watcher.rs`, `crates/turborepo-run/src/builder.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Duplicated block (30–31 lines × 2) crates/turborepo-scm/src/manual.rs:255— crates/turborepo-scm/src/manual.rs:255-285 | crates/turborepo-scm/src/manual.rs:311-340 — 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 (25–26 lines × 2) crates/turborepo-lsp/src/lib.rs:553— crates/turborepo-lsp/src/lib.rs:553-577 | crates/turborepo-lsp/src/lib.rs:643-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.
Duplicated block (21–22 lines × 2) crates/turborepo-auth/src/auth/login.rs:187— crates/turborepo-auth/src/auth/login.rs:187-207 | crates/turborepo-auth/src/auth/sso.rs:171-192 — before extracting anything, compare `crates/turborepo-auth/src/auth/login.rs` and `crates/turborepo-auth/src/auth/sso.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (22 lines × 2) crates/turborepo-paths/src/absolute_system_path.rs:428— crates/turborepo-paths/src/absolute_system_path.rs:428-449 | crates/turborepo-paths/src/anchored_system_path.rs:136-157 — 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 (16–20 lines × 2) crates/turborepo-microfrontends/src/configv1.rs:84— crates/turborepo-microfrontends/src/configv1.rs:84-103 | crates/turborepo-microfrontends/src/schema.rs:69-84 — before extracting anything, compare `crates/turborepo-microfrontends/src/configv1.rs` and `crates/turborepo-microfrontends/src/schema.rs` as WHOLE FILES: this scan already matched 3 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 (19–20 lines × 2) crates/turborepo-query/src/file.rs:176— crates/turborepo-query/src/file.rs:176-195 | crates/turborepo-query/src/file.rs:211-229 — 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 (19 lines × 2) crates/turborepo-auth/src/auth/sso.rs:91— crates/turborepo-auth/src/auth/sso.rs:91-109 | crates/turborepo-auth/src/auth/sso.rs:111-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) crates/turborepo-api-client/src/lib.rs:599— crates/turborepo-api-client/src/lib.rs:599-615 | crates/turborepo-api-client/src/lib.rs:658-674 — 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 (15–17 lines × 2) crates/turborepo-lockfiles/src/berry/fast_parse.rs:198— crates/turborepo-lockfiles/src/berry/fast_parse.rs:198-212 | crates/turborepo-lockfiles/src/yarn1/fast_parse.rs:133-149 — `crates/turborepo-lockfiles/src/berry/fast_parse.rs` and `crates/turborepo-lockfiles/src/yarn1/fast_parse.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 35 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (15–16 lines × 2) crates/turborepo-boundaries/src/tags.rs:200— crates/turborepo-boundaries/src/tags.rs:200-215 | crates/turborepo-boundaries/src/tags.rs:222-236 — 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 (14–16 lines × 2) crates/turborepo-microfrontends/src/configv1.rs:105— crates/turborepo-microfrontends/src/configv1.rs:105-120 | crates/turborepo-microfrontends/src/schema.rs:88-101 — before extracting anything, compare `crates/turborepo-microfrontends/src/configv1.rs` and `crates/turborepo-microfrontends/src/schema.rs` as WHOLE FILES: this scan already matched 3 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 (16 lines × 2) crates/turborepo-query/src/lib.rs:700— crates/turborepo-query/src/lib.rs:700-715 | crates/turborepo-query/src/task.rs:204-219 — 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–13 lines × 2) crates/turborepo-lockfiles/src/bun/subgraph.rs:342— crates/turborepo-lockfiles/src/bun/subgraph.rs:342-354 | crates/turborepo-lockfiles/src/bun/subgraph.rs:411-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–13 lines × 2) crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:791— crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:791-803 | crates/turborepo-lockfiles/src/pnpm/data_fast_parse.rs:1025-1034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–13 lines × 2) crates/turborepo-ui/src/tui/log_panel.rs:63— crates/turborepo-ui/src/tui/log_panel.rs:63-73 | crates/turborepo-ui/src/tui/popup.rs:48-60 — 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 (12 lines × 3) crates/turborepo-telemetry/src/events/command.rs:35— crates/turborepo-telemetry/src/events/command.rs:35-46 | crates/turborepo-telemetry/src/events/generic.rs:47-58 | crates/turborepo-telemetry/src/events/task.rs:50-61 — before extracting anything, compare `crates/turborepo-telemetry/src/events/command.rs` and `crates/turborepo-telemetry/src/events/generic.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 (9–11 lines × 2) crates/turborepo-auth/src/auth/login.rs:416— crates/turborepo-auth/src/auth/login.rs:416-424 | crates/turborepo-auth/src/auth/sso.rs:352-362 — before extracting anything, compare `crates/turborepo-auth/src/auth/login.rs` and `crates/turborepo-auth/src/auth/sso.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (10–11 lines × 2) crates/turborepo-cache/src/fs.rs:218— crates/turborepo-cache/src/fs.rs:218-228 | crates/turborepo-cache/src/fs.rs:291-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–11 lines × 2) crates/turborepo-filewatch/src/fsevent.rs:429— crates/turborepo-filewatch/src/fsevent.rs:429-436 | crates/turborepo-filewatch/src/fsevent.rs:466-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 3) crates/turborepo-filewatch/src/lib.rs:1482— crates/turborepo-filewatch/src/lib.rs:1482-1491 | crates/turborepo-filewatch/src/lib.rs:1589-1598 | crates/turborepo-filewatch/src/lib.rs:1806-1815 — 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.
Duplicated block (8–9 lines × 3) crates/turborepo-boundaries/src/config.rs:128— crates/turborepo-boundaries/src/config.rs:128-136 | crates/turborepo-boundaries/src/config.rs:154-162 | crates/turborepo-turbo-json/src/parser.rs:535-542 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) crates/turborepo-scm/src/ls_tree.rs:105— crates/turborepo-scm/src/ls_tree.rs:105-113 | crates/turborepo-scm/src/ls_tree.rs:149-158 | crates/turborepo-scm/src/ls_tree.rs:186-194 — 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.
Duplicated block (7–9 lines × 2) crates/turborepo-hash/src/lib.rs:179— crates/turborepo-hash/src/lib.rs:179-187 | crates/turborepo-lockfile-hash/src/lib.rs:73-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6–9 lines × 2) crates/turborepo-scm/src/worktree.rs:65— crates/turborepo-scm/src/worktree.rs:65-70 | crates/turborepo-scm/src/worktree.rs:80-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6–7 lines × 3) crates/turborepo-boundaries/src/config.rs:140— crates/turborepo-boundaries/src/config.rs:140-146 | crates/turborepo-boundaries/src/config.rs:166-172 | crates/turborepo-turbo-json/src/parser.rs:550-555 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 4) crates/turborepo-telemetry/src/events/command.rs:26— crates/turborepo-telemetry/src/events/command.rs:26-32 | crates/turborepo-telemetry/src/events/generic.rs:38-44 | crates/turborepo-telemetry/src/events/repo.rs:28-34 | crates/turborepo-telemetry/src/events/task.rs:41-47 — before extracting anything, compare `crates/turborepo-telemetry/src/events/command.rs` and `crates/turborepo-telemetry/src/events/generic.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 (5 lines × 3) crates/turborepo-cli/src/commands/mod.rs:103— crates/turborepo-cli/src/commands/mod.rs:103-107 | crates/turborepo-config/src/file.rs:158-162 | crates/turborepo-config/src/file.rs:164-168 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11 lines × 5) crates/turborepo-scm/src/ls_tree.rs:71— crates/turborepo-scm/src/ls_tree.rs:71-81 | crates/turborepo-scm/src/ls_tree.rs:107-117 | crates/turborepo-scm/src/ls_tree.rs:152-162 | crates/turborepo-scm/src/ls_tree.rs:188-198 | crates/turborepo-scm/src/status.rs:36-46 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Outbound HTTP without resilience crates/turborepo-cli/src/commands/docs.rs:77— `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.
Duplication concentrated across 6 sibling directories (9 clone groups) packages/turbo-codemod/src/commands/migrate/index.ts:66— 9 duplicated blocks under packages/ have copies in at least two of the sibling directories create-turbo, eslint-plugin-turbo, turbo-codemod, turbo-gen, turbo-ignore, turbo-workspaces — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Wholesale file copy (109 identical lines × 2 files) packages/turbo-workspaces/src/managers/aube.ts:1— packages/turbo-workspaces/src/managers/aube.ts:1 · packages/turbo-workspaces/src/managers/nub.ts:1 — these 2 files are line-for-line copies of one another — 109 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (109 identical lines × 3 files) packages/turbo-workspaces/src/managers/bun.ts:1— packages/turbo-workspaces/src/managers/bun.ts:1 · packages/turbo-workspaces/src/managers/npm.ts:1 · packages/turbo-workspaces/src/managers/yarn.ts:1 — these 3 files are line-for-line copies of one another — 109 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (100 matched lines × 2 locations) · ×1
Duplicated block with local edits (100 matched lines × 2 locations) packages/turbo-workspaces/src/managers/pnpm.ts:80— packages/turbo-workspaces/src/managers/pnpm.ts:80 · packages/turbo-workspaces/src/managers/yarn.ts:79 — the two spans are one implementation copied and then locally edited — 566 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (95 identical lines × 2 files) packages/turbo-types/schemas/schema.ts:1— packages/turbo-types/schemas/schema.ts:1 · packages/turbo-types/src/types/config-v2.ts:1 — these 2 files are line-for-line copies of one another — 95 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Duplicated block (90 lines × 4 locations) packages/turbo-workspaces/src/managers/aube.ts:95— packages/turbo-workspaces/src/managers/aube.ts:95 · packages/turbo-workspaces/src/managers/npm.ts:73 · packages/turbo-workspaces/src/managers/nub.ts:99 · packages/turbo-workspaces/src/managers/yarn.ts:74 — the 4 copies are spread across 4 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 (61 lines × 3 locations) packages/turbo-codemod/src/transforms/rename-output-mode.ts:29— packages/turbo-codemod/src/transforms/rename-output-mode.ts:29 · packages/turbo-codemod/src/transforms/stabilize-env-mode.ts:103 · packages/turbo-codemod/src/transforms/transform-env-literals-to-wildcards.ts:67 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (35 lines × 5 locations) packages/turbo-codemod/src/transforms/migrate-dot-env.ts:43— packages/turbo-codemod/src/transforms/migrate-dot-env.ts:43 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:33 · packages/turbo-codemod/src/transforms/set-default-outputs.ts:42 · packages/turbo-codemod/src/transforms/stabilize-env-mode.ts:107 · +1 more site(s) not listed — the 5 copies are spread across 5 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 (34 lines × 2 locations) packages/turbo-gen/src/templates/simple-js/config.js:10— packages/turbo-gen/src/templates/simple-js/config.js:10 · packages/turbo-gen/src/templates/simple-ts/config.ts:12 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (30 matched lines × 2 locations) · ×1
Duplicated block with local edits (30 matched lines × 2 locations) packages/turbo-codemod/src/transforms/update-schema-json-url.ts:33— packages/turbo-codemod/src/transforms/update-schema-json-url.ts:33 · packages/turbo-codemod/src/transforms/update-versioned-schema-json.ts:163 — the two spans are one implementation copied and then locally edited — 151 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (28 lines × 3 locations) packages/turbo-codemod/src/transforms/clean-globs.ts:23— packages/turbo-codemod/src/transforms/clean-globs.ts:23 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:64 · packages/turbo-codemod/src/transforms/set-default-outputs.ts:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (26 lines × 2 locations) packages/turbo-workspaces/src/commands/convert/index.ts:39— packages/turbo-workspaces/src/commands/convert/index.ts:39 · packages/turbo-workspaces/src/commands/summary/index.ts:11 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (20 lines × 3 locations) packages/turbo-codemod/src/commands/migrate/index.ts:66— packages/turbo-codemod/src/commands/migrate/index.ts:66 · packages/turbo-workspaces/src/commands/convert/index.ts:42 · packages/turbo-workspaces/src/commands/summary/index.ts:14 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (17 lines × 2 locations) apps/factory/agent/lib/example-validation.ts:32— apps/factory/agent/lib/example-validation.ts:32 · apps/factory/agent/lib/performance-validation.ts:168 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (17 matched lines × 2 locations) · ×1
Duplicated block with local edits (17 matched lines × 2 locations) apps/factory/agent/tools/find_package_versions.ts:20— apps/factory/agent/tools/find_package_versions.ts:20 · apps/factory/agent/tools/update_example_lockfile.ts:12 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (16 lines × 2 locations) packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:75— packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:75 · packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts:95 — 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 (16 lines × 6 locations) packages/turbo-codemod/src/transforms/migrate-dot-env.ts:96— packages/turbo-codemod/src/transforms/migrate-dot-env.ts:96 · packages/turbo-codemod/src/transforms/migrate-env-var-dependencies.ts:180 · packages/turbo-codemod/src/transforms/rename-output-mode.ts:86 · packages/turbo-codemod/src/transforms/rename-pipeline.ts:63 · +2 more site(s) not listed — the 6 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 6 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (15 lines × 3 locations) packages/turbo-codemod/src/transforms/rename-pipeline.ts:29— packages/turbo-codemod/src/transforms/rename-pipeline.ts:29 · packages/turbo-codemod/src/transforms/stabilize-ui.ts:32 · packages/turbo-codemod/src/transforms/update-schema-json-url.ts:28 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (15 lines × 2 locations) packages/turbo-releaser/src/stage.ts:17— packages/turbo-releaser/src/stage.ts:17 · packages/turbo-releaser/src/tag.ts:12 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (14 matched lines × 2 locations) · ×1
Duplicated block with local edits (14 matched lines × 2 locations) apps/factory/agent/lib/create-pull-request.ts:151— apps/factory/agent/lib/create-pull-request.ts:151 · apps/factory/agent/lib/pull-request.ts:101 — the two spans are one implementation copied and then locally edited — 58 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (14 lines × 2 locations) apps/factory/agent/lib/factory-image-types.ts:339— apps/factory/agent/lib/factory-image-types.ts:339 · apps/factory/agent/lib/factory-image-types.ts:357 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) packages/turbo-codemod/src/cli.ts:95— packages/turbo-codemod/src/cli.ts:95 · packages/turbo-workspaces/src/cli.ts:35 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function validateReviewCI (cyclomatic 34, cognitive 36) scripts/validate-review-ci.mjs:14— validateReviewCI has cyclomatic complexity 34 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function create (cyclomatic 31, cognitive 46) packages/create-turbo/src/commands/create/index.ts:69— create has cyclomatic complexity 31 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createPullRequest (cyclomatic 30, cognitive 35) apps/factory/agent/lib/create-pull-request.ts:209— createPullRequest has cyclomatic complexity 30 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getWorkspacePackageManager (cyclomatic 30, cognitive 35) packages/turbo-workspaces/src/utils.ts:83— getWorkspacePackageManager has cyclomatic complexity 30 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function isWorkspaceRecord (cyclomatic 30, cognitive 17) apps/factory/agent/lib/workspace.ts:144— isWorkspaceRecord has cyclomatic complexity 30 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 migrate (cyclomatic 28, cognitive 39) packages/turbo-codemod/src/commands/migrate/index.ts:57— migrate has cyclomatic complexity 28 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createProject (cyclomatic 22, cognitive 39) packages/turbo-utils/src/create-project.ts:37— createProject has cyclomatic complexity 22 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function main (cyclomatic 21, cognitive 36) · ×1
Complex function main (cyclomatic 21, cognitive 36) lockfile-tests/check-lockfiles.ts:302— main has cyclomatic complexity 21 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseArgs (cyclomatic 21, cognitive 28) scripts/create-github-api-commit.mjs:44— parseArgs has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseGitHubPush (cyclomatic 20, cognitive 18) apps/factory/agent/lib/github-push.ts:50— parseGitHubPush has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getWorkspaceConfigs (cyclomatic 19, cognitive 40) packages/turbo-utils/src/get-turbo-configs.ts:235— getWorkspaceConfigs has cyclomatic complexity 19 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function execute (cyclomatic 19, cognitive 37) apps/factory/agent/tools/audit_example_versions.ts:81— execute has cyclomatic complexity 19 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function latestRun (cyclomatic 19, cognitive 32) scripts/validate-review-ci.mjs:151— latestRun has cyclomatic complexity 19 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validateDirectory (cyclomatic 19, cognitive 19) packages/turbo-utils/src/validate-directory.ts:6— validateDirectory has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function request (cyclomatic 19, cognitive 19) REDACTED:73— request has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 lookupPackage (cyclomatic 19, cognitive 18) packages/turbo-releaser/src/npm.ts:129— lookupPackage has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseCreateWorkspaceInput (cyclomatic 19, cognitive 17) apps/factory/agent/lib/workspace.ts:58— parseCreateWorkspaceInput has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 getLocalUpgradeCommand (cyclomatic 19, cognitive 14) packages/turbo-codemod/src/commands/migrate/steps/get-turbo-upgrade-command.ts:53— getLocalUpgradeCommand has cyclomatic complexity 19 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function runFixtureGroup (cyclomatic 17, cognitive 30) lockfile-tests/runners/local.ts:391— runFixtureGroup has cyclomatic complexity 17 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· apps/factory/app/workspace-client.tsx · ×1
apps/factory/app/workspace-client.tsx: 1193 lines of code apps/factory/app/workspace-client.tsx— apps/factory/app/workspace-client.tsx has 1193 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/turbo-types/src/types/config-v2.ts · ×1
packages/turbo-types/src/types/config-v2.ts: 772 lines of code packages/turbo-types/src/types/config-v2.ts— packages/turbo-types/src/types/config-v2.ts has 772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/factory/agent/lib/factory-image.ts · ×1
apps/factory/agent/lib/factory-image.ts: 720 lines of code apps/factory/agent/lib/factory-image.ts— apps/factory/agent/lib/factory-image.ts has 720 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/turbo-types/schemas/schema.ts · ×1
packages/turbo-types/schemas/schema.ts: 673 lines of code packages/turbo-types/schemas/schema.ts— packages/turbo-types/schemas/schema.ts has 673 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· apps/factory/agent/lib/create-pull-request.ts · ×1
apps/factory/agent/lib/create-pull-request.ts: 633 lines of code apps/factory/agent/lib/create-pull-request.ts— apps/factory/agent/lib/create-pull-request.ts has 633 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/turbo-workspaces/src/utils.ts · ×1
packages/turbo-workspaces/src/utils.ts: 607 lines of code packages/turbo-workspaces/src/utils.ts— packages/turbo-workspaces/src/utils.ts has 607 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/turbo-utils/src/examples.ts · ×1
packages/turbo-utils/src/examples.ts: 545 lines of code packages/turbo-utils/src/examples.ts— packages/turbo-utils/src/examples.ts has 545 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· lockfile-tests/runners/local.ts · ×1
lockfile-tests/runners/local.ts: 486 lines of code lockfile-tests/runners/local.ts— lockfile-tests/runners/local.ts has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 447 lines of code REDACTED— REDACTED has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts · ×1
packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts: 406 lines of code packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts— packages/eslint-plugin-turbo/lib/utils/calculate-inputs.ts has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage· This test file cannot be loaded · ×1
This test file cannot be loaded turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts— turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts:1 imports './index', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
R4 · Test Coverage· No test rig can mount a component in this workspace · ×1
No test rig can mount a component in this workspace packages/create-turbo/jest.config.js— packages/create-turbo/jest.config.js 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 6 unreached component module(s) can be tested as written, however the suite is authored: apps/factory/app/factory-image.tsx, apps/factory/app/workspace-list.tsx, apps/factory/app/page.tsx, apps/factory/app/factory-image/page.tsx, apps/factory/app/workspaces/[id]/page.tsx, apps/factory/app/work/layout.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.
R6 · Tooling· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts— This repository declares test tooling, and the ✓ above records that declaration — but turborepo-tests/integration/fixtures/affected_tasks_inputs/packages/lib-a/index.test.ts cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~732 LoC) packages/turbo-types/schemas/schema.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~274 LoC) apps/factory/agent/tools/audit_example_versions.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~250 LoC) apps/factory/agent/channels/operator.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~245 LoC) packages/turbo-gen/src/types.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~186 LoC) apps/factory/agent/channels/workspace.ts— no import path from any entry point (76 application, 42 tooling, 175 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/factory/agent/channels/operator.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~152 LoC) REDACTED— no import path from any entry point (76 application, 42 tooling, 175 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 (~125 LoC) apps/factory/agent/tools/run_performance_command.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~111 LoC) apps/factory/agent/channels/github.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~105 LoC) apps/factory/agent/tools/run_example_turbo_tasks.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~78 LoC) apps/factory/agent/tools/inspect_example.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~74 LoC) apps/factory/agent/tools/record_issue_assessment.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~73 LoC) apps/factory/agent/hooks/workspace-status.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~68 LoC) apps/factory/agent/tools/find_package_versions.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~61 LoC) apps/factory/agent/tools/run_example_script.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~47 LoC) apps/factory/agent/tools/update_example_lockfile.ts— no import path from any entry point (76 application, 42 tooling, 175 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~46 LoC) apps/factory/agent/tools/audit_example_tasks.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~38 LoC) apps/factory/agent/tools/write_examples_file.ts— no import path from any entry point (76 application, 42 tooling, 175 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~32 LoC) apps/factory/agent/agent.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~27 LoC) apps/factory/agent/tools/list_examples.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~26 LoC) apps/factory/agent/tools/rebuild_factory_image.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~19 LoC) apps/factory/agent/hooks/refresh-workspace.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~17 LoC) apps/factory/agent/tools/begin_performance_improvement.ts— no import path from any entry point (76 application, 42 tooling, 175 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) apps/factory/agent/schedules/reconcile_factory_images.ts— no import path from any entry point (76 application, 42 tooling, 175 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 (~3 LoC) apps/factory/agent/tools/ask_question.ts— no import path from any entry point (76 application, 42 tooling, 175 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 'ws' — Declared in apps/factory/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Weak hash algorithm crates/turborepo-scm/src/crlf.rs:296— 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.
Third-party script without Subresource Integrity crates/turborepo-query/src/query_ide.html:23— `https://unpkg.com/react@18/umd/react.development.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 3 such include(s) across the repository's markup.
Interpolated log message defeats structured logging crates/turbo-trace/src/tracer.rs:256— `debug!` at line 256 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/turbo-trace/src/tracer.rs:263— `debug!` at line 263 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/turbo-trace/src/tracer.rs:273— `debug!` at line 273 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/turbo-trace/src/tracer.rs:278— `debug!` 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: `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/turbo-trace/src/tracer.rs:292— `debug!` at line 292 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/turbo-trace/src/tracer.rs:307— `debug!` at line 307 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/turborepo-analytics/src/lib.rs:91— `debug!` at line 91 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/turborepo-analytics/src/lib.rs:144— `debug!` at line 144 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/turborepo-analytics/src/lib.rs:155— `debug!` at line 155 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/turborepo-analytics/src/lib.rs:177— `debug!` at line 177 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/turborepo-api-client/src/shared_http_client.rs:63— `warn!` at line 63 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/turborepo-api-client/src/shared_http_client.rs:80— `warn!` at line 80 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/turborepo-api-client/src/lib.rs:787— `warn!` at line 787 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/turborepo-api-client/src/lib.rs:808— `debug!` at line 808 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/turborepo-api-client/src/lib.rs:849— `debug!` at line 849 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/turborepo-api-client/src/lib.rs:858— `debug!` at line 858 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/turborepo-api-client/src/lib.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/turborepo-api-client/src/lib.rs:881— `debug!` at line 881 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/turborepo-auth/src/auth/sso.rs:64— `warn!` at line 64 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/turborepo-auth/src/auth/sso.rs:212— `warn!` at line 212 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/turborepo-auth/src/auth/sso.rs:262— `warn!` at line 262 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/turborepo-auth/src/auth/sso.rs:359— `warn!` at line 359 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/turborepo-auth/src/auth/sso.rs:465— `warn!` at line 465 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/turborepo-auth/src/auth/mod.rs:240— `warn!` at line 240 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/turborepo-auth/src/auth/mod.rs:310— `warn!` at line 310 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`.
Silent fallback default on Err crates/turborepo-filewatch/src/hash_watcher.rs:271— `new` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-filewatch/src/package_watcher.rs:309— `new` turns every `Err` into `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-globwalk/src/lib.rs:997— `walk_compiled_globs` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-run/src/lib.rs:1750— `changed_files` turns every `Err` into `Ok(std::collections::HashSet::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-scm/src/slowest_files.rs:111— `snapshot` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-scm/src/repo_index.rs:821— `walk_candidate_files_with_unsupported` turns every `Err` into `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/turborepo-scm/src/repo_index.rs:1075— `find_untracked_files` turns every `Err` into `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Duplicated predicate apps/factory/agent/lib/example-validation.ts:115— `typeof value !== "object" || value === null || Array.isArray(value)` appears character-identically in 2 files — apps/factory/agent/lib/example-validation.ts, apps/factory/agent/lib/performance-validation.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/factory/agent/lib/example-tasks.ts:66— `typeof value === "object" && value !== null && !Array.isArray(value)` appears character-identically in 3 files — apps/factory/agent/lib/example-tasks.ts, apps/factory/agent/lib/repo.ts, apps/factory/app/workspace-types.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/turborepo-cli/src/commands/setup/first_lock.rs:343— `!root.join(".turbo/setup-lock/staged").exists() || fired.replace(true)` appears character-identically in 2 files — crates/turborepo-cli/src/commands/setup/first_lock.rs, crates/turborepo-cli/src/commands/setup/publication_guards.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/turborepo-cli/src/commands/setup/first_lock.rs:61— `root.join(".turbo/setup-lock/staged").exists() && !fired.replace(true)` appears character-identically in 2 files — crates/turborepo-cli/src/commands/setup/first_lock.rs, crates/turborepo-cli/src/commands/setup/publication_guards.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.
P2 · Observability· Console output used as the logging channel · ×3
Console output used as the logging channel packages/turbo-codemod/src/utils/logger.ts:15— `packages/turbo-codemod/src/utils/logger.ts` reports through `console.*` at 1 site(s) (first at line 15) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/turbo-utils/src/logger.ts:59— `packages/turbo-utils/src/logger.ts` reports through `console.*` at 3 site(s) (first at line 59) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel packages/turbo-workspaces/src/logger.ts:23— `packages/turbo-workspaces/src/logger.ts` reports through `console.*` at 2 site(s) (first at line 23) although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Silent fallback default in catch packages/turbo-utils/src/examples.ts:48— `getGitHubAuthHeaders` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch packages/turbo-utils/src/get-turbo-configs.ts:144— `getWorkspaceGlobs` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 86 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Fat interface: NodePlopAPI (25 required operations) packages/turbo-gen/src/types.ts:184— `NodePlopAPI` declares 25 required operations: `setGenerator`, `setPrompt`, `setWelcomeMessage`, `getWelcomeMessage`, `getGenerator`, `getGeneratorList`, `setPartial`, `getPartial`, `getPartialList`, `setHelper`, `getHelper`, `getHelperList`, `setActionType`, `getActionType`, `getActionTypeList`, `setPlopfilePath`, `getPlopfilePath`, `getDestBasePath`, `load`, `setDefaultInclude`, `getDefaultInclude`, `renderString`, `addPrompt`, `addPartial`, `addHelper`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 172 significant file(s) lose their only recent owner: crates/turborepo-repository/src/cargo.rs, crates/turborepo-repository/src/package_graph/mod.rs, crates/turborepo-cache/src/cache_archive/restore.rs, crates/turborepo-scope/src/filter.rs, crates/turborepo-query/src/affected_tasks.rs, crates/turborepo-task-hash/src/lib.rs, crates/turborepo-turbo-json/src/loader.rs, crates/turborepo-scm/src/package_deps.rs (+164 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (174 single-owned of 557 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 557 of the 802 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/turborepo-microfrontends-proxy/src/http_router.rs, packages/create-turbo/src/transforms/update-commands-in-readme.ts.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 3 of 103 project(s) overshoot their size bounds, lowering Project Cohesion to 9.4/10. The most over is `crates/turborepo-repository` (43206 LoC, 204 module-visible types across 6 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· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 22 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/turborepo-lockfiles/src/pnpm/dep_path.rs, packages/turbo-gen/src/commands/workspace/prompts.ts, crates/turborepo-paths/src/relative_unix_path_buf.rs, crates/turborepo-gitignore/src/lib.rs, crates/turborepo-scm/src/slowest_files.rs, crates/turborepo-cache/src/upload_progress.rs, crates/turborepo-cache/src/config.rs, crates/turborepo-updater/src/ui/utils.rs (and 14 more) (24 orphaned of 557 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 557 of the 802 production source files in this repository met that bar). 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 53/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/docs`, `apps/factory`, `crates/libghostty-vt-sys`, `crates/turborepo`, `crates/turborepo-download` and 13 more.
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 11/29 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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 — 135/143 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.
Subsumed condition operand crates/turborepo-microfrontends-proxy/src/http_router.rs:797— `err.contains("Optional paths are not supported")` can never decide this `||` — every value satisfying `err.contains("Optional paths are not supported")` also satisfies `err.contains("not supported")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Skipped (documented): installs the latest stable standalone archive after verifying its manifest digest scripts/install.test.mjs:128— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): adds the install directory to GitHub Actions PATH without editing shell profiles scripts/install.test.mjs:182— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): rejects a tampered archive without installing it scripts/install.test.mjs:204— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): refuses an existing PATH shim before downloading or executing it scripts/install.test.mjs:223— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): replaces a regular binary in the install directory, including when it is on PATH scripts/install.test.mjs:265— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps the old binary when verification fails scripts/install.test.mjs:291— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): refuses a symlink at the install destination before downloading scripts/install.test.mjs:315— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): rejects install directories that cannot be represented safely in PATH scripts/install.test.mjs:337— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): installs when SHELL is unset scripts/install.test.mjs:358— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): rejects unsafe version input before making a request scripts/install.test.mjs:379— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
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 8 file(s) — `apps/docs/components/diagram/flow-diagram.tsx`, `apps/docs/components/diagram/parse-flowchart.ts`, `apps/docs/geistdocs.tsx`, `apps/docs/scripts/generate-openapi-docs.ts`, `apps/factory/agent/lib/factory-image.ts`, … (+3 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a12e29-8e67-7514-932c-a43965555778 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 86 · Warnings: 1033 · Recommendations: 80 · Info: 10 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 12-10-2026 @ 03:30 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.