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

pbakaus/impeccable

Measured 13 November 2026, 17:07 UTC, at code version c4cd192

CAI score 53out of 100 At risk Up 6 since the last survey

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

A large codebase: 229,246 lines of product code in 24 projects, tests not counted · Estimated rebuild effort: about 1.8 person-years · Weakest lens: Code Health, 46

Findings by how serious they are

24 critical 2151 serious 133 minor

13 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 17:07 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

68of 68 dimensions measured by tools.
2278of 2308 findings point to an exact file and line, so you can open each one in the code. The other 30 concern the repository as a whole, such as missing documentation.
68dimensions across 7 lenses, read from 229,246 lines of product code in 24 projects.
Chapters

Executive summary

pbakaus/impeccable is rated At risk because critical security findings are open. It scores 53 out of 100, which the At risk rating leaves unchanged.

Code Health, at 46, is the weakest lens and counts most in the score. The best first step is making the five tests that check nothing check their results, worth about 4 points. Adding type checking would lift Code Health itself, worth about 3 points. Raising Code Health to 70 would lift the score to about 57.

Seven known security holes in the packages the code depends on can be used by attackers. Two pipeline steps install packages that can change without warning, and two places in the code run text as code, which an attacker could use. Updating the vulnerable packages, pinning what the pipeline installs and replacing text run as code with direct calls would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code, and setting a waiting period for automatic updates would deal with the automatic dependency update that takes a new release at once. The five tests that check nothing need to check the result they produce.

The product code is 229,246 lines, about €260,000 to rebuild.

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

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

If Code Health rose from 46 to 70, the lowest score rated Strong, the score would rise from 53 to about 57.

Code composition: what the lines of code are
Product code 84%Tests 16%
New since the last survey: 503 findings

These 503 critical or serious findings weren't in the previous survey, on 24 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · component-review._n::H (cyclomatic 265) crates/context/assets/component-review.js
  • Cyclomatic Complexity · component-review.Xn::ot (cyclomatic 56) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable::router::run (cyclomatic 53) crates/cli/src/router.rs
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::unpainted_root_reads_light (cyclomatic 46) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_context::critique_storage::run_with_saved (cyclomatic 42) crates/context/src/critique_storage.rs
  • Cyclomatic Complexity · impeccable_core::browser::driver::count_repeats (cyclomatic 42) crates/core/src/browser/driver.rs
  • Cyclomatic Complexity · impeccable_agents::resources::apply (cyclomatic 33) crates/agents/src/resources.rs
  • Cyclomatic Complexity · impeccable_agents::resources::build_resource_records (cyclomatic 32) crates/agents/src/resources.rs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 32) extension/background/service-worker.js
  • Cyclomatic Complexity · impeccable::loop_install::run_inner (cyclomatic 31) crates/cli/src/loop_install.rs
  • Cyclomatic Complexity · impeccable_account::design::after_scan (cyclomatic 29) crates/account/src/design.rs
  • Cyclomatic Complexity · impeccable_core::browser::quality::side_meets_same_fill (cyclomatic 28) crates/core/src/browser/quality.rs
  • Cyclomatic Complexity · impeccable_account::critiques::after_save (cyclomatic 26) crates/account/src/critiques.rs
  • Cyclomatic Complexity · impeccable_context::context_cli::run_with_hook_repair (cyclomatic 25) crates/context/src/context_cli.rs
  • Cyclomatic Complexity · impeccable_account::health::run (cyclomatic 24) crates/account/src/health.rs
  • Cyclomatic Complexity · impeccable_account::pro::refresh_with (cyclomatic 24) crates/account/src/pro/mod.rs
  • Cyclomatic Complexity · component-review.Xn::ct (cyclomatic 24) crates/context/assets/component-review.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 24) browser-bundle/60-offscreen.js
  • Cyclomatic Complexity · impeccable_agents::cli::validate (cyclomatic 23) crates/agents/src/cli.rs
  • Cyclomatic Complexity · impeccable_context::critique_storage::write_report (cyclomatic 22) crates/context/src/critique_storage.rs
  • Cyclomatic Complexity · SafeTagTextSeen::keep_first_keyed_claiming (cyclomatic 22) crates/core/src/checks/rules.rs
  • Cyclomatic Complexity · live-browser.renderPendingDockControls (cyclomatic 22) skill/scripts/live-browser.js
  • Cyclomatic Complexity · Xn::At (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · _n::H::ht (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_account::setup::payload (cyclomatic 21) crates/account/src/setup.rs
  • Cyclomatic Complexity · impeccable::loop_connect::connect_one (cyclomatic 21) crates/cli/src/loop_connect.rs
  • Cyclomatic Complexity · impeccable_core::browser::quality::svg_text_scale (cyclomatic 21) crates/core/src/browser/quality.rs
  • Cyclomatic Complexity · impeccable_hook::stop_discovery::changed_since (cyclomatic 21) crates/hook/src/stop_discovery.rs
  • Cyclomatic Complexity · component-review.Xn::Dt (cyclomatic 21) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_agents::render::render (cyclomatic 19) crates/agents/src/render.rs
  • Cyclomatic Complexity · impeccable_agents::targets::resource_matches (cyclomatic 19) crates/agents/src/targets.rs
  • Cyclomatic Complexity · Lt (cyclomatic 19) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_agents::render::remove_codex_hooks (cyclomatic 18) crates/agents/src/render.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::inset_stripe_detail (cyclomatic 18) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::rotate_scale_linear (cyclomatic 18) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · component-review.Xn::Ht (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · content-script.analyzeCandidate (cyclomatic 18) extension/content/content-script.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 18) extension/content/content-script.js
  • Cyclomatic Complexity · Xn::De (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_hook::hook_lib::resolve_harness (cyclomatic 17) crates/hook/src/hook_lib.rs
  • Cyclomatic Complexity · impeccable_live::source_search::walk (cyclomatic 17) crates/live/src/source_search.rs
  • Cyclomatic Complexity · live-browser.handleMouseMove (cyclomatic 17) skill/scripts/live-browser.js
  • Cyclomatic Complexity · _n::Ge (cyclomatic 17) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_account::run_whoami (cyclomatic 16) crates/account/src/lib.rs
  • Cyclomatic Complexity · impeccable_account::design::metadata (cyclomatic 16) crates/account/src/design.rs
  • Cyclomatic Complexity · impeccable::loop_connect::disconnect (cyclomatic 16) crates/cli/src/loop_connect.rs
  • Cyclomatic Complexity · impeccable_context::surface_briefs::resolve_surface_brief_from (cyclomatic 16) crates/context/src/surface_briefs.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::gradient_layer_paints_no_surface (cyclomatic 16) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · impeccable_detect::design_system::split_top_level (cyclomatic 16) crates/detect/src/design_system.rs
  • Cyclomatic Complexity · impeccable_foundation::css::scan::keyframes_move_or_resize (cyclomatic 16) crates/foundation/src/css/scan.rs
  • Cyclomatic Complexity · 15-snapshot.__snapRenderedFaces (cyclomatic 16) browser-bundle/15-snapshot.js
  • Cyclomatic Complexity · live-browser.renderEditBadge (cyclomatic 16) skill/scripts/live-browser.js
  • Cyclomatic Complexity · sendScanToTab (cyclomatic 16) extension/background/service-worker.js
  • Cyclomatic Complexity · ai (cyclomatic 16) crates/context/assets/component-review.js
  • Cognitive Complexity · _n::H (cognitive 246) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_core::browser::driver::count_repeats (cognitive 82) crates/core/src/browser/driver.rs
  • Cognitive Complexity · impeccable_context::critique_storage::run_with_saved (cognitive 67) crates/context/src/critique_storage.rs
  • Cognitive Complexity · impeccable_core::browser::page_checks::unpainted_root_reads_light (cognitive 67) crates/core/src/browser/page_checks.rs
  • Cognitive Complexity · impeccable_agents::resources::apply (cognitive 64) crates/agents/src/resources.rs
  • Cognitive Complexity · impeccable_core::browser::quality::side_meets_same_fill (cognitive 57) crates/core/src/browser/quality.rs
  • Cognitive Complexity · impeccable_agents::resources::build_resource_records (cognitive 56) crates/agents/src/resources.rs
  • Cognitive Complexity · Xn::ot (cognitive 53) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_hook::stop_discovery::changed_since (cognitive 45) crates/hook/src/stop_discovery.rs
  • Cognitive Complexity · impeccable_context::context_cli::run_with_hook_repair (cognitive 38) crates/context/src/context_cli.rs
  • Cognitive Complexity · component-review.Xn::Dt (cognitive 37) crates/context/assets/component-review.js
  • Cognitive Complexity · (anonymous) (cognitive 37) extension/background/service-worker.js
  • Cognitive Complexity · component-review.Xn::Ht (cognitive 35) crates/context/assets/component-review.js
  • Cognitive Complexity · component-review.Xn::ct (cognitive 35) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_account::design::after_scan (cognitive 34) crates/account/src/design.rs
  • Cognitive Complexity · impeccable::loop_install::run_inner (cognitive 34) crates/cli/src/loop_install.rs
  • Cognitive Complexity · impeccable_account::critiques::after_save (cognitive 33) crates/account/src/critiques.rs
  • Cognitive Complexity · impeccable_agents::resources::undo (cognitive 33) crates/agents/src/resources.rs
  • Cognitive Complexity · impeccable_context::critique_storage::write_report (cognitive 33) crates/context/src/critique_storage.rs
  • Cognitive Complexity · impeccable_core::browser::quality::svg_text_scale (cognitive 31) crates/core/src/browser/quality.rs
  • Cognitive Complexity · impeccable_account::setup::payload (cognitive 30) crates/account/src/setup.rs
  • Cognitive Complexity · impeccable_agents::render::render_codex_features (cognitive 30) crates/agents/src/render.rs
  • Cognitive Complexity · impeccable_account::pro::refresh_with (cognitive 29) crates/account/src/pro/mod.rs
  • Cognitive Complexity · impeccable_agents::render::render (cognitive 28) crates/agents/src/render.rs
  • Cognitive Complexity · impeccable_account::health::run (cognitive 27) crates/account/src/health.rs
  • Cognitive Complexity · impeccable_agents::cli::validate (cognitive 27) crates/agents/src/cli.rs
  • Cognitive Complexity · (anonymous) (cognitive 27) extension/content/content-script.js
  • Cognitive Complexity · impeccable_account::design::metadata (cognitive 26) crates/account/src/design.rs
  • Cognitive Complexity · impeccable_agents::mcp::preflight_mcp (cognitive 25) crates/agents/src/mcp.rs
  • Cognitive Complexity · impeccable_agents::targets::resource_matches (cognitive 24) crates/agents/src/targets.rs
  • Cognitive Complexity · impeccable_core::browser::element_checks::inset_stripe_detail (cognitive 24) crates/core/src/browser/element_checks.rs
  • Cognitive Complexity · impeccable_agents::render::remove_codex_hooks (cognitive 23) crates/agents/src/render.rs
  • Cognitive Complexity · impeccable_core::checks::text_rules::count_em_dashes (cognitive 23) crates/core/src/checks/text_rules.rs
  • Cognitive Complexity · component-review.Xn::At (cognitive 23) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_agents::render::set_approval (cognitive 22) crates/agents/src/render.rs
  • Cognitive Complexity · impeccable_context::surface_briefs::resolve_surface_brief_from (cognitive 22) crates/context/src/surface_briefs.rs
  • Cognitive Complexity · impeccable::loop_connect::connect_one (cognitive 21) crates/cli/src/loop_connect.rs
  • Cognitive Complexity · impeccable::loop_connect::disconnect (cognitive 21) crates/cli/src/loop_connect.rs
  • Cognitive Complexity · impeccable_core::checks::text_context::holds_status_clock (cognitive 21) crates/core/src/checks/text_context.rs
  • Cognitive Complexity · component-review.Xn::it (cognitive 21) crates/context/assets/component-review.js
  • Cognitive Complexity · scheduleLazy (cognitive 21) extension/content/content-script.js
  • Cognitive Complexity · impeccable_core::browser::text_collectors::list_separator_dashes (cognitive 20) crates/core/src/browser/text_collectors.rs
  • Cognitive Complexity · impeccable_core::browser::visual::rotate_scale_linear (cognitive 20) crates/core/src/browser/visual.rs
  • Cognitive Complexity · impeccable_foundation::css::scan::keyframes_move_or_resize (cognitive 20) crates/foundation/src/css/scan.rs
  • Cognitive Complexity · impeccable_account::run_whoami (cognitive 19) crates/account/src/lib.rs
  • Cognitive Complexity · impeccable_agents::mcp::sync_mcp (cognitive 19) crates/agents/src/mcp.rs

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 329 findings

These 329 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · component-review.Ri::G (cyclomatic 265) crates/context/assets/component-review.js
  • Cyclomatic Complexity · sheriff.evaluatePullRequest (cyclomatic 65) scripts/github/sheriff.mjs
  • Cyclomatic Complexity · impeccable_context::critique_storage::run (cyclomatic 57) crates/context/src/critique_storage.rs
  • Cyclomatic Complexity · component-review.Di::ae (cyclomatic 56) crates/context/assets/component-review.js
  • Cyclomatic Complexity · build.build (cyclomatic 40) scripts/build.js
  • Cyclomatic Complexity · utils.readSourceFiles (cyclomatic 28) scripts/lib/utils.js
  • Cyclomatic Complexity · build-font-index.main (cyclomatic 27) scripts/build-font-index.mjs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 27) extension/background/service-worker.js
  • Cyclomatic Complexity · component-review.Di::xe (cyclomatic 24) crates/context/assets/component-review.js
  • Cyclomatic Complexity · utils.parseFrontmatter (cyclomatic 23) scripts/lib/utils.js
  • Cyclomatic Complexity · live-browser.setPendingApplyLoading (cyclomatic 22) skill/scripts/live-browser.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 22) browser-bundle/60-offscreen.js
  • Cyclomatic Complexity · Di::Ge (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · Ri::G::ve (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · component-review.Di::$e (cyclomatic 21) crates/context/assets/component-review.js
  • Cyclomatic Complexity · sheriff.parseArgs (cyclomatic 20) scripts/github/sheriff.mjs
  • Cyclomatic Complexity · impeccable_context::context_cli::run (cyclomatic 19) crates/context/src/context_cli.rs
  • Cyclomatic Complexity · build-extension.manifestReferences (cyclomatic 19) REDACTED
  • Cyclomatic Complexity · Ve (cyclomatic 19) crates/context/assets/component-review.js
  • Cyclomatic Complexity · component-review.Di::Qe (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · Di::$n (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · build.generateCounts (cyclomatic 17) scripts/build.js
  • Cyclomatic Complexity · Ri::On (cyclomatic 17) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_detect::design_system::split_top_level_args (cyclomatic 16) crates/detect/src/design_system.rs
  • Cyclomatic Complexity · or (cyclomatic 16) crates/context/assets/component-review.js
  • Cognitive Complexity · Ri::G (cognitive 246) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_context::critique_storage::run (cognitive 100) crates/context/src/critique_storage.rs
  • Cognitive Complexity · build.build (cognitive 77) scripts/build.js
  • Cognitive Complexity · sheriff.evaluatePullRequest (cognitive 54) scripts/github/sheriff.mjs
  • Cognitive Complexity · Di::ae (cognitive 53) crates/context/assets/component-review.js
  • Cognitive Complexity · build-font-index.main (cognitive 45) scripts/build-font-index.mjs
  • Cognitive Complexity · component-review.Di::$e (cognitive 37) crates/context/assets/component-review.js
  • Cognitive Complexity · utils.parseFrontmatter (cognitive 36) scripts/lib/utils.js
  • Cognitive Complexity · component-review.Di::Qe (cognitive 35) crates/context/assets/component-review.js
  • Cognitive Complexity · component-review.Di::xe (cognitive 35) crates/context/assets/component-review.js
  • Cognitive Complexity · utils.readSourceFiles (cognitive 33) scripts/lib/utils.js
  • Cognitive Complexity · (anonymous) (cognitive 33) extension/background/service-worker.js
  • Cognitive Complexity · impeccable_context::context_cli::run (cognitive 29) crates/context/src/context_cli.rs
  • Cognitive Complexity · build.generateCounts (cognitive 28) scripts/build.js
  • Cognitive Complexity · utils.generateYamlFrontmatter (cognitive 25) scripts/lib/utils.js
  • Cognitive Complexity · impeccable_live::live_insert::resolve_element_match (cognitive 24) crates/live/src/live_insert.rs
  • Cognitive Complexity · component-review.Di::Ge (cognitive 23) crates/context/assets/component-review.js
  • Cognitive Complexity · live-server-processes.pidsWithEnvMarker (cognitive 23) scripts/lib/live-server-processes.mjs
  • Cognitive Complexity · (anonymous) (cognitive 23) extension/content/content-script.js
  • Cognitive Complexity · live-browser.collectFontCssText (cognitive 22) skill/scripts/live-browser.js
  • Cognitive Complexity · component-review.Di::re (cognitive 21) crates/context/assets/component-review.js
  • Cognitive Complexity · build-extension.manifestReferences (cognitive 21) REDACTED
  • Cognitive Complexity · sheriff.parseArgs (cognitive 21) scripts/github/sheriff.mjs
  • Cognitive Complexity · impeccable_context::surface_briefs::resolve_surface_brief (cognitive 20) crates/context/src/surface_briefs.rs
  • Cognitive Complexity · validate-plugin-versions.readSkillFrontmatterVersion (cognitive 20) scripts/lib/validate-plugin-versions.js
  • Cognitive Complexity · impeccable_detect::design_system::split_top_level_args (cognitive 19) crates/detect/src/design_system.rs
  • Cognitive Complexity · validate-plugin-manifest.collectPluginManifestFindings (cognitive 19) scripts/lib/validate-plugin-manifest.js
  • Cognitive Complexity · live-browser.ensureAcceptedDomClean (cognitive 19) skill/scripts/live-browser.js
  • Cognitive Complexity · build.validateProse (cognitive 18) scripts/build.js
  • Cognitive Complexity · component-review.zi (cognitive 17) crates/context/assets/component-review.js
  • Cognitive Complexity · component-review.Ee (cognitive 17) crates/context/assets/component-review.js
  • Cognitive Complexity · impeccable_comp_verbs::build_phase::next_instruction (cognitive 16) crates/comp-verbs/src/build_phase.rs
  • Cognitive Complexity · utils.appendYamlObject (cognitive 16) scripts/lib/utils.js
  • Cognitive Complexity · build.mirrorDirContentsSync (cognitive 16) scripts/build.js
  • Cognitive Complexity · publish-platform-packages.main (cognitive 16) scripts/publish-platform-packages.mjs
  • Cognitive Complexity · Ve (cognitive 16) crates/context/assets/component-review.js
  • Cognitive Complexity · Ri::On (cognitive 16) crates/context/assets/component-review.js
  • God Classes · FunctionTooLong: live-browser.initGlobalBar skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: live-browser.designPanelCss skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: impeccable_context::critique_storage::run crates/context/src/critique_storage.rs
  • God Classes · FunctionTooLong: live-browser.initPageChat skill/scripts/live-browser.js
  • God Classes · FileTooLong: scripts/smoke-provider-hooks.mjs scripts/smoke-provider-hooks.mjs
  • God Classes · FunctionTooLong: live-browser.connectSSE skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: live-browser.renderMarkdown skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: sheriff.evaluatePullRequest scripts/github/sheriff.mjs
  • God Classes · FileTooLong: github/sheriff.mjs scripts/github/sheriff.mjs
  • God Classes · FunctionTooLong: live-browser.injectSvelteComponentsFromManifest skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: live-browser.buildCyclingRow skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: live-browser.showShaderOverlay skill/scripts/live-browser.js
  • God Classes · FileTooLong: scripts/build.js scripts/build.js
  • God Classes · FileTooLong: src/live_wrap.rs crates/live/src/live_wrap.rs
  • God Classes · FunctionTooLong: live-browser.resumeSession skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: live-browser.buildParamsPanel skill/scripts/live-browser.js
  • God Classes · FunctionTooLong: impeccable_core::browser::element_checks::check_element_inset_stripe_dom crates/core/src/browser/element_checks.rs
  • Code Duplication · Near-duplicate member pair (21 shared lines) crates/core/src/browser/text_layers.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) crates/context/src/design_parser.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) crates/live/src/copy_edit_agent.rs
  • Code Duplication · Duplicated block (32 lines × 2) crates/browser/src/html_snapshot.rs
  • Code Duplication · Duplicated block (22 lines × 2) crates/live/src/live_insert.rs
  • Code Duplication · Duplicated block (20–21 lines × 2) crates/live/src/live_insert.rs
  • Code Duplication · Duplicated block (12–14 lines × 2) crates/live/src/manual_edits/commit.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/browser/src/html_snapshot.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/live/src/live_insert.rs
  • Code Duplication · Duplicated block (11 lines × 3) crates/live/src/manual_edits/commit.rs
  • Code Duplication · Duplicated block (11 lines × 2) crates/context/src/context_cli.rs
  • Code Duplication · Duplicated block (10–11 lines × 2) crates/core/src/browser/quality.rs
  • Code Duplication · Duplicated block (10–11 lines × 2) crates/html/src/engine.rs
  • Code Duplication · Duplicated block (10 lines × 6) crates/live/src/manual_edits/commit.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/core/src/checks/rules.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/core/src/browser/element_checks.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/detect/src/config.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/foundation/src/color.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/live/src/live_accept.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/core/src/browser/quality.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/live/src/live_generate.rs
Rebuild cost: about €260,000 · Estimate
Cost to rebuild€87,000 to €440,000, for 1,455 to 4,615 hours of work, about 1.8 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 229,246 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with full-build.test.mjs (2), scenarios.test.mjs (2), activation.eval.mjs.
Raises the score by about 4 points · Low effort · Test Quality
2
Resolve the 1 finding(s) in Type Safety.
Raises the score by about 3 points · Medium effort · Type Safety
3
Resolve the 2 `outerHTML` spells `HTML` where 19 names in the project spell it `Html` finding(s) in Naming Consistency — start with agent.mjs (2).
Raises the score by about 0.9 points · Low effort · Naming Consistency

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €260,000 to build again, about 1.8 person-years of work. Its weakest lens is Code Health, at 46 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 5 No assertions (empty test) finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 5 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 384,527 lines over the last 90 days, which is about 1,559,471 lines a year. At that pace, the extra work comes to an estimated 212.6 to 1275.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch @impeccable/cli-darwin-arm64 cli-darwin-arm64 @impeccable/cli-darwin-x64 cli-darwin-x64 impeccable (Cargo) impeccable (Cargo) impeccable-account impeccable-account impeccable (Cargo)->impeccable-account impeccable-agents impeccable-agents impeccable (Cargo)->impeccable-agents impeccable-browser impeccable-browser impeccable (Cargo)->impeccable-browser impeccable-common impeccable-common impeccable (Cargo)->impeccable-common impeccable-comp impeccable-comp impeccable (Cargo)->impeccable-comp impeccable-comp-verbs impeccable-comp-verbs impeccable (Cargo)->impeccable-comp-verbs impeccable-context impeccable-context impeccable (Cargo)->impeccable-context impeccable-core impeccable-core impeccable (Cargo)->impeccable-core impeccable-detect impeccable-detect impeccable (Cargo)->impeccable-detect impeccable-hook impeccable-hook impeccable (Cargo)->impeccable-hook impeccable-html impeccable-html impeccable (Cargo)->impeccable-html impeccable-live impeccable-live impeccable (Cargo)->impeccable-live impeccable-skills impeccable-skills impeccable (Cargo)->impeccable-skills impeccable-account->impeccable-common impeccable-account->impeccable-context impeccable-agents->impeccable-common impeccable-browser->impeccable-common impeccable-browser->impeccable-core impeccable-browser->impeccable-detect impeccable-bundle impeccable-bundle impeccable-bundle->impeccable-core impeccable-comp-verbs->impeccable-common impeccable-comp-verbs->impeccable-comp impeccable-comp-verbs->impeccable-context impeccable-context->impeccable-common impeccable-context->impeccable-comp impeccable-context->impeccable-core impeccable-foundation impeccable-foundation impeccable-core->impeccable-foundation impeccable-detect->impeccable-common impeccable-detect->impeccable-core impeccable-hook->impeccable-common impeccable-hook->impeccable-comp-verbs impeccable-hook->impeccable-context impeccable-hook->impeccable-core impeccable-hook->impeccable-detect impeccable-html->impeccable-common impeccable-html->impeccable-core impeccable-html->impeccable-detect impeccable-live->impeccable-common impeccable-live->impeccable-context impeccable-live->impeccable-core impeccable-live->impeccable-hook impeccable-skills->impeccable-common impeccable-skills->impeccable-context impeccable-skills->impeccable-detect impeccable-wasm impeccable-wasm impeccable-wasm->impeccable-core impeccable-wasm->impeccable-detect impeccable-wasm->impeccable-html xtask xtask xtask->impeccable-bundle __more__ +4 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

338 modules, with 393 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 298 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 impeccable_account.config2 impeccable_agents3 impeccable_browser.cdp4 impeccable_common5 impeccable_comp.raster6 impeccable_comp_verbs.entry_capture7 impeccable_context.staleness8 impeccable_foundation.color9 impeccable.asset_capture10 impeccable_account.session11 impeccable_comp.metrics12 impeccable_comp_verbs.font_match13 impeccable_context.context_cli14 impeccable_context.doctor15 impeccable_foundation.browser.dom16 impeccable_foundation.rules.types17 impeccable_foundation.vectors18 impeccable_html.dom19 impeccable_account.pro20 impeccable_comp_verbs.comp_diff21 impeccable_core.browser.visual22 impeccable_core.checks.rules23 impeccable_foundation.browser.snapshot24 impeccable_foundation.css.measures25 impeccable_comp_verbs.build_phase26 impeccable_core.checks.measures27 impeccable_detect.design_system28 impeccable_foundation.browser29 impeccable_foundation.css.scan30 impeccable_html.engine31 impeccable_core.browser.driver32 impeccable_core.browser.page_checks33 impeccable_detect.engines34 impeccable_html.adapters35 impeccable_browser36 impeccable_core.browser.element_checks37 impeccable_core.browser.text_collectors38 impeccable_detect.cli39 impeccable_hook.hook_lib40 impeccable_html.static_engine
1 impeccable_account.config
2 impeccable_agents
3 impeccable_browser.cdp
4 impeccable_common
5 impeccable_comp.raster
6 impeccable_comp_verbs.entry_capture
7 impeccable_context.staleness
8 impeccable_foundation.color
9 impeccable.asset_capture41
10 impeccable_account.session21
11 impeccable_comp.metrics1
12 impeccable_comp_verbs.font_match12
13 impeccable_context.context_cli11
14 impeccable_context.doctor11
15 impeccable_foundation.browser.dom1
16 impeccable_foundation.rules.types5
17 impeccable_foundation.vectors1
18 impeccable_html.dom1
19 impeccable_account.pro211
20 impeccable_comp_verbs.comp_diff131
21 impeccable_core.browser.visual42
22 impeccable_core.checks.rules114
23 impeccable_foundation.browser.snapshot5
24 impeccable_foundation.css.measures411
25 impeccable_comp_verbs.build_phase1112
26 impeccable_core.checks.measures216
27 impeccable_detect.design_system31
28 impeccable_foundation.browser11
29 impeccable_foundation.css.scan1
30 impeccable_html.engine1313
31 impeccable_core.browser.driver2151
32 impeccable_core.browser.page_checks11113
33 impeccable_detect.engines11
34 impeccable_html.adapters123121
35 impeccable_browser53116
36 impeccable_core.browser.element_checks222111111
37 impeccable_core.browser.text_collectors2111
38 impeccable_detect.cli224
39 impeccable_hook.hook_lib211
40 impeccable_html.static_engine32212
Uses a module listed above itPart of a loopThe module itself
1 impeccable_account.config2 impeccable_agents3 impeccable_browser.cdp4 impeccable_common5 impeccable_comp.raster6 impeccable_comp_verbs.entry_capture7 impeccable_context.staleness8 impeccable_foundation.color9 impeccable.asset_capture10 impeccable_account.session11 impeccable_comp.metrics12 impeccable_comp_verbs.font_match13 impeccable_context.context_cli14 impeccable_context.doctor15 impeccable_foundation.browser.dom16 impeccable_foundation.rules.types17 impeccable_foundation.vectors18 impeccable_html.dom19 impeccable_account.pro20 impeccable_comp_verbs.comp_diff21 impeccable_core.browser.visual22 impeccable_core.checks.rules23 impeccable_foundation.browser.snapshot24 impeccable_foundation.css.measures25 impeccable_comp_verbs.build_phase26 impeccable_core.checks.measures27 impeccable_detect.design_system28 impeccable_foundation.browser29 impeccable_foundation.css.scan30 impeccable_html.engine31 impeccable_core.browser.driver32 impeccable_core.browser.page_checks33 impeccable_detect.engines34 impeccable_html.adapters35 impeccable_browser36 impeccable_core.browser.element_checks37 impeccable_core.browser.text_collectors38 impeccable_detect.cli39 impeccable_hook.hook_lib40 impeccable_html.static_engineimpeccable_account.config1impeccable_agents2impeccable_browser.cdp3impeccable_common4impeccable_comp.raster5impeccable_comp_verbs.entry_capture6impeccable_context.staleness7impeccable_foundation.color8impeccable.asset_capture9impeccable_account.session10impeccable_comp.metrics11impeccable_comp_verbs.font_match12impeccable_context.context_cli13impeccable_context.doctor14impeccable_foundation.browser.dom15impeccable_foundation.rules.types16impeccable_foundation.vectors17impeccable_html.dom18impeccable_account.pro19impeccable_comp_verbs.comp_diff20impeccable_core.browser.visual21impeccable_core.checks.rules22impeccable_foundation.browser.snapshot23impeccable_foundation.css.measures24impeccable_comp_verbs.build_phase25impeccable_core.checks.measures26impeccable_detect.design_system27impeccable_foundation.browser28impeccable_foundation.css.scan29impeccable_html.engine30impeccable_core.browser.driver31impeccable_core.browser.page_checks32impeccable_detect.engines33impeccable_html.adapters34impeccable_browser35impeccable_core.browser.element_checks36impeccable_core.browser.text_collectors37impeccable_detect.cli38impeccable_hook.hook_lib39impeccable_html.static_engine4041211121111151121113142114541111122163111113132151111131112312153116222111111211122421132212+298 more modules (most-connected shown)

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

At a glance — Architecture · 98% · Exemplary ·

At a glance — Maturity · 68% · Adequate · gated by M2 ·

At a glance — Readiness · 47% · Weak · gated by P3, P7 ·

At a glance — Security · 74% · Adequate · gated by D29 ·

At a glance — Accessibility · 74% · Strong ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection18High / Critical
A03:2025 — Software Supply Chain Failures14High / Critical
A01:2025 — Broken Access Control2Medium

Roadmap

Top priorities: Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with full-build.test.mjs (2), scenarios.test.mjs (2), activation.eval.mjs; Resolve the 1 finding(s) in Type Safety; 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.

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

Do thisHelpsEffortDimension
Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with full-build.test.mjs (2), scenarios.test.mjs (2), activation.eval.mjs.+4.2 ptsLowTest Quality
Resolve the 1 finding(s) in Type Safety.+3.0 ptsMediumType Safety
Resolve the 2 `outerHTML` spells `HTML` where 19 names in the project spell it `Html` finding(s) in Naming Consistency — start with agent.mjs (2).+0.9 ptsLowNaming Consistency
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.2 ptsMediumAsync & latency hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.+0.9 ptsLowADR Quality
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+1.6 ptsMediumSecurity & performance tooling
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.+1.6 ptsMediumOutbound HTTP resilience
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.+1.4 ptsMediumCancellation propagation

File quality

Per-file score 0–10 — a quality signature. Of 269 files carrying findings, judged against the Production bar: 0% slop · 82% mixed · 18% near-clean.

FileScoreBandWorst signal
REDACTED0.8SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.0MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
crates/detect/src/cli.rs5.5MixedCyclomatic Complexity: impeccable_detect::cli::detect_cli (cyclomatic 85)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
crates/core/src/checks/text_rules.rs6.0MixedExplicit Debt: TodoComment
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedDependency Vulnerabilities: Medium CVE: REDACTED
crates/context/assets/component-review.js7.0MixedCyclomatic Complexity: component-review._n::H (cyclomatic 265)
crates/core/src/browser/quality.rs7.0MixedCyclomatic Complexity: impeccable_core::browser::quality::check_quality (cyclomatic 207)
crates/context/src/serve_question.rs7.0MixedCyclomatic Complexity: impeccable_context::serve_question::run (cyclomatic 162)
crates/core/src/browser/page_checks.rs7.0MixedCyclomatic Complexity: impeccable_core::browser::page_checks::check_text_occlusion_dom (cyclomatic 143)
crates/comp-verbs/src/build_phase.rs7.0MixedCyclomatic Complexity: impeccable_comp_verbs::build_phase::gate_hero_inner (cyclomatic 116)
crates/core/src/browser/element_checks.rs7.0MixedCyclomatic Complexity: impeccable_core::browser::element_checks::check_element_colors_dom_in (cyclomatic 109)
browser-bundle/15-snapshot.js7.0MixedCyclomatic Complexity: capture (cyclomatic 94)
crates/detect/src/regex_matchers.rs7.0MixedCyclomatic Complexity: impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88)
skill/scripts/live-browser.js7.0MixedCyclomatic Complexity: live-browser.connectSSE (cyclomatic 77)
crates/comp/src/font_fingerprint.rs7.0MixedCyclomatic Complexity: impeccable_comp::font_fingerprint::measure (cyclomatic 72)

How the grades work

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

Critical — 24

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

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

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

Could not be resolved — 13

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 68 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 68 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D17D19D20D21D24D26D28D29D30D32D34D35D36D43D44AC1AC2AC3AC5AC6AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R2R3R4R6R7R8R9S1X1X14X2X21X27X28X29X30X4X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1d5e0-de60-7efa-837d-62174bdc69b2.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — the repository root (puppeteer) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 961 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 150 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.ts, .tsx, .rs, .js, .mjs, .jsx) and this repository declares a Cargo test suite (repository root, 293 test files), but it was not re-run: its build outgrew the 8 GB scratch ceiling (8.007 GB measured) and was stopped; its suite was not run. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (65 contributor(s) across 2944 commit(s) sampled, automation and bot accounts excluded). One of them holds 85% of the history; the other 64 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `browser-bundle/00-header.js`, `browser-bundle/99-footer.js`, `skill/scripts/live-browser.js`, `ui/component-review/kit.ts`, `ui/component-review/review.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): REDACTED has no "dev" script, so `npm run dev` could not start the app. Last output: "npm warn EBADDEVENGINES Invalid engine "runtime" / npm warn EBADDEVENGINES Invalid semver version ">=22.18.0" does not match "v22.13.0" for "runtime" / npm warn EBADDEVENGINES { / npm warn EBADDEVENGINES current: { name: 'node', version: 'v22.13.0' }, / npm warn EBADDEVENGINES required: { name: 'node', version: '>=22.18.0', onFail: 'warn' } / npm warn EBADDEVENGINES } / npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 16 further occurrence(s) are not listed individually; the score already reflects all 56.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 211 further occurrence(s) are not listed individually; the score already reflects all 251.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 455 further occurrence(s) are not listed individually; the score already reflects all 495.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 69 further occurrence(s) are not listed individually; the score already reflects all 109.
  • X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 8 further occurrence(s) are not listed individually; the score already reflects all 48.

Repo exclusion declarations: 29 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • 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.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

472 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was component-review._n::H at 265. A further 9 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 impeccable_comp::raster::glyph at 51 — they are counted neither in the figure above nor in this dimension's score. 5 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/comp/src/raster.rs (impeccable_comp::raster::glyph at 51), crates/html/src/cascade/csstree/ast.rs (Node::type_name at 35), crates/html/src/select.rs (impeccable_html::select::alias_selector at 23), crates/context/src/provider.rs (impeccable_context::provider::provider_from_skill_dir at 22), crates/html/src/cascade/vectors.rs (impeccable_html::cascade::vectors::call at 20). 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.

impeccable_core::browser::quality::check_quality (cyclomatic 207) · ×113crates/core/src/browser/quality.rs:2187
impeccable_live::session::apply_event (cyclomatic 82) · ×55crates/live/src/session.rs:432
impeccable_context::serve_question::run (cyclomatic 162) · ×35crates/context/src/serve_question.rs:1274
impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88) · ×25crates/detect/src/regex_matchers.rs:2065
impeccable_html::quality::check_quality (cyclomatic 95) · ×18crates/html/src/quality.rs:695

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

What to do

  1. Bring the 5 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with component-review._n::H (cyclomatic 265), review.mountComponentReview.render (cyclomatic 248), impeccable_core::browser::quality::check_quality (cyclomatic 207). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cyclomatic Complexity from 2.0 to about 2.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

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

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

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

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

746 method(s) exceeded the cognitive complexity threshold of 15; the worst was impeccable_core::browser::quality::check_quality at 423.

impeccable_core::browser::quality::check_quality (cognitive 423) · ×167crates/core/src/browser/quality.rs:2187
impeccable_live::session::apply_event (cognitive 175) · ×115crates/live/src/session.rs:432
impeccable_context::serve_question::run (cognitive 363) · ×61crates/context/src/serve_question.rs:1274
impeccable_detect::regex_matchers::scan_markup_context (cognitive 212) · ×44crates/detect/src/regex_matchers.rs:2065
impeccable_html::quality::check_quality (cognitive 182) · ×26crates/html/src/quality.rs:695

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

What to do

  1. Bring the 80 bodies over 60 down to 60 or less in Cognitive Complexity — start with impeccable_core::browser::quality::check_quality (cognitive 423), impeccable_context::serve_question::run (cognitive 363), impeccable_core::browser::page_checks::check_text_occlusion_dom (cognitive 253). — 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 80 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.7 / 10Strong✓ Tool-verified

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

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

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

170 god class(es) detected.

FunctionTooLong: impeccable_core::browser::quality::check_quality · ×82crates/core/src/browser/quality.rs:2187
FileTooLong: scripts/live-browser.js · ×70skill/scripts/live-browser.js
MethodTooLong: ServerState.page · ×7crates/context/src/serve_question.rs:2271
TooManyFunctions: impeccable_wasm::exports_pure · ×4crates/wasm/src/exports_pure.rs:26
TooManyMethods: Parser · ×4crates/html/src/cascade/csstree/parser.rs:31

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

What to do

  1. Resolve the 82 FunctionTooLong finding(s) in God Classes — start with live_server.rs (6), build_phase.rs (5), detect_text.rs (4). — One of this dimension's main actionable groups (82 warning-level).
  2. Resolve the 70 FileTooLong finding(s) in God Classes — start with quality.rs (2), measures.rs (2), live-browser.js. — One of this dimension's main actionable groups (70 warning-level).
  3. Resolve the 7 MethodTooLong finding(s) in God Classes — start with serve_question.rs, entry_capture.rs, asset_capture.rs. — One of this dimension's main actionable groups (7 warning-level).

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

D4 · Code Duplication9.4 / 10Stronggated by 483 serious findings✓ Tool-verified

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.

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

278 duplicated block group(s) detected. A further 205 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (5 lines × 2) · ×35crates/comp/src/font_fingerprint.rs:600
Duplicated block (7 lines × 2) · ×28crates/context/src/serve_question.rs:250
Duplicated block (6 lines × 2) · ×26crates/core/src/browser/background.rs:275
Duplicated block (10 lines × 2) · ×20crates/browser/src/html_snapshot.rs:316
Duplicated block (9 lines × 2) · ×19crates/common/src/http.rs:91

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

What to do

  1. Resolve the 35 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with font_fingerprint.rs (2), serve_question.rs (2), live_accept.rs (2). — One of this dimension's main actionable groups (35 warning-level).
  2. Resolve the 28 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with element_checks.rs (2), config.rs (2), commit.rs (2). — One of this dimension's main actionable groups (28 warning-level).
  3. Resolve the 26 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with page_checks.rs (2), hook_lib.rs (2), live_generate.rs (2). — One of this dimension's main actionable groups (26 warning-level).

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

D5 · Coupling9.0 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

24 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 18 of the 24 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: impeccable-comp · ×3
Off the main sequence: impeccable-common

What to do

  1. Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).

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

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

1 of 96 classes have LCOM4 above 3.

Low cohesion: JsDom (LCOM4 19)crates/wasm/src/js_dom.rs:123

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with js_dom.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D10 · Test Quality9.8 / 10Adequategated by 5 critical findings✓ Tool-verified

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

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

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

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

No assertions (empty test): skipped — ${PROVIDERS[provider].envKey} is unset · ×5tests/skill-workflow/full-build.test.mjs:127
Fixed-sleep synchronisation: ends a stubborn child without awaiting anything · ×3tests/process-group.test.mjs:95
Skipped (documented): cleans accepted LLM DOM wrappers after carbonize cleanup · ×10tests/live-e2e-accept-cleanup-regression.test.mjs:48

What to do

  1. Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with full-build.test.mjs (2), scenarios.test.mjs (2), activation.eval.mjs. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 3 Fixed-sleep synchronisation finding(s) in Test Quality — start with process-group.test.mjs (3). — One of this dimension's main actionable groups (3 warning-level).

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

D12 · Dependency Hygiene9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

11 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: ego-tree · ×11

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 196 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares REDACTED, 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.3 / 10Strong✓ Tool-verified

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

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

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

Top hotspots: crates/core/src/browser/quality.rs (60×207=12420); crates/core/src/browser/element_checks.rs (88×109=9592); crates/core/src/browser/page_checks.rs (53×143=7579) Repeated repair below the complexity floor: tests/oracle/cases/detect.mjs (9 of 15 changes were fixes); crates/context/src/http.rs (6 of 6 changes were fixes); cli/bin/cli.js (3 of 5 changes were fixes)

Hotspot: crates/core/src/browser/quality.rs · ×90crates/core/src/browser/quality.rs:2187
Repeated repair: tests/oracle/cases/detect.mjs · ×10tests/oracle/cases/detect.mjs:67

What to do

  1. Resolve the 90 Hotspot finding(s) in Churn × Complexity Hotspots — start with quality.rs (2), REDACTED (2), cli.rs (2). — One of this dimension's main actionable groups (90 warning-level).
  2. Resolve the 10 Repeated repair finding(s) in Churn × Complexity Hotspots — start with http.rs (2), detect.mjs, cli.js. — One of this dimension's main actionable groups (10 warning-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

2 deducted task-comment markers across 229246 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.

TodoComment · ×2crates/core/src/checks/text_rules.rs:76

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with text_rules.rs (2). — One of this dimension's main actionable groups (2 warning-level).

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

D19 · Documentation Quality5.0 / 10Adequate✓ Tool-verified

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

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

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

1 of 2 documentation facets pass in full; short on: F4 map. 32 document(s) read across 7 unit(s).

Documentation: no map of the repository's partsREADME.md:1

What to do

  1. Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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

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

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

No architecture decision records were found.

No ADRs foundREDACTED:37

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D21 · Naming Consistency0.5 / 10Critical✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

2 naming inconsistencies among 21 declarations measured against a convention their peers follow.

`outerHTML` spells `HTML` where 19 names in the project spell it `Html` · ×2tests/live-e2e/agent.mjs:526

What to do

  1. Resolve the 2 `outerHTML` spells `HTML` where 19 names in the project spell it `Html` finding(s) in Naming Consistency — start with agent.mjs (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

D24 · Comment Value9.9 9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

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

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

redundant comment · ×2tests/lib/transformers/factory.test.js:117
doc comments repeat the namesscripts/lib/zip.js:18

✓ On the Gold path — maintain.

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

D26 · Project Cohesion8.9 / 10Strong✓ Tool-verified

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

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

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

1 of 19 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)1.7 / 10Critical✓ Tool-verified

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

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

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

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

18 finding(s): 0 critical, 7 high, 11 medium, 0 low. semgrep hit a parse error in 14 file(s) — `.github/skills/impeccable/scripts/impeccable` (line 49), `.github/skills/impeccable/scripts/live-browser.js`, `browser-bundle/00-header.js`, `browser-bundle/99-footer.js` (line 1), `crates/context/assets/component-review.js`, … (+9 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 3 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

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

What to do

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

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

D30 · Dependency Vulnerabilities4.1 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 warning-level).

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

D32 · Data Compliance (PII/GDPR)8.1 / 10Strong✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

2 finding(s): 0 critical, 0 high, 2 medium, 0 low. semgrep could not parse 5 file(s) — `browser-bundle/00-header.js`, `browser-bundle/99-footer.js`, `skill/scripts/live-browser.js`, `ui/component-review/kit.ts`, `ui/component-review/review.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: cli.rs↔hook_lib.rs 64%

Change coupling: cli.rs ↔ hook_lib.rscrates/detect/src/cli.rs:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with cli.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.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

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.

AC2 · Forms & labels7.5 / 10Strong✓ 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 for>, a wrapping <label>, or aria-label. (×2) — crates/context/assets/component-review.js:1567, ui/component-review/plan-review.ts:373

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.
AC3 · Page structure5.2 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×3) — extension/devtools/panel.html:2, extension/devtools/sidebar.html:2, extension/popup/popup.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — extension/devtools/sidebar.html:2, extension/popup/popup.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.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety7.8 / 10Strong✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.setting-switch-track::before` moves (`transition: transform 220ms cubic-bezier(0.3, 0.7, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — extension/devtools/panel.css:570
  • `.setting-switch-track::after` moves (`transition: transform 220ms cubic-bezier(0.3, 0.7, 0.2, 1), background-color var(--ks-quick) var(--ks-ease), box-shadow var(--ks-quick) var(--ks-ease)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — extension/devtools/panel.css:583

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

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

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

M1 · Documentation (README)8.4 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

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

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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

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

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

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

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

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

P2 · Observability5.3 / 10Adequate✓ Tool-verified

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

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

  • Only 1/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/account`, `crates/browser`, `crates/cli`, `crates/common` and 4 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:3

What to do

  • Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `cargo` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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.

  • `fetch(` 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. (×3) — cli/bin/cli.js:67, ui/component-review/entry.ts:40, ui/component-review/entry.ts:52
  • `ureq::AgentBuilder::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/context/src/http.rs:46
  • `ureq::get(` 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/live/src/live_server.rs:459

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
  • 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.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build-font-index.mjs:108
  • `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build-font-index.mjs:116
  • `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build-font-index.mjs:154
  • `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — scripts/build-font-index.mjs:155, scripts/build-font-index.mjs:160, scripts/build-font-index.mjs:161
  • `fs.statSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build-font-index.mjs:162
  • `existsSync` in `createProviderZip` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/lib/zip.js:24
  • `statSync` in `createProviderZip` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/lib/zip.js:54

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety1.7 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 38 typed · 190 plain JS — the untyped files are browser-bundle/05-natives.js, browser-bundle/10-probe.js, browser-bundle/15-snapshot.js, browser-bundle/30-scan-common.js, browser-bundle/35-visual.js, browser-bundle/40-overlay.js (+184 more).
R10 · Code Duplication9.2 / 10Exemplary✓ Tool-verified

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.

  • cursor-plugin/ and plugin/ are near-verbatim copies of each other: 41 files are byte-identical under the same relative paths (~18152 lines; the trees hold 65 and 63 files). That is one structural fact, not 41 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — cursor-plugin/skills/impeccable/scripts/live-browser.js:1
  • crates/wasm/tools/ab-diff.mjs:41 · crates/wasm/tools/snapshot-diff.mjs:35 — the two spans are one implementation copied and then locally edited — 860 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. — crates/wasm/tools/ab-diff.mjs:41
  • scripts/build.js:281 · scripts/build.js:375 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/build.js:281
  • REDACTED:55 · REDACTED:35 — 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. — REDACTED:55
  • scripts/release.mjs:229 · scripts/release.mjs:499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — scripts/release.mjs:229
  • REDACTED:231 · extension/content/content-script.js:153 — the two spans are one implementation copied and then locally edited — 169 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. — REDACTED:231
  • scripts/smoke-provider-hooks.mjs:506 · scripts/smoke-provider-hooks.mjs:566 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/smoke-provider-hooks.mjs:506
  • skill/scripts/live-browser.js:2451 · skill/scripts/live-browser.js:2541 — 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. — skill/scripts/live-browser.js:2451
  • skill/scripts/live-browser.js:1486 · skill/scripts/live-browser.js:11865 — 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. — skill/scripts/live-browser.js:1486
  • skill/scripts/live-browser.js:3946 · skill/scripts/live-browser.js:4055 — 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. — skill/scripts/live-browser.js:3946
  • scripts/lib/utils.js:795 · scripts/lib/utils.js:824 — the two spans are one implementation copied and then locally edited — 96 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/lib/utils.js:795
  • skill/scripts/live-browser.js:2477 · skill/scripts/live-browser.js:2558 — 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. — skill/scripts/live-browser.js:2477
  • browser-bundle/10-probe.js:63 · browser-bundle/15-snapshot.js:103 — 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. — browser-bundle/10-probe.js:63
  • crates/context/assets/component-review.js:1591 · ui/component-review/review.ts:215 — the two spans are one implementation copied and then locally edited — 527 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. — crates/context/assets/component-review.js:1591
  • skill/scripts/live-browser.js:6405 · skill/scripts/live-browser.js:6441 — 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. — skill/scripts/live-browser.js:6405
  • skill/scripts/live-browser.js:9687 · skill/scripts/live-browser.js:10120 — 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. — skill/scripts/live-browser.js:9687
  • browser-bundle/10-probe.js:128 · browser-bundle/10-probe.js:157 — 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. — browser-bundle/10-probe.js:128
  • skill/scripts/live-browser.js:8515 · skill/scripts/live-browser.js:8620 — 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. — skill/scripts/live-browser.js:8515
  • extension/devtools/panel.js:69 · extension/devtools/panel.js:84 — 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. — extension/devtools/panel.js:69
  • extension/devtools/panel.js:9 · extension/devtools/sidebar.js:7 — the two spans are one implementation copied and then locally edited — 98 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. — extension/devtools/panel.js:9
  • scripts/build.js:318 · scripts/build.js:408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — scripts/build.js:318
  • skill/scripts/live-browser.js:13385 · skill/scripts/live-browser.js:13455 — 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. — skill/scripts/live-browser.js:13385
  • browser-bundle/10-probe.js:355 · browser-bundle/15-snapshot.js:642 — 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. — browser-bundle/10-probe.js:355
  • extension/background/service-worker.js:366 · extension/background/service-worker.js:399 — 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. — extension/background/service-worker.js:366
  • extension/shared/findings-report.js:70 · extension/shared/findings-report.js:112 — the two spans are one implementation copied and then locally edited — 59 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. — extension/shared/findings-report.js:70
  • skill/scripts/live-browser.js:1220 · skill/scripts/live-browser.js:1260 — 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. — skill/scripts/live-browser.js:1220
  • skill/scripts/live-browser.js:5657 · skill/scripts/live-browser.js:5694 — 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. — skill/scripts/live-browser.js:5657
  • REDACTED:24 · REDACTED:22 — 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. — REDACTED:24
  • skill/scripts/live-browser.js:1824 · skill/scripts/live-browser.js:1848 — 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. — skill/scripts/live-browser.js:1824
  • skill/scripts/live-browser.js:13419 · skill/scripts/live-browser.js:13446 — 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. — skill/scripts/live-browser.js:13419
  • browser-bundle/10-probe.js:80 · browser-bundle/15-snapshot.js:85 — 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. — browser-bundle/10-probe.js:80
  • browser-bundle/15-snapshot.js:449 · browser-bundle/15-snapshot.js:616 — the two spans are one implementation copied and then locally edited — 59 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. — browser-bundle/15-snapshot.js:449
  • browser-bundle/40-overlay.js:376 · browser-bundle/40-overlay.js:386 — 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. — browser-bundle/40-overlay.js:376
  • REDACTED:70 · browser-bundle/60-offscreen.js:112 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:70
  • crates/wasm/tools/ab-diff.mjs:22 · crates/wasm/tools/ext-diff.mjs:24 · crates/wasm/tools/snapshot-diff.mjs:19 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — crates/wasm/tools/ab-diff.mjs:22
  • scripts/smoke-provider-hooks.mjs:478 · scripts/smoke-provider-hooks.mjs:487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/smoke-provider-hooks.mjs:478
  • scripts/smoke-provider-hooks.mjs:543 · scripts/smoke-provider-hooks.mjs:591 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/smoke-provider-hooks.mjs:543
  • skill/scripts/live-browser.js:1153 · skill/scripts/live-browser.js:2980 — 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. — skill/scripts/live-browser.js:1153
  • skill/scripts/live-browser.js:3811 · skill/scripts/live-browser.js:3846 — 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. — skill/scripts/live-browser.js:3811
  • skill/scripts/live-browser.js:6117 · skill/scripts/live-browser.js:6170 — 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. — skill/scripts/live-browser.js:6117

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.
R2 · Cyclomatic Complexity4.0 / 10Weak✓ Tool-verified

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

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

  • H has cyclomatic complexity 255 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — crates/context/assets/component-review.js:1588
  • render has cyclomatic complexity 255 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — ui/component-review/review.ts:142
  • (anonymous) has cyclomatic complexity 93 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e.test.mjs:215
  • capture has cyclomatic complexity 92 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — browser-bundle/15-snapshot.js:758
  • runAgentLoop has cyclomatic complexity 79 and cognitive complexity 183; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e/agent.mjs:1921
  • handleKeyDown has cyclomatic complexity 70 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — skill/scripts/live-browser.js:8379
  • onmessage has cyclomatic complexity 69 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — skill/scripts/live-browser.js:7813
  • evaluatePullRequest has cyclomatic complexity 66 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/github/sheriff.mjs:147
  • (anonymous) has cyclomatic complexity 64 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/cli/src/raster_coverage.js:28
  • resumeSession has cyclomatic complexity 64 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:10324
  • exercise has cyclomatic complexity 58 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/launcher-download.test.mjs:22
  • ot has cyclomatic complexity 56 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — crates/context/assets/component-review.js:1588
  • onKey has cyclomatic complexity 56 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — ui/component-review/plan-review.ts:587
  • injectSvelteComponentsFromManifest has cyclomatic complexity 50 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:6052
  • (anonymous) has cyclomatic complexity 43 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:7258
  • build has cyclomatic complexity 42 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/build.js:752
  • runManualEditStage has cyclomatic complexity 42 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e.test.mjs:1934
  • restoreSessionWithoutWrapper has cyclomatic complexity 40 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:9885
  • handleClick has cyclomatic complexity 34 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:8212
  • scan has cyclomatic complexity 33 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — crates/cli/src/asset_capture.js:24
  • handleManualEditActivity has cyclomatic complexity 32 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:4531
  • readSourceFiles has cyclomatic complexity 32 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/utils.js:250
  • applyManualEditBatchToSource has cyclomatic complexity 30 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e/agent.mjs:894
  • validateManualEditCoverage has cyclomatic complexity 29 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e/agents/llm-agent.mjs:1061
  • unlockSteerChat has cyclomatic complexity 29 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. — skill/scripts/live-browser.js:11241
  • writeSvelteComponentVariants has cyclomatic complexity 29 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e/agent.mjs:1742
  • (anonymous) has cyclomatic complexity 28 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. — tests/live-e2e.test.mjs:214
  • applyManualEdits has cyclomatic complexity 27 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/live-e2e/agents/llm-agent.mjs:456
  • buildSveltePropValuesV2 has cyclomatic complexity 26 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:5744
  • main has cyclomatic complexity 25 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/build-font-index.mjs:103
  • diffResults has cyclomatic complexity 25 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. — tests/oracle/lib.mjs:421
  • encode has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/oracle/vectors/recorder.mjs:19
  • (anonymous) has cyclomatic complexity 25 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — extension/background/service-worker.js:247
  • ct has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — crates/context/assets/component-review.js:1568
  • summary has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — ui/component-review/plan-review.ts:381
  • parseFrontmatter has cyclomatic complexity 23 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/utils.js:129
  • generateVariants has cyclomatic complexity 23 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. — tests/live-e2e/agents/llm-agent.mjs:327
  • applyEditing has cyclomatic complexity 23 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. — skill/scripts/live-browser.js:4017
  • onPendingPillClick has cyclomatic complexity 23 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. — skill/scripts/live-browser.js:4385
  • mountSvelteComponentVariant has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — skill/scripts/live-browser.js:5904
R3 · Large Files6.6 / 10Adequate✓ Tool-verified

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

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

  • crates/context/assets/component-review.js has 1469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/context/assets/component-review.js:1
  • browser-bundle/15-snapshot.js has 987 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — browser-bundle/15-snapshot.js:1
  • ui/component-review/plan-review.ts has 605 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/component-review/plan-review.ts:1
  • browser-bundle/40-overlay.js has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — browser-bundle/40-overlay.js:1
  • ui/component-review/review.ts has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/component-review/review.ts:1
  • REDACTED has 438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • extension/background/service-worker.js has 416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extension/background/service-worker.js:1

What to do

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

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

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

  • scripts/smoke-provider-hooks.mjs:15 imports './lib/cli-args.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — scripts/smoke-provider-hooks.mjs:15
  • tests/framework-fixtures/tanstack-start/files/src/router.tsx:2 imports './routeTree.gen', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/framework-fixtures/tanstack-start/files/src/router.tsx:2
  • tests/workflow-security.test.js:4 imports '../.github/workflows/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — tests/workflow-security.test.js:4
  • 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. (×16) — browser-bundle/15-snapshot.js:1, REDACTED:1, crates/cli/src/raster_coverage.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling6.7 / 10Adequate✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • This repository declares test tooling, and the ✓ above records that declaration — but scripts/smoke-provider-hooks.mjs and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — scripts/smoke-provider-hooks.mjs:15

What to do

  • Add eslint as REDACTED scripts and run them in CI.
R7 · Dead Code9.3 / 10Exemplary✓ Tool-verified

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

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

  • 1 file(s) (~2 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/ctx-adaptive
  • 3 file(s) (~13 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/ctx-csp-append-arrays
  • 1 file(s) (~6 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/ctx-csp-append-string
  • 1 file(s) (~3 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. (×4) — tests/oracle/workspaces/ctx-csp-middleware, tests/oracle/workspaces/ctx-monorepo-tooling/apps/web, tests/oracle/workspaces/live-astro, …
  • 1 file(s) (~18 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. (×4) — tests/oracle/workspaces/ctx-legacy, tests/oracle/workspaces/ctx-monorepo/apps/a, tests/oracle/workspaces/ctx-monorepo/apps/b, …
  • 1 file(s) (~1 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/ctx-monorepo-tooling/packages/scripts
  • 2 file(s) (~19 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/ctx-signals
  • 3 file(s) (~12 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/hook-project
  • 2 file(s) (~26 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — tests/oracle/workspaces/live-workspaces/apps/web
  • Unreachable from the 188 application, 83 tooling and 313 test entry point(s) detected in this repo. Gate removals on `bun run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (188 application, 83 tooling, 313 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 — extension/background/service-worker.js
  • Nothing imports this binding — it is safe to review for removal. (×2) — scripts/lib/transformers/hooks.js:25, ui/component-review/plan-model.ts:35
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×9) — scripts/build.js:743, tests/lib/transformers/providers.test.js:10, tests/live-e2e.test.mjs:1673, …

What to do

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

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

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

  • Declared in the root REDACTED 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 REDACTED 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 tests/oracle/workspaces/ctx-monorepo-tooling/apps/web/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Declared in tests/oracle/workspaces/live-next/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Declared in tests/oracle/workspaces/live-tanstack/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Declared in tests/oracle/workspaces/live-vite/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.

What to do

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

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

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

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×3) — crates/comp-verbs/src/build_phase.rs:2455, crates/comp-verbs/src/font_match.rs:278, crates/live/src/svelte_sessions.rs:14

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 3 sites, not one: `crates/comp-verbs/src/build_phase.rs:2455` (`Sha1::new`), `crates/comp-verbs/src/font_match.rs:278` (`Sha1::new`), `crates/live/src/svelte_sessions.rs:14` (`Sha1::new`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/20 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `download` 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 })`. — cli/bin/cli.js:58
  • `start` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ui/component-review/entry.ts:37
  • `onSubmit` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — ui/component-review/entry.ts:51, crates/context/assets/component-review.js:1633
  • `removeSelectedElement` 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 })`. — skill/scripts/live-browser.js:3912
  • `undoElementRemoval` 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 })`. — skill/scripts/live-browser.js:3979
  • `applyEditing` 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 })`. — skill/scripts/live-browser.js:4017
  • `fetchPendingCount` 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 })`. — skill/scripts/live-browser.js:4372
  • `onPendingPillClick` 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 })`. — skill/scripts/live-browser.js:4385
  • `onPendingTrashClick` 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 })`. — skill/scripts/live-browser.js:4432
  • `onPendingKeepFixingClick` 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 })`. — skill/scripts/live-browser.js:4472
  • `onPendingRollbackClick` 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 })`. — skill/scripts/live-browser.js:4489
  • `loadSvelteComponentParams` 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 })`. — skill/scripts/live-browser.js:5580
  • `injectSvelteComponentsFromManifest` 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 })`. — skill/scripts/live-browser.js:6052
  • `inlineFontUrls` 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 })`. — skill/scripts/live-browser.js:8723
  • `collectFontFaces` 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 })`. — skill/scripts/live-browser.js:8746
  • `captureAndEmit` 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 })`. — skill/scripts/live-browser.js:9002
  • `fetchDesignSystem` 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 })`. — skill/scripts/live-browser.js:13079
  • `initSettings` 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 })`. — extension/devtools/panel.js:52
  • `di` 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 })`. — crates/context/assets/component-review.js:1633

What to do

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

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

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

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. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items 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.

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

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

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

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

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

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

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.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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 `REDACTED` 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.

X5 · Nullable reference types6.0 / 10Adequate✓ Tool-verified

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.

  • ~38.6 `!` null assertions per 1k TypeScript source lines — 86 assertion(s) across the 2228 source line(s) of the 12 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: ui/component-review/review.ts (53), ui/component-review/plan-review.ts (30), ui/component-review/entry.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health46%Weak — gated by D1, D2, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture98%ExemplaryStrongest area.
Maturity68%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness47%Weak — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security74%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility74%StrongSolid.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • SC1 Supply-chain hygiene — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

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

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

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

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; 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. Dart isolates share no mutable memory, so no two requests write one object at the same instant. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (the repository): REDACTED has no "dev" script, so `npm run dev` could not start the app. Last output: "npm warn EBADDEVENGINES Invalid engine "runtime" / npm warn EBADDEVENGINES Invalid semver version ">=22.18.0" does not match "v22.13.0" for "runtime" / npm warn EBADDEVENGINES { / npm warn EBADDEVENGINES current: { name: 'node', version: 'v22.13.0' }, / npm warn EBADDEVENGINES required: { name: 'node', version: '>=22.18.0', onFail: 'warn' } / npm warn EBADDEVENGINES } / npm error Missing script: "dev" / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (30 value object(s))
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — uses a bun lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • X12 Unreachable branch — X12 reached only 12% of this repository's production lines — rust (226,974 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 12% of this repository's production lines — rust (226,974 lines), python (155 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — X23 reached only 12% of this repository's production lines — rust (226,974 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X24 Document value interpolated into markup unescaped — X24 reached only 12% of this repository's production lines — rust (226,974 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 12% of this repository's production lines — rust (226,974 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 24 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · No assertions (empty test) · ×5
  • No assertions (empty test): skipped — ${PROVIDERS[provider].envKey} is unset tests/skill-workflow/full-build.test.mjs:127 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): skipped — ${ENGINE_MISSING_MESSAGE} tests/skill-workflow/full-build.test.mjs:131 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): skipped, ${PROVIDERS[provider].envKey} is unset tests/skill-behavior/activation.eval.mjs:303 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): skipped — ${PROVIDERS[provider].envKey} is unset tests/skill-behavior/scenarios.test.mjs:142 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): skipped — ${ENGINE_MISSING_MESSAGE} tests/skill-behavior/scenarios.test.mjs:146 — Test method has an empty body — it asserts nothing and exercises no code.
AC3 · Page structure · Document without a <title> · ×3
  • Document without a <title> extension/devtools/panel.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extension/devtools/sidebar.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extension/popup/popup.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC2 · Forms & labels · <textarea> without a programmatic label · ×2
  • <textarea> without a programmatic label crates/context/assets/component-review.js:1567 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label ui/component-review/plan-review.ts:373 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
Serious — 2151 finding(s)
D2 · Cognitive Complexity · impeccable_core · ×167
  • impeccable_core::browser::quality::check_quality (cognitive 423) crates/core/src/browser/quality.rs:2187 — impeccable_core::browser::quality::check_quality has cognitive complexity 423 (threshold 15). Drivers by points: if/else 108 (287 pts), boolean chains 98, loops 10 (34 pts), match/switch 3 (4 pts) (nesting depth added 204). 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.
  • impeccable_core::browser::page_checks::check_text_occlusion_dom (cognitive 253) crates/core/src/browser/page_checks.rs:4808 — impeccable_core::browser::page_checks::check_text_occlusion_dom has cognitive complexity 253 (threshold 15). Drivers by points: if/else 95 (185 pts), boolean chains 41, loops 14 (21 pts), match/switch 2 (6 pts) (nesting depth added 101). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::element_checks::check_element_colors_dom_in (cognitive 162) crates/core/src/browser/element_checks.rs:2650 — impeccable_core::browser::element_checks::check_element_colors_dom_in has cognitive complexity 162 (threshold 15). Drivers by points: if/else 59 (92 pts), boolean chains 50, match/switch 10 (14 pts), loops 2 (6 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::page_checks::check_heading_rhythm_dom (cognitive 138) crates/core/src/browser/page_checks.rs:2314 — impeccable_core::browser::page_checks::check_heading_rhythm_dom has cognitive complexity 138 (threshold 15). Drivers by points: if/else 50 (110 pts), boolean chains 18, loops 8 (10 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::driver::count_repeats (cognitive 82) crates/core/src/browser/driver.rs:3241 — impeccable_core::browser::driver::count_repeats has cognitive complexity 82 (threshold 15). Drivers by points: if/else 18 (50 pts), loops 17 (25 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::painted::unpainted_walk (cognitive 82) crates/core/src/browser/painted.rs:655 — impeccable_core::browser::painted::unpainted_walk has cognitive complexity 82 (threshold 15). Drivers by points: if/else 38 (62 pts), boolean chains 14, match/switch 2 (5 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::checks::css_scan::path_is_rounded_rectangle (cognitive 79) crates/core/src/checks/css_scan.rs:2168 — impeccable_core::checks::css_scan::path_is_rounded_rectangle has cognitive complexity 79 (threshold 15). Drivers by points: if/else 29 (51 pts), match/switch 7 (15 pts), boolean chains 7, loops 5 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::checks::css_scan::scan_css_text_for_pseudo_stripe (cognitive 77) crates/core/src/checks/css_scan.rs:704 — impeccable_core::checks::css_scan::scan_css_text_for_pseudo_stripe has cognitive complexity 77 (threshold 15). Drivers by points: if/else 29 (59 pts), boolean chains 12, match/switch 2 (5 pts), loops 1 (nesting depth added 33). 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.
  • impeccable_core::browser::element_checks::read_pseudo_gradient_face (cognitive 75) crates/core/src/browser/element_checks.rs:924 — impeccable_core::browser::element_checks::read_pseudo_gradient_face has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (53 pts), loops 5 (12 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::text_collectors::collect_repeated_container_text_findings (cognitive 73) crates/core/src/browser/text_collectors.rs:956 — impeccable_core::browser::text_collectors::collect_repeated_container_text_findings has cognitive complexity 73 (threshold 15). Drivers by points: if/else 21 (54 pts), loops 7 (15 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::visual::css_plan (cognitive 73) crates/core/src/browser/visual.rs:3786 — impeccable_core::browser::visual::css_plan has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (57 pts), match/switch 2 (8 pts), loops 1 (5 pts), boolean chains 3 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_core::browser::driver::collect_browser_findings (cognitive 70) crates/core/src/browser/driver.rs:2904 — impeccable_core::browser::driver::collect_browser_findings has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (49 pts), boolean chains 12, loops 7 (9 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::painted::mask_alpha_at (cognitive 68) crates/core/src/browser/painted.rs:112 — impeccable_core::browser::painted::mask_alpha_at has cognitive complexity 68 (threshold 15). Drivers by points: if/else 34 (44 pts), loops 5 (9 pts), match/switch 5 (9 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_core::checks::css_scan::scan_css_text_for_radial_halo_with (cognitive 68) crates/core/src/checks/css_scan.rs:356 — impeccable_core::checks::css_scan::scan_css_text_for_radial_halo_with has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (44 pts), match/switch 6 (18 pts), loops 3 (6 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::page_checks::unpainted_root_reads_light (cognitive 67) crates/core/src/browser/page_checks.rs:2807 — impeccable_core::browser::page_checks::unpainted_root_reads_light has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 17, loops 5 (6 pts), match/switch 1 (2 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.
  • impeccable_core::browser::page_checks::check_edge_flush_cards_dom (cognitive 66) crates/core/src/browser/page_checks.rs:3810 — impeccable_core::browser::page_checks::check_edge_flush_cards_dom has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (50 pts), boolean chains 8, loops 4 (8 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.
  • impeccable_core::browser::page_checks::check_first_viewport_column_overflow_dom (cognitive 66) crates/core/src/browser/page_checks.rs:5516 — impeccable_core::browser::page_checks::check_first_viewport_column_overflow_dom has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::quality::text_descendants_flush_sides (cognitive 63) crates/core/src/browser/quality.rs:1419 — impeccable_core::browser::quality::text_descendants_flush_sides has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 19, 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.
  • impeccable_core::checks::html_patterns::check_html_patterns_picking (cognitive 63) crates/core/src/checks/html_patterns.rs:703 — impeccable_core::checks::html_patterns::check_html_patterns_picking has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 9 (11 pts), boolean chains 9, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::visual::blended_echo_over (cognitive 61) crates/core/src/browser/visual.rs:2621 — impeccable_core::browser::visual::blended_echo_over has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 5 (13 pts), boolean chains 5 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::page_checks::measure_hidden_text_dom (cognitive 59) crates/core/src/browser/page_checks.rs:3509 — impeccable_core::browser::page_checks::measure_hidden_text_dom has cognitive complexity 59 (threshold 15). Drivers by points: if/else 32 (64 pts), loops 6 (11 pts), match/switch 3 (8 pts), boolean chains 4 (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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 (impeccable_core::browser::page_checks::measure_hidden_text_dom::state_of) 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.
  • impeccable_core::browser::quality::side_meets_same_fill (cognitive 57) crates/core/src/browser/quality.rs:603 — impeccable_core::browser::quality::side_meets_same_fill has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (38 pts), loops 4 (11 pts), boolean chains 6, match/switch 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::checks::css_scan::scan_css_text_for_pulsing_dot (cognitive 57) crates/core/src/checks/css_scan.rs:2977 — impeccable_core::checks::css_scan::scan_css_text_for_pulsing_dot has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 5 (8 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::checks::css_scan::scan_css_text_for_inset_stripe (cognitive 56) crates/core/src/checks/css_scan.rs:885 — impeccable_core::checks::css_scan::scan_css_text_for_inset_stripe has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (36 pts), match/switch 4 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_core::browser::driver::pseudo_element_host_selector (cognitive 54) crates/core/src/browser/driver.rs:631 — impeccable_core::browser::driver::pseudo_element_host_selector has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 5 (11 pts), boolean chains 3 (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.
  • + 142 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_live · ×115
  • impeccable_live::session::apply_event (cognitive 175) crates/live/src/session.rs:432 — impeccable_live::session::apply_event has cognitive complexity 175 (threshold 15). Drivers by points: if/else 45 (118 pts), match/switch 17 (43 pts), boolean chains 12, loops 2 (nesting depth added 99). 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.
  • impeccable_live::live_generate::run (cognitive 117) crates/live/src/live_generate.rs:423 — impeccable_live::live_generate::run has cognitive complexity 117 (threshold 15). Drivers by points: if/else 48 (85 pts), match/switch 13 (20 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::config::glob_sync (cognitive 99) crates/live/src/config.rs:280 — impeccable_live::config::glob_sync has cognitive complexity 99 (threshold 15). Drivers by points: if/else 24 (67 pts), loops 5 (13 pts), match/switch 4 (13 pts), boolean chains 6 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::svelte_ast::analyze_node (cognitive 89) crates/live/src/svelte_ast.rs:476 — impeccable_live::svelte_ast::analyze_node has cognitive complexity 89 (threshold 15). Drivers by points: if/else 34 (78 pts), loops 2 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 50). 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.
  • impeccable_live::manual_edits::apply::push_batch_in_chunks_and_wait (cognitive 78) crates/live/src/manual_edits/apply.rs:1483 — impeccable_live::manual_edits::apply::push_batch_in_chunks_and_wait has cognitive complexity 78 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 9 (32 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_server::handle_poll_post (cognitive 77) crates/live/src/live_server.rs:1552 — impeccable_live::live_server::handle_poll_post has cognitive complexity 77 (threshold 15). Drivers by points: if/else 38 (58 pts), match/switch 5 (9 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_accept::accept_cli (cognitive 76) crates/live/src/live_accept.rs:184 — impeccable_live::live_accept::accept_cli has cognitive complexity 76 (threshold 15). Drivers by points: if/else 32 (47 pts), match/switch 8 (18 pts), boolean chains 8, loops 1 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::svelte_ast::analyze_attributes (cognitive 74) crates/live/src/svelte_ast.rs:661 — impeccable_live::svelte_ast::analyze_attributes has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (62 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::svelte_ast::restore_svelte_markup::walk (cognitive 74) crates/live/src/svelte_ast.rs:1421 — impeccable_live::svelte_ast::restore_svelte_markup::walk has cognitive complexity 74 (threshold 15). Drivers by points: if/else 15 (50 pts), loops 7 (21 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_wrap::wrap_cli (cognitive 72) crates/live/src/live_wrap.rs:61 — impeccable_live::live_wrap::wrap_cli has cognitive complexity 72 (threshold 15). Drivers by points: if/else 41 (57 pts), loops 3 (7 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_server::handle_manual_edit_route (cognitive 71) crates/live/src/live_server.rs:1994 — impeccable_live::live_server::handle_manual_edit_route has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (45 pts), match/switch 10 (24 pts), loops 1 (2 pts) (nesting depth added 39). 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.
  • impeccable_live::live_inject::inject_cli (cognitive 70) crates/live/src/live_inject.rs:44 — impeccable_live::live_inject::inject_cli has cognitive complexity 70 (threshold 15). Drivers by points: if/else 32 (58 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::svelte_ast::slot_keys_of::visit (cognitive 70) crates/live/src/svelte_ast.rs:832 — impeccable_live::svelte_ast::slot_keys_of::visit has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (57 pts), loops 3 (8 pts), match/switch 2 (3 pts), 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.
  • impeccable_live::wrap_common::find_closing_line (cognitive 67) crates/live/src/wrap_common.rs:300 — impeccable_live::wrap_common::find_closing_line has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (50 pts), boolean chains 9, match/switch 1 (5 pts), loops 2 (3 pts) (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.
  • impeccable_live::manual_edits::commit::run_commit (cognitive 64) crates/live/src/manual_edits/commit.rs:1802 — impeccable_live::manual_edits::commit::run_commit has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (32 pts), loops 10 (18 pts), match/switch 8 (10 pts), boolean chains 4 (nesting depth added 17). 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.
  • impeccable_live::event_validation::validate_event (cognitive 63) crates/live/src/event_validation.rs:303 — impeccable_live::event_validation::validate_event has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (45 pts), match/switch 10 (18 pts) (nesting depth added 32). 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.
  • impeccable_live::live_server::run (cognitive 63) crates/live/src/live_server.rs:96 — impeccable_live::live_server::run has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 7 (14 pts), loops 5 (8 pts), boolean chains 5 (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.
  • impeccable_live::svelte_ast::describe_each_item::walk_for_slots (cognitive 61) crates/live/src/svelte_ast.rs:1050 — impeccable_live::svelte_ast::describe_each_item::walk_for_slots has cognitive complexity 61 (threshold 15). Drivers by points: if/else 11 (42 pts), match/switch 3 (10 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent 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 (impeccable_live::svelte_ast::describe_each_item::collect_statics) 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.
  • impeccable_live::accept_css::merge_level (cognitive 57) crates/live/src/accept_css.rs:316 — impeccable_live::accept_css::merge_level has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 5 (13 pts), match/switch 2 (6 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_server::handle_manual_edit_commit (cognitive 55) crates/live/src/live_server.rs:2369 — impeccable_live::live_server::handle_manual_edit_commit has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (36 pts), match/switch 9 (13 pts), boolean chains 5, 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.
  • impeccable_live::live_server::handle_connection (cognitive 52) crates/live/src/live_server.rs:622 — impeccable_live::live_server::handle_connection has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 5 (11 pts), boolean chains 5 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_accept::read_source_shadow_preview_meta (cognitive 50) crates/live/src/live_accept.rs:882 — impeccable_live::live_accept::read_source_shadow_preview_meta has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (34 pts), loops 3 (12 pts), boolean chains 4 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_live::svelte_ast::collect_root_identifiers (cognitive 49) crates/live/src/svelte_ast.rs:53 — impeccable_live::svelte_ast::collect_root_identifiers has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 4 (11 pts), match/switch 2 (3 pts) (nesting depth added 32). Of this number, 48 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.
  • impeccable_live::util::date_parse_ms (cognitive 47) crates/live/src/util.rs:65 — impeccable_live::util::date_parse_ms has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 3 (9 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_live::live_boot::run (cognitive 46) crates/live/src/live_boot.rs:57 — impeccable_live::live_boot::run has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (30 pts), match/switch 6 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 90 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_core · ×113
  • impeccable_core::browser::quality::check_quality (cyclomatic 207) crates/core/src/browser/quality.rs:2187 — impeccable_core::browser::quality::check_quality has cyclomatic complexity 207 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::page_checks::check_text_occlusion_dom (cyclomatic 143) crates/core/src/browser/page_checks.rs:4808 — impeccable_core::browser::page_checks::check_text_occlusion_dom has cyclomatic complexity 143 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::element_checks::check_element_colors_dom_in (cyclomatic 109) crates/core/src/browser/element_checks.rs:2650 — impeccable_core::browser::element_checks::check_element_colors_dom_in has cyclomatic complexity 109 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::page_checks::check_heading_rhythm_dom (cyclomatic 75) crates/core/src/browser/page_checks.rs:2314 — impeccable_core::browser::page_checks::check_heading_rhythm_dom has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::painted::unpainted_walk (cyclomatic 55) crates/core/src/browser/painted.rs:655 — impeccable_core::browser::painted::unpainted_walk has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::checks::css_scan::path_is_rounded_rectangle (cyclomatic 53) crates/core/src/checks/css_scan.rs:2168 — impeccable_core::checks::css_scan::path_is_rounded_rectangle has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::page_checks::unpainted_root_reads_light (cyclomatic 46) crates/core/src/browser/page_checks.rs:2807 — impeccable_core::browser::page_checks::unpainted_root_reads_light has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::painted::mask_alpha_at (cyclomatic 45) crates/core/src/browser/painted.rs:112 — impeccable_core::browser::painted::mask_alpha_at has cyclomatic complexity 45 (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.
  • impeccable_core::checks::css_scan::scan_css_text_for_pseudo_stripe (cyclomatic 45) crates/core/src/checks/css_scan.rs:704 — impeccable_core::checks::css_scan::scan_css_text_for_pseudo_stripe has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::driver::collect_browser_findings (cyclomatic 44) crates/core/src/browser/driver.rs:2904 — impeccable_core::browser::driver::collect_browser_findings has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::driver::count_repeats (cyclomatic 42) crates/core/src/browser/driver.rs:3241 — impeccable_core::browser::driver::count_repeats has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::quality::text_descendants_flush_sides (cyclomatic 42) crates/core/src/browser/quality.rs:1419 — impeccable_core::browser::quality::text_descendants_flush_sides has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::checks::html_patterns::check_html_patterns_picking (cyclomatic 40) crates/core/src/checks/html_patterns.rs:703 — impeccable_core::checks::html_patterns::check_html_patterns_picking has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::element_checks::check_element_inset_stripe_dom (cyclomatic 38) crates/core/src/browser/element_checks.rs:569 — impeccable_core::browser::element_checks::check_element_inset_stripe_dom has cyclomatic complexity 38 (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.
  • impeccable_core::browser::visual::collect_visual_contrast_reasons (cyclomatic 35) crates/core/src/browser/visual.rs:109 — impeccable_core::browser::visual::collect_visual_contrast_reasons 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.
  • impeccable_core::browser::element_checks::check_element_pseudo_stripe_dom (cyclomatic 34) crates/core/src/browser/element_checks.rs:413 — impeccable_core::browser::element_checks::check_element_pseudo_stripe_dom has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::element_checks::check_element_text_overflow_dom (cyclomatic 34) crates/core/src/browser/element_checks.rs:6038 — impeccable_core::browser::element_checks::check_element_text_overflow_dom has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::element_checks::read_pseudo_gradient_face (cyclomatic 33) crates/core/src/browser/element_checks.rs:924 — impeccable_core::browser::element_checks::read_pseudo_gradient_face has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::page_checks::check_edge_flush_cards_dom (cyclomatic 33) crates/core/src/browser/page_checks.rs:3810 — impeccable_core::browser::page_checks::check_edge_flush_cards_dom has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::page_checks::check_first_viewport_column_overflow_dom (cyclomatic 33) crates/core/src/browser/page_checks.rs:5516 — impeccable_core::browser::page_checks::check_first_viewport_column_overflow_dom has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::checks::vectors_a::call (cyclomatic 33) crates/core/src/checks/vectors_a.rs:123 — impeccable_core::checks::vectors_a::call has cyclomatic complexity 33 (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.
  • impeccable_core::browser::element_checks::layer_entry_fills (cyclomatic 30) crates/core/src/browser/element_checks.rs:1130 — impeccable_core::browser::element_checks::layer_entry_fills has cyclomatic complexity 30 (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.
  • impeccable_core::browser::text_layers::covered_by_a_later_picture (cyclomatic 30) crates/core/src/browser/text_layers.rs:1238 — impeccable_core::browser::text_layers::covered_by_a_later_picture 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.
  • impeccable_core::browser::visual::pseudo_paint_placed (cyclomatic 30) crates/core/src/browser/visual.rs:1094 — impeccable_core::browser::visual::pseudo_paint_placed has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_core::browser::quality::body_text_edge_span (cyclomatic 29) crates/core/src/browser/quality.rs:2033 — impeccable_core::browser::quality::body_text_edge_span 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.
  • + 88 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×90
  • Hotspot: crates/core/src/browser/quality.rs crates/core/src/browser/quality.rs:2187 — crates/core/src/browser/quality.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 207 in impeccable_core::browser::quality::check_quality at line 2187. 4 of those changes were fix/bug commits, and the other 56 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/quality.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/core/src/browser/element_checks.rs crates/core/src/browser/element_checks.rs:2650 — crates/core/src/browser/element_checks.rs changed 88 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in impeccable_core::browser::element_checks::check_element_colors_dom_in at line 2650. 6 of those changes were fix/bug commits, and the other 82 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/element_checks.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/core/src/browser/page_checks.rs crates/core/src/browser/page_checks.rs:4808 — crates/core/src/browser/page_checks.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 143 in impeccable_core::browser::page_checks::check_text_occlusion_dom at line 4808. 3 of those changes were fix/bug commits, and the other 50 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/page_checks.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: skill/scripts/live-browser.js skill/scripts/live-browser.js:7806 — skill/scripts/live-browser.js changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in live-browser.connectSSE at line 7806. 20 of those changes were fix/bug commits, and the other 29 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- skill/scripts/live-browser.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/html/src/quality.rs crates/html/src/quality.rs:695 — crates/html/src/quality.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in impeccable_html::quality::check_quality at line 695. 5 of those changes were fix/bug commits, 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/html/src/quality.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/context/src/serve_question.rs crates/context/src/serve_question.rs:1274 — crates/context/src/serve_question.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in impeccable_context::serve_question::run at line 1274. 4 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/context/src/serve_question.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/detect/src/regex_matchers.rs crates/detect/src/regex_matchers.rs:2065 — crates/detect/src/regex_matchers.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in impeccable_detect::regex_matchers::scan_markup_context at line 2065. 9 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/detect/src/regex_matchers.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/core/src/browser/driver.rs crates/core/src/browser/driver.rs:2904 — crates/core/src/browser/driver.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in impeccable_core::browser::driver::collect_browser_findings at line 2904. 6 of those changes were fix/bug commits, and the other 46 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/driver.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/comp-verbs/src/build_phase.rs crates/comp-verbs/src/build_phase.rs:1786 — crates/comp-verbs/src/build_phase.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in impeccable_comp_verbs::build_phase::gate_hero_inner at line 1786. 6 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/comp-verbs/src/build_phase.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/html/src/adapters.rs crates/html/src/adapters.rs:1028 — crates/html/src/adapters.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in impeccable_html::adapters::check_element_colors at line 1028. 5 of those changes were fix/bug commits, and the other 38 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/html/src/adapters.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: REDACTED REDACTED:1187 — REDACTED changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in impeccable_browser::scan_loaded at line 1187. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/core/src/browser/painted.rs crates/core/src/browser/painted.rs:655 — crates/core/src/browser/painted.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in impeccable_core::browser::painted::unpainted_walk at line 655. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/painted.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/hook/src/hook.rs crates/hook/src/hook.rs:81 — crates/hook/src/hook.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in impeccable_hook::hook::run_hook at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/hook/src/hook.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/detect/src/cli.rs crates/detect/src/cli.rs:538 — crates/detect/src/cli.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in impeccable_detect::cli::detect_cli at line 538. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/detect/src/cli.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/core/src/checks/rules.rs crates/core/src/checks/rules.rs:334 — crates/core/src/checks/rules.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in impeccable_core::checks::rules::check_borders at line 334. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/checks/rules.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/core/src/browser/visual.rs crates/core/src/browser/visual.rs:109 — crates/core/src/browser/visual.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in impeccable_core::browser::visual::collect_visual_contrast_reasons at line 109. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/visual.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/html/src/engine.rs crates/html/src/engine.rs:199 — crates/html/src/engine.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in impeccable_html::engine::detect_html_source at line 199. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/html/src/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/core/src/checks/css_scan.rs crates/core/src/checks/css_scan.rs:704 — crates/core/src/checks/css_scan.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in impeccable_core::checks::css_scan::scan_css_text_for_pseudo_stripe at line 704. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/checks/css_scan.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/cli/src/router.rs crates/cli/src/router.rs:11 — crates/cli/src/router.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in impeccable::router::run at line 11. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/cli/src/router.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/browser/src/cdp.rs crates/browser/src/cdp.rs:988 — crates/browser/src/cdp.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in Page::on_event at line 988. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/browser/src/cdp.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/detect/src/detect_text.rs crates/detect/src/detect_text.rs:1270 — crates/detect/src/detect_text.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in impeccable_detect::detect_text::scan_inset_stripe_css at line 1270. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/detect/src/detect_text.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/live/src/live_server.rs crates/live/src/live_server.rs:622 — crates/live/src/live_server.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in impeccable_live::live_server::handle_connection at line 622. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/live/src/live_server.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: browser-bundle/15-snapshot.js browser-bundle/15-snapshot.js:616 — browser-bundle/15-snapshot.js changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in 15-snapshot.__snapRunningAnimations at line 616. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- browser-bundle/15-snapshot.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/build.js scripts/build.js:752 — scripts/build.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in build.build at line 752. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- scripts/build.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/context/src/context_cli.rs crates/context/src/context_cli.rs:794 — crates/context/src/context_cli.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in impeccable_context::context_cli::run_with_hook_repair at line 794. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/context/src/context_cli.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 65 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×82
  • FunctionTooLong: impeccable_core::browser::quality::check_quality crates/core/src/browser/quality.rs:2187 — FunctionTooLong — impeccable_core::browser::quality::check_quality runs 544 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 444 over it, 5.44× 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: plan-review.mountPlanReview ui/component-review/plan-review.ts:52 — FunctionTooLong — mountPlanReview runs 493 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 393 over it, 4.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_context::serve_question::run crates/context/src/serve_question.rs:1274 — FunctionTooLong — impeccable_context::serve_question::run runs 474 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 374 over it, 4.74× 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: 40-overlay.createImpeccableOverlay browser-bundle/40-overlay.js:16 — FunctionTooLong — createImpeccableOverlay runs 422 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 322 over it, 4.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_comp_verbs::build_phase::gate_hero_inner crates/comp-verbs/src/build_phase.rs:1786 — FunctionTooLong — impeccable_comp_verbs::build_phase::gate_hero_inner runs 399 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 299 over it, 3.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_live::session::apply_event crates/live/src/session.rs:432 — FunctionTooLong — impeccable_live::session::apply_event runs 380 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 280 over it, 3.80× 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: impeccable_hook::hook::run_hook crates/hook/src/hook.rs:81 — FunctionTooLong — impeccable_hook::hook::run_hook runs 377 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 277 over it, 3.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_core::browser::element_checks::check_element_colors_dom_in crates/core/src/browser/element_checks.rs:2650 — FunctionTooLong — impeccable_core::browser::element_checks::check_element_colors_dom_in runs 366 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 266 over it, 3.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_detect::cli::detect_cli crates/detect/src/cli.rs:538 — FunctionTooLong — impeccable_detect::cli::detect_cli runs 345 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 245 over it, 3.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.
  • FunctionTooLong: impeccable_live::live_wrap::wrap_cli crates/live/src/live_wrap.rs:61 — FunctionTooLong — impeccable_live::live_wrap::wrap_cli runs 321 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 221 over it, 3.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_live::live_server::handle_poll_post crates/live/src/live_server.rs:1552 — FunctionTooLong — impeccable_live::live_server::handle_poll_post runs 304 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 204 over it, 3.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_html::quality::check_quality crates/html/src/quality.rs:695 — FunctionTooLong — impeccable_html::quality::check_quality runs 302 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 202 over it, 3.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: impeccable_live::live_server::handle_manual_edit_commit crates/live/src/live_server.rs:2369 — FunctionTooLong — impeccable_live::live_server::handle_manual_edit_commit runs 296 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 196 over it, 2.96× 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: impeccable_live::live_server::handle_manual_edit_route crates/live/src/live_server.rs:1994 — FunctionTooLong — impeccable_live::live_server::handle_manual_edit_route 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: impeccable_comp_verbs::build_phase::run_with_renderer crates/comp-verbs/src/build_phase.rs:3428 — FunctionTooLong — impeccable_comp_verbs::build_phase::run_with_renderer runs 287 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 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_hook::hook::run_stop_hook crates/hook/src/hook.rs:626 — FunctionTooLong — impeccable_hook::hook::run_stop_hook runs 286 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 186 over it, 2.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_live::live_server::handle_connection crates/live/src/live_server.rs:622 — FunctionTooLong — impeccable_live::live_server::handle_connection runs 263 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 163 over it, 2.63× 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: impeccable_live::live_generate::run crates/live/src/live_generate.rs:423 — FunctionTooLong — impeccable_live::live_generate::run runs 258 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 158 over it, 2.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.
  • FunctionTooLong: impeccable_live::live_accept::accept_cli crates/live/src/live_accept.rs:184 — FunctionTooLong — impeccable_live::live_accept::accept_cli runs 257 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 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_comp_verbs::font_match::run crates/comp-verbs/src/font_match.rs:423 — FunctionTooLong — impeccable_comp_verbs::font_match::run runs 241 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 141 over it, 2.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: impeccable_core::checks::vectors_a::call crates/core/src/checks/vectors_a.rs:123 — FunctionTooLong — impeccable_core::checks::vectors_a::call runs 231 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 131 over it, 2.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_comp::font_fingerprint::measure crates/comp/src/font_fingerprint.rs:598 — FunctionTooLong — impeccable_comp::font_fingerprint::measure runs 230 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 130 over it, 2.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: impeccable::asset_capture::capture_page crates/cli/src/asset_capture.rs:445 — FunctionTooLong — impeccable::asset_capture::capture_page runs 227 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 127 over it, 2.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: impeccable_live::live_server::run crates/live/src/live_server.rs:96 — FunctionTooLong — impeccable_live::live_server::run runs 226 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 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_html::engine::detect_html_source crates/html/src/engine.rs:199 — FunctionTooLong — impeccable_html::engine::detect_html_source runs 225 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 125 over it, 2.25× 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.
  • + 57 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×70
  • FileTooLong: scripts/live-browser.js skill/scripts/live-browser.js — FileTooLong — 9679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9179 over it, 19.36× 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: browser/element_checks.rs crates/core/src/browser/element_checks.rs — FileTooLong — 3610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 169 free functions. The bar is 500 significant lines; this is 3110 over it, 7.22× 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: browser/page_checks.rs crates/core/src/browser/page_checks.rs — FileTooLong — 3243 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 145 free functions. The bar is 500 significant lines; this is 2743 over it, 6.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/visual.rs crates/core/src/browser/visual.rs — FileTooLong — 2663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 141 free functions. The bar is 500 significant lines; this is 2163 over it, 5.33× 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/build_phase.rs crates/comp-verbs/src/build_phase.rs — FileTooLong — 2480 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 92 free functions. The bar is 500 significant lines; this is 1980 over it, 4.96× 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/live_server.rs crates/live/src/live_server.rs — FileTooLong — 2212 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 1712 over it, 4.42× 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/regex_matchers.rs crates/detect/src/regex_matchers.rs — FileTooLong — 2116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 81 free functions. The bar is 500 significant lines; this is 1616 over it, 4.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/driver.rs crates/core/src/browser/driver.rs — FileTooLong — 2099 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 96 free functions. The bar is 500 significant lines; this is 1599 over it, 4.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: browser/quality.rs crates/core/src/browser/quality.rs — FileTooLong — 2039 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 72 free functions. The bar is 500 significant lines; this is 1539 over it, 4.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: checks/css_scan.rs crates/core/src/checks/css_scan.rs — FileTooLong — 2033 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 1533 over it, 4.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/detect_text.rs crates/detect/src/detect_text.rs — FileTooLong — 1716 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 48 free functions. The bar is 500 significant lines; this is 1216 over it, 3.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/hook_lib.rs crates/hook/src/hook_lib.rs — FileTooLong — 1688 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 116 free functions. The bar is 500 significant lines; this is 1188 over it, 3.38× 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: manual_edits/commit.rs crates/live/src/manual_edits/commit.rs — FileTooLong — 1680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 55 free functions. The bar is 500 significant lines; this is 1180 over it, 3.36× 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: browser/painted.rs crates/core/src/browser/painted.rs — FileTooLong — 1632 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 105 free functions. The bar is 500 significant lines; this is 1132 over it, 3.26× 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/serve_question.rs crates/context/src/serve_question.rs — FileTooLong — 1628 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 108 free functions. The bar is 500 significant lines; this is 1128 over it, 3.26× 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/cdp.rs crates/browser/src/cdp.rs — FileTooLong — 1479 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 979 over it, 2.96× 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: checks/rules.rs crates/core/src/checks/rules.rs — FileTooLong — 1457 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 957 over it, 2.91× 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/design_system.rs crates/detect/src/design_system.rs — FileTooLong — 1456 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 85 free functions. The bar is 500 significant lines; this is 956 over it, 2.91× 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: REDACTED REDACTED — 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 51 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: src/svelte_component.rs crates/live/src/svelte_component.rs — FileTooLong — 1362 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 58 free functions. The bar is 500 significant lines; this is 862 over it, 2.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: manual_edits/apply.rs crates/live/src/manual_edits/apply.rs — FileTooLong — 1345 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 845 over it, 2.69× 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/adapters.rs crates/html/src/adapters.rs — FileTooLong — 1250 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 63 free functions. The bar is 500 significant lines; this is 750 over it, 2.50× 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/copy_edit_agent.rs crates/live/src/copy_edit_agent.rs — FileTooLong — 1240 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 44 free functions. The bar is 500 significant lines; this is 740 over it, 2.48× 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/server_state.rs crates/live/src/server_state.rs — FileTooLong — 1175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: ServerState (2 blocks, 110-1298). The bar is 500 significant lines; this is 675 over it, 2.35× 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/design_md.rs crates/live/src/design_md.rs — FileTooLong — 1107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 607 over it, 2.21× 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.
  • + 45 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_context · ×61
  • impeccable_context::serve_question::run (cognitive 363) crates/context/src/serve_question.rs:1274 — impeccable_context::serve_question::run has cognitive complexity 363 (threshold 15). Drivers by points: if/else 120 (296 pts), boolean chains 39, match/switch 10 (20 pts), loops 4 (8 pts) (nesting depth added 190). 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.
  • impeccable_context::component_review::manifest::freeze (cognitive 141) crates/context/src/component_review/manifest.rs:85 — impeccable_context::component_review::manifest::freeze has cognitive complexity 141 (threshold 15). Drivers by points: if/else 44 (95 pts), loops 14 (26 pts), boolean chains 13, match/switch 2 (7 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::catalog::validate_concept_catalog (cognitive 97) crates/context/src/catalog.rs:247 — impeccable_context::catalog::validate_concept_catalog has cognitive complexity 97 (threshold 15). Drivers by points: if/else 43 (80 pts), loops 6 (7 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::concept_seed::render_roll (cognitive 89) crates/context/src/concept_seed.rs:436 — impeccable_context::concept_seed::render_roll has cognitive complexity 89 (threshold 15). Drivers by points: if/else 53 (65 pts), boolean chains 10, match/switch 8, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • impeccable_context::critique_storage::run_with_saved (cognitive 67) crates/context/src/critique_storage.rs:681 — impeccable_context::critique_storage::run_with_saved has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (41 pts), match/switch 7 (16 pts), boolean chains 10 (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.
  • impeccable_context::generate_image::run_with_api_base (cognitive 66) crates/context/src/generate_image.rs:334 — impeccable_context::generate_image::run_with_api_base has cognitive complexity 66 (threshold 15). Drivers by points: if/else 27 (43 pts), match/switch 8 (17 pts), boolean chains 3, loops 2 (3 pts) (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.
  • impeccable_context::embed_prompt::run (cognitive 62) crates/context/src/embed_prompt.rs:186 — impeccable_context::embed_prompt::run has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (42 pts), match/switch 4 (11 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_context::context::has_visual_implementation (cognitive 59) crates/context/src/context.rs:1291 — impeccable_context::context::has_visual_implementation has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 12, loops 4 (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.
  • impeccable_context::staleness_deep::check_hook_installation (cognitive 59) crates/context/src/staleness_deep.rs:239 — impeccable_context::staleness_deep::check_hook_installation has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (47 pts), loops 5 (9 pts), boolean chains 3 (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.
  • impeccable_context::signals::git_signals (cognitive 56) crates/context/src/signals.rs:103 — impeccable_context::signals::git_signals has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 6 (11 pts), match/switch 2 (4 pts), boolean chains 3 (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.
  • impeccable_context::pin::run (cognitive 55) crates/context/src/pin.rs:214 — impeccable_context::pin::run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (45 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 30). 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.
  • impeccable_context::url::parse (cognitive 54) crates/context/src/url.rs:45 — impeccable_context::url::parse has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (38 pts), match/switch 8 (10 pts), boolean chains 5, 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.
  • impeccable_context::component_review::store::prepare_bound (cognitive 47) crates/context/src/component_review/store.rs:104 — impeccable_context::component_review::store::prepare_bound has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (32 pts), loops 6 (9 pts), boolean chains 6 (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.
  • impeccable_context::component_review::verify::capture_intact (cognitive 45) crates/context/src/component_review/verify.rs:49 — impeccable_context::component_review::verify::capture_intact has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 12, loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::context_cli::automatic_hook_mode (cognitive 45) crates/context/src/context_cli.rs:115 — impeccable_context::context_cli::automatic_hook_mode has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 2 (3 pts), boolean chains 2 (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.
  • impeccable_context::roll_selection::select_approved_compositions (cognitive 45) crates/context/src/roll_selection.rs:283 — impeccable_context::roll_selection::select_approved_compositions has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 4 (8 pts), match/switch 3 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::roll_selection::select_approved_challengers (cognitive 43) crates/context/src/roll_selection.rs:155 — impeccable_context::roll_selection::select_approved_challengers has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 6 (8 pts), match/switch 2 (4 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.
  • impeccable_context::staleness::check_native_platform_evidence (cognitive 42) crates/context/src/staleness.rs:138 — impeccable_context::staleness::check_native_platform_evidence has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 3 (5 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::component_review::store::submit (cognitive 40) crates/context/src/component_review/store.rs:314 — impeccable_context::component_review::store::submit has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 13, loops 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_context::component_review::server::serve (cognitive 39) crates/context/src/component_review/server.rs:91 — impeccable_context::component_review::server::serve has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 3 (7 pts), boolean chains 5, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::component_review::visual_approval::identity (cognitive 39) crates/context/src/component_review/visual_approval.rs:6 — impeccable_context::component_review::visual_approval::identity has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 3 (6 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.
  • impeccable_context::component_review::run_with_capturer (cognitive 38) crates/context/src/component_review/mod.rs:48 — impeccable_context::component_review::run_with_capturer has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 10, match/switch 2 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • impeccable_context::context_cli::run_with_hook_repair (cognitive 38) crates/context/src/context_cli.rs:794 — impeccable_context::context_cli::run_with_hook_repair has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (29 pts), match/switch 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_context::doctor::apply_fixes (cognitive 37) crates/context/src/doctor.rs:134 — impeccable_context::doctor::apply_fixes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (32 pts), match/switch 1 (3 pts), boolean chains 1, loops 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.
  • impeccable_context::concept_seed::run (cognitive 33) crates/context/src/concept_seed.rs:684 — impeccable_context::concept_seed::run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 7 (10 pts), boolean chains 4 (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.
  • + 36 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_live · ×55
  • impeccable_live::session::apply_event (cyclomatic 82) crates/live/src/session.rs:432 — impeccable_live::session::apply_event has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_generate::run (cyclomatic 70) crates/live/src/live_generate.rs:423 — impeccable_live::live_generate::run has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::svelte_ast::analyze_node (cyclomatic 52) crates/live/src/svelte_ast.rs:476 — impeccable_live::svelte_ast::analyze_node has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_server::handle_poll_post (cyclomatic 51) crates/live/src/live_server.rs:1552 — impeccable_live::live_server::handle_poll_post has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_server::handle_connection (cyclomatic 47) crates/live/src/live_server.rs:622 — impeccable_live::live_server::handle_connection has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_wrap::wrap_cli (cyclomatic 45) crates/live/src/live_wrap.rs:61 — impeccable_live::live_wrap::wrap_cli has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_accept::accept_cli (cyclomatic 44) crates/live/src/live_accept.rs:184 — impeccable_live::live_accept::accept_cli has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::event_validation::validate_event (cyclomatic 43) crates/live/src/event_validation.rs:303 — impeccable_live::event_validation::validate_event 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.
  • impeccable_live::manual_edits::commit::run_commit (cyclomatic 41) crates/live/src/manual_edits/commit.rs:1802 — impeccable_live::manual_edits::commit::run_commit has cyclomatic complexity 41 (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.
  • impeccable_live::live_server::handle_manual_edit_commit (cyclomatic 38) crates/live/src/live_server.rs:2369 — impeccable_live::live_server::handle_manual_edit_commit has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_server::run (cyclomatic 37) crates/live/src/live_server.rs:96 — impeccable_live::live_server::run 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.
  • impeccable_live::live_boot::run (cyclomatic 36) crates/live/src/live_boot.rs:57 — impeccable_live::live_boot::run has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_inject::inject_cli (cyclomatic 36) crates/live/src/live_inject.rs:44 — impeccable_live::live_inject::inject_cli has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::config::glob_sync (cyclomatic 35) crates/live/src/config.rs:280 — impeccable_live::config::glob_sync 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.
  • impeccable_live::live_server::handle_manual_edit_route (cyclomatic 35) crates/live/src/live_server.rs:1994 — impeccable_live::live_server::handle_manual_edit_route 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.
  • impeccable_live::manual_edits::apply::push_batch_in_chunks_and_wait (cyclomatic 35) crates/live/src/manual_edits/apply.rs:1483 — impeccable_live::manual_edits::apply::push_batch_in_chunks_and_wait 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.
  • impeccable_live::manual_edits::apply::validate_manual_apply_result_message (cyclomatic 34) crates/live/src/manual_edits/apply.rs:751 — impeccable_live::manual_edits::apply::validate_manual_apply_result_message has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::svelte_ast::analyze_attributes (cyclomatic 33) crates/live/src/svelte_ast.rs:661 — impeccable_live::svelte_ast::analyze_attributes has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::wrap_common::find_closing_line (cyclomatic 33) crates/live/src/wrap_common.rs:300 — impeccable_live::wrap_common::find_closing_line has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_server::handle_events_post (cyclomatic 32) crates/live/src/live_server.rs:1149 — impeccable_live::live_server::handle_events_post 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.
  • impeccable_live::svelte_ast::slot_keys_of::visit (cyclomatic 31) crates/live/src/svelte_ast.rs:832 — impeccable_live::svelte_ast::slot_keys_of::visit has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::design_md::unescape_yaml_double_quoted (cyclomatic 30) crates/live/src/design_md.rs:174 — impeccable_live::design_md::unescape_yaml_double_quoted has cyclomatic complexity 30 (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.
  • impeccable_live::svelte_ast::restore_svelte_markup::walk (cyclomatic 30) crates/live/src/svelte_ast.rs:1421 — impeccable_live::svelte_ast::restore_svelte_markup::walk has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_live::live_insert::insert_cli (cyclomatic 26) crates/live/src/live_insert.rs:89 — impeccable_live::live_insert::insert_cli has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_live::manual_edits::commit::line_has_object_key (cyclomatic 25) crates/live/src/manual_edits/commit.rs:648 — impeccable_live::manual_edits::commit::line_has_object_key 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.
  • + 30 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_detect · ×44
  • impeccable_detect::regex_matchers::scan_markup_context (cognitive 212) crates/detect/src/regex_matchers.rs:2065 — impeccable_detect::regex_matchers::scan_markup_context has cognitive complexity 212 (threshold 15). Drivers by points: if/else 52 (170 pts), boolean chains 25, match/switch 6 (16 pts), loops 1 (nesting depth added 128). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::cli::detect_cli (cognitive 134) crates/detect/src/cli.rs:538 — impeccable_detect::cli::detect_cli has cognitive complexity 134 (threshold 15). Drivers by points: if/else 61 (95 pts), boolean chains 17, match/switch 8 (13 pts), loops 5 (9 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::detect_text::strip_js_comments (cognitive 124) crates/detect/src/detect_text.rs:432 — impeccable_detect::detect_text::strip_js_comments has cognitive complexity 124 (threshold 15). Drivers by points: if/else 41 (87 pts), boolean chains 27, loops 3 (10 pts) (nesting depth added 53). 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.
  • impeccable_detect::cli::scan_targets (cognitive 112) crates/detect/src/cli.rs:1083 — impeccable_detect::cli::scan_targets has cognitive complexity 112 (threshold 15). Drivers by points: if/else 22 (68 pts), loops 8 (27 pts), match/switch 4 (13 pts), boolean chains 4 (nesting depth added 74). 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.
  • impeccable_detect::detect_text::scan_inset_stripe_css (cognitive 65) crates/detect/src/detect_text.rs:1270 — impeccable_detect::detect_text::scan_inset_stripe_css has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 7, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::design_system::check_source_design_system (cognitive 62) crates/detect/src/design_system.rs:1946 — impeccable_detect::design_system::check_source_design_system has cognitive complexity 62 (threshold 15). Drivers by points: loops 11 (32 pts), if/else 10 (28 pts), boolean chains 2 (nesting depth added 39). 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.
  • impeccable_detect::detect_text::jsx_expression_end (cognitive 61) crates/detect/src/detect_text.rs:158 — impeccable_detect::detect_text::jsx_expression_end has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (56 pts), boolean chains 4, loops 1 (nesting depth added 35). 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.
  • impeccable_detect::regex_matchers::image_source_is_missing (cognitive 61) crates/detect/src/regex_matchers.rs:1756 — impeccable_detect::regex_matchers::image_source_is_missing has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 20, loops 7 (15 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::detect_text::mask_js_literals (cognitive 59) crates/detect/src/detect_text.rs:633 — impeccable_detect::detect_text::mask_js_literals has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 8, loops 5, match/switch 2 (4 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.
  • impeccable_detect::design_system::read_workspace_pattern_groups (cognitive 48) crates/detect/src/design_system.rs:1192 — impeccable_detect::design_system::read_workspace_pattern_groups has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 4 (10 pts), boolean chains 1, match/switch 1 (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.
  • impeccable_detect::detect_text::run_regex_matchers (cognitive 44) crates/detect/src/detect_text.rs:1888 — impeccable_detect::detect_text::run_regex_matchers has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (10 pts), boolean chains 8, match/switch 1 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::regex_matchers::scan_js (cognitive 43) crates/detect/src/regex_matchers.rs:63 — impeccable_detect::regex_matchers::scan_js has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 3, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::detect_text::blank_css_line_comments (cognitive 39) crates/detect/src/detect_text.rs:862 — impeccable_detect::detect_text::blank_css_line_comments has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 7, loops 2 (5 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.
  • impeccable_detect::detect_text::find_css_in_js_templates (cognitive 39) crates/detect/src/detect_text.rs:1742 — impeccable_detect::detect_text::find_css_in_js_templates has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 7 (14 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::config::normalize_ignore_value_entries (cognitive 38) crates/detect/src/config.rs:618 — impeccable_detect::config::normalize_ignore_value_entries has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::regex_matchers::sass_scope_statements (cognitive 33) crates/detect/src/regex_matchers.rs:951 — impeccable_detect::regex_matchers::sass_scope_statements has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::config::glob_to_regex (cognitive 31) crates/detect/src/config.rs:741 — impeccable_detect::config::glob_to_regex has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (5 pts), 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.
  • impeccable_detect::detect_text::find_astro_frontmatter_close (cognitive 31) crates/detect/src/detect_text.rs:948 — impeccable_detect::detect_text::find_astro_frontmatter_close has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 8, 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.
  • impeccable_detect::design_system::add_sidecar_radii (cognitive 26) crates/detect/src/design_system.rs:1040 — impeccable_detect::design_system::add_sidecar_radii has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (8 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.
  • impeccable_detect::design_system::find_design_root (cognitive 26) crates/detect/src/design_system.rs:1467 — impeccable_detect::design_system::find_design_root has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::design_system::canonical_design_finding_key (cognitive 24) crates/detect/src/design_system.rs:2094 — impeccable_detect::design_system::canonical_design_finding_key has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::detect_text::parse_jsx_tag (cognitive 24) crates/detect/src/detect_text.rs:246 — impeccable_detect::detect_text::parse_jsx_tag has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • impeccable_detect::ignores::parse_value_args (cognitive 24) crates/detect/src/ignores.rs:114 — impeccable_detect::ignores::parse_value_args has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_detect::file_system::is_port_listening (cognitive 22) crates/detect/src/file_system.rs:360 — impeccable_detect::file_system::is_port_listening has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 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.
  • impeccable_detect::detect_text::detect_text (cognitive 21) crates/detect/src/detect_text.rs:2154 — impeccable_detect::detect_text::detect_text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 5 (6 pts), boolean chains 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.
  • + 19 more in this group — see findings.md.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×40
  • JavaScript dependencies are not locked demos/landing-demo/package.json:11 — demos/landing-demo/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/astro-vite7/files/package.json:11 — tests/framework-fixtures/astro-vite7/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/monorepo-nested-vite/files/website/package.json:11 — tests/framework-fixtures/monorepo-nested-vite/files/website/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/nextjs-app-router/files/package.json:10 — tests/framework-fixtures/nextjs-app-router/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/nuxt-vite7/files/package.json:11 — tests/framework-fixtures/nuxt-vite7/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/tanstack-router-vite/files/package.json:11 — tests/framework-fixtures/tanstack-router-vite/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/tanstack-start/files/package.json:11 — tests/framework-fixtures/tanstack-start/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite7-vue/files/package.json:6 — tests/framework-fixtures/vite7-vue/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-https/files/package.json:11 — tests/framework-fixtures/vite8-https/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-base-path/files/package.json:11 — tests/framework-fixtures/vite8-react-base-path/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-csp-meta/files/package.json:11 — tests/framework-fixtures/vite8-react-csp-meta/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-css-modules/files/package.json:11 — tests/framework-fixtures/vite8-react-css-modules/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-emotion/files/package.json:11 — tests/framework-fixtures/vite8-react-emotion/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-insert/files/package.json:11 — tests/framework-fixtures/vite8-react-insert/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-mapped-list/files/package.json:11 — tests/framework-fixtures/vite8-react-mapped-list/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-modal/files/package.json:11 — tests/framework-fixtures/vite8-react-modal/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-plain/files/package.json:12 — tests/framework-fixtures/vite8-react-plain/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-pricing-cards/files/package.json:11 — tests/framework-fixtures/vite8-react-pricing-cards/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-radix-dialog/files/package.json:11 — tests/framework-fixtures/vite8-react-radix-dialog/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-router-spa/files/package.json:11 — tests/framework-fixtures/vite8-react-router-spa/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-styled-components/files/package.json:11 — tests/framework-fixtures/vite8-react-styled-components/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-tabs/files/package.json:11 — tests/framework-fixtures/vite8-react-tabs/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-tailwindv3/files/package.json:11 — tests/framework-fixtures/vite8-react-tailwindv3/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-tailwindv4/files/package.json:11 — tests/framework-fixtures/vite8-react-tailwindv4/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked tests/framework-fixtures/vite8-react-ts/files/package.json:11 — tests/framework-fixtures/vite8-react-ts/files/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • + 15 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_context · ×35
  • impeccable_context::serve_question::run (cyclomatic 162) crates/context/src/serve_question.rs:1274 — impeccable_context::serve_question::run has cyclomatic complexity 162 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::component_review::manifest::freeze (cyclomatic 74) crates/context/src/component_review/manifest.rs:85 — impeccable_context::component_review::manifest::freeze has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::concept_seed::render_roll (cyclomatic 61) crates/context/src/concept_seed.rs:436 — impeccable_context::concept_seed::render_roll has cyclomatic complexity 61 (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.
  • impeccable_context::catalog::validate_concept_catalog (cyclomatic 55) crates/context/src/catalog.rs:247 — impeccable_context::catalog::validate_concept_catalog has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::critique_storage::run_with_saved (cyclomatic 42) crates/context/src/critique_storage.rs:681 — impeccable_context::critique_storage::run_with_saved has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::context::has_visual_implementation (cyclomatic 40) crates/context/src/context.rs:1291 — impeccable_context::context::has_visual_implementation has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::component_review::store::submit (cyclomatic 39) crates/context/src/component_review/store.rs:314 — impeccable_context::component_review::store::submit has cyclomatic complexity 39 (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.
  • impeccable_context::component_review::server::serve (cyclomatic 38) crates/context/src/component_review/server.rs:91 — impeccable_context::component_review::server::serve has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::generate_image::run_with_api_base (cyclomatic 38) crates/context/src/generate_image.rs:334 — impeccable_context::generate_image::run_with_api_base has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::url::parse (cyclomatic 32) crates/context/src/url.rs:45 — impeccable_context::url::parse 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.
  • impeccable_context::signals::git_signals (cyclomatic 31) crates/context/src/signals.rs:103 — impeccable_context::signals::git_signals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::component_review::store::prepare_bound (cyclomatic 30) crates/context/src/component_review/store.rs:104 — impeccable_context::component_review::store::prepare_bound has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::component_review::verify::capture_intact (cyclomatic 30) crates/context/src/component_review/verify.rs:49 — impeccable_context::component_review::verify::capture_intact has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_context::design_parser::unescape_yaml_double_quoted (cyclomatic 30) crates/context/src/design_parser.rs:97 — impeccable_context::design_parser::unescape_yaml_double_quoted has cyclomatic complexity 30 (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.
  • impeccable_context::component_review::run_with_capturer (cyclomatic 28) crates/context/src/component_review/mod.rs:48 — impeccable_context::component_review::run_with_capturer 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.
  • impeccable_context::staleness_deep::check_hook_installation (cyclomatic 28) crates/context/src/staleness_deep.rs:239 — impeccable_context::staleness_deep::check_hook_installation 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.
  • impeccable_context::context_cli::run_with_hook_repair (cyclomatic 25) crates/context/src/context_cli.rs:794 — impeccable_context::context_cli::run_with_hook_repair 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.
  • impeccable_context::embed_prompt::run (cyclomatic 25) crates/context/src/embed_prompt.rs:186 — impeccable_context::embed_prompt::run 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.
  • impeccable_context::staleness::check_native_platform_evidence (cyclomatic 25) crates/context/src/staleness.rs:138 — impeccable_context::staleness::check_native_platform_evidence 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.
  • impeccable_context::catalog::validate_concept_entry (cyclomatic 24) crates/context/src/catalog.rs:97 — impeccable_context::catalog::validate_concept_entry has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_context::concept_seed::run (cyclomatic 24) crates/context/src/concept_seed.rs:684 — impeccable_context::concept_seed::run 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.
  • impeccable_context::pin::run (cyclomatic 24) crates/context/src/pin.rs:214 — impeccable_context::pin::run 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.
  • impeccable_context::roll_selection::select_approved_challengers (cyclomatic 23) crates/context/src/roll_selection.rs:155 — impeccable_context::roll_selection::select_approved_challengers 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.
  • impeccable_context::roll_selection::select_approved_compositions (cyclomatic 23) crates/context/src/roll_selection.rs:283 — impeccable_context::roll_selection::select_approved_compositions 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.
  • impeccable_context::concept_seed::ping_chosen (cyclomatic 22) crates/context/src/concept_seed.rs:207 — impeccable_context::concept_seed::ping_chosen 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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×35
  • Duplicated block (5 lines × 2) crates/comp/src/font_fingerprint.rs:600 — crates/comp/src/font_fingerprint.rs:600-604 | crates/comp/src/font_fingerprint.rs:609-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp/src/font_fingerprint.rs:600` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/context/src/concept_seed.rs:168 — crates/context/src/concept_seed.rs:168-172 | crates/context/src/context_cli.rs:691-695 — 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/context/src/serve_question.rs:243 — crates/context/src/serve_question.rs:243-247 | crates/context/src/serve_question.rs:264-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/serve_question.rs:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/core/src/browser/text_collectors.rs:1036 — crates/core/src/browser/text_collectors.rs:1036-1040 | crates/html/src/page.rs:599-603 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/text_collectors.rs:1036` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/core/src/checks/rules.rs:1888 — crates/core/src/checks/rules.rs:1888-1892 | crates/core/src/checks/text_rules.rs:138-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/rules.rs:1888` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/html/src/cascade/shorthand.rs:146 — crates/html/src/cascade/shorthand.rs:146-150 | crates/html/src/cascade/shorthand.rs:178-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/cascade/shorthand.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/html/src/engine.rs:283 — crates/html/src/engine.rs:283-287 | crates/html/src/engine.rs:341-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/engine.rs:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/live/src/live_accept.rs:1280 — crates/live/src/live_accept.rs:1280-1284 | crates/live/src/svelte_component.rs:104-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_accept.rs:1280` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:456 — REDACTED:456-460 | REDACTED:498-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:456` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) crates/live/src/manual_edits/evidence.rs:603 — crates/live/src/manual_edits/evidence.rs:603-607 | crates/skills/src/util.rs:94-98 — 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/hook/src/hook_lib.rs:987 — crates/hook/src/hook_lib.rs:987-991 | crates/hook/src/hook_lib.rs:1003-1010 — 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/core/src/browser/element_checks.rs:1956 — crates/core/src/browser/element_checks.rs:1956-1960 | crates/core/src/browser/element_checks.rs:1965-1971 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/element_checks.rs:1956` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/account/src/critiques.rs:229 — crates/account/src/critiques.rs:229-233 | crates/account/src/setup.rs:303-307 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/critiques.rs:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/comp-verbs/src/build_phase.rs:1584 — crates/comp-verbs/src/build_phase.rs:1584-1588 | crates/comp-verbs/src/build_phase.rs:2466-2470 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) crates/context/src/context_cli.rs:710 — crates/context/src/context_cli.rs:710-714 | crates/context/src/staleness_notice.rs:76-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/context_cli.rs:710` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/context/src/catalog.rs:279 — crates/context/src/catalog.rs:279-283 | crates/context/src/catalog.rs:304-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/catalog.rs:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/html/src/decorative_text.rs:51 — crates/html/src/decorative_text.rs:51-55 | crates/html/src/decorative_text.rs:57-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/decorative_text.rs:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/live/src/copy_edit_agent.rs:673 — crates/live/src/copy_edit_agent.rs:673-677 | crates/live/src/copy_edit_agent.rs:789-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/live/src/copy_edit_agent.rs:786` calls `insert`, `into`, `normalize_batch_number` and `crates/live/src/copy_edit_agent.rs:672` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) crates/browser/src/consent.rs:992 — crates/browser/src/consent.rs:992-996 | crates/browser/src/overlays.rs:631-635 — 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/browser/src/fullpage.rs:990 — crates/browser/src/fullpage.rs:990-994 | crates/browser/src/fullpage.rs:1025-1029 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) crates/comp/src/font_fingerprint.rs:1067 — crates/comp/src/font_fingerprint.rs:1067-1071 | crates/comp/src/font_fingerprint.rs:1086-1090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp/src/font_fingerprint.rs:1067` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/context/src/catalog.rs:222 — crates/context/src/catalog.rs:222-226 | crates/context/src/catalog.rs:517-521 — 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/context/src/critique_storage.rs:118 — crates/context/src/critique_storage.rs:118-122 | crates/context/src/surface_briefs.rs:177-181 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/critique_storage.rs:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) crates/context/src/critique_storage.rs:438 — crates/context/src/critique_storage.rs:438-442 | crates/context/src/critique_storage.rs:451-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/critique_storage.rs:438` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) crates/context/src/serve_question.rs:1399 — crates/context/src/serve_question.rs:1399-1403 | crates/context/src/serve_question.rs:1419-1423 — 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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×28
  • Duplicated block (7 lines × 2) crates/context/src/serve_question.rs:250 — crates/context/src/serve_question.rs:250-256 | crates/context/src/serve_question.rs:270-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/serve_question.rs:250` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/core/src/browser/driver.rs:25 — crates/core/src/browser/driver.rs:25-31 | crates/html/src/adapters.rs:85-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/driver.rs:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/core/src/browser/element_checks.rs:4724 — crates/core/src/browser/element_checks.rs:4724-4730 | crates/core/src/browser/element_checks.rs:4774-4780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/element_checks.rs:4724` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) crates/core/src/browser/page_checks.rs:3962 — crates/core/src/browser/page_checks.rs:3962-3968 | crates/core/src/browser/page_checks.rs:4879-4885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/page_checks.rs:3962` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/detect/src/config.rs:742 — crates/detect/src/config.rs:742-748 | crates/live/src/config.rs:114-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/config.rs:742` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/detect/src/config.rs:1049 — crates/detect/src/config.rs:1049-1055 | crates/hook/src/hook_lib.rs:1228-1234 — before extracting anything, compare `crates/detect/src/config.rs` and `crates/hook/src/hook_lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/config.rs:1049` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/live/src/live_accept.rs:186 — crates/live/src/live_accept.rs:186-192 | crates/live/src/live_insert.rs:91-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_accept.rs:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/live_insert.rs:98` calls `parse_count`, `arg_val`, `as_deref` and `crates/live/src/live_accept.rs:193` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) crates/live/src/live_inject.rs:142 — crates/live/src/live_inject.rs:142-148 | crates/live/src/live_inject.rs:256-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_inject.rs:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/live/src/manual_edits/commit.rs:1167 — crates/live/src/manual_edits/commit.rs:1167-1173 | crates/live/src/manual_edits/commit.rs:1862-1868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/live/src/manual_edits/commit.rs:1941 — crates/live/src/manual_edits/commit.rs:1941-1947 | crates/live/src/manual_edits/commit.rs:2030-2036 — 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/skills/src/bundle.rs:849 — crates/skills/src/bundle.rs:849-855 | crates/skills/src/bundle.rs:1051-1057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/skills/src/bundle.rs:849` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/comp-verbs/src/font_match.rs:574 — crates/comp-verbs/src/font_match.rs:574-580 | crates/comp-verbs/src/font_match.rs:709-715 — 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/core/src/browser/painted.rs:1914 — crates/core/src/browser/painted.rs:1914-1920 | crates/core/src/browser/painted.rs:2385-2391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/painted.rs:1914` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) crates/live/src/manual_edits/apply.rs:681 — crates/live/src/manual_edits/apply.rs:681-687 | crates/live/src/manual_edits/apply.rs:1559-1565 — 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/skills/src/prompt.rs:157 — crates/skills/src/prompt.rs:157-163 | crates/skills/src/prompt.rs:250-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/skills/src/prompt.rs:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) crates/core/src/browser/element_checks.rs:2539 — crates/core/src/browser/element_checks.rs:2539-2545 | crates/core/src/browser/painted.rs:171-177 — 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/core/src/browser/text_layers.rs:946 — crates/core/src/browser/text_layers.rs:946-952 | crates/core/src/browser/text_layers.rs:1035-1041 — 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/foundation/src/fdlibm_trig.rs:307 — crates/foundation/src/fdlibm_trig.rs:307-313 | crates/foundation/src/fdlibm_trig.rs:314-320 — 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/skills/src/commands.rs:972 — crates/skills/src/commands.rs:972-978 | crates/skills/src/commands.rs:1031-1037 — 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/browser/src/html_snapshot.rs:371 — crates/browser/src/html_snapshot.rs:371-377 | crates/cli/src/capture_snapshot.rs:471-477 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/browser/src/html_snapshot.rs:379` calls `from_secs` and `crates/cli/src/capture_snapshot.rs:479` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) crates/context/src/concept_seed.rs:334 — crates/context/src/concept_seed.rs:334-340 | crates/context/src/serve_question.rs:1225-1231 — 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/core/src/browser/background.rs:100 — crates/core/src/browser/background.rs:100-106 | crates/html/src/background.rs:194-200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/hook/src/before_edit.rs:664 — crates/hook/src/before_edit.rs:664-670 | crates/hook/src/hook.rs:27-33 — 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/account/src/store.rs:404 — crates/account/src/store.rs:404-410 | crates/cli/src/loop_connect.rs:692-701 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/store.rs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) crates/hook/src/admin.rs:911 — crates/hook/src/admin.rs:911-917 | crates/hook/src/admin.rs:966-972 — 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.
  • + 3 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_html · ×26
  • impeccable_html::quality::check_quality (cognitive 182) crates/html/src/quality.rs:695 — impeccable_html::quality::check_quality has cognitive complexity 182 (threshold 15). Drivers by points: if/else 50 (127 pts), boolean chains 49, loops 2 (6 pts) (nesting depth added 81). 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.
  • impeccable_html::engine::detect_html_source (cognitive 142) crates/html/src/engine.rs:199 — impeccable_html::engine::detect_html_source has cognitive complexity 142 (threshold 15). Drivers by points: if/else 41 (115 pts), loops 9 (19 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 87). 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.
  • impeccable_html::cascade::csstree::tokenizer::tokenize (cognitive 94) crates/html/src/cascade/csstree/tokenizer.rs:337 — impeccable_html::cascade::csstree::tokenizer::tokenize has cognitive complexity 94 (threshold 15). Drivers by points: if/else 34 (70 pts), match/switch 4 (10 pts), boolean chains 7, loops 4 (7 pts) (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.
  • impeccable_html::adapters::check_element_colors (cognitive 65) crates/html/src/adapters.rs:1028 — impeccable_html::adapters::check_element_colors has cognitive complexity 65 (threshold 15). Drivers by points: if/else 33 (53 pts), boolean chains 10, loops 1, match/switch 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.
  • impeccable_html::page::check_repeated_container_text_from_doc (cognitive 64) crates/html/src/page.rs:523 — impeccable_html::page::check_repeated_container_text_from_doc has cognitive complexity 64 (threshold 15). Drivers by points: if/else 20 (48 pts), loops 6 (12 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::static_engine::collect_static_design_system_findings (cognitive 56) crates/html/src/static_engine.rs:205 — impeccable_html::static_engine::collect_static_design_system_findings has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (44 pts), loops 4 (10 pts), boolean chains 2 (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.
  • impeccable_html::adapters::check_element_stripe_child (cognitive 53) crates/html/src/adapters.rs:912 — impeccable_html::adapters::check_element_stripe_child has cognitive complexity 53 (threshold 15). Drivers by points: if/else 30 (43 pts), boolean chains 10 (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.
  • impeccable_html::cascade::shorthand::expand_static_declaration (cognitive 53) crates/html/src/cascade/shorthand.rs:260 — impeccable_html::cascade::shorthand::expand_static_declaration has cognitive complexity 53 (threshold 15). Drivers by points: if/else 32 (48 pts), boolean chains 3, loops 1 (2 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.
  • impeccable_html::cascade::rules::walk_list (cognitive 44) crates/html/src/cascade/rules.rs:591 — impeccable_html::cascade::rules::walk_list has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 3 (8 pts), boolean chains 2, 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.
  • impeccable_html::background::gradient_stops_walk (cognitive 43) crates/html/src/background.rs:407 — impeccable_html::background::gradient_stops_walk has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 3, loops 1 (nesting depth added 24). 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.
  • impeccable_html::background::walk_surface (cognitive 38) crates/html/src/background.rs:266 — impeccable_html::background::walk_surface has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 9, 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.
  • impeccable_html::page::check_page_layout (cognitive 31) crates/html/src/page.rs:436 — impeccable_html::page::check_page_layout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, loops 4 (5 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::adapters::collect_numbered_section_label_candidates (cognitive 27) crates/html/src/adapters.rs:301 — impeccable_html::adapters::collect_numbered_section_label_candidates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, 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.
  • impeccable_html::cascade::values::normalize_static_css_value (cognitive 27) crates/html/src/cascade/values.rs:271 — impeccable_html::cascade::values::normalize_static_css_value has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::page::is_output_block (cognitive 24) crates/html/src/page.rs:334 — impeccable_html::page::is_output_block has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, loops 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.
  • impeccable_html::adapters::collect_kicker_candidates (cognitive 22) crates/html/src/adapters.rs:208 — impeccable_html::adapters::collect_kicker_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, 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.
  • impeccable_html::cascade::values::split_css_tokens (cognitive 22) crates/html/src/cascade/values.rs:79 — impeccable_html::cascade::values::split_css_tokens has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 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.
  • impeccable_html::quality::insulates_side (cognitive 22) crates/html/src/quality.rs:576 — impeccable_html::quality::insulates_side has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (8 pts), match/switch 2 (3 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • impeccable_html::adapters::check_element_italic_serif (cognitive 20) crates/html/src/adapters.rs:1386 — impeccable_html::adapters::check_element_italic_serif has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::cascade::values::split_css_list (cognitive 19) crates/html/src/cascade/values.rs:41 — impeccable_html::cascade::values::split_css_list has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::engine::count_colour_pairs (cognitive 18) crates/html/src/engine.rs:554 — impeccable_html::engine::count_colour_pairs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), 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.
  • impeccable_html::quality::is_visually_hidden (cognitive 18) crates/html/src/quality.rs:122 — impeccable_html::quality::is_visually_hidden has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5 (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.
  • impeccable_html::quality::is_transparent_wrapper_static (cognitive 18) crates/html/src/quality.rs:479 — impeccable_html::quality::is_transparent_wrapper_static has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), loops 1 (nesting depth added 1). 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.
  • impeccable_html::cascade::csstree::strings::decode_range (cognitive 17) crates/html/src/cascade/csstree/strings.rs:24 — impeccable_html::cascade::csstree::strings::decode_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::page::frames_embedded_content (cognitive 17) crates/html/src/page.rs:276 — impeccable_html::page::frames_embedded_content has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (6 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×26
  • Duplicated block (6 lines × 2) crates/core/src/browser/background.rs:275 — crates/core/src/browser/background.rs:275-280 | crates/html/src/background.rs:341-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/background.rs:275` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/core/src/browser/driver.rs:331 — crates/core/src/browser/driver.rs:331-336 | crates/detect/src/design_system.rs:1603-1608 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/core/src/browser/page_checks.rs:4321 — crates/core/src/browser/page_checks.rs:4321-4326 | crates/core/src/browser/quality.rs:823-828 — 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/core/src/browser/painted.rs:2140 — crates/core/src/browser/painted.rs:2140-2145 | crates/core/src/browser/painted.rs:2982-2987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/painted.rs:2140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/core/src/browser/quality.rs:1022 — crates/core/src/browser/quality.rs:1022-1027 | crates/core/src/browser/quality.rs:1731-1736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/hook/src/hook_lib.rs:2068 — crates/hook/src/hook_lib.rs:2068-2073 | crates/hook/src/hook_lib.rs:2172-2177 — 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/live/src/inject/sveltekit.rs:126 — crates/live/src/inject/sveltekit.rs:126-131 | crates/live/src/inject/tanstack.rs:116-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/inject/sveltekit.rs:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/live/src/live_generate.rs:443 — crates/live/src/live_generate.rs:443-448 | crates/live/src/live_poll.rs:697-702 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/live/src/live_poll.rs:696` calls `run` and `crates/live/src/live_generate.rs:442` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/live/src/live_generate.rs:572 — crates/live/src/live_generate.rs:572-577 | crates/live/src/live_generate.rs:655-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_generate.rs:572` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/live/src/live_inject.rs:135 — crates/live/src/live_inject.rs:135-140 | crates/live/src/live_inject.rs:247-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_inject.rs:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) crates/live/src/session.rs:797 — crates/live/src/session.rs:797-802 | crates/live/src/session.rs:869-874 — 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/skills/src/bundle.rs:758 — crates/skills/src/bundle.rs:758-763 | crates/skills/src/bundle.rs:826-831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/skills/src/bundle.rs:758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/skills/src/bundle.rs:832` calls `is_file`, `join` and `crates/skills/src/bundle.rs:764` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) crates/core/src/browser/page_checks.rs:2699 — crates/core/src/browser/page_checks.rs:2699-2704 | crates/core/src/browser/page_checks.rs:2965-2970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/page_checks.rs:2699` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) crates/core/src/checks/vectors_b.rs:66 — crates/core/src/checks/vectors_b.rs:66-71 | crates/foundation/src/vectors/checks_b.rs:107-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/vectors_b.rs:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/hook/src/hook_lib.rs:2062 — crates/hook/src/hook_lib.rs:2062-2067 | crates/hook/src/hook_lib.rs:2157-2162 — 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/html/src/cascade/shorthand.rs:302 — crates/html/src/cascade/shorthand.rs:302-307 | crates/html/src/cascade/shorthand.rs:345-350 — 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/core/src/browser/text_collectors.rs:168 — crates/core/src/browser/text_collectors.rs:168-173 | crates/html/src/adapters.rs:183-188 — 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/detect/src/config.rs:1066 — crates/detect/src/config.rs:1066-1071 | crates/hook/src/hook_lib.rs:1246-1251 — before extracting anything, compare `crates/detect/src/config.rs` and `crates/hook/src/hook_lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/live/src/manual_edits/commit.rs:132 — crates/live/src/manual_edits/commit.rs:132-137 | crates/live/src/manual_edits/evidence.rs:299-304 — 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/account/src/session.rs:37 — crates/account/src/session.rs:37-42 | crates/skills/src/util.rs:52-57 — 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/hook/src/util.rs:46 — crates/hook/src/util.rs:46-51 | crates/wasm/src/exports_pure.rs:153-158 — 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/hook/src/admin.rs:314 — crates/hook/src/admin.rs:314-319 | crates/hook/src/admin.rs:322-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/hook/src/admin.rs:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/live/src/manual_edits/apply.rs:169 — crates/live/src/manual_edits/apply.rs:169-174 | crates/live/src/manual_edits/apply.rs:674-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) crates/skills/src/commands.rs:986 — crates/skills/src/commands.rs:986-991 | crates/skills/src/commands.rs:1042-1047 — 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/core/src/browser/visual.rs:3720 — crates/core/src/browser/visual.rs:3720-3725 | crates/core/src/browser/visual.rs:3747-3752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/visual.rs:3720` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 1 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_detect · ×25
  • impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88) crates/detect/src/regex_matchers.rs:2065 — impeccable_detect::regex_matchers::scan_markup_context has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_detect::cli::detect_cli (cyclomatic 85) crates/detect/src/cli.rs:538 — impeccable_detect::cli::detect_cli has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_detect::detect_text::strip_js_comments (cyclomatic 68) crates/detect/src/detect_text.rs:432 — impeccable_detect::detect_text::strip_js_comments has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_detect::regex_matchers::image_source_is_missing (cyclomatic 39) crates/detect/src/regex_matchers.rs:1756 — impeccable_detect::regex_matchers::image_source_is_missing has cyclomatic complexity 39 (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.
  • impeccable_detect::detect_text::mask_js_literals (cyclomatic 38) crates/detect/src/detect_text.rs:633 — impeccable_detect::detect_text::mask_js_literals has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_detect::cli::scan_targets (cyclomatic 37) crates/detect/src/cli.rs:1083 — impeccable_detect::cli::scan_targets 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.
  • impeccable_detect::detect_text::scan_inset_stripe_css (cyclomatic 34) crates/detect/src/detect_text.rs:1270 — impeccable_detect::detect_text::scan_inset_stripe_css has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_detect::detect_text::jsx_expression_end (cyclomatic 26) crates/detect/src/detect_text.rs:158 — impeccable_detect::detect_text::jsx_expression_end 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.
  • impeccable_detect::design_system::check_source_design_system (cyclomatic 24) crates/detect/src/design_system.rs:1946 — impeccable_detect::design_system::check_source_design_system has cyclomatic complexity 24 (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.
  • impeccable_detect::detect_text::blank_css_line_comments (cyclomatic 22) crates/detect/src/detect_text.rs:862 — impeccable_detect::detect_text::blank_css_line_comments 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.
  • impeccable_detect::design_system::read_workspace_pattern_groups (cyclomatic 21) crates/detect/src/design_system.rs:1192 — impeccable_detect::design_system::read_workspace_pattern_groups 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.
  • impeccable_detect::detect_text::parse_jsx_tag (cyclomatic 21) crates/detect/src/detect_text.rs:246 — impeccable_detect::detect_text::parse_jsx_tag 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.
  • impeccable_detect::regex_matchers::scan_js (cyclomatic 21) crates/detect/src/regex_matchers.rs:63 — impeccable_detect::regex_matchers::scan_js 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.
  • impeccable_detect::design_system::monorepo_owns_path (cyclomatic 20) crates/detect/src/design_system.rs:1343 — impeccable_detect::design_system::monorepo_owns_path 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.
  • impeccable_detect::detect_text::find_astro_frontmatter_close (cyclomatic 20) crates/detect/src/detect_text.rs:948 — impeccable_detect::detect_text::find_astro_frontmatter_close 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.
  • impeccable_detect::detect_text::find_css_in_js_templates (cyclomatic 20) crates/detect/src/detect_text.rs:1742 — impeccable_detect::detect_text::find_css_in_js_templates 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.
  • impeccable_detect::detect_text::run_regex_matchers (cyclomatic 20) crates/detect/src/detect_text.rs:1888 — impeccable_detect::detect_text::run_regex_matchers 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.
  • impeccable_detect::ignores::parse_value_args (cyclomatic 18) crates/detect/src/ignores.rs:114 — impeccable_detect::ignores::parse_value_args 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.
  • impeccable_detect::config::parse_color_channel (cyclomatic 17) crates/detect/src/config.rs:516 — impeccable_detect::config::parse_color_channel has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • impeccable_detect::detect_text::detect_text (cyclomatic 17) crates/detect/src/detect_text.rs:2154 — impeccable_detect::detect_text::detect_text 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.
  • impeccable_detect::config::normalize_ignore_value_entries (cyclomatic 16) crates/detect/src/config.rs:618 — impeccable_detect::config::normalize_ignore_value_entries 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.
  • impeccable_detect::design_system::split_top_level (cyclomatic 16) crates/detect/src/design_system.rs:929 — impeccable_detect::design_system::split_top_level 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. This is NOT this file's highest cyclomatic complexity: impeccable_detect::design_system::yaml_simple_escape (cyclomatic 18) 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.
  • impeccable_detect::regex_matchers::split_statements (cyclomatic 16) crates/detect/src/regex_matchers.rs:508 — impeccable_detect::regex_matchers::split_statements 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.
  • impeccable_detect::regex_matchers::sass_scope_statements (cyclomatic 16) crates/detect/src/regex_matchers.rs:951 — impeccable_detect::regex_matchers::sass_scope_statements 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.
  • impeccable_detect::regex_matchers::analyze_monotonous_spacing (cyclomatic 16) crates/detect/src/regex_matchers.rs:2777 — impeccable_detect::regex_matchers::analyze_monotonous_spacing 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.
D2 · Cognitive Complexity · impeccable_comp_verbs · ×21
  • impeccable_comp_verbs::build_phase::gate_hero_inner (cognitive 220) crates/comp-verbs/src/build_phase.rs:1786 — impeccable_comp_verbs::build_phase::gate_hero_inner has cognitive complexity 220 (threshold 15). Drivers by points: if/else 84 (149 pts), loops 22 (48 pts), boolean chains 20, match/switch 2 (3 pts) (nesting depth added 92). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp_verbs::build_phase::run_with_renderer (cognitive 174) crates/comp-verbs/src/build_phase.rs:3428 — impeccable_comp_verbs::build_phase::run_with_renderer has cognitive complexity 174 (threshold 15). Drivers by points: if/else 64 (133 pts), loops 8 (23 pts), boolean chains 11, match/switch 4 (7 pts) (nesting depth added 87). 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.
  • impeccable_comp_verbs::font_match::run (cognitive 69) crates/comp-verbs/src/font_match.rs:423 — impeccable_comp_verbs::font_match::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 34 (62 pts), loops 2 (3 pts), boolean chains 2, match/switch 2 (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.
  • impeccable_comp_verbs::map_inspection::inspect (cognitive 63) crates/comp-verbs/src/map_inspection.rs:70 — impeccable_comp_verbs::map_inspection::inspect has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 10 (14 pts), match/switch 2 (5 pts), boolean chains 3 (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.
  • impeccable_comp_verbs::build_phase::advance (cognitive 58) crates/comp-verbs/src/build_phase.rs:2839 — impeccable_comp_verbs::build_phase::advance has cognitive complexity 58 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 8 (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.
  • impeccable_comp_verbs::build_phase::write_scaffold (cognitive 46) crates/comp-verbs/src/build_phase.rs:1022 — impeccable_comp_verbs::build_phase::write_scaffold has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (44 pts), boolean chains 1, loops 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.
  • impeccable_comp_verbs::build_phase::unreferenced_plates (cognitive 45) crates/comp-verbs/src/build_phase.rs:875 — impeccable_comp_verbs::build_phase::unreferenced_plates has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 22). 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.
  • impeccable_comp_verbs::build_phase::gate_responsive_inner (cognitive 44) crates/comp-verbs/src/build_phase.rs:2483 — impeccable_comp_verbs::build_phase::gate_responsive_inner has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 11, loops 3, match/switch 2 (3 pts) (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.
  • impeccable_comp_verbs::build_phase::finish_native_capture (cognitive 40) crates/comp-verbs/src/build_phase.rs:1467 — impeccable_comp_verbs::build_phase::finish_native_capture has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 3 (6 pts), match/switch 1 (2 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.
  • impeccable_comp_verbs::build_phase::hero_readings (cognitive 38) crates/comp-verbs/src/build_phase.rs:1180 — impeccable_comp_verbs::build_phase::hero_readings has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (10 pts), boolean chains 5 (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.
  • impeccable_comp_verbs::build_phase::gate_plates_for (cognitive 35) crates/comp-verbs/src/build_phase.rs:608 — impeccable_comp_verbs::build_phase::gate_plates_for has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 2 (4 pts), boolean chains 3, 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.
  • impeccable_comp_verbs::build_phase::gate_spec (cognitive 30) crates/comp-verbs/src/build_phase.rs:424 — impeccable_comp_verbs::build_phase::gate_spec has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • impeccable_comp_verbs::comp_diff::verdict_for (cognitive 29) crates/comp-verbs/src/comp_diff.rs:88 — impeccable_comp_verbs::comp_diff::verdict_for has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 9 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_comp_verbs::completion::report (cognitive 28) crates/comp-verbs/src/completion.rs:107 — impeccable_comp_verbs::completion::report has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 4 (7 pts), loops 1 (3 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.
  • impeccable_comp_verbs::comp_diff::resolve_regions (cognitive 27) crates/comp-verbs/src/comp_diff.rs:216 — impeccable_comp_verbs::comp_diff::resolve_regions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_comp_verbs::comp_diff::run (cognitive 26) crates/comp-verbs/src/comp_diff.rs:708 — impeccable_comp_verbs::comp_diff::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 6 (10 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.
  • impeccable_comp_verbs::util::parse_f64 (cognitive 20) crates/comp-verbs/src/util.rs:29 — impeccable_comp_verbs::util::parse_f64 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 7, 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.
  • impeccable_comp_verbs::font_match::with_weight_variants (cognitive 17) crates/comp-verbs/src/font_match.rs:200 — impeccable_comp_verbs::font_match::with_weight_variants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 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.
  • impeccable_comp_verbs::map_inspection::geometry_error (cognitive 17) crates/comp-verbs/src/map_inspection.rs:22 — impeccable_comp_verbs::map_inspection::geometry_error has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, 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.
  • impeccable_comp_verbs::build_phase::source_files::walk (cognitive 16) crates/comp-verbs/src/build_phase.rs:844 — impeccable_comp_verbs::build_phase::source_files::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp_verbs::build_phase::clear_comparison_artifacts (cognitive 16) crates/comp-verbs/src/build_phase.rs:1701 — impeccable_comp_verbs::build_phase::clear_comparison_artifacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), match/switch 2 (nesting depth added 4). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (clear_regions, remove_file). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · impeccable_hook · ×21
  • impeccable_hook::hook::run_hook (cognitive 128) crates/hook/src/hook.rs:81 — impeccable_hook::hook::run_hook has cognitive complexity 128 (threshold 15). Drivers by points: if/else 59 (104 pts), boolean chains 17, match/switch 3 (6 pts), loops 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::hook::run_stop_hook (cognitive 121) crates/hook/src/hook.rs:626 — impeccable_hook::hook::run_stop_hook has cognitive complexity 121 (threshold 15). Drivers by points: if/else 57 (89 pts), match/switch 6 (12 pts), boolean chains 11, loops 6 (9 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::admin::repair_hook_manifests (cognitive 47) crates/hook/src/admin.rs:573 — impeccable_hook::admin::repair_hook_manifests has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (40 pts), boolean chains 3, match/switch 1 (3 pts), loops 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.
  • impeccable_hook::stop_discovery::changed_since (cognitive 45) crates/hook/src/stop_discovery.rs:95 — impeccable_hook::stop_discovery::changed_since has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (38 pts), boolean chains 4, 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.
  • impeccable_hook::stop_baseline::capture (cognitive 32) crates/hook/src/stop_baseline.rs:73 — impeccable_hook::stop_baseline::capture has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::before_edit::main_flow (cognitive 31) crates/hook/src/before_edit.rs:676 — impeccable_hook::before_edit::main_flow has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, match/switch 4 (6 pts), boolean chains 3 (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.
  • impeccable_hook::admin::add_ignore_value (cognitive 26) crates/hook/src/admin.rs:1062 — impeccable_hook::admin::add_ignore_value has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, match/switch 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.
  • impeccable_hook::hook_lib::expand_scan_targets (cognitive 26) crates/hook/src/hook_lib.rs:2431 — impeccable_hook::hook_lib::expand_scan_targets has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 3 (5 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.
  • impeccable_hook::hook::run (cognitive 25) crates/hook/src/hook.rs:1079 — impeccable_hook::hook::run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_hook::hook_lib::ensure_hook_git_excludes (cognitive 24) crates/hook/src/hook_lib.rs:679 — impeccable_hook::hook_lib::ensure_hook_git_excludes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_hook::hook_sessions::sweep_expired (cognitive 23) crates/hook/src/hook_sessions.rs:136 — impeccable_hook::hook_sessions::sweep_expired has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::admin::reset (cognitive 22) crates/hook/src/admin.rs:1157 — impeccable_hook::admin::reset has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::before_edit::python_string_arg (cognitive 20) crates/hook/src/before_edit.rs:469 — impeccable_hook::before_edit::python_string_arg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::hook_claim::sweep_old_buckets (cognitive 20) crates/hook/src/hook_claim.rs:211 — impeccable_hook::hook_claim::sweep_old_buckets has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 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.
  • impeccable_hook::admin::parse_ignore_value_args (cognitive 19) crates/hook/src/admin.rs:1008 — impeccable_hook::admin::parse_ignore_value_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_hook::build_completion::reminder (cognitive 19) crates/hook/src/build_completion.rs:31 — impeccable_hook::build_completion::reminder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (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.
  • impeccable_hook::admin::merge_detector_config (cognitive 18) crates/hook/src/admin.rs:259 — impeccable_hook::admin::merge_detector_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_hook::before_edit::projected_edit_content (cognitive 18) crates/hook/src/before_edit.rs:121 — impeccable_hook::before_edit::projected_edit_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_hook::hook_lib::extract_finding_ignore_value_raw (cognitive 18) crates/hook/src/hook_lib.rs:1148 — impeccable_hook::hook_lib::extract_finding_ignore_value_raw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1, 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.
  • impeccable_hook::hook_lib::hook_state_dir (cognitive 16) crates/hook/src/hook_lib.rs:166 — impeccable_hook::hook_lib::hook_state_dir has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 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.
  • impeccable_hook::hook_sessions::recorded_roots (cognitive 16) crates/hook/src/hook_sessions.rs:92 — impeccable_hook::hook_sessions::recorded_roots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2, match/switch 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.
D2 · Cognitive Complexity · impeccable_comp · ×20
  • impeccable_comp::font_fingerprint::measure (cognitive 161) crates/comp/src/font_fingerprint.rs:598 — impeccable_comp::font_fingerprint::measure has cognitive complexity 161 (threshold 15). Drivers by points: if/else 47 (82 pts), loops 27 (65 pts), boolean chains 12, match/switch 2 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::font_fingerprint::find_lines (cognitive 66) crates/comp/src/font_fingerprint.rs:299 — impeccable_comp::font_fingerprint::find_lines has cognitive complexity 66 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 14 (22 pts), boolean chains 7 (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.
  • impeccable_comp::hero::text_region_check (cognitive 55) crates/comp/src/hero.rs:151 — impeccable_comp::hero::text_region_check has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (48 pts), boolean chains 5, match/switch 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::font_fingerprint::isolate_dominant (cognitive 51) crates/comp/src/font_fingerprint.rs:899 — impeccable_comp::font_fingerprint::isolate_dominant has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 6 (11 pts), boolean chains 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.
  • impeccable_comp::font_fingerprint::fingerprint (cognitive 32) crates/comp/src/font_fingerprint.rs:1060 — impeccable_comp::font_fingerprint::fingerprint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::review_groups::issues (cognitive 31) crates/comp/src/review_groups.rs:5 — impeccable_comp::review_groups::issues has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (8 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.
  • impeccable_comp::font_fingerprint::line_metrics (cognitive 28) crates/comp/src/font_fingerprint.rs:436 — impeccable_comp::font_fingerprint::line_metrics has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::font_fingerprint::segment (cognitive 26) crates/comp/src/font_fingerprint.rs:527 — impeccable_comp::font_fingerprint::segment has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 5 (12 pts), boolean chains 1 (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.
  • impeccable_comp::source_pixels::is_transformed_copy (cognitive 26) crates/comp/src/source_pixels.rs:10 — impeccable_comp::source_pixels::is_transformed_copy has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 4 (8 pts), boolean chains 3 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • impeccable_comp::font_fingerprint::binarize (cognitive 25) crates/comp/src/font_fingerprint.rs:221 — impeccable_comp::font_fingerprint::binarize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 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.
  • impeccable_comp::raster::resize (cognitive 24) crates/comp/src/raster.rs:71 — impeccable_comp::raster::resize has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (20 pts), boolean chains 2, if/else 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.
  • impeccable_comp::raster::blit (cognitive 24) crates/comp/src/raster.rs:144 — impeccable_comp::raster::blit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::hero::invented_ink (cognitive 23) crates/comp/src/hero.rs:407 — impeccable_comp::hero::invented_ink has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (10 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.
  • impeccable_comp::source_pixels::area_reduce (cognitive 20) crates/comp/src/source_pixels.rs:99 — impeccable_comp::source_pixels::area_reduce has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (18 pts), boolean chains 1, if/else 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • impeccable_comp::metrics::ssim (cognitive 19) crates/comp/src/metrics.rs:84 — impeccable_comp::metrics::ssim has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 2 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • impeccable_comp::font_index::candidates_from_index (cognitive 18) crates/comp/src/font_index.rs:238 — impeccable_comp::font_index::candidates_from_index has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_comp::hero::svg_illustrations (cognitive 17) crates/comp/src/hero.rs:495 — impeccable_comp::hero::svg_illustrations has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 3 (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.
  • impeccable_comp::font_index::load_font_index (cognitive 16) crates/comp/src/font_index.rs:137 — impeccable_comp::font_index::load_font_index has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (7 pts), loops 2 (5 pts), if/else 3, 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.
  • impeccable_comp::hero::ink_box (cognitive 16) crates/comp/src/hero.rs:37 — impeccable_comp::hero::ink_box has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 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.
  • impeccable_comp::metrics::horizontal_bands (cognitive 16) crates/comp/src/metrics.rs:448 — impeccable_comp::metrics::horizontal_bands has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×20
  • Duplicated block (10 lines × 2) crates/browser/src/html_snapshot.rs:316 — crates/browser/src/html_snapshot.rs:316-325 | crates/cli/src/capture_snapshot.rs:448-457 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) REDACTED:1261 — REDACTED:1261-1270 | REDACTED:1406-1415 — 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) REDACTED:2132 — REDACTED:2132-2141 | crates/core/src/browser/visual.rs:4246-4255 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) crates/common/src/jsp.rs:405 — crates/common/src/jsp.rs:405-414 | crates/common/src/jsp.rs:720-729 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/jsp.rs:405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/context/src/design_parser.rs:49 — crates/context/src/design_parser.rs:49-58 | crates/context/src/design_parser.rs:79-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/core/src/browser/background.rs:174 — crates/core/src/browser/background.rs:174-183 | crates/core/src/browser/background.rs:579-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/background.rs:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/core/src/browser/visual.rs:1108 — crates/core/src/browser/visual.rs:1108-1117 | crates/core/src/browser/visual.rs:2869-2878 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/visual.rs:1108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) crates/core/src/checks/vectors_a.rs:124 — crates/core/src/checks/vectors_a.rs:124-133 | crates/foundation/src/vectors/checks_a.rs:87-96 — 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/html/src/cascade/csstree/generator.rs:332 — crates/html/src/cascade/csstree/generator.rs:332-341 | crates/html/src/cascade/csstree/generator.rs:344-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/cascade/csstree/generator.rs:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/html/src/cascade/csstree/generator.rs:343` calls `tok` and `crates/html/src/cascade/csstree/generator.rs:331` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) crates/live/src/live_complete.rs:29 — crates/live/src/live_complete.rs:29-38 | crates/live/src/live_resume.rs:242-251 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_complete.rs:29` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) crates/live/src/live_discard_manual_edits.rs:44 — crates/live/src/live_discard_manual_edits.rs:44-53 | crates/live/src/live_resume.rs:114-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_discard_manual_edits.rs:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) crates/live/src/live_inject.rs:60 — crates/live/src/live_inject.rs:60-69 | crates/live/src/live_inject.rs:99-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_inject.rs:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/live/src/live_poll.rs:716 — crates/live/src/live_poll.rs:716-725 | crates/live/src/live_server.rs:448-457 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/live/src/manual_edits/mod.rs:42 — crates/live/src/manual_edits/mod.rs:42-51 | crates/live/src/source_search.rs:142-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) crates/live/src/svelte_ast.rs:453 — crates/live/src/svelte_ast.rs:453-462 | crates/live/src/svelte_ast.rs:1429-1438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/svelte_ast.rs:453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/core/src/browser/text_collectors.rs:1047 — crates/core/src/browser/text_collectors.rs:1047-1056 | crates/html/src/page.rs:610-619 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/text_collectors.rs:1047` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/core/src/browser/driver.rs:3297 — crates/core/src/browser/driver.rs:3297-3306 | crates/core/src/browser/driver.rs:3371-3380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/driver.rs:3297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/live/src/design_md.rs:121 — crates/live/src/design_md.rs:121-130 | crates/live/src/design_md.rs:156-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/design_md.rs:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) crates/detect/src/ignores.rs:96 — crates/detect/src/ignores.rs:96-105 | crates/hook/src/admin.rs:987-996 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/live/src/live_commit_manual_edits.rs:26 — crates/live/src/live_commit_manual_edits.rs:26-35 | crates/live/src/live_discard_manual_edits.rs:14-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_commit_manual_edits.rs:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X2 · Cancellation propagation · Async function without AbortSignal · ×20
  • Async function without AbortSignal: download cli/bin/cli.js:58 — `download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: start ui/component-review/entry.ts:37 — `start` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: onSubmit ui/component-review/entry.ts:51 — `onSubmit` 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: removeSelectedElement skill/scripts/live-browser.js:3912 — `removeSelectedElement` 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: undoElementRemoval skill/scripts/live-browser.js:3979 — `undoElementRemoval` 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: applyEditing skill/scripts/live-browser.js:4017 — `applyEditing` 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: fetchPendingCount skill/scripts/live-browser.js:4372 — `fetchPendingCount` 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: onPendingPillClick skill/scripts/live-browser.js:4385 — `onPendingPillClick` 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: onPendingTrashClick skill/scripts/live-browser.js:4432 — `onPendingTrashClick` 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: onPendingKeepFixingClick skill/scripts/live-browser.js:4472 — `onPendingKeepFixingClick` 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: onPendingRollbackClick skill/scripts/live-browser.js:4489 — `onPendingRollbackClick` 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: loadSvelteComponentParams skill/scripts/live-browser.js:5580 — `loadSvelteComponentParams` 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: injectSvelteComponentsFromManifest skill/scripts/live-browser.js:6052 — `injectSvelteComponentsFromManifest` 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: inlineFontUrls skill/scripts/live-browser.js:8723 — `inlineFontUrls` 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: collectFontFaces skill/scripts/live-browser.js:8746 — `collectFontFaces` 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: captureAndEmit skill/scripts/live-browser.js:9002 — `captureAndEmit` 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: fetchDesignSystem skill/scripts/live-browser.js:13079 — `fetchDesignSystem` 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: initSettings extension/devtools/panel.js:52 — `initSettings` 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: di crates/context/assets/component-review.js:1633 — `di` 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: onSubmit crates/context/assets/component-review.js:1633 — `onSubmit` 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 })`.
D2 · Cognitive Complexity · impeccable_foundation · ×19
  • impeccable_foundation::fdlibm_trig::kernel_rem_pio2 (cognitive 103) crates/foundation/src/fdlibm_trig.rs:100 — impeccable_foundation::fdlibm_trig::kernel_rem_pio2 has cognitive complexity 103 (threshold 15). Drivers by points: if/else 27 (52 pts), loops 20 (44 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::color::parse_any_color (cognitive 62) crates/foundation/src/color.rs:944 — impeccable_foundation::color::parse_any_color has cognitive complexity 62 (threshold 15). Drivers by points: if/else 38 (59 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::js::number_to_string_radix (cognitive 59) crates/foundation/src/js.rs:226 — impeccable_foundation::js::number_to_string_radix has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (39 pts), loops 6 (12 pts), match/switch 1 (6 pts), boolean chains 2 (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.
  • impeccable_foundation::css::measures::resolve_var_refs (cognitive 50) crates/foundation/src/css/measures.rs:254 — impeccable_foundation::css::measures::resolve_var_refs has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 3 (5 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::js::shortest_digits (cognitive 37) crates/foundation/src/js.rs:87 — impeccable_foundation::js::shortest_digits has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (10 pts), boolean chains 3 (nesting depth added 24). 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.
  • impeccable_foundation::css::scan::step_translation (cognitive 36) crates/foundation/src/css/scan.rs:458 — impeccable_foundation::css::scan::step_translation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (12 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::css::scan::attr_tag_match_starts (cognitive 36) crates/foundation/src/css/scan.rs:864 — impeccable_foundation::css::scan::attr_tag_match_starts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (4 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.
  • impeccable_foundation::js::scan_decimal_prefix (cognitive 33) crates/foundation/src/js.rs:369 — impeccable_foundation::js::scan_decimal_prefix has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 12, loops 3 (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.
  • impeccable_foundation::fdlibm_trig::rem_pio2 (cognitive 31) crates/foundation/src/fdlibm_trig.rs:343 — impeccable_foundation::fdlibm_trig::rem_pio2 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::css::scan::infinite_animation_names (cognitive 21) crates/foundation/src/css/scan.rs:769 — impeccable_foundation::css::scan::infinite_animation_names has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 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.
  • impeccable_foundation::fdlibm_trig::scalbn (cognitive 21) crates/foundation/src/fdlibm_trig.rs:40 — impeccable_foundation::fdlibm_trig::scalbn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
  • impeccable_foundation::css::scan::keyframes_move_or_resize (cognitive 20) crates/foundation/src/css/scan.rs:546 — impeccable_foundation::css::scan::keyframes_move_or_resize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 4 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::js::number_to_string (cognitive 20) crates/foundation/src/js.rs:150 — impeccable_foundation::js::number_to_string has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), loops 2 (4 pts), boolean chains 3 (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.
  • impeccable_foundation::vectors::checks_a::call (cognitive 18) crates/foundation/src/vectors/checks_a.rs:86 — impeccable_foundation::vectors::checks_a::call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (4 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.
  • impeccable_foundation::color::extract_color_function_tokens (cognitive 17) crates/foundation/src/color.rs:282 — impeccable_foundation::color::extract_color_function_tokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::css::scan::collect_marquee_keyframes (cognitive 17) crates/foundation/src/css/scan.rs:358 — impeccable_foundation::css::scan::collect_marquee_keyframes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::browser::dom::merge_text_rects_into_lines (cognitive 16) crates/foundation/src/browser/dom.rs:412 — impeccable_foundation::browser::dom::merge_text_rects_into_lines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_foundation::js::to_fixed (cognitive 16) crates/foundation/src/js.rs:321 — impeccable_foundation::js::to_fixed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), boolean chains 1, 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.
  • impeccable_foundation::vectors::decode (cognitive 16) crates/foundation/src/vectors/mod.rs:74 — impeccable_foundation::vectors::decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (5 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×19
  • Duplicated block (9 lines × 2) crates/common/src/http.rs:91 — crates/common/src/http.rs:91-99 | crates/foundation/src/fonts.rs:66-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/http.rs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/common/src/jsp.rs:618 — crates/common/src/jsp.rs:618-626 | crates/common/src/jsp.rs:628-636 — 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/comp/src/hero.rs:161 — crates/comp/src/hero.rs:161-169 | crates/comp/src/hero.rs:285-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp/src/hero.rs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/context/src/serve_question.rs:1432 — crates/context/src/serve_question.rs:1432-1440 | crates/context/src/serve_question.rs:1486-1494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/serve_question.rs:1432` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) crates/core/src/checks/rules.rs:1697 — crates/core/src/checks/rules.rs:1697-1705 | crates/core/src/checks/rules.rs:1957-1965 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/rules.rs:1697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `opts` to `&IconTileOpts` in one and `&HeroEyebrowOpts` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/detect/src/config.rs:131 — crates/detect/src/config.rs:131-139 | crates/hook/src/hook_lib.rs:503-511 — before extracting anything, compare `crates/detect/src/config.rs` and `crates/hook/src/hook_lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/config.rs:131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `&mut DetectionConfig` in one and `&mut HookConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) crates/detect/src/design_system.rs:417 — crates/detect/src/design_system.rs:417-425 | crates/detect/src/design_system.rs:449-457 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/design_system.rs:417` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/detect/src/regex_matchers.rs:2125 — crates/detect/src/regex_matchers.rs:2125-2133 | crates/detect/src/regex_matchers.rs:2352-2360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) crates/hook/src/admin.rs:841 — crates/hook/src/admin.rs:841-849 | REDACTED:558-566 — before extracting anything, compare `crates/hook/src/admin.rs` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/hook/src/admin.rs:841` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/hook/src/before_edit.rs:764 — crates/hook/src/before_edit.rs:764-772 | crates/hook/src/hook.rs:239-247 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/hook/src/before_edit.rs:764` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/live/src/live_server.rs:2646 — crates/live/src/live_server.rs:2646-2654 | crates/live/src/live_server.rs:2691-2699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_server.rs:2646` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/foundation/src/color.rs:1077 — crates/foundation/src/color.rs:1077-1085 | crates/foundation/src/color.rs:1088-1096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/foundation/src/color.rs:1077` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) crates/cli/src/font_render.rs:56 — crates/cli/src/font_render.rs:56-64 | crates/comp-verbs/src/build_phase.rs:1141-1149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/src/font_render.rs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/core/src/browser/painted.rs:1239 — crates/core/src/browser/painted.rs:1239-1247 | crates/core/src/checks/text_context.rs:212-220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/painted.rs:1239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/core/src/browser/element_checks.rs:1433 — crates/core/src/browser/element_checks.rs:1433-1441 | crates/core/src/browser/visual.rs:492-500 — 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/browser/src/cdp.rs:239 — crates/browser/src/cdp.rs:239-248 | crates/browser/src/cdp.rs:256-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/cdp.rs:239` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) crates/live/src/config.rs:23 — crates/live/src/config.rs:23-31 | crates/live/src/config.rs:34-42 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/config.rs:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) crates/live/src/json_error.rs:97 — crates/live/src/json_error.rs:97-105 | crates/live/src/json_error.rs:112-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/json_error.rs:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/live/src/json_error.rs:94` calls `peek`, `Some` and `crates/live/src/json_error.rs:110` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) crates/live/src/manual_edits/apply.rs:183 — crates/live/src/manual_edits/apply.rs:183-191 | crates/live/src/manual_edits/apply.rs:214-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/apply.rs:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · impeccable_html · ×18
  • impeccable_html::quality::check_quality (cyclomatic 95) crates/html/src/quality.rs:695 — impeccable_html::quality::check_quality has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::cascade::csstree::tokenizer::tokenize (cyclomatic 65) crates/html/src/cascade/csstree/tokenizer.rs:337 — impeccable_html::cascade::csstree::tokenizer::tokenize has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::engine::detect_html_source (cyclomatic 52) crates/html/src/engine.rs:199 — impeccable_html::engine::detect_html_source has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::adapters::check_element_colors (cyclomatic 36) crates/html/src/adapters.rs:1028 — impeccable_html::adapters::check_element_colors has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::cascade::shorthand::expand_static_declaration (cyclomatic 36) crates/html/src/cascade/shorthand.rs:260 — impeccable_html::cascade::shorthand::expand_static_declaration has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::adapters::check_element_stripe_child (cyclomatic 34) crates/html/src/adapters.rs:912 — impeccable_html::adapters::check_element_stripe_child has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_html::page::check_repeated_container_text_from_doc (cyclomatic 27) crates/html/src/page.rs:523 — impeccable_html::page::check_repeated_container_text_from_doc 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.
  • impeccable_html::background::walk_surface (cyclomatic 22) crates/html/src/background.rs:266 — impeccable_html::background::walk_surface 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.
  • impeccable_html::static_engine::collect_static_design_system_findings (cyclomatic 22) crates/html/src/static_engine.rs:205 — impeccable_html::static_engine::collect_static_design_system_findings 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.
  • impeccable_html::cascade::rules::extra_specified_expansions (cyclomatic 21) crates/html/src/cascade/rules.rs:304 — impeccable_html::cascade::rules::extra_specified_expansions 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.
  • impeccable_html::page::check_page_layout (cyclomatic 20) crates/html/src/page.rs:436 — impeccable_html::page::check_page_layout 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.
  • impeccable_html::quality::insulates_side (cyclomatic 20) crates/html/src/quality.rs:576 — impeccable_html::quality::insulates_side has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • impeccable_html::background::gradient_stops_walk (cyclomatic 19) crates/html/src/background.rs:407 — impeccable_html::background::gradient_stops_walk 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.
  • impeccable_html::cascade::values::normalize_static_css_value (cyclomatic 18) crates/html/src/cascade/values.rs:271 — impeccable_html::cascade::values::normalize_static_css_value 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.
  • impeccable_html::page::is_output_block (cyclomatic 18) crates/html/src/page.rs:334 — impeccable_html::page::is_output_block 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.
  • impeccable_html::quality::is_transparent_wrapper_static (cyclomatic 18) crates/html/src/quality.rs:479 — impeccable_html::quality::is_transparent_wrapper_static has cyclomatic complexity 18 (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.
  • impeccable_html::cascade::rules::walk_list (cyclomatic 16) crates/html/src/cascade/rules.rs:591 — impeccable_html::cascade::rules::walk_list 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.
  • impeccable_html::page::frames_embedded_content (cyclomatic 16) crates/html/src/page.rs:276 — impeccable_html::page::frames_embedded_content 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×18
  • Duplicated block (8 lines × 2) crates/account/src/store.rs:239 — crates/account/src/store.rs:239-246 | crates/account/src/store.rs:267-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/store.rs:239` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/comp/src/png_io.rs:78 — crates/comp/src/png_io.rs:78-85 | crates/comp/src/png_io.rs:88-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/context/src/context.rs:702 — crates/context/src/context.rs:702-709 | crates/context/src/staleness.rs:76-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/core/src/browser/painted.rs:2273 — crates/core/src/browser/painted.rs:2273-2280 | crates/core/src/browser/painted.rs:2298-2305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/painted.rs:2273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) crates/core/src/browser/text_collectors.rs:1012 — crates/core/src/browser/text_collectors.rs:1012-1019 | crates/html/src/page.rs:577-584 — 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/hook/src/admin.rs:709 — crates/hook/src/admin.rs:709-716 | REDACTED:605-612 — before extracting anything, compare `crates/hook/src/admin.rs` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/hook/src/admin.rs:709` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/live/src/copy_edit_agent.rs:488 — crates/live/src/copy_edit_agent.rs:488-495 | crates/live/src/copy_edit_agent.rs:1372-1379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/copy_edit_agent.rs:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/live/src/manual_edits/commit.rs:566 — crates/live/src/manual_edits/commit.rs:566-573 | crates/live/src/manual_edits/commit.rs:589-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:566` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/live/src/session.rs:770 — crates/live/src/session.rs:770-777 | crates/live/src/session.rs:813-820 — 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/live/src/svelte_ast.rs:1616 — crates/live/src/svelte_ast.rs:1616-1623 | crates/live/src/svelte_ast.rs:1628-1635 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/svelte_ast.rs:1616` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/context/src/util.rs:138 — crates/context/src/util.rs:138-145 | crates/skills/src/util.rs:110-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/comp-verbs/src/comp_diff.rs:467 — crates/comp-verbs/src/comp_diff.rs:467-474 | crates/comp-verbs/src/comp_diff.rs:522-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/comp-verbs/src/comp_diff.rs:465` calls `min` and `crates/comp-verbs/src/comp_diff.rs:520` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) crates/core/src/checks/css_scan.rs:2039 — crates/core/src/checks/css_scan.rs:2039-2046 | crates/core/src/checks/css_scan.rs:2080-2087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/css_scan.rs:2039` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) crates/browser/src/screenshot_contrast.rs:692 — crates/browser/src/screenshot_contrast.rs:692-699 | crates/live/src/inject/detect_utils.rs:32-39 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) crates/live/src/live_insert.rs:261 — crates/live/src/live_insert.rs:261-268 | crates/live/src/live_wrap.rs:428-437 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_wrap.rs:428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) crates/live/src/manual_edits/apply.rs:792 — crates/live/src/manual_edits/apply.rs:792-799 | crates/live/src/manual_edits/apply.rs:801-808 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/apply.rs:792` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) crates/agents/src/fs_writer.rs:62 — crates/agents/src/fs_writer.rs:62-69 | crates/agents/src/lib.rs:409-416 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/agents/src/fs_writer.rs:62` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) crates/detect/src/design_system.rs:832 — crates/detect/src/design_system.rs:832-839 | crates/detect/src/design_system.rs:1041-1048 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/design_system.rs:832` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · impeccable_comp_verbs · ×16
  • impeccable_comp_verbs::build_phase::gate_hero_inner (cyclomatic 116) crates/comp-verbs/src/build_phase.rs:1786 — impeccable_comp_verbs::build_phase::gate_hero_inner has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp_verbs::build_phase::run_with_renderer (cyclomatic 88) crates/comp-verbs/src/build_phase.rs:3428 — impeccable_comp_verbs::build_phase::run_with_renderer has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp_verbs::build_phase::gate_responsive_inner (cyclomatic 39) crates/comp-verbs/src/build_phase.rs:2483 — impeccable_comp_verbs::build_phase::gate_responsive_inner has cyclomatic complexity 39 (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.
  • impeccable_comp_verbs::build_phase::advance (cyclomatic 39) crates/comp-verbs/src/build_phase.rs:2839 — impeccable_comp_verbs::build_phase::advance has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp_verbs::font_match::run (cyclomatic 37) crates/comp-verbs/src/font_match.rs:423 — impeccable_comp_verbs::font_match::run 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.
  • impeccable_comp_verbs::map_inspection::inspect (cyclomatic 36) crates/comp-verbs/src/map_inspection.rs:70 — impeccable_comp_verbs::map_inspection::inspect has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp_verbs::build_phase::gate_spec (cyclomatic 27) crates/comp-verbs/src/build_phase.rs:424 — impeccable_comp_verbs::build_phase::gate_spec has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_comp_verbs::comp_diff::verdict_for (cyclomatic 24) crates/comp-verbs/src/comp_diff.rs:88 — impeccable_comp_verbs::comp_diff::verdict_for has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_comp_verbs::build_phase::unreferenced_plates (cyclomatic 23) crates/comp-verbs/src/build_phase.rs:875 — impeccable_comp_verbs::build_phase::unreferenced_plates 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.
  • impeccable_comp_verbs::build_phase::gate_plates_for (cyclomatic 21) crates/comp-verbs/src/build_phase.rs:608 — impeccable_comp_verbs::build_phase::gate_plates_for 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.
  • impeccable_comp_verbs::build_phase::finish_native_capture (cyclomatic 20) crates/comp-verbs/src/build_phase.rs:1467 — impeccable_comp_verbs::build_phase::finish_native_capture 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.
  • impeccable_comp_verbs::build_phase::write_scaffold (cyclomatic 19) crates/comp-verbs/src/build_phase.rs:1022 — impeccable_comp_verbs::build_phase::write_scaffold 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.
  • impeccable_comp_verbs::build_phase::hero_readings (cyclomatic 19) crates/comp-verbs/src/build_phase.rs:1180 — impeccable_comp_verbs::build_phase::hero_readings 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.
  • impeccable_comp_verbs::build_phase::next_instruction (cyclomatic 18) crates/comp-verbs/src/build_phase.rs:2967 — impeccable_comp_verbs::build_phase::next_instruction 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.
  • impeccable_comp_verbs::completion::report (cyclomatic 18) crates/comp-verbs/src/completion.rs:107 — impeccable_comp_verbs::completion::report 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.
  • impeccable_comp_verbs::comp_diff::run (cyclomatic 17) crates/comp-verbs/src/comp_diff.rs:708 — impeccable_comp_verbs::comp_diff::run 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.
D2 · Cognitive Complexity · impeccable_skills · ×16
  • impeccable_skills::commands::install (cognitive 71) crates/skills/src/commands.rs:648 — impeccable_skills::commands::install has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (51 pts), boolean chains 12, match/switch 5 (8 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_skills::commands::update (cognitive 58) crates/skills/src/commands.rs:860 — impeccable_skills::commands::update has cognitive complexity 58 (threshold 15). Drivers by points: if/else 29 (43 pts), match/switch 6 (8 pts), boolean chains 7 (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.
  • impeccable_skills::hook_manifest::copy_provider_hooks (cognitive 46) REDACTED:638 — impeccable_skills::hook_manifest::copy_provider_hooks has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (34 pts), boolean chains 5, match/switch 1 (4 pts), loops 2 (3 pts) (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.
  • impeccable_skills::bundle::is_up_to_date (cognitive 41) crates/skills/src/bundle.rs:640 — impeccable_skills::bundle::is_up_to_date has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 4 (9 pts) (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.
  • impeccable_skills::hook_manifest::repair_stale_hook_manifests (cognitive 38) REDACTED:782 — impeccable_skills::hook_manifest::repair_stale_hook_manifests has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_skills::bundle::download_file_capped (cognitive 30) crates/skills/src/bundle.rs:174 — impeccable_skills::bundle::download_file_capped has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_skills::bundle::copy_provider_commands (cognitive 30) crates/skills/src/bundle.rs:797 — impeccable_skills::bundle::copy_provider_commands has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_skills::bundle::link_provider_skills (cognitive 22) crates/skills/src/bundle.rs:1035 — impeccable_skills::bundle::link_provider_skills has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 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.
  • impeccable_skills::bundle::copy_provider_skills (cognitive 21) crates/skills/src/bundle.rs:731 — impeccable_skills::bundle::copy_provider_skills has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (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.
  • impeccable_skills::commands::link (cognitive 21) crates/skills/src/commands.rs:568 — impeccable_skills::commands::link has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 2 (3 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.
  • impeccable_skills::providers::extract_version (cognitive 21) crates/skills/src/providers.rs:604 — impeccable_skills::providers::extract_version has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 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.
  • impeccable_skills::bundle::extract_zip_from (cognitive 19) crates/skills/src/bundle.rs:286 — impeccable_skills::bundle::extract_zip_from has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 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.
  • impeccable_skills::engine_binary::install_engine_binaries (cognitive 17) crates/skills/src/engine_binary.rs:114 — impeccable_skills::engine_binary::install_engine_binaries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_skills::bundle::copy_provider_agents (cognitive 16) crates/skills/src/bundle.rs:934 — impeccable_skills::bundle::copy_provider_agents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 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.
  • impeccable_skills::commands::prompt_for_providers (cognitive 16) crates/skills/src/commands.rs:275 — impeccable_skills::commands::prompt_for_providers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 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.
  • impeccable_skills::commands::choose_install_scope (cognitive 16) crates/skills/src/commands.rs:382 — impeccable_skills::commands::choose_install_scope has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), 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.
R4 · Test Coverage · No test reaches this file · ×16
  • No test reaches this file browser-bundle/15-snapshot.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/cli/src/raster_coverage.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser-bundle/35-visual.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/wasm/tools/ext-diff.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/wasm/tools/ab-diff.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser-bundle/05-natives.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/wasm/tools/snapshot-diff.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/cli/src/asset_capture.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/cli/src/component_isolation.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/live/src/svelte_bridge_helper.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser-bundle/30-scan-common.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/cli/src/component_fonts.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file browser-bundle/99-footer.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×15
  • Edited copy of a member (10 corresponding lines) crates/context/src/staleness.rs:22 — crates/context/src/staleness.rs:22-31 | crates/context/src/staleness_deep.rs:424-434 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/detect/src/util.rs:63 — crates/detect/src/util.rs:63-72 | crates/live/src/accept_css.rs:459-471 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/core/src/browser/painted.rs:1944 — crates/core/src/browser/painted.rs:1944-1953 | crates/core/src/browser/painted.rs:2859-2870 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/context/src/hermes.rs:16 — crates/context/src/hermes.rs:16-25 | crates/skills/src/providers.rs:113-128 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/core/src/checks/rules.rs:476 — crates/core/src/checks/rules.rs:476-485 | crates/core/src/checks/rules.rs:493-507 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/account/src/session.rs:233 — crates/account/src/session.rs:233-242 | crates/account/src/session.rs:249-260 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/core/src/browser/page_checks.rs:1218 — crates/core/src/browser/page_checks.rs:1218-1227 | crates/html/src/page.rs:404-413 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/detect/src/regex_matchers.rs:2766 — crates/detect/src/regex_matchers.rs:2766-2775 | crates/live/src/design_md.rs:59-71 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:469 — REDACTED:469-486 | crates/detect/src/profiler.rs:113-122 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/core/src/browser/driver.rs:369 — crates/core/src/browser/driver.rs:369-378 | crates/html/src/static_engine.rs:166-175 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/html/src/cascade/csstree/tokenizer.rs:793 — crates/html/src/cascade/csstree/tokenizer.rs:793-806 | crates/html/src/cascade/csstree/tokenizer.rs:808-817 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/core/src/browser/driver.rs:313 — crates/core/src/browser/driver.rs:313-322 | crates/detect/src/design_system.rs:2070-2079 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/foundation/src/color.rs:830 — crates/foundation/src/color.rs:830-844 | crates/core/src/browser/element_checks.rs:1890-1899 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/hook/src/hook_lib.rs:551 — crates/hook/src/hook_lib.rs:551-560 | crates/detect/src/config.rs:693-702 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) crates/detect/src/cli.rs:1277 — crates/detect/src/cli.rs:1277-1289 | crates/skills/src/prompt.rs:602-611 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · impeccable_browser · ×13
  • impeccable_browser::scan_loaded (cognitive 60) REDACTED:1187 — impeccable_browser::scan_loaded has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (40 pts), loops 7 (12 pts), boolean chains 5, match/switch 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.
  • impeccable_browser::fullpage::stitch (cognitive 55) crates/browser/src/fullpage.rs:920 — impeccable_browser::fullpage::stitch has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (40 pts), loops 3 (7 pts), boolean chains 6, match/switch 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::run_visual_contrast_fallback (cognitive 33) REDACTED:2192 — impeccable_browser::run_visual_contrast_fallback has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 8, loops 2, 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.
  • impeccable_browser::fullpage::capture_element_shots (cognitive 33) crates/browser/src/fullpage.rs:1075 — impeccable_browser::fullpage::capture_element_shots has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 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.
  • impeccable_browser::validity::classify_with (cognitive 32) crates/browser/src/validity.rs:388 — impeccable_browser::validity::classify_with has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (24 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.
  • impeccable_browser::capture_post_scan (cognitive 22) REDACTED:1746 — impeccable_browser::capture_post_scan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::fullpage::capture_with (cognitive 22) crates/browser/src/fullpage.rs:617 — impeccable_browser::fullpage::capture_with has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::discovery::standard_candidates (cognitive 20) crates/browser/src/discovery.rs:62 — impeccable_browser::discovery::standard_candidates has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 4 (5 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • impeccable_browser::remeasure_drifted (cognitive 19) REDACTED:1868 — impeccable_browser::remeasure_drifted has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (9 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.
  • impeccable_browser::snapshot_engine::recapture_geometry (cognitive 19) crates/browser/src/snapshot_engine.rs:164 — impeccable_browser::snapshot_engine::recapture_geometry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::snapshot_engine::analyze_visual_contrast (cognitive 19) crates/browser/src/snapshot_engine.rs:646 — impeccable_browser::snapshot_engine::analyze_visual_contrast has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 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.
  • impeccable_browser::cdp::typed_page_error_message (cognitive 17) crates/browser/src/cdp.rs:1987 — impeccable_browser::cdp::typed_page_error_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::cdp::client_error_message (cognitive 17) crates/browser/src/cdp.rs:2169 — impeccable_browser::cdp::client_error_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×13
  • Edited copy of a member (8 corresponding lines) crates/account/src/config.rs:73 — crates/account/src/config.rs:73-86 | crates/hook/src/hook_claim.rs:97-104 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/context/src/palette.rs:15 — crates/context/src/palette.rs:15-22 | crates/context/src/serve_question.rs:2053-2061 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/core/src/browser/visual.rs:3962 — crates/core/src/browser/visual.rs:3962-3969 | crates/core/src/browser/visual.rs:4009-4022 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/core/src/browser/quality.rs:466 — crates/core/src/browser/quality.rs:466-473 | crates/html/src/quality.rs:470-477 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/live/src/server.rs:32 — crates/live/src/server.rs:32-39 | crates/live/src/server.rs:43-53 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/core/src/checks/css_scan.rs:1708 — crates/core/src/checks/css_scan.rs:1708-1715 | crates/core/src/checks/css_scan.rs:1886-1893 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/context/src/concept_seed.rs:292 — crates/context/src/concept_seed.rs:292-299 | crates/context/src/catalog.rs:477-484 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/core/src/browser/visual.rs:671 — crates/core/src/browser/visual.rs:671-678 | crates/html/src/adapters.rs:1598-1605 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/comp-verbs/src/comp_diff.rs:400 — crates/comp-verbs/src/comp_diff.rs:400-407 | crates/live/src/journal.rs:202-209 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/context/src/generate_image.rs:21 — crates/context/src/generate_image.rs:21-28 | crates/foundation/src/browser/selector.rs:64-73 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/detect/src/github_annotations.rs:123 — crates/detect/src/github_annotations.rs:123-130 | crates/detect/src/list_rules.rs:28-35 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/core/src/browser/background.rs:153 — crates/core/src/browser/background.rs:153-161 | crates/html/src/background.rs:239-246 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) crates/detect/src/ignores.rs:219 — crates/detect/src/ignores.rs:219-226 | crates/hook/src/admin.rs:487-494 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D1 · Cyclomatic Complexity · impeccable_foundation · ×12
  • impeccable_foundation::fdlibm_trig::kernel_rem_pio2 (cyclomatic 46) crates/foundation/src/fdlibm_trig.rs:100 — impeccable_foundation::fdlibm_trig::kernel_rem_pio2 has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_foundation::color::parse_any_color (cyclomatic 35) crates/foundation/src/color.rs:944 — impeccable_foundation::color::parse_any_color 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.
  • impeccable_foundation::vectors::call (cyclomatic 32) crates/foundation/src/vectors/mod.rs:309 — impeccable_foundation::vectors::call has cyclomatic complexity 32 (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.
  • impeccable_foundation::js::scan_decimal_prefix (cyclomatic 27) crates/foundation/src/js.rs:369 — impeccable_foundation::js::scan_decimal_prefix 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.
  • impeccable_foundation::css::measures::resolve_var_refs (cyclomatic 26) crates/foundation/src/css/measures.rs:254 — impeccable_foundation::css::measures::resolve_var_refs 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.
  • impeccable_foundation::js::number_to_string_radix (cyclomatic 25) crates/foundation/src/js.rs:226 — impeccable_foundation::js::number_to_string_radix 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.
  • impeccable_foundation::css::scan::step_translation (cyclomatic 20) crates/foundation/src/css/scan.rs:458 — impeccable_foundation::css::scan::step_translation has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • impeccable_foundation::css::scan::attr_tag_match_starts (cyclomatic 17) crates/foundation/src/css/scan.rs:864 — impeccable_foundation::css::scan::attr_tag_match_starts 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.
  • impeccable_foundation::css::scan::keyframes_move_or_resize (cyclomatic 16) crates/foundation/src/css/scan.rs:546 — impeccable_foundation::css::scan::keyframes_move_or_resize 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.
  • impeccable_foundation::fdlibm_trig::rem_pio2 (cyclomatic 16) crates/foundation/src/fdlibm_trig.rs:343 — impeccable_foundation::fdlibm_trig::rem_pio2 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.
  • impeccable_foundation::js::number_to_string (cyclomatic 16) crates/foundation/src/js.rs:150 — impeccable_foundation::js::number_to_string 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.
  • impeccable_foundation::vectors::checks_a::call (cyclomatic 16) crates/foundation/src/vectors/checks_a.rs:86 — impeccable_foundation::vectors::checks_a::call 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.
D2 · Cognitive Complexity · impeccable_agents · ×12
  • impeccable_agents::resources::apply (cognitive 64) crates/agents/src/resources.rs:3 — impeccable_agents::resources::apply has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (54 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::resources::build_resource_records (cognitive 56) crates/agents/src/resources.rs:252 — impeccable_agents::resources::build_resource_records has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 6 (13 pts), boolean chains 6, match/switch 1 (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.
  • impeccable_agents::resources::undo (cognitive 33) crates/agents/src/resources.rs:577 — impeccable_agents::resources::undo has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (9 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::render::render_codex_features (cognitive 30) crates/agents/src/render.rs:668 — impeccable_agents::render::render_codex_features has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::render::render (cognitive 28) crates/agents/src/render.rs:8 — impeccable_agents::render::render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::cli::validate (cognitive 27) crates/agents/src/cli.rs:68 — impeccable_agents::cli::validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7, 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.
  • impeccable_agents::mcp::preflight_mcp (cognitive 25) crates/agents/src/mcp.rs:51 — impeccable_agents::mcp::preflight_mcp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::targets::resource_matches (cognitive 24) crates/agents/src/targets.rs:106 — impeccable_agents::targets::resource_matches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_agents::render::remove_codex_hooks (cognitive 23) crates/agents/src/render.rs:341 — impeccable_agents::render::remove_codex_hooks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2, 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.
  • impeccable_agents::render::set_approval (cognitive 22) crates/agents/src/render.rs:587 — impeccable_agents::render::set_approval has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1, 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.
  • impeccable_agents::mcp::sync_mcp (cognitive 19) crates/agents/src/mcp.rs:3 — impeccable_agents::mcp::sync_mcp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 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.
  • impeccable_agents::mcp::parse_mcp_observation (cognitive 18) crates/agents/src/mcp.rs:154 — impeccable_agents::mcp::parse_mcp_observation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · impeccable · ×12
  • impeccable::asset_capture::capture_page (cognitive 46) crates/cli/src/asset_capture.rs:445 — impeccable::asset_capture::capture_page has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 10, match/switch 2 (4 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.
  • impeccable::component_capture::render_page (cognitive 36) crates/cli/src/component_capture.rs:62 — impeccable::component_capture::render_page has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable::loop_install::run_inner (cognitive 34) crates/cli/src/loop_install.rs:288 — impeccable::loop_install::run_inner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 6, match/switch 3 (4 pts), loops 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable::capture_service::parse_capture (cognitive 31) crates/cli/src/capture_service.rs:516 — impeccable::capture_service::parse_capture has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable::capture_service::serve (cognitive 29) crates/cli/src/capture_service.rs:107 — impeccable::capture_service::serve has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (9 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.
  • impeccable::entry_capture::capture_text_only (cognitive 25) crates/cli/src/entry_capture.rs:285 — impeccable::entry_capture::capture_text_only has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (6 pts), boolean chains 2, 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.
  • impeccable::capture_service::request (cognitive 22) crates/cli/src/capture_service.rs:18 — impeccable::capture_service::request has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, match/switch 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.
  • impeccable::loop_connect::connect_one (cognitive 21) crates/cli/src/loop_connect.rs:149 — impeccable::loop_connect::connect_one has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 5 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable::loop_connect::disconnect (cognitive 21) crates/cli/src/loop_connect.rs:274 — impeccable::loop_connect::disconnect has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (6 pts), loops 5, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable::loop_install::download (cognitive 19) crates/cli/src/loop_install.rs:82 — impeccable::loop_install::download has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable::entry_capture::static_inventory::walk (cognitive 16) crates/cli/src/entry_capture.rs:497 — impeccable::entry_capture::static_inventory::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable::router::detect (cognitive 16) crates/cli/src/router.rs:196 — impeccable::router::detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×12
  • Edited copy of a member (6 corresponding lines) crates/wasm/src/exports_visual.rs:78 — crates/wasm/src/exports_visual.rs:78-83 | crates/wasm/src/exports_visual.rs:177-182 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/comp-verbs/src/approved_comp.rs:200 — crates/comp-verbs/src/approved_comp.rs:200-205 | crates/comp-verbs/src/approved_comp.rs:232-240 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/hook/src/hook_lib.rs:613 — crates/hook/src/hook_lib.rs:613-618 | crates/hook/src/hook_lib.rs:852-857 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/context/src/util.rs:177 — crates/context/src/util.rs:177-182 | crates/detect/src/design_system.rs:1129-1134 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/context/src/context_cli.rs:641 — crates/context/src/context_cli.rs:641-646 | crates/context/src/staleness_notice.rs:10-15 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/foundation/src/browser/fake_dom.rs:470 — crates/foundation/src/browser/fake_dom.rs:470-479 | crates/foundation/src/browser/fake_dom.rs:480-485 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/context/src/detect_csp.rs:198 — crates/context/src/detect_csp.rs:198-203 | crates/context/src/signals.rs:345-351 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/core/src/browser/decorative_text.rs:312 — crates/core/src/browser/decorative_text.rs:312-317 | crates/core/src/checks/decorative_text.rs:251-256 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/core/src/browser/text_geometry.rs:405 — crates/core/src/browser/text_geometry.rs:405-410 | crates/core/src/browser/text_layers.rs:217-223 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/foundation/src/browser/selector.rs:722 — crates/foundation/src/browser/selector.rs:722-727 | crates/html/src/select.rs:468-473 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/common/src/lib.rs:93 — crates/common/src/lib.rs:93-98 | crates/hook/src/hook_lib.rs:86-91 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) crates/core/src/browser/decorative_text.rs:21 — crates/core/src/browser/decorative_text.rs:21-26 | crates/html/src/decorative_text.rs:23-28 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · impeccable_common · ×11
  • impeccable_common::http::read_request (cognitive 78) crates/common/src/http.rs:148 — impeccable_common::http::read_request has cognitive complexity 78 (threshold 15). Drivers by points: if/else 20 (45 pts), loops 7 (17 pts), match/switch 4 (10 pts), boolean chains 6 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_common::jsp::win32::dirname (cognitive 58) crates/common/src/jsp.rs:694 — impeccable_common::jsp::win32::dirname has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 4 (13 pts), boolean chains 7 (nesting depth added 29). 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.
  • impeccable_common::jsp::win32::normalize (cognitive 57) crates/common/src/jsp.rs:386 — impeccable_common::jsp::win32::normalize has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 3 (12 pts), boolean chains 9, match/switch 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.
  • impeccable_common::jsp::win32::basename_ext (cognitive 47) crates/common/src/jsp.rs:772 — impeccable_common::jsp::win32::basename_ext has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 26). 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.
  • impeccable_common::jsp::win32::relative (cognitive 45) crates/common/src/jsp.rs:600 — impeccable_common::jsp::win32::relative has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 6, boolean chains 5 (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.
  • impeccable_common::jsp::win32::parse_root (cognitive 40) crates/common/src/jsp.rs:326 — impeccable_common::jsp::win32::parse_root has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (12 pts), boolean chains 8 (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.
  • impeccable_common::jsp::win32::resolve (cognitive 38) crates/common/src/jsp.rs:523 — impeccable_common::jsp::win32::resolve has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 2, 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.
  • impeccable_common::jsp::win32::join (cognitive 24) crates/common/src/jsp.rs:465 — impeccable_common::jsp::win32::join has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_common::jsp::win32::extname (cognitive 20) crates/common/src/jsp.rs:844 — impeccable_common::jsp::win32::extname 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.
  • impeccable_common::jsp::normalize_segments (cognitive 17) crates/common/src/jsp.rs:116 — impeccable_common::jsp::normalize_segments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 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.
  • impeccable_common::seed::locate (cognitive 16) crates/common/src/seed.rs:214 — impeccable_common::seed::locate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×11
  • Edited copy of a member (11 corresponding lines) crates/context/src/design_parser.rs:66 — crates/context/src/design_parser.rs:66-76 | crates/live/src/design_md.rs:139-152 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/hook/src/hook_lib.rs:837 — crates/hook/src/hook_lib.rs:837-850 | crates/hook/src/hook_lib.rs:864-874 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/detect/src/ignores.rs:460 — crates/detect/src/ignores.rs:460-470 | crates/detect/src/ignores.rs:472-484 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/core/src/browser/background.rs:623 — crates/core/src/browser/background.rs:623-635 | crates/html/src/background.rs:516-526 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/context/src/context_cli.rs:201 — crates/context/src/context_cli.rs:201-213 | crates/context/src/context_cli.rs:706-716 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/hook/src/admin.rs:748 — crates/hook/src/admin.rs:748-762 | REDACTED:337-347 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/context/src/concept_seed.rs:132 — crates/context/src/concept_seed.rs:132-142 | crates/live/src/live_poll.rs:332-345 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/browser/src/snapshot_engine.rs:91 — crates/browser/src/snapshot_engine.rs:91-142 | crates/browser/src/snapshot_engine.rs:231-241 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/core/src/browser/painted.rs:2139 — crates/core/src/browser/painted.rs:2139-2149 | crates/core/src/browser/painted.rs:2981-2991 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) crates/live/src/config.rs:21 — crates/live/src/config.rs:21-31 | crates/live/src/config.rs:32-42 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:258 — REDACTED:258-268 | REDACTED:272-282 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×11
  • Edited copy of a member (17 corresponding lines) crates/live/src/copy_edit_agent.rs:876 — crates/live/src/copy_edit_agent.rs:876-897 | crates/live/src/manual_edits/evidence.rs:473-495 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/context/src/design_parser.rs:30 — crates/context/src/design_parser.rs:30-46 | crates/live/src/design_md.rs:98-116 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/detect/src/ignores.rs:282 — crates/detect/src/ignores.rs:282-301 | crates/detect/src/ignores.rs:303-319 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/foundation/src/fdlibm_trig.rs:509 — crates/foundation/src/fdlibm_trig.rs:509-525 | crates/foundation/src/fdlibm_trig.rs:528-544 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/core/src/browser/element_checks.rs:1370 — crates/core/src/browser/element_checks.rs:1370-1386 | crates/html/src/adapters.rs:731-748 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/detect/src/config.rs:1048 — crates/detect/src/config.rs:1048-1064 | crates/hook/src/hook_lib.rs:1227-1243 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/detect/src/design_system.rs:416 — crates/detect/src/design_system.rs:416-432 | crates/detect/src/design_system.rs:448-464 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/detect/src/profiler.rs:51 — crates/detect/src/profiler.rs:51-67 | crates/html/src/static_engine.rs:108-124 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/core/src/browser/quality.rs:1867 — crates/core/src/browser/quality.rs:1867-1883 | crates/html/src/quality.rs:190-208 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/hook/src/before_edit.rs:224 — crates/hook/src/before_edit.rs:224-240 | crates/hook/src/before_edit.rs:399-415 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) crates/foundation/src/js.rs:544 — crates/foundation/src/js.rs:544-560 | crates/foundation/src/js.rs:563-579 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) crates/browser/src/html_snapshot.rs:223 — crates/browser/src/html_snapshot.rs:223-235 | crates/cli/src/capture_snapshot.rs:355-367 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) crates/cli/src/asset_capture.rs:627 — crates/cli/src/asset_capture.rs:627-639 | crates/cli/src/asset_capture.rs:662-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cli/src/asset_capture.rs:627` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/core/src/browser/text_geometry.rs:268 — crates/core/src/browser/text_geometry.rs:268-280 | crates/core/src/browser/text_geometry.rs:319-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/text_geometry.rs:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/html/src/cascade/csstree/parser.rs:456 — crates/html/src/cascade/csstree/parser.rs:456-468 | crates/html/src/cascade/csstree/parser.rs:1364-1376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/cascade/csstree/parser.rs:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/html/src/cascade/csstree/strings.rs:89 — crates/html/src/cascade/csstree/strings.rs:89-101 | crates/html/src/cascade/csstree/strings.rs:144-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/cascade/csstree/strings.rs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) crates/live/src/accept_css.rs:699 — crates/live/src/accept_css.rs:699-711 | crates/live/src/svelte_component.rs:1190-1202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/accept_css.rs:699` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/live/src/json_error.rs:189 — crates/live/src/json_error.rs:189-201 | crates/live/src/json_error.rs:238-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/json_error.rs:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) crates/live/src/live_server.rs:1735 — crates/live/src/live_server.rs:1735-1747 | crates/live/src/live_server.rs:1826-1838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_server.rs:1735` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) crates/live/src/wrap_common.rs:159 — crates/live/src/wrap_common.rs:159-171 | crates/live/src/wrap_common.rs:184-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/wrap_common.rs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) crates/context/src/context_cli.rs:864 — crates/context/src/context_cli.rs:864-876 | crates/context/src/context_cli.rs:887-899 — 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/agents/src/lib.rs:460 — crates/agents/src/lib.rs:460-472 | crates/agents/src/lib.rs:483-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/agents/src/lib.rs:460` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×11
  • Duplicated block (12 lines × 2) crates/agents/src/resources.rs:260 — crates/agents/src/resources.rs:260-271 | crates/agents/src/resources.rs:467-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/agents/src/resources.rs:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) crates/context/src/generate_image.rs:358 — crates/context/src/generate_image.rs:358-369 | crates/context/src/generate_image.rs:390-401 — 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/core/src/browser/background.rs:364 — crates/core/src/browser/background.rs:364-375 | crates/core/src/browser/element_checks.rs:2389-2400 — 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 × 2) crates/core/src/browser/element_checks.rs:2333 — crates/core/src/browser/element_checks.rs:2333-2344 | crates/core/src/browser/element_checks.rs:2714-2725 — 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/foundation/src/css/scan.rs:167 — crates/foundation/src/css/scan.rs:167-178 | crates/foundation/src/css/scan.rs:200-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/foundation/src/css/scan.rs:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/html/src/adapters.rs:1154 — crates/html/src/adapters.rs:1154-1165 | crates/html/src/adapters.rs:1296-1307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/adapters.rs:1154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/live/src/live_accept.rs:390 — crates/live/src/live_accept.rs:390-401 | crates/live/src/live_accept.rs:439-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_accept.rs:390` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/live/src/manual_edits/apply.rs:1139 — crates/live/src/manual_edits/apply.rs:1139-1150 | crates/live/src/manual_edits/apply.rs:1282-1293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/apply.rs:1139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/live/src/manual_edits/commit.rs:2039 — crates/live/src/manual_edits/commit.rs:2039-2050 | crates/live/src/manual_edits/commit.rs:2185-2196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:2039` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) crates/detect/src/design_system.rs:1352 — crates/detect/src/design_system.rs:1352-1363 | crates/detect/src/design_system.rs:1373-1384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/design_system.rs:1352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) crates/live/src/live_server.rs:1883 — crates/live/src/live_server.rs:1883-1894 | crates/live/src/live_server.rs:1923-1934 — 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.
D1 · Cyclomatic Complexity · impeccable · ×10
  • impeccable::router::run (cyclomatic 53) crates/cli/src/router.rs:11 — impeccable::router::run has cyclomatic complexity 53 (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.
  • impeccable::asset_capture::capture_page (cyclomatic 34) crates/cli/src/asset_capture.rs:445 — impeccable::asset_capture::capture_page has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable::loop_install::run_inner (cyclomatic 31) crates/cli/src/loop_install.rs:288 — impeccable::loop_install::run_inner has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable::component_capture::render_page (cyclomatic 26) crates/cli/src/component_capture.rs:62 — impeccable::component_capture::render_page has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable::capture_service::parse_capture (cyclomatic 22) crates/cli/src/capture_service.rs:516 — impeccable::capture_service::parse_capture 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.
  • impeccable::loop_connect::connect_one (cyclomatic 21) crates/cli/src/loop_connect.rs:149 — impeccable::loop_connect::connect_one 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.
  • impeccable::capture_service::serve (cyclomatic 20) crates/cli/src/capture_service.rs:107 — impeccable::capture_service::serve 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.
  • impeccable::capture_service::request (cyclomatic 18) crates/cli/src/capture_service.rs:18 — impeccable::capture_service::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.
  • impeccable::loop_connect::disconnect (cyclomatic 16) crates/cli/src/loop_connect.rs:274 — impeccable::loop_connect::disconnect 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.
  • impeccable::reviewed_entry::reference (cyclomatic 16) crates/cli/src/reviewed_entry.rs:49 — impeccable::reviewed_entry::reference 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×10
  • Repeated repair: tests/oracle/cases/detect.mjs tests/oracle/cases/detect.mjs:67 — tests/oracle/cases/detect.mjs changed 15 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is (anonymous) at line 67), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix launcher probe exit status, `**/` ignore boundaries, denied storage, and unsafe DESIGN.md links (#1116)”; “Fix: ignoreFiles waives a linked stylesheet's page-level findings (#1087) (#1092)”; “Fix: --version prints the installed skill's version (#1028) (#1032)”; “Fix: say when detect scanned files with the regex engine only (#884) (#919)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- tests/oracle/cases/detect.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/context/src/http.rs crates/context/src/http.rs:100 — crates/context/src/http.rs changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is impeccable_context::http::bypasses_proxy at line 100), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: proxy tests clear NO_PROXY; IP hosts skip name suffixes”; “Fix: a trailing-dot host matches; proxy tests survive Windows env”; “Fix: one deadline across redirects, no 3xx body taken as a download”; “Fix: each redirect hop picks its own proxy; IP entries match any spelling”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/context/src/http.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: cli/bin/cli.js cli/bin/cli.js:58 — cli/bin/cli.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is cli.download at line 58), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: name the provider behind engine download outages (#1351)”; “Fix: launcher checks the cached stamp and the sibling engine version (#1232) (#1233)”; “Fix: verify engine downloads against a committed checksum manifest (#813) (#1180)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- cli/bin/cli.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/common/src/git.rs crates/common/src/git.rs:55 — crates/common/src/git.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is impeccable_common::git::ensure_dir_ignored at line 55), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: native audits save too, project-wide audits get a key, commit lifts ignores”; “Fix: keep runtime output out of git and report spent build files (#834) (#1303)”; “Fix: find the design hook from a nested git worktree (#1016) (#1020)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/common/src/git.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: skill/scripts/live-browser-session.js skill/scripts/live-browser-session.js:16 — skill/scripts/live-browser-session.js changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is live-browser-session.randomUUID at line 16), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix launcher probe exit status, `**/` ignore boundaries, denied storage, and unsafe DESIGN.md links (#1116)”; “Fix: keep checkpoint revisions ahead of storage across tabs (#903) (#907)”; “Fix live cleanup races with framework HMR (#695)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- skill/scripts/live-browser-session.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/account/src/http.rs crates/account/src/http.rs:207 — crates/account/src/http.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 5 (its worst body is impeccable_account::http::transport_reason at line 207), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix adversarial DESIGN.md upload review findings”; “Fix critique upload input, opt-out, and renewal boundaries”; “Fix: the account client names its origin for the NO_PROXY match”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/account/src/http.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: tests/oracle/cases/live-wrap.mjs tests/oracle/cases/live-wrap.mjs:9 — tests/oracle/cases/live-wrap.mjs 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 2 (its worst body is W at line 9), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: choose the live-wrap source file by --text, not walk order (#1281) (#1295)”; “Fix: live-wrap finds where a self-closing element ends (#852) (#916)”; “Fix: live-wrap matches a capitalised component to its rendered tag (#875)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- tests/oracle/cases/live-wrap.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: crates/detect/src/file_system.rs crates/detect/src/file_system.rs:467 — crates/detect/src/file_system.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 11 (its worst body is impeccable_detect::file_system::http_get_once at line 467), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: walk .mjs and .cjs sources in directory scans (#1220) (#1225)”; “Fix: detect honors a configured extension's engine (#795) (#1013)”; “Fix: honor detector.extensions in detect directory walks (#822) (#827)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/detect/src/file_system.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/core/src/browser/line_breaks.rs crates/core/src/browser/line_breaks.rs:352 — crates/core/src/browser/line_breaks.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 12 (its worst body is impeccable_core::browser::line_breaks::check_straggler at line 352), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix: straggler sees a text-wrap: pretty the browser dropped (#1136) (#1181)”; “Fix: straggler measures the last word instead of estimating it (#1135)”; “Fix small measurement defects from craft run 1009 (round 13, branch D) (#1151)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- crates/core/src/browser/line_breaks.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: tests/oracle/cases/live-roots.mjs tests/oracle/cases/live-roots.mjs:24 — tests/oracle/cases/live-roots.mjs 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 1 (its worst body is setup at line 24), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix CSP meta patch hiding a separator after an unknown &name; reference (#1145)”; “Fix live-inject CSP meta patch escaping and revert (#1128)”; “Fix: live-server --background forwards its resolved root to the child (#1086) (#1089)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:07:50 -08:00' --until='2026-11-12 22:07:50 -08:00' --full-history --no-merges -- tests/oracle/cases/live-roots.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · impeccable_account · ×10
  • impeccable_account::design::after_scan (cognitive 34) crates/account/src/design.rs:61 — impeccable_account::design::after_scan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28 (33 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_account::critiques::after_save (cognitive 33) crates/account/src/critiques.rs:91 — impeccable_account::critiques::after_save has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25 (32 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.
  • impeccable_account::setup::payload (cognitive 30) crates/account/src/setup.rs:107 — impeccable_account::setup::payload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_account::pro::refresh_with (cognitive 29) crates/account/src/pro/mod.rs:485 — impeccable_account::pro::refresh_with has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 8 (11 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_account::health::run (cognitive 27) crates/account/src/health.rs:195 — impeccable_account::health::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 6 (10 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.
  • impeccable_account::design::metadata (cognitive 26) crates/account/src/design.rs:278 — impeccable_account::design::metadata has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, 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.
  • impeccable_account::run_whoami (cognitive 19) crates/account/src/lib.rs:262 — impeccable_account::run_whoami has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 4 (6 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.
  • impeccable_account::setup::run (cognitive 18) crates/account/src/setup.rs:301 — impeccable_account::setup::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • impeccable_account::critiques::run (cognitive 17) crates/account/src/critiques.rs:227 — impeccable_account::critiques::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 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.
  • impeccable_account::health::after_scan (cognitive 16) crates/account/src/health.rs:97 — impeccable_account::health::after_scan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · impeccable_hook · ×9
  • impeccable_hook::hook::run_hook (cyclomatic 78) crates/hook/src/hook.rs:81 — impeccable_hook::hook::run_hook has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_hook::hook::run_stop_hook (cyclomatic 73) crates/hook/src/hook.rs:626 — impeccable_hook::hook::run_stop_hook has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_hook::stop_baseline::capture (cyclomatic 27) crates/hook/src/stop_baseline.rs:73 — impeccable_hook::stop_baseline::capture 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.
  • impeccable_hook::before_edit::main_flow (cyclomatic 26) crates/hook/src/before_edit.rs:676 — impeccable_hook::before_edit::main_flow has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_hook::admin::repair_hook_manifests (cyclomatic 23) crates/hook/src/admin.rs:573 — impeccable_hook::admin::repair_hook_manifests 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.
  • impeccable_hook::stop_discovery::changed_since (cyclomatic 21) crates/hook/src/stop_discovery.rs:95 — impeccable_hook::stop_discovery::changed_since 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.
  • impeccable_hook::admin::add_ignore_value (cyclomatic 18) crates/hook/src/admin.rs:1062 — impeccable_hook::admin::add_ignore_value 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.
  • impeccable_hook::hook_lib::resolve_harness (cyclomatic 17) crates/hook/src/hook_lib.rs:1918 — impeccable_hook::hook_lib::resolve_harness 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.
  • impeccable_hook::hook_lib::expand_scan_targets (cyclomatic 16) crates/hook/src/hook_lib.rs:2431 — impeccable_hook::hook_lib::expand_scan_targets 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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×9
  • Edited copy of a member (9 corresponding lines) crates/context/src/surface_briefs.rs:82 — crates/context/src/surface_briefs.rs:82-90 | crates/context/src/surface_briefs.rs:92-100 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/foundation/src/vectors/checks_a.rs:49 — crates/foundation/src/vectors/checks_a.rs:49-57 | crates/html/src/cascade/vectors.rs:71-79 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/context/src/util.rs:137 — crates/context/src/util.rs:137-145 | crates/skills/src/util.rs:109-117 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/context/src/context.rs:701 — crates/context/src/context.rs:701-709 | crates/context/src/staleness.rs:75-83 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/context/src/generate_image.rs:11 — crates/context/src/generate_image.rs:11-19 | crates/context/src/serve_question.rs:28-36 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/foundation/src/browser/snapshot.rs:816 — crates/foundation/src/browser/snapshot.rs:816-825 | crates/foundation/src/browser/snapshot.rs:826-834 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/core/src/checks/css_scan.rs:1175 — crates/core/src/checks/css_scan.rs:1175-1194 | crates/core/src/checks/css_scan.rs:1198-1206 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/detect/src/profiler.rs:79 — crates/detect/src/profiler.rs:79-87 | crates/live/src/live_poll.rs:320-330 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) crates/foundation/src/browser/dom.rs:523 — crates/foundation/src/browser/dom.rs:523-535 | crates/core/src/checks/css_scan.rs:676-684 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×9
  • Duplicated block (14 lines × 2) crates/account/src/store.rs:224 — crates/account/src/store.rs:224-237 | crates/account/src/store.rs:252-265 — 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/browser/src/cdp.rs:366 — crates/browser/src/cdp.rs:366-379 | crates/browser/src/cdp.rs:420-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/cdp.rs:366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/browser/src/html_snapshot.rs:207 — crates/browser/src/html_snapshot.rs:207-220 | crates/cli/src/capture_snapshot.rs:316-329 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/html_snapshot.rs:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/core/src/browser/page_checks.rs:815 — crates/core/src/browser/page_checks.rs:815-828 | crates/core/src/browser/page_checks.rs:845-858 — 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/core/src/checks/css_scan.rs:385 — crates/core/src/checks/css_scan.rs:385-398 | crates/foundation/src/color.rs:763-776 — 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 (14 lines × 2) crates/core/src/checks/css_scan.rs:1075 — crates/core/src/checks/css_scan.rs:1075-1088 | crates/core/src/checks/row_stripe.rs:207-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) crates/detect/src/detect_text.rs:1217 — crates/detect/src/detect_text.rs:1217-1230 | crates/detect/src/detect_text.rs:1239-1252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/detect_text.rs:1217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/detect/src/ignores.rs:254 — crates/detect/src/ignores.rs:254-267 | crates/hook/src/admin.rs:871-884 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/ignores.rs:254` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) crates/live/src/manual_edits/apply.rs:642 — crates/live/src/manual_edits/apply.rs:642-655 | crates/live/src/manual_edits/apply.rs:693-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/apply.rs:642` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×9
  • Sync-over-async blocking scripts/build-font-index.mjs:108 — `fs.readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:116 — `fs.existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:154 — `fs.mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:155 — `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:160 — `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:161 — `fs.writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/build-font-index.mjs:162 — `fs.statSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/lib/zip.js:24 — `existsSync` in `createProviderZip` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/lib/zip.js:54 — `statSync` in `createProviderZip` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D1 · Cyclomatic Complexity · impeccable_skills · ×8
  • impeccable_skills::commands::install (cyclomatic 43) crates/skills/src/commands.rs:648 — impeccable_skills::commands::install 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.
  • impeccable_skills::commands::update (cyclomatic 39) crates/skills/src/commands.rs:860 — impeccable_skills::commands::update has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_skills::hook_manifest::copy_provider_hooks (cyclomatic 21) REDACTED:638 — impeccable_skills::hook_manifest::copy_provider_hooks 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.
  • impeccable_skills::bundle::download_file_capped (cyclomatic 17) crates/skills/src/bundle.rs:174 — impeccable_skills::bundle::download_file_capped 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.
  • impeccable_skills::bundle::is_up_to_date (cyclomatic 16) crates/skills/src/bundle.rs:640 — impeccable_skills::bundle::is_up_to_date 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.
  • impeccable_skills::commands::link (cyclomatic 16) crates/skills/src/commands.rs:568 — impeccable_skills::commands::link 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.
  • impeccable_skills::hook_manifest::repair_stale_hook_manifests (cyclomatic 16) REDACTED:782 — impeccable_skills::hook_manifest::repair_stale_hook_manifests 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.
  • impeccable_skills::providers::extract_version (cyclomatic 16) crates/skills/src/providers.rs:604 — impeccable_skills::providers::extract_version 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.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×8
  • Edited copy of a member (14 corresponding lines) crates/comp-verbs/src/build_phase.rs:1272 — crates/comp-verbs/src/build_phase.rs:1272-1288 | crates/comp-verbs/src/build_phase.rs:2711-2724 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/core/src/browser/quality.rs:447 — crates/core/src/browser/quality.rs:447-460 | crates/html/src/quality.rs:448-464 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/core/src/browser/element_checks.rs:2609 — crates/core/src/browser/element_checks.rs:2609-2622 | crates/core/src/checks/rules.rs:1271-1284 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/context/src/pin.rs:160 — crates/context/src/pin.rs:160-177 | crates/context/src/pin.rs:180-193 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/core/src/browser/element_checks.rs:1837 — crates/core/src/browser/element_checks.rs:1837-1850 | crates/core/src/browser/quality.rs:1969-1983 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/core/src/checks/vectors_a.rs:52 — crates/core/src/checks/vectors_a.rs:52-68 | crates/core/src/checks/vectors_b.rs:36-49 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/html/src/cascade/csstree/tokenizer.rs:251 — crates/html/src/cascade/csstree/tokenizer.rs:251-265 | crates/html/src/cascade/csstree/tokenizer.rs:297-310 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) crates/foundation/src/css/measures.rs:465 — crates/foundation/src/css/measures.rs:465-478 | crates/live/src/design_md.rs:1072-1088 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×8
  • Edited copy of a member (16 corresponding lines) crates/core/src/browser/element_checks.rs:5080 — crates/core/src/browser/element_checks.rs:5080-5095 | crates/html/src/adapters.rs:1815-1831 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/cli/src/font_render.rs:55 — crates/cli/src/font_render.rs:55-70 | crates/comp-verbs/src/build_phase.rs:1139-1155 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/core/src/browser/page_checks.rs:945 — crates/core/src/browser/page_checks.rs:945-963 | crates/html/src/page.rs:245-260 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/core/src/browser/text_collectors.rs:150 — crates/core/src/browser/text_collectors.rs:150-165 | crates/html/src/adapters.rs:165-180 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/live/src/accept_css.rs:41 — crates/live/src/accept_css.rs:41-57 | crates/live/src/accept_css.rs:59-74 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/core/src/browser/element_checks.rs:1789 — crates/core/src/browser/element_checks.rs:1789-1807 | crates/core/src/browser/element_checks.rs:1818-1833 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/browser/src/cdp.rs:1788 — crates/browser/src/cdp.rs:1788-1803 | crates/browser/src/cdp.rs:1806-1821 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) crates/foundation/src/rules/text.rs:278 — crates/foundation/src/rules/text.rs:278-294 | crates/core/src/checks/text_rules.rs:338-353 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×8
  • Duplicated block (8 lines × 2 locations) browser-bundle/10-probe.js:80 — browser-bundle/10-probe.js:80 · browser-bundle/15-snapshot.js:85 — 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 (8 lines × 2 locations) browser-bundle/40-overlay.js:376 — browser-bundle/40-overlay.js:376 · browser-bundle/40-overlay.js:386 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) REDACTED:70 — REDACTED:70 · browser-bundle/60-offscreen.js:112 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) scripts/smoke-provider-hooks.mjs:478 — scripts/smoke-provider-hooks.mjs:478 · scripts/smoke-provider-hooks.mjs:487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) scripts/smoke-provider-hooks.mjs:543 — scripts/smoke-provider-hooks.mjs:543 · scripts/smoke-provider-hooks.mjs:591 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) skill/scripts/live-browser.js:1153 — skill/scripts/live-browser.js:1153 · skill/scripts/live-browser.js:2980 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) skill/scripts/live-browser.js:3811 — skill/scripts/live-browser.js:3811 · skill/scripts/live-browser.js:3846 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) skill/scripts/live-browser.js:6117 — skill/scripts/live-browser.js:6117 · skill/scripts/live-browser.js:6170 — 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.
D1 · Cyclomatic Complexity · impeccable_common · ×7
  • impeccable_common::http::read_request (cyclomatic 37) crates/common/src/http.rs:148 — impeccable_common::http::read_request 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.
  • impeccable_common::jsp::win32::relative (cyclomatic 30) crates/common/src/jsp.rs:600 — impeccable_common::jsp::win32::relative has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_common::jsp::win32::normalize (cyclomatic 28) crates/common/src/jsp.rs:386 — impeccable_common::jsp::win32::normalize 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.
  • impeccable_common::jsp::win32::dirname (cyclomatic 27) crates/common/src/jsp.rs:694 — impeccable_common::jsp::win32::dirname 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.
  • impeccable_common::jsp::win32::parse_root (cyclomatic 20) crates/common/src/jsp.rs:326 — impeccable_common::jsp::win32::parse_root 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.
  • impeccable_common::jsp::win32::basename_ext (cyclomatic 20) crates/common/src/jsp.rs:772 — impeccable_common::jsp::win32::basename_ext 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.
  • impeccable_common::jsp::win32::resolve (cyclomatic 17) crates/common/src/jsp.rs:523 — impeccable_common::jsp::win32::resolve has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · impeccable_account · ×7
  • impeccable_account::design::after_scan (cyclomatic 29) crates/account/src/design.rs:61 — impeccable_account::design::after_scan 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.
  • impeccable_account::critiques::after_save (cyclomatic 26) crates/account/src/critiques.rs:91 — impeccable_account::critiques::after_save has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • impeccable_account::health::run (cyclomatic 24) crates/account/src/health.rs:195 — impeccable_account::health::run has cyclomatic complexity 24 (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.
  • impeccable_account::pro::refresh_with (cyclomatic 24) crates/account/src/pro/mod.rs:485 — impeccable_account::pro::refresh_with has cyclomatic complexity 24 (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.
  • impeccable_account::setup::payload (cyclomatic 21) crates/account/src/setup.rs:107 — impeccable_account::setup::payload 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.
  • impeccable_account::run_whoami (cyclomatic 16) crates/account/src/lib.rs:262 — impeccable_account::run_whoami 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.
  • impeccable_account::design::metadata (cyclomatic 16) crates/account/src/design.rs:278 — impeccable_account::design::metadata 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.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: ServerState.page crates/context/src/serve_question.rs:2271 — MethodTooLong — page runs 270 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 170 over it, 2.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CdpEntryRenderer.capture_at crates/cli/src/entry_capture.rs:84 — MethodTooLong — capture_at runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CdpAssetRenderer.capture_batch crates/cli/src/asset_capture.rs:51 — MethodTooLong — capture_batch runs 140 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 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Generator.node crates/html/src/cascade/csstree/generator.rs:218 — MethodTooLong — node runs 131 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 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CssHostIndex.new crates/core/src/checks/css_scan.rs:1339 — MethodTooLong — new runs 126 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 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Prompt.checkbox crates/skills/src/prompt.rs:198 — MethodTooLong — checkbox runs 106 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 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HtmlSnapshot.capture_regions_at_viewport crates/cli/src/capture_snapshot.rs:138 — MethodTooLong — capture_regions_at_viewport runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×7
  • Edited copy of a member (18 corresponding lines) crates/context/src/serve_question.rs:1992 — crates/context/src/serve_question.rs:1992-2022 | crates/context/src/url.rs:159-176 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/core/src/browser/driver.rs:17 — crates/core/src/browser/driver.rs:17-35 | crates/html/src/adapters.rs:78-95 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/core/src/browser/decorative_text.rs:30 — crates/core/src/browser/decorative_text.rs:30-47 | crates/html/src/decorative_text.rs:65-85 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/live/src/manual_edits/mod.rs:53 — crates/live/src/manual_edits/mod.rs:53-70 | crates/live/src/source_search.rs:170-191 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/context/src/util.rs:196 — crates/context/src/util.rs:196-213 | crates/detect/src/ignores.rs:342-363 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/context/src/concept_seed.rs:302 — crates/context/src/concept_seed.rs:302-322 | crates/context/src/concept_seed.rs:343-360 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) crates/core/src/browser/element_checks.rs:359 — crates/core/src/browser/element_checks.rs:359-376 | crates/core/src/browser/painted.rs:2685-2704 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×7
  • Duplicated block (17 lines × 2) crates/common/src/jsp.rs:339 — crates/common/src/jsp.rs:339-355 | crates/common/src/jsp.rs:397-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/jsp.rs:339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/context/src/util.rs:197 — crates/context/src/util.rs:197-213 | crates/detect/src/ignores.rs:347-363 — before extracting anything, compare `crates/context/src/util.rs` and `crates/detect/src/ignores.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/ignores.rs:347` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/core/src/browser/quality.rs:2240 — crates/core/src/browser/quality.rs:2240-2256 | crates/html/src/quality.rs:727-743 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/quality.rs:2240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/core/src/browser/visual.rs:2726 — crates/core/src/browser/visual.rs:2726-2742 | crates/core/src/browser/visual.rs:3019-3035 — 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/detect/src/config.rs:1007 — crates/detect/src/config.rs:1007-1023 | crates/hook/src/hook_lib.rs:1176-1192 — before extracting anything, compare `crates/detect/src/config.rs` and `crates/hook/src/hook_lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/config.rs:1007` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/html/src/cascade/csstree/parser.rs:980 — crates/html/src/cascade/csstree/parser.rs:980-996 | crates/html/src/cascade/csstree/parser.rs:1009-1025 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/html/src/cascade/csstree/parser.rs:980` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) crates/live/src/accept_css.rs:85 — crates/live/src/accept_css.rs:85-101 | crates/live/src/accept_css.rs:115-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/accept_css.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) crates/context/src/design_parser.rs:130 — crates/context/src/design_parser.rs:130-140 | crates/detect/src/design_system.rs:502-512 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/hook/src/hook_lib.rs:1449 — crates/hook/src/hook_lib.rs:1449-1459 | crates/hook/src/hook_lib.rs:1581-1591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/hook/src/hook_lib.rs:1449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/live/src/accept_css.rs:788 — crates/live/src/accept_css.rs:788-798 | crates/live/src/bake.rs:166-176 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/accept_css.rs:788` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/live/src/event_validation.rs:48 — crates/live/src/event_validation.rs:48-58 | crates/live/src/instructions.rs:42-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/event_validation.rs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/live/src/manual_edits/commit.rs:1543 — crates/live/src/manual_edits/commit.rs:1543-1553 | crates/live/src/manual_edits/commit.rs:2068-2078 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1543` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) crates/foundation/src/vectors/mod.rs:179 — crates/foundation/src/vectors/mod.rs:179-189 | crates/html/src/cascade/vectors.rs:139-149 — 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/live/src/manual_edits/mod.rs:29 — crates/live/src/manual_edits/mod.rs:29-39 | crates/live/src/source_search.rs:129-139 — 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.
D1 · Cyclomatic Complexity · impeccable_comp · ×6
  • impeccable_comp::font_fingerprint::measure (cyclomatic 72) crates/comp/src/font_fingerprint.rs:598 — impeccable_comp::font_fingerprint::measure has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp::font_fingerprint::find_lines (cyclomatic 37) crates/comp/src/font_fingerprint.rs:299 — impeccable_comp::font_fingerprint::find_lines 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.
  • impeccable_comp::hero::text_region_check (cyclomatic 33) crates/comp/src/hero.rs:151 — impeccable_comp::hero::text_region_check has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_comp::font_fingerprint::isolate_dominant (cyclomatic 21) crates/comp/src/font_fingerprint.rs:899 — impeccable_comp::font_fingerprint::isolate_dominant has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: impeccable_comp::font_fingerprint::stats (cyclomatic 37) 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.
  • impeccable_comp::font_fingerprint::fingerprint (cyclomatic 20) crates/comp/src/font_fingerprint.rs:1060 — impeccable_comp::font_fingerprint::fingerprint 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. This is NOT this file's highest cyclomatic complexity: impeccable_comp::font_fingerprint::stats (cyclomatic 37) 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.
  • impeccable_comp::font_fingerprint::line_metrics (cyclomatic 16) crates/comp/src/font_fingerprint.rs:436 — impeccable_comp::font_fingerprint::line_metrics 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. This is NOT this file's highest cyclomatic complexity: impeccable_comp::font_fingerprint::stats (cyclomatic 37) 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.
D1 · Cyclomatic Complexity · impeccable_browser · ×6
  • impeccable_browser::scan_loaded (cyclomatic 41) REDACTED:1187 — impeccable_browser::scan_loaded has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_browser::fullpage::stitch (cyclomatic 24) crates/browser/src/fullpage.rs:920 — impeccable_browser::fullpage::stitch 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.
  • impeccable_browser::run_visual_contrast_fallback (cyclomatic 23) REDACTED:2192 — impeccable_browser::run_visual_contrast_fallback 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.
  • impeccable_browser::validity::classify_with (cyclomatic 22) crates/browser/src/validity.rs:388 — impeccable_browser::validity::classify_with 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.
  • impeccable_browser::cdp::client_error_message (cyclomatic 17) crates/browser/src/cdp.rs:2169 — impeccable_browser::cdp::client_error_message 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.
  • impeccable_browser::fullpage::capture_element_shots (cyclomatic 17) crates/browser/src/fullpage.rs:1075 — impeccable_browser::fullpage::capture_element_shots has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · impeccable_agents · ×6
  • impeccable_agents::resources::apply (cyclomatic 33) crates/agents/src/resources.rs:3 — impeccable_agents::resources::apply has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • impeccable_agents::resources::build_resource_records (cyclomatic 32) crates/agents/src/resources.rs:252 — impeccable_agents::resources::build_resource_records 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.
  • impeccable_agents::cli::validate (cyclomatic 23) crates/agents/src/cli.rs:68 — impeccable_agents::cli::validate 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.
  • impeccable_agents::render::render (cyclomatic 19) crates/agents/src/render.rs:8 — impeccable_agents::render::render 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.
  • impeccable_agents::targets::resource_matches (cyclomatic 19) crates/agents/src/targets.rs:106 — impeccable_agents::targets::resource_matches 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.
  • impeccable_agents::render::remove_codex_hooks (cyclomatic 18) crates/agents/src/render.rs:341 — impeccable_agents::render::remove_codex_hooks 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.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×6
  • Edited copy of a member (26 corresponding lines) crates/context/src/generate_image.rs:30 — crates/context/src/generate_image.rs:30-55 | crates/detect/src/config.rs:558-600 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/detect/src/ignores.rs:253 — crates/detect/src/ignores.rs:253-280 | crates/hook/src/admin.rs:870-895 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/agents/src/resources.rs:485 — crates/agents/src/resources.rs:485-514 | crates/agents/src/resources.rs:550-575 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/hook/src/admin.rs:898 — crates/hook/src/admin.rs:898-923 | crates/hook/src/admin.rs:953-984 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/core/src/browser/driver.rs:284 — crates/core/src/browser/driver.rs:284-310 | crates/detect/src/design_system.rs:1556-1581 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) crates/core/src/checks/gradient_geometry.rs:135 — crates/core/src/checks/gradient_geometry.rs:135-161 | crates/foundation/src/browser/fake_dom.rs:352-377 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×6
  • Edited copy of a member (13 corresponding lines) crates/core/src/third_party.rs:200 — crates/core/src/third_party.rs:200-212 | crates/core/src/third_party.rs:232-251 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/live/src/pending_edits.rs:19 — crates/live/src/pending_edits.rs:19-31 | crates/live/src/svelte_component.rs:1239-1255 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/skills/src/providers.rs:277 — crates/skills/src/providers.rs:277-290 | crates/skills/src/providers.rs:293-305 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/foundation/src/js_ext_a.rs:37 — crates/foundation/src/js_ext_a.rs:37-49 | crates/foundation/src/js_ext_a.rs:54-66 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/context/src/provider.rs:44 — crates/context/src/provider.rs:44-56 | crates/hook/src/stop_discovery.rs:75-90 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) crates/foundation/src/js_ext_a.rs:20 — crates/foundation/src/js_ext_a.rs:20-32 | crates/live/src/manual_edits/evidence.rs:129-141 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×6
  • Edited copy of a member (7 corresponding lines) crates/context/src/critique_storage.rs:436 — crates/context/src/critique_storage.rs:436-442 | crates/context/src/critique_storage.rs:449-455 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/foundation/src/browser/selector.rs:423 — crates/foundation/src/browser/selector.rs:423-429 | crates/html/src/select.rs:267-273 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/foundation/src/browser/fake_dom.rs:193 — crates/foundation/src/browser/fake_dom.rs:193-201 | crates/foundation/src/js_ext_a.rs:183-189 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/common/src/jsp.rs:175 — crates/common/src/jsp.rs:175-181 | crates/core/src/checks/css_scan.rs:1952-1962 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/context/src/hook_wiring.rs:7 — crates/context/src/hook_wiring.rs:7-13 | crates/core/src/browser/visual.rs:4219-4225 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) crates/live/src/manual_edits/commit.rs:61 — crates/live/src/manual_edits/commit.rs:61-67 | crates/live/src/manual_edits/evidence.rs:190-196 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×6
  • Edited copy of a member (3 corresponding lines) crates/account/src/oauth.rs:355 — crates/account/src/oauth.rs:355-357 | crates/cli/src/capture_service.rs:94-96 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/cli/src/reviewed_entry.rs:27 — crates/cli/src/reviewed_entry.rs:27-29 | crates/context/src/component_review/store.rs:9-11 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/core/src/checks/text_context.rs:1514 — crates/core/src/checks/text_context.rs:1514-1516 | crates/core/src/checks/text_rules.rs:451-454 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/context/src/detect_csp.rs:47 — crates/context/src/detect_csp.rs:47-49 | crates/context/src/staleness.rs:71-73 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/foundation/src/vectors/mod.rs:244 — crates/foundation/src/vectors/mod.rs:244-246 | crates/html/src/cascade/vectors.rs:111-113 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) crates/context/src/design_parser.rs:25 — crates/context/src/design_parser.rs:25-27 | crates/live/src/design_md.rs:39-43 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×6
  • Duplicated block (7 lines × 3) crates/live/src/copy_edit_agent.rs:1094 — crates/live/src/copy_edit_agent.rs:1094-1100 | crates/live/src/copy_edit_agent.rs:1134-1140 | crates/live/src/copy_edit_agent.rs:1142-1148 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 3) crates/live/src/session.rs:603 — crates/live/src/session.rs:603-609 | crates/live/src/session.rs:844-850 | crates/live/src/session.rs:887-893 — 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 lines × 3) crates/account/src/store.rs:202 — crates/account/src/store.rs:202-208 | crates/account/src/store.rs:240-246 | crates/account/src/store.rs:268-274 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/store.rs:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/live/src/svelte_ast.rs:557 — crates/live/src/svelte_ast.rs:557-563 | crates/live/src/svelte_ast.rs:1213-1219 | crates/live/src/svelte_ast.rs:1454-1460 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/live/src/svelte_ast.rs:1453` calls `visit_expr`, `get` and `crates/live/src/svelte_ast.rs:556` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) crates/comp-verbs/src/util.rs:127 — crates/comp-verbs/src/util.rs:127-133 | crates/context/src/util.rs:198-204 | crates/detect/src/ignores.rs:348-354 — before extracting anything, compare `crates/context/src/util.rs` and `crates/detect/src/ignores.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp-verbs/src/util.rs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) crates/core/src/browser/text_layers.rs:939 — crates/core/src/browser/text_layers.rs:939-945 | crates/core/src/browser/text_layers.rs:1012-1018 | crates/core/src/browser/text_layers.rs:1240-1246 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×6
  • Duplicated block (6 lines × 3) crates/context/src/context.rs:926 — crates/context/src/context.rs:926-931 | crates/detect/src/design_system.rs:1353-1358 | crates/detect/src/design_system.rs:1374-1379 — before extracting anything, compare `crates/context/src/context.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/context.rs:926` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/core/src/browser/element_checks.rs:1961 — crates/core/src/browser/element_checks.rs:1961-1966 | crates/core/src/browser/element_checks.rs:1972-1977 | crates/core/src/browser/element_checks.rs:1983-1988 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/element_checks.rs:1961` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) crates/live/src/live_accept.rs:185 — crates/live/src/live_accept.rs:185-190 | crates/live/src/live_insert.rs:90-95 | crates/live/src/live_wrap.rs:62-67 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 6 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/live_insert.rs:98` calls `parse_count`, `arg_val`, `as_deref` and `crates/live/src/live_accept.rs:193` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) crates/live/src/live_generate.rs:571 — crates/live/src/live_generate.rs:571-576 | crates/live/src/live_generate.rs:654-659 | crates/live/src/live_generate.rs:672-677 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_generate.rs:571` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/live_generate.rs:678` calls `sleep`, `from_millis` and `crates/live/src/live_generate.rs:660` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) crates/core/src/checks/css_scan.rs:2608 — crates/core/src/checks/css_scan.rs:2608-2620 | crates/detect/src/detect_text.rs:852-857 | crates/foundation/src/js.rs:12-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) crates/foundation/src/vectors/checks_a.rs:25 — crates/foundation/src/vectors/checks_a.rs:25-30 | crates/foundation/src/vectors/checks_b.rs:23-28 | crates/html/src/cascade/vectors.rs:47-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D2 · Cognitive Complexity · Parser · ×5
  • Parser::an_plus_b (cognitive 38) crates/html/src/cascade/csstree/parser.rs:968 — Parser::an_plus_b has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 4, match/switch 2 (4 pts), loops 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.
  • Parser::consume_b (cognitive 29) crates/html/src/cascade/csstree/parser.rs:920 — Parser::consume_b has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Parser::declaration (cognitive 27) crates/html/src/cascade/csstree/parser.rs:1314 — Parser::declaration has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (4 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.
  • Parser::on_white_space (cognitive 18) crates/html/src/cascade/csstree/parser.rs:260 — Parser::on_white_space has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 1, 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.
  • Parser::fn_var (cognitive 18) crates/html/src/cascade/csstree/parser.rs:442 — Parser::fn_var has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (4 pts) (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.
D2 · Cognitive Complexity · component-review.Xn · ×5
  • component-review.Xn::Dt (cognitive 37) crates/context/assets/component-review.js:1537 — component-review.Xn::Dt has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 16 (33 pts), boolean chains 2, if/else 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (component-review.Xn::it, component-review.Xn::At, component-review.Xn::Ht, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • component-review.Xn::Ht (cognitive 35) crates/context/assets/component-review.js:1562 — component-review.Xn::Ht has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 12 (28 pts), if/else 4 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 4 other methods here (component-review.Xn::Dt, component-review.Xn::it, component-review.Xn::At, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • component-review.Xn::ct (cognitive 35) crates/context/assets/component-review.js:1568 — component-review.Xn::ct has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 19 (33 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. This shape REPEATS in the file: 4 other methods here (component-review.Xn::Dt, component-review.Xn::it, component-review.Xn::At, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • component-review.Xn::At (cognitive 23) crates/context/assets/component-review.js:1548 — component-review.Xn::At has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 13 (20 pts), boolean chains 2, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (component-review.Xn::Dt, component-review.Xn::it, component-review.Xn::Ht, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • component-review.Xn::it (cognitive 21) crates/context/assets/component-review.js:1537 — component-review.Xn::it has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 3 (4 pts), boolean chains 1 (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. This shape REPEATS in the file: 4 other methods here (component-review.Xn::Dt, component-review.Xn::At, component-review.Xn::Ht, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×5
  • Edited copy of a member (20 corresponding lines) crates/html/src/cascade/shorthand.rs:143 — crates/html/src/cascade/shorthand.rs:143-163 | crates/html/src/cascade/shorthand.rs:175-194 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/common/src/http.rs:49 — crates/common/src/http.rs:49-80 | crates/core/src/browser/driver.rs:501-520 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/detect/src/detect_text.rs:1211 — crates/detect/src/detect_text.rs:1211-1230 | crates/detect/src/detect_text.rs:1233-1252 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/account/src/pro/mod.rs:407 — crates/account/src/pro/mod.rs:407-426 | crates/account/src/setup.rs:38-58 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) crates/live/src/manual_edits/apply.rs:115 — crates/live/src/manual_edits/apply.rs:115-134 | crates/live/src/manual_edits/commit.rs:439-460 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/account/src/pro/verify.rs:57 — crates/account/src/pro/verify.rs:57-61 | crates/common/src/seed.rs:22-24 | crates/context/src/telemetry.rs:151-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/cli/src/component_capture.rs:15 — crates/cli/src/component_capture.rs:15-17 | crates/comp-verbs/src/util.rs:118-124 | crates/context/src/util.rs:184-189 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/context/src/staleness.rs:85 — crates/context/src/staleness.rs:85-87 | crates/context/src/staleness_deep.rs:117-119 | crates/skills/src/commands.rs:85-87 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/context/src/telemetry.rs:128 — crates/context/src/telemetry.rs:128-130 | crates/hook/src/build_completion.rs:7-10 | crates/hook/src/hook_claim.rs:199-201 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) crates/foundation/src/color.rs:693 — crates/foundation/src/color.rs:693-698 | crates/foundation/src/inline_ignores.rs:125-127 | crates/live/src/design_md.rs:648-650 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) crates/context/src/context_cli.rs:572 — crates/context/src/context_cli.rs:572-587 | crates/skills/src/providers.rs:607-622 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/context_cli.rs:572` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/context/src/design_parser.rs:101 — crates/context/src/design_parser.rs:101-116 | crates/live/src/design_md.rs:178-193 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16 lines × 2) crates/core/src/browser/page_checks.rs:3812 — crates/core/src/browser/page_checks.rs:3812-3827 | crates/core/src/browser/page_checks.rs:5526-5541 — 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 (16 lines × 2) crates/live/src/copy_edit_agent.rs:877 — crates/live/src/copy_edit_agent.rs:877-892 | crates/live/src/manual_edits/evidence.rs:474-489 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/copy_edit_agent.rs:877` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) crates/browser/src/html_snapshot.rs:187 — crates/browser/src/html_snapshot.rs:187-202 | crates/cli/src/capture_snapshot.rs:296-311 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/html_snapshot.rs:187` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×5
  • Duplicated block (15 lines × 2) crates/core/src/browser/element_checks.rs:1867 — crates/core/src/browser/element_checks.rs:1867-1881 | crates/core/src/checks/html_patterns.rs:1000-1014 — 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 (15 lines × 2) crates/detect/src/detect_text.rs:230 — crates/detect/src/detect_text.rs:230-244 | crates/detect/src/detect_text.rs:1688-1702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/detect_text.rs:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/live/src/manual_edits/evidence.rs:795 — crates/live/src/manual_edits/evidence.rs:795-809 | crates/live/src/manual_edits/evidence.rs:825-839 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/evidence.rs:795` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) crates/core/src/browser/element_checks.rs:2283 — crates/core/src/browser/element_checks.rs:2283-2297 | crates/html/src/adapters.rs:823-837 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) crates/account/src/critiques.rs:156 — crates/account/src/critiques.rs:156-170 | crates/account/src/design.rs:132-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/critiques.rs:156` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience cli/bin/cli.js:67 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/context/src/http.rs:46 — `ureq::AgentBuilder::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience crates/live/src/live_server.rs:459 — `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience ui/component-review/entry.ts:40 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience ui/component-review/entry.ts:52 — `fetch(` 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.
D1 · Cyclomatic Complexity · component-review.Xn · ×4
  • component-review.Xn::ot (cyclomatic 56) crates/context/assets/component-review.js:1588 — component-review.Xn::ot has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (component-review.Xn::Dt, component-review.Xn::Ht, component-review.Xn::ct) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • component-review.Xn::ct (cyclomatic 24) crates/context/assets/component-review.js:1568 — component-review.Xn::ct 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. This shape REPEATS in the file: 3 other methods here (component-review.Xn::Dt, component-review.Xn::Ht, component-review.Xn::ot) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • component-review.Xn::Dt (cyclomatic 21) crates/context/assets/component-review.js:1537 — component-review.Xn::Dt has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (component-review.Xn::Ht, component-review.Xn::ct, component-review.Xn::ot) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • component-review.Xn::Ht (cyclomatic 18) crates/context/assets/component-review.js:1562 — component-review.Xn::Ht has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (component-review.Xn::Dt, component-review.Xn::ct, component-review.Xn::ot) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) · ×4
  • (anonymous)::scan (cyclomatic 33) crates/cli/src/asset_capture.js:24 — (anonymous)::scan has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::suppressMany (cyclomatic 20) crates/cli/src/asset_capture.js:56 — (anonymous)::suppressMany 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.
  • (anonymous)::layers (cyclomatic 18) crates/cli/src/asset_capture.js:7 — (anonymous)::layers 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.
  • (anonymous)::picture (cyclomatic 18) crates/cli/src/raster_coverage.js:164 — (anonymous)::picture has cyclomatic complexity 18 (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.
D3 · God Classes · TooManyFunctions · ×4
  • TooManyFunctions: impeccable_wasm::exports_pure crates/wasm/src/exports_pure.rs:26 — TooManyFunctions — 87 free functions. The bar is 30 free functions; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: impeccable_skills::hook_manifest REDACTED:35 — TooManyFunctions — 52 free functions. The bar is 30 free functions; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: impeccable_wasm::exports_visual crates/wasm/src/exports_visual.rs:12 — TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: impeccable_browser::snapshot_engine crates/browser/src/snapshot_engine.rs:45 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 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.
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: Parser crates/html/src/cascade/csstree/parser.rs:31 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× 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: ServerState crates/live/src/server_state.rs:110 — 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: Page crates/browser/src/cdp.rs:746 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: StaticDocument crates/html/src/dom.rs:54 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×4
  • Edited copy of a member (23 corresponding lines) crates/core/src/browser/element_checks.rs:4440 — crates/core/src/browser/element_checks.rs:4440-4462 | crates/html/src/adapters.rs:511-534 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/browser/src/html_snapshot.rs:155 — crates/browser/src/html_snapshot.rs:155-177 | crates/cli/src/capture_snapshot.rs:331-353 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/hook/src/admin.rs:782 — crates/hook/src/admin.rs:782-811 | REDACTED:515-537 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) crates/context/src/context.rs:415 — crates/context/src/context.rs:415-437 | crates/detect/src/design_system.rs:1158-1180 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) crates/core/src/browser/page_checks.rs:814 — crates/core/src/browser/page_checks.rs:814-839 | crates/core/src/browser/page_checks.rs:844-864 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/core/src/browser/text_geometry.rs:267 — crates/core/src/browser/text_geometry.rs:267-287 | crates/core/src/browser/text_geometry.rs:318-343 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/core/src/browser/element_checks.rs:336 — crates/core/src/browser/element_checks.rs:336-356 | crates/core/src/browser/page_checks.rs:3988-4009 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) crates/core/src/browser/element_checks.rs:79 — crates/core/src/browser/element_checks.rs:79-103 | crates/html/src/adapters.rs:106-126 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) crates/context/src/serve_question.rs:241 — crates/context/src/serve_question.rs:241-256 | crates/context/src/serve_question.rs:262-276 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/context/src/context.rs:892 — crates/context/src/context.rs:892-906 | crates/context/src/context.rs:908-923 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/context/src/serve_question.rs:1975 — crates/context/src/serve_question.rs:1975-1989 | crates/foundation/src/fonts.rs:65-80 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) crates/hook/src/util.rs:99 — crates/hook/src/util.rs:99-113 | crates/skills/src/util.rs:268-282 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×4
  • Edited copy of a member (19 corresponding lines) crates/live/src/live_poll.rs:76 — crates/live/src/live_poll.rs:76-94 | crates/wasm/src/exports_pure.rs:246-265 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/live/src/source_search.rs:43 — crates/live/src/source_search.rs:43-61 | crates/live/src/util.rs:26-46 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/core/src/browser/quality.rs:92 — crates/core/src/browser/quality.rs:92-110 | crates/html/src/quality.rs:348-366 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) crates/core/src/browser/visual.rs:412 — crates/core/src/browser/visual.rs:412-430 | crates/html/src/adapters.rs:764-782 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×4
  • Edited copy of a member (24 corresponding lines) crates/live/src/inject/sveltekit.rs:111 — crates/live/src/inject/sveltekit.rs:111-138 | crates/live/src/inject/tanstack.rs:104-127 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/core/src/browser/driver.rs:325 — crates/core/src/browser/driver.rs:325-349 | crates/detect/src/design_system.rs:1598-1621 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/core/src/browser/background.rs:464 — crates/core/src/browser/background.rs:464-490 | crates/html/src/background.rs:489-512 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) crates/core/src/browser/element_checks.rs:4954 — crates/core/src/browser/element_checks.rs:4954-4977 | crates/html/src/adapters.rs:1742-1768 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×4
  • Edited copy of a member (12 corresponding lines) crates/live/src/server_state.rs:345 — crates/live/src/server_state.rs:345-356 | crates/live/src/server_state.rs:363-374 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/context/src/artifact_schema.rs:55 — crates/context/src/artifact_schema.rs:55-66 | crates/context/src/catalog.rs:233-244 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/detect/src/regex_matchers.rs:866 — crates/detect/src/regex_matchers.rs:866-877 | crates/detect/src/regex_matchers.rs:936-947 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) crates/hook/src/hook_lib.rs:948 — crates/hook/src/hook_lib.rs:948-959 | crates/detect/src/cli.rs:182-193 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) crates/agents/src/resources.rs:486 — crates/agents/src/resources.rs:486-494 | crates/agents/src/resources.rs:551-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/agents/src/resources.rs:486` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) crates/context/src/design_parser.rs:69 — crates/context/src/design_parser.rs:69-76 | crates/live/src/design_md.rs:144-152 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) crates/live/src/manual_edits/commit.rs:1614 — crates/live/src/manual_edits/commit.rs:1614-1621 | crates/live/src/manual_edits/commit.rs:1760-1768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1760` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/manual_edits/commit.rs:1622` calls `insert`, `into` and `crates/live/src/manual_edits/commit.rs:1768` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 2) crates/live/src/svelte_component.rs:1570 — crates/live/src/svelte_component.rs:1570-1578 | crates/live/src/svelte_component.rs:1689-1696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/svelte_component.rs:1570` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R8 · Dependency Hygiene · Unused dependency 'react' · ×4
  • Unused dependency 'react' — Declared in tests/oracle/workspaces/ctx-monorepo-tooling/apps/web/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Unused dependency 'react' — Declared in tests/oracle/workspaces/live-next/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Unused dependency 'react' — Declared in tests/oracle/workspaces/live-tanstack/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Unused dependency 'react' — Declared in tests/oracle/workspaces/live-vite/package.json but never imported anywhere in that package or its workspace members — while tests/fixtures/antipatterns/framework-vite/main.tsx DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
D1 · Cyclomatic Complexity · ServerState · ×3
  • ServerState::page (cyclomatic 85) crates/context/src/serve_question.rs:2271 — ServerState::page has cyclomatic complexity 85 (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.
  • ServerState::record_generation_checkpoint (cyclomatic 19) crates/live/src/server_state.rs:1189 — ServerState::record_generation_checkpoint 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.
  • ServerState::load_round (cyclomatic 16) crates/context/src/serve_question.rs:2180 — ServerState::load_round has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Page · ×3
  • Page::on_event (cyclomatic 56) crates/browser/src/cdp.rs:988 — Page::on_event has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Page::goto (cyclomatic 23) crates/browser/src/cdp.rs:1336 — Page::goto 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.
  • Page::native_pseudo_boxes (cyclomatic 16) crates/browser/src/cdp.rs:1541 — Page::native_pseudo_boxes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser · ×3
  • Parser::an_plus_b (cyclomatic 24) crates/html/src/cascade/csstree/parser.rs:968 — Parser::an_plus_b 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.
  • Parser::value_get_node (cyclomatic 19) crates/html/src/cascade/csstree/parser.rs:290 — Parser::value_get_node 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.
  • Parser::consume_b (cyclomatic 16) crates/html/src/cascade/csstree/parser.rs:920 — Parser::consume_b has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 18) · ×3
  • (anonymous) (cyclomatic 18) extension/background/service-worker.js:352 — (anonymous) has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 385, 358, 397, …). 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.
  • (anonymous) (cyclomatic 18) extension/content/content-script.js:306 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous) (cyclomatic 18) crates/live/src/svelte_bridge_helper.mjs:34 — (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · Fixed-sleep synchronisation · ×3
  • Fixed-sleep synchronisation: ends a stubborn child without awaiting anything tests/process-group.test.mjs:95 — This test starts work it did not wait for (`running`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 250))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: a second signal kills the group instead of abandoning the escalation tests/process-group.test.mjs:123 — This test starts work it did not wait for (`running`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 250))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: onExit still reaches a group a shutdown is in the middle of stopping tests/process-group.test.mjs:165 — This test starts work it did not wait for (`running`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 250))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D2 · Cognitive Complexity · ServerState · ×3
  • ServerState::page (cognitive 119) crates/context/src/serve_question.rs:2271 — ServerState::page has cognitive complexity 119 (threshold 15). Drivers by points: if/else 78 (83 pts), boolean chains 25, match/switch 7 (10 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • ServerState::record_generation_checkpoint (cognitive 24) crates/live/src/server_state.rs:1189 — ServerState::record_generation_checkpoint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 4 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • ServerState::load_round (cognitive 18) crates/context/src/serve_question.rs:2180 — ServerState::load_round has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 2, loops 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Page · ×3
  • Page::on_event (cognitive 86) crates/browser/src/cdp.rs:988 — Page::on_event has cognitive complexity 86 (threshold 15). Drivers by points: if/else 33 (75 pts), boolean chains 6, match/switch 3 (5 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Page::goto (cognitive 41) crates/browser/src/cdp.rs:1336 — Page::goto has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Page::native_pseudo_boxes (cognitive 33) crates/browser/src/cdp.rs:1541 — Page::native_pseudo_boxes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) · ×3
  • (anonymous)::scan (cognitive 56) crates/cli/src/asset_capture.js:24 — (anonymous)::scan has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 7 (24 pts), boolean chains 14, if/else 4 (10 pts), loops 4 (8 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::suppressMany (cognitive 31) crates/cli/src/asset_capture.js:56 — (anonymous)::suppressMany has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 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.
  • (anonymous)::layers (cognitive 25) crates/cli/src/asset_capture.js:7 — (anonymous)::layers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×3
  • Edited copy of a member (32 corresponding lines) crates/context/src/design_parser.rs:159 — crates/context/src/design_parser.rs:159-190 | crates/live/src/design_md.rs:264-299 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/hook/src/admin.rs:831 — crates/hook/src/admin.rs:831-863 | REDACTED:549-580 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) crates/core/src/browser/quality.rs:1643 — crates/core/src/browser/quality.rs:1643-1674 | crates/html/src/quality.rs:122-154 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×3
  • Edited copy of a member (34 corresponding lines) crates/context/src/design_parser.rs:192 — crates/context/src/design_parser.rs:192-225 | crates/live/src/design_md.rs:319-364 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/hook/src/admin.rs:692 — crates/hook/src/admin.rs:692-730 | REDACTED:590-623 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) crates/browser/src/cdp.rs:365 — crates/browser/src/cdp.rs:365-398 | crates/browser/src/cdp.rs:408-449 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) crates/detect/src/config.rs:113 — crates/detect/src/config.rs:113-139 | crates/hook/src/hook_lib.rs:479-511 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/core/src/browser/element_checks.rs:4563 — crates/core/src/browser/element_checks.rs:4563-4589 | crates/html/src/adapters.rs:538-565 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) crates/live/src/accept_css.rs:83 — crates/live/src/accept_css.rs:83-109 | crates/live/src/accept_css.rs:112-142 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) crates/context/src/concept_seed.rs:404 — crates/context/src/concept_seed.rs:404-407 | crates/context/src/palette.rs:8-12 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/context/src/context.rs:340 — crates/context/src/context.rs:340-343 | crates/live/src/util.rs:274-277 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) crates/live/src/instructions.rs:61 — crates/live/src/instructions.rs:61-64 | crates/skills/src/util.rs:295-298 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) crates/account/src/design.rs:113 — crates/account/src/design.rs:113-136 | crates/account/src/design.rs:148-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/account/src/design.rs:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) crates/comp/src/jsnum.rs:45 — crates/comp/src/jsnum.rs:45-68 | crates/foundation/src/js.rs:342-365 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp/src/jsnum.rs:45` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) crates/detect/src/ignores.rs:123 — crates/detect/src/ignores.rs:123-146 | crates/hook/src/admin.rs:1023-1046 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/ignores.rs:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) crates/agents/src/fs_writer.rs:41 — crates/agents/src/fs_writer.rs:41-51 | crates/agents/src/lib.rs:397-408 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/agents/src/fs_writer.rs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) crates/context/src/design_parser.rs:31 — crates/context/src/design_parser.rs:31-41 | crates/live/src/design_md.rs:99-110 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/design_md.rs:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) crates/context/src/design_parser.rs:215 — crates/context/src/design_parser.rs:215-225 | crates/live/src/design_md.rs:353-364 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:215` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) crates/context/src/design_parser.rs:98 — crates/context/src/design_parser.rs:98-108 | crates/detect/src/design_system.rs:490-500 | crates/live/src/design_md.rs:175-185 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) crates/live/src/live_poll.rs:258 — crates/live/src/live_poll.rs:258-268 | crates/live/src/live_server.rs:407-417 | crates/live/src/svelte_sessions.rs:65-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) crates/comp-verbs/src/util.rs:141 — crates/comp-verbs/src/util.rs:141-151 | crates/context/src/util.rs:216-226 | crates/detect/src/ignores.rs:366-376 — before extracting anything, compare `crates/context/src/util.rs` and `crates/detect/src/ignores.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) crates/core/src/browser/quality.rs:1188 — crates/core/src/browser/quality.rs:1188-1197 | crates/core/src/browser/quality.rs:1234-1244 — 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–11 lines × 2) crates/core/src/checks/css_scan.rs:445 — crates/core/src/checks/css_scan.rs:445-455 | crates/core/src/checks/css_scan.rs:941-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/css_scan.rs:445` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) crates/live/src/design_md.rs:1015 — crates/live/src/design_md.rs:1015-1024 | crates/live/src/design_md.rs:1351-1361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/design_md.rs:1351` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/design_md.rs:1025` calls `insert`, `into`, `Array` and `crates/live/src/design_md.rs:1361` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) crates/context/src/context.rs:1117 — crates/context/src/context.rs:1117-1123 | crates/context/src/surface_briefs.rs:191-198 — 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–8 lines × 2) crates/core/src/browser/page_checks.rs:1783 — crates/core/src/browser/page_checks.rs:1783-1789 | crates/core/src/browser/page_checks.rs:2212-2219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/page_checks.rs:1783` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) crates/live/src/live_boot.rs:149 — crates/live/src/live_boot.rs:149-155 | crates/live/src/live_boot.rs:214-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_boot.rs:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: impeccable-comp — impeccable-comp: 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: impeccable-foundation — impeccable-foundation: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: impeccable-core — impeccable-core: abstractness 0.04, instability 0.10, distance 0.86 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×3
  • Duplicated block (15 lines × 2 locations) browser-bundle/10-probe.js:63 — browser-bundle/10-probe.js:63 · browser-bundle/15-snapshot.js:103 — 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 (15 lines × 2 locations) skill/scripts/live-browser.js:6405 — skill/scripts/live-browser.js:6405 · skill/scripts/live-browser.js:6441 — 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 (15 lines × 2 locations) skill/scripts/live-browser.js:9687 — skill/scripts/live-browser.js:9687 · skill/scripts/live-browser.js:10120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×3
  • Duplicated block (12 lines × 2 locations) extension/devtools/panel.js:69 — extension/devtools/panel.js:69 · extension/devtools/panel.js:84 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (12 lines × 2 locations) scripts/build.js:318 — scripts/build.js:318 · scripts/build.js:408 — 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) skill/scripts/live-browser.js:13385 — skill/scripts/live-browser.js:13385 · skill/scripts/live-browser.js:13455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×3
  • Duplicated block (10 lines × 2 locations) extension/background/service-worker.js:366 — extension/background/service-worker.js:366 · extension/background/service-worker.js:399 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) skill/scripts/live-browser.js:1220 — skill/scripts/live-browser.js:1220 · skill/scripts/live-browser.js:1260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) skill/scripts/live-browser.js:5657 — skill/scripts/live-browser.js:5657 · skill/scripts/live-browser.js:5694 — 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 (9 lines × 2 locations) · ×3
  • Duplicated block (9 lines × 2 locations) REDACTED:24 — REDACTED:24 · REDACTED:22 — 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 (9 lines × 2 locations) skill/scripts/live-browser.js:1824 — skill/scripts/live-browser.js:1824 · skill/scripts/live-browser.js:1848 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) skill/scripts/live-browser.js:13419 — skill/scripts/live-browser.js:13419 · skill/scripts/live-browser.js:13446 — 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.
R4 · Test Coverage · This test file cannot be loaded · ×3
  • This test file cannot be loaded scripts/smoke-provider-hooks.mjs:15 — scripts/smoke-provider-hooks.mjs:15 imports './lib/cli-args.mjs', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded tests/framework-fixtures/tanstack-start/files/src/router.tsx:2 — tests/framework-fixtures/tanstack-start/files/src/router.tsx:2 imports './routeTree.gen', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded tests/workflow-security.test.js:4 — tests/workflow-security.test.js:4 imports '../.github/workflows/', 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.
S1 · Web-Security Posture · Weak hash algorithm · ×3
  • Weak hash algorithm crates/comp-verbs/src/build_phase.rs:2455 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm crates/comp-verbs/src/font_match.rs:278 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm crates/live/src/svelte_sessions.rs:14 — 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.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark extension/devtools/sidebar.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extension/popup/popup.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard extension/devtools/panel.css:570 — `.setting-switch-track::before` moves (`transition: transform 220ms cubic-bezier(0.3, 0.7, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard extension/devtools/panel.css:583 — `.setting-switch-track::after` moves (`transition: transform 220ms cubic-bezier(0.3, 0.7, 0.2, 1), background-color var(--ks-quick) var(--ks-ease), box-shadow var(--ks-quick) var(--ks-ease)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · Xn · ×2
  • Xn::At (cyclomatic 22) crates/context/assets/component-review.js:1548 — Xn::At 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.
  • Xn::De (cyclomatic 18) crates/context/assets/component-review.js:1521 — Xn::De has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _n · ×2
  • _n::H::ht (cyclomatic 22) crates/context/assets/component-review.js:1633 — _n::H::ht 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.
  • _n::Ge (cyclomatic 17) crates/context/assets/component-review.js:1588 — _n::Ge 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.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment crates/core/src/checks/text_rules.rs:76 — // TODO(dedupe): use rules::is_card_like_from_props — 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/core/src/checks/text_rules.rs:90 — // TODO(dedupe): use rules::is_accent_color — 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.
D2 · Cognitive Complexity · _n · ×2
  • _n::H (cognitive 246) crates/context/assets/component-review.js:1588 — _n::H has cognitive complexity 246 (threshold 15). Drivers by points: ternaries 173, boolean chains 46, if/else 15 (16 pts), other 11 (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.
  • _n::Ge (cognitive 16) crates/context/assets/component-review.js:1588 — _n::Ge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5, ternaries 3 (4 pts), boolean chains 3, other 3, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Prompt · ×2
  • Prompt::checkbox (cognitive 44) crates/skills/src/prompt.rs:198 — Prompt::checkbox has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (33 pts), match/switch 3 (7 pts), loops 2 (3 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.
  • Prompt::radio (cognitive 17) crates/skills/src/prompt.rs:149 — Prompt::radio has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (6 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 27) · ×2
  • (anonymous) (cognitive 27) extension/content/content-script.js:306 — (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 3 (7 pts), boolean chains 3 (nesting depth added 10). Of this number, 22 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 27) crates/live/src/svelte_bridge_helper.mjs:34 — (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 2 (7 pts), boolean chains 6, error handling 3 (6 pts), if/else 5 (6 pts), other 2 (nesting depth added 9). Of this number, 26 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Sys · ×2
  • Sys::migrate_unprefix_impeccable (cognitive 20) crates/skills/src/providers.rs:250 — Sys::migrate_unprefix_impeccable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Sys::resolve_update_target (cognitive 18) crates/skills/src/providers.rs:417 — Sys::resolve_update_target has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, 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.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: ServerState crates/live/src/server_state.rs:110 — TooManyFields — 36 stored fields beside 48 methods. The bar is 30 stored fields; this is 6 over it, 1.20× 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.
  • TooManyFields: FakeEl crates/foundation/src/browser/fake_dom.rs:18 — TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× 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.
D32 · Data Compliance (PII/GDPR) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×2
  • Edited copy of a member (41 corresponding lines) crates/core/src/browser/element_checks.rs:2265 — crates/core/src/browser/element_checks.rs:2265-2305 | crates/html/src/adapters.rs:805-845 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) crates/skills/src/bundle.rs:731 — crates/skills/src/bundle.rs:731-771 | crates/skills/src/bundle.rs:797-842 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) crates/foundation/src/css/measures.rs:988 — crates/foundation/src/css/measures.rs:988-1016 | crates/html/src/cascade/shorthand.rs:17-45 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) crates/detect/src/regex_matchers.rs:153 — crates/detect/src/regex_matchers.rs:153-182 | crates/detect/src/regex_matchers.rs:604-632 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 17+ corresponding lines) crates/context/src/design_parser.rs:48 — crates/context/src/design_parser.rs:48-64 | crates/context/src/design_parser.rs:78-95 | crates/live/src/design_md.rs:120-136 | crates/live/src/design_md.rs:155-171 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 17+ corresponding lines) crates/context/src/context.rs:317 — crates/context/src/context.rs:317-333 | crates/context/src/context.rs:439-458 | crates/live/src/roots.rs:104-120 | crates/live/src/roots.rs:128-148 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/live/src/inject/astro.rs:14 — crates/live/src/inject/astro.rs:14-28 | crates/live/src/inject/html.rs:13-24 | crates/live/src/inject/next.rs:32-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/wasm/src/js_dom.rs:275 — crates/wasm/src/js_dom.rs:275-291 | crates/wasm/src/js_dom.rs:292-303 | crates/wasm/src/js_dom.rs:346-357 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/context/src/design_parser.rs:227 — crates/context/src/design_parser.rs:227-237 | crates/detect/src/design_system.rs:400-414 | crates/live/src/design_md.rs:304-316 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) crates/hook/src/admin.rs:101 — crates/hook/src/admin.rs:101-111 | crates/hook/src/admin.rs:114-124 | crates/html/src/cascade/vectors.rs:196-206 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/browser/src/consent.rs:1023 — crates/browser/src/consent.rs:1023-1030 | crates/browser/src/overlays.rs:678-687 | crates/browser/src/validity.rs:294-301 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) crates/context/src/hook_markers.rs:195 — crates/context/src/hook_markers.rs:195-202 | crates/hook/src/admin.rs:765-772 | REDACTED:314-321 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) crates/context/src/serve_question.rs:120 — crates/context/src/serve_question.rs:120-124 | crates/context/src/serve_question.rs:863-867 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) crates/context/src/artifact_schema.rs:47 — crates/context/src/artifact_schema.rs:47-52 | crates/skills/src/providers.rs:680-684 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) crates/context/src/generate_image.rs:36 — crates/context/src/generate_image.rs:36-52 | crates/detect/src/config.rs:577-593 | crates/detect/src/design_system.rs:658-674 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/generate_image.rs:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) crates/live/src/live_server.rs:1156 — crates/live/src/live_server.rs:1156-1172 | crates/live/src/live_server.rs:1560-1576 | crates/live/src/live_server.rs:2010-2026 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) crates/context/src/design_parser.rs:143 — crates/context/src/design_parser.rs:143-157 | crates/live/src/design_md.rs:222-237 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) crates/core/src/checks/decorative_text.rs:472 — crates/core/src/checks/decorative_text.rs:472-487 | crates/core/src/checks/rules.rs:890-904 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/checks/decorative_text.rs:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) crates/live/src/manual_edits/commit.rs:1907 — crates/live/src/manual_edits/commit.rs:1907-1918 | crates/live/src/manual_edits/commit.rs:1963-1974 | crates/live/src/manual_edits/commit.rs:2017-2028 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1907` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 3) crates/core/src/checks/vectors_a.rs:70 — crates/core/src/checks/vectors_a.rs:70-81 | crates/core/src/checks/vectors_a.rs:83-97 | crates/core/src/checks/vectors_b.rs:51-63 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `hits` to `&[RuleHit]` in one and `&[IndexedHit]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×2
  • Duplicated block (3–5 lines × 3) crates/comp-verbs/src/build_phase.rs:1283 — crates/comp-verbs/src/build_phase.rs:1283-1288 | crates/comp-verbs/src/build_phase.rs:2703-2705 | crates/comp-verbs/src/build_phase.rs:2720-2724 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/comp-verbs/src/build_phase.rs:1283` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (3–5 lines × 3) crates/live/src/manual_edits/commit.rs:772 — crates/live/src/manual_edits/commit.rs:772-776 | crates/live/src/manual_edits/commit.rs:1034-1036 | crates/live/src/manual_edits/commit.rs:1085-1089 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:772` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) crates/context/src/context.rs:35 — crates/context/src/context.rs:35-43 | crates/detect/src/design_system.rs:156-164 | crates/live/src/roots.rs:64-72 — before extracting anything, compare `crates/context/src/context.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/core/src/browser/element_checks.rs:290 — crates/core/src/browser/element_checks.rs:290-298 | crates/core/src/browser/text_collectors.rs:630-638 | crates/html/src/adapters.rs:63-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `v` to `Vec<measures::Finding>` in one and `Vec<crate::checks::measures::Finding>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×2
  • Duplicated block (14 lines × 2 locations) browser-bundle/10-probe.js:128 — browser-bundle/10-probe.js:128 · browser-bundle/10-probe.js:157 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) skill/scripts/live-browser.js:8515 — skill/scripts/live-browser.js:8515 · skill/scripts/live-browser.js:8620 — 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.
D1 · Cyclomatic Complexity · component-review._n · ×1
  • component-review._n::H (cyclomatic 265) crates/context/assets/component-review.js:1588 — component-review._n::H has cyclomatic complexity 265 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · review.mountComponentReview.render (cyclomatic 248) · ×1
  • review.mountComponentReview.render (cyclomatic 248) ui/component-review/review.ts:142 — review.mountComponentReview.render has cyclomatic complexity 248 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (review.mountComponentReview.render::resizePreview) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · capture (cyclomatic 94) · ×1
  • capture (cyclomatic 94) browser-bundle/15-snapshot.js:758 — capture has cyclomatic complexity 94 (threshold 15). Of this number, 92 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.connectSSE (cyclomatic 77) · ×1
  • live-browser.connectSSE (cyclomatic 77) skill/scripts/live-browser.js:7806 — live-browser.connectSSE has cyclomatic complexity 77 (threshold 15). Of this number, 22 points are the body's own statements and 55 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · live-browser.handleKeyDown (cyclomatic 70) · ×1
  • live-browser.handleKeyDown (cyclomatic 70) skill/scripts/live-browser.js:8379 — live-browser.handleKeyDown has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.resumeSession (cyclomatic 69) · ×1
  • live-browser.resumeSession (cyclomatic 69) skill/scripts/live-browser.js:10324 — live-browser.resumeSession has cyclomatic complexity 69 (threshold 15). Of this number, 64 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 64) · ×1
  • (anonymous) (cyclomatic 64) crates/cli/src/raster_coverage.js:28 — (anonymous) has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.onKey (cyclomatic 56) · ×1
  • plan-review.mountPlanReview.onKey (cyclomatic 56) ui/component-review/plan-review.ts:587 — plan-review.mountPlanReview.onKey has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Generator · ×1
  • Generator::node (cyclomatic 52) crates/html/src/cascade/csstree/generator.rs:218 — Generator::node has cyclomatic complexity 52 (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.
D1 · Cyclomatic Complexity · live-browser.injectSvelteComponentsFromManifest (cyclomatic 50) · ×1
  • live-browser.injectSvelteComponentsFromManifest (cyclomatic 50) skill/scripts/live-browser.js:6052 — live-browser.injectSvelteComponentsFromManifest has cyclomatic complexity 50 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · live-browser.startVariantObserver (cyclomatic 43) · ×1
  • live-browser.startVariantObserver (cyclomatic 43) skill/scripts/live-browser.js:7255 — live-browser.startVariantObserver has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to one function literal inside it that branches (line 7258). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.restoreSessionWithoutWrapper (cyclomatic 40) · ×1
  • live-browser.restoreSessionWithoutWrapper (cyclomatic 40) skill/scripts/live-browser.js:9885 — live-browser.restoreSessionWithoutWrapper has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · live-browser.buildSveltePropValuesV2 (cyclomatic 39) · ×1
  • live-browser.buildSveltePropValuesV2 (cyclomatic 39) skill/scripts/live-browser.js:5744 — live-browser.buildSveltePropValuesV2 has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 39) · ×1
  • (anonymous) (cyclomatic 39) crates/cli/src/component_isolation.js:4 — (anonymous) has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 14 of the 39 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 43, include, a function literal at line 5, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.handleClick (cyclomatic 34) · ×1
  • live-browser.handleClick (cyclomatic 34) skill/scripts/live-browser.js:8212 — live-browser.handleClick has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.wire (cyclomatic 33) · ×1
  • plan-review.mountPlanReview.wire (cyclomatic 33) ui/component-review/plan-review.ts:508 — plan-review.mountPlanReview.wire has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 543, a function literal at line 541, toPanel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.handleManualEditActivity (cyclomatic 32) · ×1
  • live-browser.handleManualEditActivity (cyclomatic 32) skill/scripts/live-browser.js:4531 — live-browser.handleManualEditActivity has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 32) · ×1
  • (anonymous) (cyclomatic 32) extension/background/service-worker.js:247 — (anonymous) has cyclomatic complexity 32 (threshold 15). Of this number, 25 points are the body's own statements and 7 belong to 8 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · live-browser.injectVariantsFromSource (cyclomatic 31) · ×1
  • live-browser.injectVariantsFromSource (cyclomatic 31) skill/scripts/live-browser.js:6645 — live-browser.injectVariantsFromSource has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 6689, 6712, 6663, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · NativeComponentCapturer · ×1
  • NativeComponentCapturer::capture (cyclomatic 29) crates/cli/src/component_capture.rs:212 — NativeComponentCapturer::capture 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.
D1 · Cyclomatic Complexity · KeypressSession · ×1
  • KeypressSession::next_key (cyclomatic 29) crates/skills/src/prompt.rs:469 — KeypressSession::next_key has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · 15-snapshot.__snapLinkedStylesheetText (cyclomatic 29) · ×1
  • 15-snapshot.__snapLinkedStylesheetText (cyclomatic 29) browser-bundle/15-snapshot.js:491 — 15-snapshot.__snapLinkedStylesheetText has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (appendRules, appendSheet). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · service-worker.chrome.runtime.onMessage.addListener() (cyclomatic 29) · ×1
  • service-worker.chrome.runtime.onMessage.addListener() (cyclomatic 29) extension/background/service-worker.js:247 — service-worker.chrome.runtime.onMessage.addListener() has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · live-browser.unlockSteerChat (cyclomatic 29) · ×1
  • live-browser.unlockSteerChat (cyclomatic 29) skill/scripts/live-browser.js:11241 — live-browser.unlockSteerChat 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.
D1 · Cyclomatic Complexity · Prompt · ×1
  • Prompt::checkbox (cyclomatic 28) crates/skills/src/prompt.rs:198 — Prompt::checkbox has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 15-snapshot.__snapPseudoElementHostSelector (cyclomatic 28) · ×1
  • 15-snapshot.__snapPseudoElementHostSelector (cyclomatic 28) browser-bundle/15-snapshot.js:188 — 15-snapshot.__snapPseudoElementHostSelector has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.summary (cyclomatic 28) · ×1
  • plan-review.mountPlanReview.summary (cyclomatic 28) ui/component-review/plan-review.ts:381 — plan-review.mountPlanReview.summary has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 15-snapshot.__snapLastWordRects (cyclomatic 27) · ×1
  • 15-snapshot.__snapLastWordRects (cyclomatic 27) browser-bundle/15-snapshot.js:128 — 15-snapshot.__snapLastWordRects has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.mountSvelteComponentVariant (cyclomatic 27) · ×1
  • live-browser.mountSvelteComponentVariant (cyclomatic 27) skill/scripts/live-browser.js:5904 — live-browser.mountSvelteComponentVariant has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.startScrollLock (cyclomatic 27) · ×1
  • live-browser.startScrollLock (cyclomatic 27) skill/scripts/live-browser.js:7085 — live-browser.startScrollLock has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (correct, a function literal at line 7139, a function literal at line 7189, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · 40-overlay.createImpeccableOverlay (cyclomatic 25) · ×1
  • 40-overlay.createImpeccableOverlay (cyclomatic 25) browser-bundle/40-overlay.js:16 — 40-overlay.createImpeccableOverlay has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 305, 260, 224, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.buildParamsPanel (cyclomatic 25) · ×1
  • live-browser.buildParamsPanel (cyclomatic 25) skill/scripts/live-browser.js:3338 — live-browser.buildParamsPanel has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.initPageChat (cyclomatic 25) · ×1
  • live-browser.initPageChat (cyclomatic 25) skill/scripts/live-browser.js:11592 — live-browser.initPageChat has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 11757, 11749, 11708, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.initGlobalBar (cyclomatic 25) · ×1
  • live-browser.initGlobalBar (cyclomatic 25) skill/scripts/live-browser.js:11923 — live-browser.initGlobalBar has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (makeIconBtn, makeIconBtn::collapse, makePendingDecisionBtn, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CdpAssetRenderer · ×1
  • CdpAssetRenderer::capture_batch (cyclomatic 24) crates/cli/src/asset_capture.rs:51 — CdpAssetRenderer::capture_batch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.startVoice (cyclomatic 24) · ×1
  • live-browser.startVoice (cyclomatic 24) skill/scripts/live-browser.js:11399 — live-browser.startVoice has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 24) · ×1
  • (anonymous) (cyclomatic 24) browser-bundle/60-offscreen.js:217 — (anonymous) has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CssHostIndex · ×1
  • CssHostIndex::new (cyclomatic 23) crates/core/src/checks/css_scan.rs:1339 — CssHostIndex::new has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 60-offscreen.chrome.runtime.onMessage.addListener() (cyclomatic 23) · ×1
  • 60-offscreen.chrome.runtime.onMessage.addListener() (cyclomatic 23) browser-bundle/60-offscreen.js:217 — 60-offscreen.chrome.runtime.onMessage.addListener() has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SafeTagTextSeen · ×1
  • SafeTagTextSeen::keep_first_keyed_claiming (cyclomatic 22) crates/core/src/checks/rules.rs:668 — SafeTagTextSeen::keep_first_keyed_claiming has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser-ignores.pageCandidates (cyclomatic 22) · ×1
  • live-browser-ignores.pageCandidates (cyclomatic 22) REDACTED:122 — live-browser-ignores.pageCandidates has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.onAnnotDown (cyclomatic 22) · ×1
  • live-browser.onAnnotDown (cyclomatic 22) skill/scripts/live-browser.js:626 — live-browser.onAnnotDown has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.resolveBarAnchor (cyclomatic 22) · ×1
  • live-browser.resolveBarAnchor (cyclomatic 22) skill/scripts/live-browser.js:2115 — live-browser.resolveBarAnchor has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.applyEditing (cyclomatic 22) · ×1
  • live-browser.applyEditing (cyclomatic 22) skill/scripts/live-browser.js:4017 — live-browser.applyEditing has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.renderPendingDockControls (cyclomatic 22) · ×1
  • live-browser.renderPendingDockControls (cyclomatic 22) skill/scripts/live-browser.js:4307 — live-browser.renderPendingDockControls has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.onPendingPillClick (cyclomatic 22) · ×1
  • live-browser.onPendingPillClick (cyclomatic 22) skill/scripts/live-browser.js:4385 — live-browser.onPendingPillClick has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.showShaderOverlay (cyclomatic 22) · ×1
  • live-browser.showShaderOverlay (cyclomatic 22) skill/scripts/live-browser.js:9342 — live-browser.showShaderOverlay has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CdpEntryRenderer · ×1
  • CdpEntryRenderer::capture_at (cyclomatic 21) crates/cli/src/entry_capture.rs:84 — CdpEntryRenderer::capture_at has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 15-snapshot.__snapRunningAnimations (cyclomatic 21) · ×1
  • 15-snapshot.__snapRunningAnimations (cyclomatic 21) browser-bundle/15-snapshot.js:616 — 15-snapshot.__snapRunningAnimations has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · map_inspection.html.select (cyclomatic 21) · ×1
  • map_inspection.html.select (cyclomatic 21) crates/comp-verbs/src/map_inspection.html:257 — map_inspection.html.select has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ext-diff.scanWith (cyclomatic 21) · ×1
  • ext-diff.scanWith (cyclomatic 21) crates/wasm/tools/ext-diff.mjs:74 — ext-diff.scanWith has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 83, 79, 89). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.hitSiblingInsertGap (cyclomatic 21) · ×1
  • live-browser.hitSiblingInsertGap (cyclomatic 21) skill/scripts/live-browser.js:1805 — live-browser.hitSiblingInsertGap has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.decisionBar (cyclomatic 21) · ×1
  • plan-review.mountPlanReview.decisionBar (cyclomatic 21) ui/component-review/plan-review.ts:304 — plan-review.mountPlanReview.decisionBar has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 15-snapshot.__snapResolvedAnimationKeyframes (cyclomatic 20) · ×1
  • 15-snapshot.__snapResolvedAnimationKeyframes (cyclomatic 20) browser-bundle/15-snapshot.js:449 — 15-snapshot.__snapResolvedAnimationKeyframes has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · content-script.runScan (cyclomatic 20) · ×1
  • content-script.runScan (cyclomatic 20) extension/content/content-script.js:220 — content-script.runScan has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 236). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser-ignores.resolveDetectIgnores (cyclomatic 20) · ×1
  • live-browser-ignores.resolveDetectIgnores (cyclomatic 20) REDACTED:199 — live-browser-ignores.resolveDetectIgnores has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.extractContext (cyclomatic 20) · ×1
  • live-browser.extractContext (cyclomatic 20) skill/scripts/live-browser.js:1014 — live-browser.extractContext has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.buildCyclingRow (cyclomatic 20) · ×1
  • live-browser.buildCyclingRow (cyclomatic 20) skill/scripts/live-browser.js:2708 — live-browser.buildCyclingRow has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) · ×1
  • live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) skill/scripts/live-browser.js:5367 — live-browser.findLiveElementFromAnchorSnapshot has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.findLiveElementForOriginalMarkup (cyclomatic 19) · ×1
  • live-browser.findLiveElementForOriginalMarkup (cyclomatic 19) skill/scripts/live-browser.js:5390 — live-browser.findLiveElementForOriginalMarkup has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.completeSourceInjection (cyclomatic 19) · ×1
  • live-browser.completeSourceInjection (cyclomatic 19) skill/scripts/live-browser.js:6572 — live-browser.completeSourceInjection has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.buildSvelteExpressionTextMap (cyclomatic 19) · ×1
  • live-browser.buildSvelteExpressionTextMap (cyclomatic 19) skill/scripts/live-browser.js:6758 — live-browser.buildSvelteExpressionTextMap has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.updateGlobalBarState (cyclomatic 19) · ×1
  • live-browser.updateGlobalBarState (cyclomatic 19) skill/scripts/live-browser.js:12373 — live-browser.updateGlobalBarState has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (sync, a function literal at line 12397, a function literal at line 12415). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.sidePanel (cyclomatic 19) · ×1
  • plan-review.mountPlanReview.sidePanel (cyclomatic 19) ui/component-review/plan-review.ts:357 — plan-review.mountPlanReview.sidePanel has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · running_animation_properties (cyclomatic 19) · ×1
  • running_animation_properties (cyclomatic 19) browser-bundle/10-probe.js:336 — running_animation_properties has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) crates/cli/src/component_fonts.js:4 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 9 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Lt (cyclomatic 19) · ×1
  • Lt (cyclomatic 19) crates/context/assets/component-review.js:1286 — Lt has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RenderedTextCount · ×1
  • RenderedTextCount::feed (cyclomatic 18) crates/core/src/browser/quality.rs:1151 — RenderedTextCount::feed has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · content-script.analyzeCandidate (cyclomatic 18) · ×1
  • content-script.analyzeCandidate (cyclomatic 18) extension/content/content-script.js:266 — content-script.analyzeCandidate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.captureElementToBlob (cyclomatic 18) · ×1
  • live-browser.captureElementToBlob (cyclomatic 18) skill/scripts/live-browser.js:8931 — live-browser.captureElementToBlob has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.recoverMissedGenerationCompletion (cyclomatic 18) · ×1
  • live-browser.recoverMissedGenerationCompletion (cyclomatic 18) skill/scripts/live-browser.js:9964 — live-browser.recoverMissedGenerationCompletion has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.renderDesignVisual (cyclomatic 18) · ×1
  • live-browser.renderDesignVisual (cyclomatic 18) skill/scripts/live-browser.js:13182 — live-browser.renderDesignVisual has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.renderMarkdown (cyclomatic 18) · ×1
  • live-browser.renderMarkdown (cyclomatic 18) skill/scripts/live-browser.js:13667 — live-browser.renderMarkdown has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan-review.mountPlanReview.stage (cyclomatic 18) · ×1
  • plan-review.mountPlanReview.stage (cyclomatic 18) ui/component-review/plan-review.ts:328 — plan-review.mountPlanReview.stage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.collectEditableTextRows · ×1
  • live-browser.collectEditableTextRows::visit (cyclomatic 17) skill/scripts/live-browser.js:3486 — live-browser.collectEditableTextRows::visit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.handleMouseMove (cyclomatic 17) · ×1
  • live-browser.handleMouseMove (cyclomatic 17) skill/scripts/live-browser.js:8172 — live-browser.handleMouseMove has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.captureAndEmit (cyclomatic 17) · ×1
  • live-browser.captureAndEmit (cyclomatic 17) skill/scripts/live-browser.js:9002 — live-browser.captureAndEmit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scheduleLazyVisualContrast (cyclomatic 17) · ×1
  • scheduleLazyVisualContrast (cyclomatic 17) REDACTED:222 — scheduleLazyVisualContrast has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 15-snapshot.__snapRenderedFaces (cyclomatic 16) · ×1
  • 15-snapshot.__snapRenderedFaces (cyclomatic 16) browser-bundle/15-snapshot.js:344 — 15-snapshot.__snapRenderedFaces has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · 15-snapshot.__snapConditionalCssRuleIsActive (cyclomatic 16) · ×1
  • 15-snapshot.__snapConditionalCssRuleIsActive (cyclomatic 16) browser-bundle/15-snapshot.js:373 — 15-snapshot.__snapConditionalCssRuleIsActive has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · 15-snapshot.__snapKeyframes (cyclomatic 16) · ×1
  • 15-snapshot.__snapKeyframes (cyclomatic 16) browser-bundle/15-snapshot.js:577 — 15-snapshot.__snapKeyframes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 40-overlay.createImpeccableOverlay.highlight (cyclomatic 16) · ×1
  • 40-overlay.createImpeccableOverlay.highlight (cyclomatic 16) browser-bundle/40-overlay.js:315 — 40-overlay.createImpeccableOverlay.highlight has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 325, enableCycleMode, a function literal at line 317, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · svelte_bridge_helper.rl.on("line") (cyclomatic 16) · ×1
  • svelte_bridge_helper.rl.on("line") (cyclomatic 16) crates/live/src/svelte_bridge_helper.mjs:34 — svelte_bridge_helper.rl.on("line") has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost (cyclomatic 16) · ×1
  • live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost (cyclomatic 16) skill/scripts/live-browser-dom.js:141 — live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.contextElementForManualEdit (cyclomatic 16) · ×1
  • live-browser.contextElementForManualEdit (cyclomatic 16) skill/scripts/live-browser.js:1071 — live-browser.contextElementForManualEdit has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · live-browser.buildInsertConfigureRow (cyclomatic 16) · ×1
  • live-browser.buildInsertConfigureRow (cyclomatic 16) skill/scripts/live-browser.js:2534 — live-browser.buildInsertConfigureRow has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 2582, 2560, 2611, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · live-browser.wrapMixedContentTextNodes (cyclomatic 16) · ×1
  • live-browser.wrapMixedContentTextNodes (cyclomatic 16) skill/scripts/live-browser.js:3523 — live-browser.wrapMixedContentTextNodes has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.renderEditBadge (cyclomatic 16) · ×1
  • live-browser.renderEditBadge (cyclomatic 16) skill/scripts/live-browser.js:4961 — live-browser.renderEditBadge has cyclomatic complexity 16 (threshold 15). Of this number, 11 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.
D1 · Cyclomatic Complexity · live-browser.cleanup (cyclomatic 16) · ×1
  • live-browser.cleanup (cyclomatic 16) skill/scripts/live-browser.js:10047 — live-browser.cleanup has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.syncVoiceUi (cyclomatic 16) · ×1
  • live-browser.syncVoiceUi (cyclomatic 16) skill/scripts/live-browser.js:11338 — live-browser.syncVoiceUi has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · live-browser.teardown (cyclomatic 16) · ×1
  • live-browser.teardown (cyclomatic 16) skill/scripts/live-browser.js:12566 — live-browser.teardown has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · review.mountComponentReview.render · ×1
  • review.mountComponentReview.render::resizePreview (cyclomatic 16) ui/component-review/review.ts:369 — review.mountComponentReview.render::resizePreview 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. This shape REPEATS in the file: one other method here (review.mountComponentReview.render) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · createImpeccableOverlay.highlight (cyclomatic 16) · ×1
  • createImpeccableOverlay.highlight (cyclomatic 16) browser-bundle/40-overlay.js:315 — createImpeccableOverlay.highlight has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 325, enableCycleMode, _checkLabel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ensureOffscreenDocument (cyclomatic 16) · ×1
  • ensureOffscreenDocument (cyclomatic 16) extension/background/service-worker.js:124 — ensureOffscreenDocument has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 126, 161, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sendScanToTab (cyclomatic 16) · ×1
  • sendScanToTab (cyclomatic 16) extension/background/service-worker.js:207 — sendScanToTab has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai (cyclomatic 16) · ×1
  • ai (cyclomatic 16) crates/context/assets/component-review.js:1521 — ai has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 1521, a function literal at line 1521, a function literal at line 1521, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · review.mountComponentReview.render (cognitive 209) · ×1
  • review.mountComponentReview.render (cognitive 209) ui/component-review/review.ts:142 — review.mountComponentReview.render has cognitive complexity 209 (threshold 15). Drivers by points: boolean chains 80, if/else 66 (78 pts), ternaries 37 (49 pts), loops 2 (nesting depth added 24). Of this number, 106 points are the body's own statements and 103 belong to 44 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous) (cognitive 186) · ×1
  • (anonymous) (cognitive 186) crates/cli/src/raster_coverage.js:28 — (anonymous) has cognitive complexity 186 (threshold 15). Drivers by points: if/else 42 (69 pts), boolean chains 59, ternaries 22 (34 pts), loops 7 (9 pts), other 9, error handling 4 (6 pts) (nesting depth added 43). Of this number, 80 points are the body's own statements and 106 belong to 42 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · capture (cognitive 164) · ×1
  • capture (cognitive 164) browser-bundle/15-snapshot.js:758 — capture has cognitive complexity 164 (threshold 15). Drivers by points: if/else 41 (91 pts), boolean chains 25, loops 12 (23 pts), ternaries 8 (17 pts), error handling 3 (8 pts) (nesting depth added 75). Of this number, 162 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.handleKeyDown (cognitive 92) · ×1
  • live-browser.handleKeyDown (cognitive 92) skill/scripts/live-browser.js:8379 — live-browser.handleKeyDown has cognitive complexity 92 (threshold 15). Drivers by points: if/else 35 (59 pts), boolean chains 21, loops 3 (9 pts), ternaries 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.resumeSession (cognitive 72) · ×1
  • live-browser.resumeSession (cognitive 72) skill/scripts/live-browser.js:10324 — live-browser.resumeSession has cognitive complexity 72 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 22, ternaries 5 (7 pts), error handling 1 (3 pts) (nesting depth added 16). Of this number, 61 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.startVariantObserver (cognitive 67) · ×1
  • live-browser.startVariantObserver (cognitive 67) skill/scripts/live-browser.js:7255 — live-browser.startVariantObserver has cognitive complexity 67 (threshold 15). Drivers by points: if/else 26 (46 pts), boolean chains 12, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 24). None of this is in the body itself: all 67 points belong to one function literal inside it that branches (line 7258). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · NativeComponentCapturer · ×1
  • NativeComponentCapturer::capture (cognitive 55) crates/cli/src/component_capture.rs:212 — NativeComponentCapturer::capture has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 4 (8 pts), boolean chains 7, match/switch 1 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Xn · ×1
  • Xn::ot (cognitive 53) crates/context/assets/component-review.js:1588 — Xn::ot has cognitive complexity 53 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 22 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plan-review.mountPlanReview.onKey (cognitive 51) · ×1
  • plan-review.mountPlanReview.onKey (cognitive 51) ui/component-review/plan-review.ts:587 — plan-review.mountPlanReview.onKey has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 20 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · live-browser.injectVariantsFromSource (cognitive 50) · ×1
  • live-browser.injectVariantsFromSource (cognitive 50) skill/scripts/live-browser.js:6645 — live-browser.injectVariantsFromSource has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 9, ternaries 1 (nesting depth added 21). Of this number, 21 points are the body's own statements and 29 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · live-browser.buildSveltePropValuesV2 (cognitive 48) · ×1
  • live-browser.buildSveltePropValuesV2 (cognitive 48) skill/scripts/live-browser.js:5744 — live-browser.buildSveltePropValuesV2 has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 16, if/else 7 (14 pts), error handling 3 (11 pts), loops 3 (7 pts) (nesting depth added 19). Of this number, 47 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.injectSvelteComponentsFromManifest (cognitive 43) · ×1
  • live-browser.injectSvelteComponentsFromManifest (cognitive 43) skill/scripts/live-browser.js:6052 — live-browser.injectSvelteComponentsFromManifest has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 22, if/else 12 (14 pts), ternaries 5 (6 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CssHostIndex · ×1
  • CssHostIndex::new (cognitive 41) crates/core/src/checks/css_scan.rs:1339 — CssHostIndex::new has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (8 pts), boolean chains 6, match/switch 2 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 41) · ×1
  • (anonymous) (cognitive 41) crates/cli/src/component_isolation.js:4 — (anonymous) has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 11, loops 5 (6 pts), ternaries 3 (nesting depth added 6). Most of this is not in the body itself: 13 of the 41 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 43, include, a function literal at line 21, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · plan-review.mountPlanReview.summary (cognitive 40) · ×1
  • plan-review.mountPlanReview.summary (cognitive 40) ui/component-review/plan-review.ts:381 — plan-review.mountPlanReview.summary has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 21 (35 pts), boolean chains 3, if/else 2 (nesting depth added 14). Of this number, 35 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 15-snapshot.__snapLastWordRects (cognitive 39) · ×1
  • 15-snapshot.__snapLastWordRects (cognitive 39) browser-bundle/15-snapshot.js:128 — 15-snapshot.__snapLastWordRects has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 8, loops 4 (5 pts), ternaries 1 (nesting depth added 15). Of this number, 26 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.handleManualEditActivity (cognitive 39) · ×1
  • live-browser.handleManualEditActivity (cognitive 39) skill/scripts/live-browser.js:4531 — live-browser.handleManualEditActivity has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SafeTagTextSeen · ×1
  • SafeTagTextSeen::keep_first_keyed_claiming (cognitive 38) crates/core/src/checks/rules.rs:668 — SafeTagTextSeen::keep_first_keyed_claiming has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 5 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createImpeccableOverlay (cognitive 38) · ×1
  • createImpeccableOverlay (cognitive 38) browser-bundle/40-overlay.js:16 — createImpeccableOverlay has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 6, loops 4, ternaries 1 (nesting depth added 13). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 260, 305, 224, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · 15-snapshot.__snapPseudoElementHostSelector (cognitive 37) · ×1
  • 15-snapshot.__snapPseudoElementHostSelector (cognitive 37) browser-bundle/15-snapshot.js:188 — 15-snapshot.__snapPseudoElementHostSelector has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (11 pts), boolean chains 6 (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. This shape REPEATS in the file: one other method here (15-snapshot.__snapPseudoElementHostSelector::consumeFunction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · live-browser.cleanup (cognitive 37) · ×1
  • live-browser.cleanup (cognitive 37) skill/scripts/live-browser.js:10047 — live-browser.cleanup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 1 (4 pts) (nesting depth added 19). Most of this is not in the body itself: 14 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 10071, 10097). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plan-review.mountPlanReview.decisionBar (cognitive 37) · ×1
  • plan-review.mountPlanReview.decisionBar (cognitive 37) ui/component-review/plan-review.ts:304 — plan-review.mountPlanReview.decisionBar has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 16 (33 pts), boolean chains 2, if/else 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 37) · ×1
  • (anonymous) (cognitive 37) extension/background/service-worker.js:247 — (anonymous) has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 14, error handling 3 (6 pts), loops 1 (2 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 8 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Generator · ×1
  • Generator::node (cognitive 36) crates/html/src/cascade/csstree/generator.rs:218 — Generator::node has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 7 (14 pts), boolean chains 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · live-browser.resolveBarAnchor (cognitive 36) · ×1
  • live-browser.resolveBarAnchor (cognitive 36) skill/scripts/live-browser.js:2115 — live-browser.resolveBarAnchor has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 9 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · live-browser.findLiveElementForOriginalMarkup (cognitive 36) · ×1
  • live-browser.findLiveElementForOriginalMarkup (cognitive 36) skill/scripts/live-browser.js:5390 — live-browser.findLiveElementForOriginalMarkup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan-review.mountPlanReview.sidePanel (cognitive 36) · ×1
  • plan-review.mountPlanReview.sidePanel (cognitive 36) ui/component-review/plan-review.ts:357 — plan-review.mountPlanReview.sidePanel has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 12 (28 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 18). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KeypressSession · ×1
  • KeypressSession::next_key (cognitive 35) crates/skills/src/prompt.rs:469 — KeypressSession::next_key has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 5 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · 15-snapshot.__snapRunningAnimations (cognitive 35) · ×1
  • 15-snapshot.__snapRunningAnimations (cognitive 35) browser-bundle/15-snapshot.js:616 — 15-snapshot.__snapRunningAnimations has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (7 pts), error handling 3 (5 pts), boolean chains 4 (nesting depth added 15). Of this number, 32 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.
D2 · Cognitive Complexity · live-browser.extractContext (cognitive 35) · ×1
  • live-browser.extractContext (cognitive 35) skill/scripts/live-browser.js:1014 — live-browser.extractContext has cognitive complexity 35 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (7 pts), boolean chains 5, error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan-review.mountPlanReview.wire (cognitive 35) · ×1
  • plan-review.mountPlanReview.wire (cognitive 35) ui/component-review/plan-review.ts:508 — plan-review.mountPlanReview.wire has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 543, a function literal at line 511, a function literal at line 541, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 35) · ×1
  • (anonymous) (cognitive 35) browser-bundle/60-offscreen.js:217 — (anonymous) has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 8, loops 1 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 12). Of this number, 26 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.applyEditing (cognitive 34) · ×1
  • live-browser.applyEditing (cognitive 34) skill/scripts/live-browser.js:4017 — live-browser.applyEditing has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 6, loops 3 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildCyclingRow (cognitive 33) · ×1
  • live-browser.buildCyclingRow (cognitive 33) skill/scripts/live-browser.js:2708 — live-browser.buildCyclingRow has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 5 (12 pts), boolean chains 3 (nesting depth added 13). Of this number, 27 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderFindings (cognitive 33) · ×1
  • renderFindings (cognitive 33) extension/devtools/panel.js:291 — renderFindings has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 4 (10 pts), loops 5 (9 pts), boolean chains 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.
D2 · Cognitive Complexity · CdpAssetRenderer · ×1
  • CdpAssetRenderer::capture_batch (cognitive 32) crates/cli/src/asset_capture.rs:51 — CdpAssetRenderer::capture_batch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, loops 4 (6 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.
D2 · Cognitive Complexity · CdpEntryRenderer · ×1
  • CdpEntryRenderer::capture_at (cognitive 32) crates/cli/src/entry_capture.rs:84 — CdpEntryRenderer::capture_at has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, loops 3 (4 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 15-snapshot.__snapKeyframes (cognitive 32) · ×1
  • 15-snapshot.__snapKeyframes (cognitive 32) browser-bundle/15-snapshot.js:577 — 15-snapshot.__snapKeyframes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (10 pts), boolean chains 5, error handling 1 (2 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.
D2 · Cognitive Complexity · 60-offscreen.chrome.runtime.onMessage.addListener() (cognitive 32) · ×1
  • 60-offscreen.chrome.runtime.onMessage.addListener() (cognitive 32) browser-bundle/60-offscreen.js:217 — 60-offscreen.chrome.runtime.onMessage.addListener() has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 8, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 24 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.handleClick (cognitive 32) · ×1
  • live-browser.handleClick (cognitive 32) skill/scripts/live-browser.js:8212 — live-browser.handleClick has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 10 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · service-worker.chrome.runtime.onMessage.addListener() (cognitive 31) · ×1
  • service-worker.chrome.runtime.onMessage.addListener() (cognitive 31) extension/background/service-worker.js:247 — service-worker.chrome.runtime.onMessage.addListener() has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 14, loops 1 (2 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · live-browser.hitSiblingInsertGap (cognitive 31) · ×1
  • live-browser.hitSiblingInsertGap (cognitive 31) skill/scripts/live-browser.js:1805 — live-browser.hitSiblingInsertGap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 9, loops 3 (4 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildSvelteExpressionTextMap (cognitive 31) · ×1
  • live-browser.buildSvelteExpressionTextMap (cognitive 31) skill/scripts/live-browser.js:6758 — live-browser.buildSvelteExpressionTextMap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 13). Of this number, 29 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 31) · ×1
  • (anonymous) (cognitive 31) extension/background/service-worker.js:352 — (anonymous) has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 3 (9 pts) (nesting depth added 14). Most of this is not in the body itself: 11 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 385, 358, 397, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · live-browser.restoreSessionWithoutWrapper (cognitive 30) · ×1
  • live-browser.restoreSessionWithoutWrapper (cognitive 30) skill/scripts/live-browser.js:9885 — live-browser.restoreSessionWithoutWrapper has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 17, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · live-browser.renderMarkdown (cognitive 30) · ×1
  • live-browser.renderMarkdown (cognitive 30) skill/scripts/live-browser.js:13667 — live-browser.renderMarkdown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · __snapResolvedAnimationKeyframes (cognitive 30) · ×1
  • __snapResolvedAnimationKeyframes (cognitive 30) browser-bundle/15-snapshot.js:449 — __snapResolvedAnimationKeyframes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, error handling 2 (3 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). Of this number, 28 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.
D2 · Cognitive Complexity · RenderedTextCount · ×1
  • RenderedTextCount::feed (cognitive 29) crates/core/src/browser/quality.rs:1151 — RenderedTextCount::feed has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.onAnnotDown (cognitive 29) · ×1
  • live-browser.onAnnotDown (cognitive 29) skill/scripts/live-browser.js:626 — live-browser.onAnnotDown has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, error handling 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.
D2 · Cognitive Complexity · live-browser.mountSvelteComponentVariant (cognitive 29) · ×1
  • live-browser.mountSvelteComponentVariant (cognitive 29) skill/scripts/live-browser.js:5904 — live-browser.mountSvelteComponentVariant has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 11, error handling 1, ternaries 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keyframes (cognitive 29) · ×1
  • keyframes (cognitive 29) browser-bundle/10-probe.js:132 — keyframes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (10 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ext-diff.scanWith (cognitive 28) · ×1
  • ext-diff.scanWith (cognitive 28) crates/wasm/tools/ext-diff.mjs:74 — ext-diff.scanWith has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 8, ternaries 3, loops 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 83, 79, 89). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · content-script.drive (cognitive 28) · ×1
  • content-script.drive (cognitive 28) extension/content/content-script.js:186 — content-script.drive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · running_animation_properties (cognitive 28) · ×1
  • running_animation_properties (cognitive 28) browser-bundle/10-probe.js:336 — running_animation_properties has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), error handling 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.completeSourceInjection (cognitive 27) · ×1
  • live-browser.completeSourceInjection (cognitive 27) skill/scripts/live-browser.js:6572 — live-browser.completeSourceInjection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 7, ternaries 2 (nesting depth added 11). Of this number, 18 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · 15-snapshot.__snapLinkedStylesheetText · ×1
  • 15-snapshot.__snapLinkedStylesheetText::appendRules (cognitive 26) browser-bundle/15-snapshot.js:496 — 15-snapshot.__snapLinkedStylesheetText::appendRules has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser-ignores.pageCandidates (cognitive 26) · ×1
  • live-browser-ignores.pageCandidates (cognitive 26) REDACTED:122 — live-browser-ignores.pageCandidates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 5 (6 pts), boolean chains 5, ternaries 3 (5 pts), error handling 1 (nesting depth added 6). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser-ignores.resolveDetectIgnores (cognitive 26) · ×1
  • live-browser-ignores.resolveDetectIgnores (cognitive 26) REDACTED:199 — live-browser-ignores.resolveDetectIgnores has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, ternaries 3 (4 pts), loops 1 (nesting depth added 7). Of this number, 23 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildParamsPanel (cognitive 26) · ×1
  • live-browser.buildParamsPanel (cognitive 26) skill/scripts/live-browser.js:3338 — live-browser.buildParamsPanel has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 12). Of this number, 17 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.stripSvelteBlockRegions (cognitive 26) · ×1
  • live-browser.stripSvelteBlockRegions (cognitive 26) skill/scripts/live-browser.js:5834 — live-browser.stripSvelteBlockRegions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keyframe_keys (cognitive 26) · ×1
  • keyframe_keys (cognitive 26) browser-bundle/10-probe.js:162 — keyframe_keys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildDots (cognitive 25) · ×1
  • live-browser.buildDots (cognitive 25) skill/scripts/live-browser.js:2908 — live-browser.buildDots has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 2, if/else 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.showShaderOverlay (cognitive 25) · ×1
  • live-browser.showShaderOverlay (cognitive 25) skill/scripts/live-browser.js:9342 — live-browser.showShaderOverlay has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 4). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · OverlayReport · ×1
  • OverlayReport::merge (cognitive 24) crates/browser/src/overlays.rs:630 — OverlayReport::merge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.onPendingPillClick (cognitive 24) · ×1
  • live-browser.onPendingPillClick (cognitive 24) skill/scripts/live-browser.js:4385 — live-browser.onPendingPillClick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · live-browser.maybeWarnConditionalAncestor (cognitive 24) · ×1
  • live-browser.maybeWarnConditionalAncestor (cognitive 24) skill/scripts/live-browser.js:8299 — live-browser.maybeWarnConditionalAncestor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.initPageChat (cognitive 24) · ×1
  • live-browser.initPageChat (cognitive 24) skill/scripts/live-browser.js:11592 — live-browser.initPageChat has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 11757, 11749, 11714, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ensureOffscreenDocument (cognitive 24) · ×1
  • ensureOffscreenDocument (cognitive 24) extension/background/service-worker.js:124 — ensureOffscreenDocument has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 126, 161, 166, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · content-script.runScan (cognitive 23) · ×1
  • content-script.runScan (cognitive 23) extension/content/content-script.js:220 — content-script.runScan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 236). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · live-browser.renderEditBadge (cognitive 23) · ×1
  • live-browser.renderEditBadge (cognitive 23) skill/scripts/live-browser.js:4961 — live-browser.renderEditBadge has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.findLiveElementFromAnchorSnapshot (cognitive 23) · ×1
  • live-browser.findLiveElementFromAnchorSnapshot (cognitive 23) skill/scripts/live-browser.js:5367 — live-browser.findLiveElementFromAnchorSnapshot has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan-review.mountPlanReview.stage (cognitive 23) · ×1
  • plan-review.mountPlanReview.stage (cognitive 23) ui/component-review/plan-review.ts:328 — plan-review.mountPlanReview.stage has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 13 (20 pts), boolean chains 2, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scheduleLazyVisualContrast (cognitive 23) · ×1
  • scheduleLazyVisualContrast (cognitive 23) REDACTED:222 — scheduleLazyVisualContrast has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (nesting depth added 7). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 230, 241, 240, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · service-worker.chrome.runtime.onConnect.addListener() (cognitive 22) · ×1
  • service-worker.chrome.runtime.onConnect.addListener() (cognitive 22) extension/background/service-worker.js:352 — service-worker.chrome.runtime.onConnect.addListener() has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (22 pts) (nesting depth added 8). Of this number, 11 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content-script.analyzeCandidate (cognitive 22) · ×1
  • content-script.analyzeCandidate (cognitive 22) extension/content/content-script.js:266 — content-script.analyzeCandidate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost (cognitive 22) · ×1
  • live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost (cognitive 22) skill/scripts/live-browser-dom.js:141 — live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.captureAndEmit (cognitive 22) · ×1
  • live-browser.captureAndEmit (cognitive 22) skill/scripts/live-browser.js:9002 — live-browser.captureAndEmit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 2 (3 pts), ternaries 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.
D2 · Cognitive Complexity · Browser · ×1
  • Browser::launch (cognitive 21) crates/browser/src/cdp.rs:167 — Browser::launch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 4 (7 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlSnapshot · ×1
  • HtmlSnapshot::capture_regions_at_viewport (cognitive 21) crates/cli/src/capture_snapshot.rs:138 — HtmlSnapshot::capture_regions_at_viewport has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.collectEditableTextRows · ×1
  • live-browser.collectEditableTextRows::visit (cognitive 21) skill/scripts/live-browser.js:3486 — live-browser.collectEditableTextRows::visit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.connectSSE (cognitive 21) · ×1
  • live-browser.connectSSE (cognitive 21) skill/scripts/live-browser.js:7806 — live-browser.connectSSE has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 21. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · live-browser.captureElementToBlob (cognitive 21) · ×1
  • live-browser.captureElementToBlob (cognitive 21) skill/scripts/live-browser.js:8931 — live-browser.captureElementToBlob has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · live-browser.syncVoiceUi (cognitive 21) · ×1
  • live-browser.syncVoiceUi (cognitive 21) skill/scripts/live-browser.js:11338 — live-browser.syncVoiceUi has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan-review.mountPlanReview.stageFigures (cognitive 21) · ×1
  • plan-review.mountPlanReview.stageFigures (cognitive 21) ui/component-review/plan-review.ts:283 — plan-review.mountPlanReview.stageFigures has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 3 (4 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · scheduleLazy (cognitive 21) · ×1
  • scheduleLazy (cognitive 21) extension/content/content-script.js:143 — scheduleLazy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 8). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 151, 163, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · live-browser.startScrollLock (cognitive 20) · ×1
  • live-browser.startScrollLock (cognitive 20) skill/scripts/live-browser.js:7085 — live-browser.startScrollLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (correct, a function literal at line 7189, schedule, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 20) · ×1
  • (anonymous) (cognitive 20) crates/cli/src/component_fonts.js:4 — (anonymous) has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 2 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content-script.chrome.runtime.onMessage.addListener() (cognitive 19) · ×1
  • content-script.chrome.runtime.onMessage.addListener() (cognitive 19) extension/content/content-script.js:306 — content-script.chrome.runtime.onMessage.addListener() has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser-ignores.globToRegex (cognitive 19) · ×1
  • live-browser-ignores.globToRegex (cognitive 19) REDACTED:59 — live-browser-ignores.globToRegex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.wrapMixedContentTextNodes (cognitive 19) · ×1
  • live-browser.wrapMixedContentTextNodes (cognitive 19) skill/scripts/live-browser.js:3523 — live-browser.wrapMixedContentTextNodes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.unlockSteerChat (cognitive 19) · ×1
  • live-browser.unlockSteerChat (cognitive 19) skill/scripts/live-browser.js:11241 — live-browser.unlockSteerChat has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · live-browser.initGlobalBar (cognitive 19) · ×1
  • live-browser.initGlobalBar (cognitive 19) skill/scripts/live-browser.js:11923 — live-browser.initGlobalBar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 2, error handling 1. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 10 function items inside it that branch (makeIconBtn, makeIconBtn::collapse, makePendingDecisionBtn, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · 35-visual.createVisualContrast.analyzeVisualContrast (cognitive 18) · ×1
  • 35-visual.createVisualContrast.analyzeVisualContrast (cognitive 18) browser-bundle/35-visual.js:163 — 35-visual.createVisualContrast.analyzeVisualContrast has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · map_inspection.html.renderList (cognitive 18) · ×1
  • map_inspection.html.renderList (cognitive 18) crates/comp-verbs/src/map_inspection.html:186 — map_inspection.html.renderList has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · svelte_bridge_helper.rl.on("line") (cognitive 18) · ×1
  • svelte_bridge_helper.rl.on("line") (cognitive 18) crates/live/src/svelte_bridge_helper.mjs:34 — svelte_bridge_helper.rl.on("line") has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, error handling 3 (6 pts), if/else 5 (6 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · service-worker.sendScanToTab (cognitive 18) · ×1
  • service-worker.sendScanToTab (cognitive 18) extension/background/service-worker.js:207 — service-worker.sendScanToTab has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5, ternaries 2 (5 pts), boolean chains 4, error handling 3 (4 pts) (nesting depth added 4). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.restoreDiscardedManualEdits (cognitive 18) · ×1
  • live-browser.restoreDiscardedManualEdits (cognitive 18) skill/scripts/live-browser.js:4607 — live-browser.restoreDiscardedManualEdits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.collectFontFaces (cognitive 18) · ×1
  • live-browser.collectFontFaces (cognitive 18) skill/scripts/live-browser.js:8746 — live-browser.collectFontFaces has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.startVoice (cognitive 18) · ×1
  • live-browser.startVoice (cognitive 18) skill/scripts/live-browser.js:11399 — live-browser.startVoice has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · __snapConditionalCssRuleIsActive (cognitive 18) · ×1
  • __snapConditionalCssRuleIsActive (cognitive 18) browser-bundle/15-snapshot.js:373 — __snapConditionalCssRuleIsActive has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), error handling 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createVisualContrast.analyzeVisualContrast (cognitive 18) · ×1
  • createVisualContrast.analyzeVisualContrast (cognitive 18) browser-bundle/35-visual.js:163 — createVisualContrast.analyzeVisualContrast has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Ledger · ×1
  • Ledger::prune (cognitive 17) crates/context/src/telemetry.rs:507 — Ledger::prune has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · El · ×1
  • El::match_non_ts_pseudo_class (cognitive 17) crates/html/src/select.rs:415 — El::match_non_ts_pseudo_class has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · 10-probe.__collectTextRects (cognitive 17) · ×1
  • 10-probe.__collectTextRects (cognitive 17) browser-bundle/10-probe.js:77 — 10-probe.__collectTextRects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 35-visual.createVisualContrast.sampleVisualBackgroundAtPoint (cognitive 17) · ×1
  • 35-visual.createVisualContrast.sampleVisualBackgroundAtPoint (cognitive 17) browser-bundle/35-visual.js:106 — 35-visual.createVisualContrast.sampleVisualBackgroundAtPoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · component-review.Mn (cognitive 17) · ×1
  • component-review.Mn (cognitive 17) crates/context/assets/component-review.js:1 — component-review.Mn has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1 (nesting depth added 8). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 1). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · component-review.Tt (cognitive 17) · ×1
  • component-review.Tt (cognitive 17) crates/context/assets/component-review.js:1521 — component-review.Tt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · live-browser.detectInsertAxisFromStyle (cognitive 17) · ×1
  • live-browser.detectInsertAxisFromStyle (cognitive 17) skill/scripts/live-browser.js:1733 — live-browser.detectInsertAxisFromStyle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 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.
D2 · Cognitive Complexity · live-browser.splitCssSelectorList (cognitive 17) · ×1
  • live-browser.splitCssSelectorList (cognitive 17) skill/scripts/live-browser.js:5689 — live-browser.splitCssSelectorList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.startScrollTracking · ×1
  • live-browser.startScrollTracking::tick (cognitive 17) skill/scripts/live-browser.js:7372 — live-browser.startScrollTracking::tick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · model.reviewUnits (cognitive 17) · ×1
  • model.reviewUnits (cognitive 17) ui/component-review/model.ts:117 — model.reviewUnits has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1 (nesting depth added 8). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 119). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · instrument-strip.place (cognitive 17) · ×1
  • instrument-strip.place (cognitive 17) ui/component-review/instrument-strip.ts:10 — instrument-strip.place has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createVisualContrast.sampleVisualBackgroundAtPoint (cognitive 17) · ×1
  • createVisualContrast.sampleVisualBackgroundAtPoint (cognitive 17) browser-bundle/35-visual.js:106 — createVisualContrast.sampleVisualBackgroundAtPoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResponseCapture · ×1
  • ResponseCapture::event (cognitive 16) crates/browser/src/response_capture.rs:98 — ResponseCapture::event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 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.
D2 · Cognitive Complexity · Scanner · ×1
  • Scanner::number (cognitive 16) crates/live/src/json_error.rs:81 — Scanner::number has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (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.
D2 · Cognitive Complexity · 15-snapshot.__snapPseudoElementHostSelector · ×1
  • 15-snapshot.__snapPseudoElementHostSelector::consumeFunction (cognitive 16) browser-bundle/15-snapshot.js:192 — 15-snapshot.__snapPseudoElementHostSelector::consumeFunction 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. This shape REPEATS in the file: one other method here (15-snapshot.__snapPseudoElementHostSelector) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · 15-snapshot.__snapSplitCssCommaList (cognitive 16) · ×1
  • 15-snapshot.__snapSplitCssCommaList (cognitive 16) browser-bundle/15-snapshot.js:391 — 15-snapshot.__snapSplitCssCommaList 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.
D2 · Cognitive Complexity · map_inspection.html.select (cognitive 16) · ×1
  • map_inspection.html.select (cognitive 16) crates/comp-verbs/src/map_inspection.html:257 — map_inspection.html.select has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 3 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · live-browser.buildInsertConfigureRow (cognitive 16) · ×1
  • live-browser.buildInsertConfigureRow (cognitive 16) skill/scripts/live-browser.js:2534 — live-browser.buildInsertConfigureRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 2582, 2560, 2611, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · live-browser.queryManualEditRef (cognitive 16) · ×1
  • live-browser.queryManualEditRef (cognitive 16) skill/scripts/live-browser.js:4694 — live-browser.queryManualEditRef has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.stripSvelteKeyDelimiters (cognitive 16) · ×1
  • live-browser.stripSvelteKeyDelimiters (cognitive 16) skill/scripts/live-browser.js:5863 — live-browser.stripSvelteKeyDelimiters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.handleMouseMove (cognitive 16) · ×1
  • live-browser.handleMouseMove (cognitive 16) skill/scripts/live-browser.js:8172 — live-browser.handleMouseMove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · live-browser.onDetectMessage (cognitive 16) · ×1
  • live-browser.onDetectMessage (cognitive 16) skill/scripts/live-browser.js:12542 — live-browser.onDetectMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.renderDesignVisual (cognitive 16) · ×1
  • live-browser.renderDesignVisual (cognitive 16) skill/scripts/live-browser.js:13182 — live-browser.renderDesignVisual has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 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.
D2 · Cognitive Complexity · live-browser.renderComponentTiles (cognitive 16) · ×1
  • live-browser.renderComponentTiles (cognitive 16) skill/scripts/live-browser.js:13468 — live-browser.renderComponentTiles has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 2 (5 pts), loops 2 (3 pts), ternaries 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.
D2 · Cognitive Complexity · Lt (cognitive 16) · ×1
  • Lt (cognitive 16) crates/context/assets/component-review.js:1286 — Lt has cognitive complexity 16 (threshold 15). Drivers by points: other 7, boolean chains 4, if/else 3, ternaries 2. Of this number, 15 points are the body's own statements and 1 belongs to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: ServerState crates/live/src/server_state.rs:110 — 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), 48 methods, 2 blocks, lines 110-1298. 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: cli.rs ↔ hook_lib.rs crates/detect/src/cli.rs:1 — `crates/detect/src/cli.rs` and `crates/hook/src/hook_lib.rs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `6f3746c4` Add composable rule packs to the CLI router; `2e3cdf02` Report a side stripe on a status row or cell as a side tab (#1133); `dad8dbb3` Fix: ignoreFiles waives a linked stylesheet's page-level findings (#1… — run `git show` on any of them.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) crates/context/src/design_parser.rs:97 — crates/context/src/design_parser.rs:97-157 | crates/live/src/design_md.rs:174-237 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (114 corresponding lines) · ×1
  • Edited copy of a member (114 corresponding lines) crates/core/src/browser/text_collectors.rs:959 — crates/core/src/browser/text_collectors.rs:959-1078 | crates/html/src/page.rs:523-636 — These two members are one piece of code written twice and then edited apart: 114 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (101 corresponding lines) · ×1
  • Edited copy of a member (101 corresponding lines) crates/core/src/browser/background.rs:171 — crates/core/src/browser/background.rs:171-303 | crates/html/src/background.rs:270-370 — These two members are one piece of code written twice and then edited apart: 101 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) crates/browser/src/html_snapshot.rs:77 — crates/browser/src/html_snapshot.rs:77-130 | crates/cli/src/capture_snapshot.rs:58-112 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) crates/detect/src/ignores.rs:114 — crates/detect/src/ignores.rs:114-171 | crates/hook/src/admin.rs:1008-1059 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) crates/browser/src/html_snapshot.rs:385 — crates/browser/src/html_snapshot.rs:385-440 | crates/cli/src/capture_snapshot.rs:483-539 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) crates/core/src/checks/rules.rs:1860 — crates/core/src/checks/rules.rs:1860-1898 | crates/core/src/checks/text_rules.rs:91-148 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) crates/browser/src/html_snapshot.rs:186 — crates/browser/src/html_snapshot.rs:186-220 | crates/cli/src/capture_snapshot.rs:295-329 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) crates/core/src/browser/background.rs:576 — crates/core/src/browser/background.rs:576-619 | crates/html/src/background.rs:411-468 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) crates/comp/src/jsnum.rs:29 — crates/comp/src/jsnum.rs:29-68 | crates/foundation/src/js.rs:321-365 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) crates/context/src/context_cli.rs:568 — crates/context/src/context_cli.rs:568-615 | crates/skills/src/providers.rs:604-658 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) crates/core/src/browser/page_checks.rs:3013 — crates/core/src/browser/page_checks.rs:3013-3068 | crates/html/src/page.rs:641-677 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) crates/account/src/store.rs:223 — crates/account/src/store.rs:223-250 | crates/account/src/store.rs:251-278 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) crates/hook/src/hook_claim.rs:211 — crates/hook/src/hook_claim.rs:211-235 | crates/hook/src/hook_sessions.rs:136-162 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) crates/live/src/live_accept.rs:943 — crates/live/src/live_accept.rs:943-969 | crates/live/src/svelte_component.rs:334-360 | crates/live/src/svelte_component.rs:998-1021 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) crates/core/src/browser/driver.rs:175 — crates/core/src/browser/driver.rs:175-207 | crates/detect/src/design_system.rs:929-966 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) crates/html/src/cascade/csstree/strings.rs:87 — crates/html/src/cascade/csstree/strings.rs:87-116 | crates/html/src/cascade/csstree/strings.rs:142-177 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) crates/live/src/event_validation.rs:47 — crates/live/src/event_validation.rs:47-64 | crates/live/src/instructions.rs:41-58 | crates/live/src/live_resume.rs:87-104 | crates/live/src/manual_edits/evidence.rs:84-104 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) crates/core/src/browser/painted.rs:1913 — crates/core/src/browser/painted.rs:1913-1933 | crates/core/src/browser/painted.rs:2272-2288 | crates/core/src/browser/painted.rs:2297-2313 | crates/core/src/browser/painted.rs:2535-2550 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) crates/context/src/pin.rs:121 — crates/context/src/pin.rs:121-129 | crates/skills/src/providers.rs:85-93 | crates/skills/src/providers.rs:97-107 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 9+ corresponding lines) REDACTED:2392 — REDACTED:2392-2400 | crates/browser/src/screenshot_contrast.rs:691-699 | crates/context/src/staleness.rs:219-227 | crates/core/src/browser/driver.rs:154-162 | crates/hook/src/util.rs:62-70 | crates/live/src/event_validation.rs:16-24 | crates/live/src/inject/detect_utils.rs:31-39 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) crates/foundation/src/vectors/checks_b.rs:31 — crates/foundation/src/vectors/checks_b.rs:31-46 | crates/foundation/src/vectors/mod.rs:40-55 | crates/html/src/cascade/vectors.rs:54-69 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/core/src/browser/driver.rs:2685 — crates/core/src/browser/driver.rs:2685-2691 | crates/detect/src/config.rs:369-375 | crates/detect/src/design_system.rs:569-577 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) crates/core/src/browser/driver.rs:278 — crates/core/src/browser/driver.rs:278-281 | crates/detect/src/design_system.rs:648-651 | crates/foundation/src/css/measures.rs:885-892 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 6+ corresponding lines) crates/browser/src/validity.rs:287 — crates/browser/src/validity.rs:287-292 | crates/common/src/http.rs:35-40 | crates/foundation/src/browser/fake_dom.rs:524-530 | crates/foundation/src/browser/snapshot.rs:605-611 | crates/foundation/src/vectors/checks_b.rs:83-88 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) crates/comp-verbs/src/approved_comp.rs:47 — crates/comp-verbs/src/approved_comp.rs:47-50 | crates/comp-verbs/src/build_phase.rs:51-58 | crates/comp-verbs/src/comp_diff.rs:696-703 | crates/comp-verbs/src/font_match.rs:371-378 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) crates/bundle/src/lib.rs:64 — crates/bundle/src/lib.rs:64-66 | crates/foundation/src/registry.rs:804-810 | crates/html/src/cascade/defaults.rs:147-152 | crates/skills/src/commands.rs:39-41 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) crates/core/src/browser/quality.rs:2704 — crates/core/src/browser/quality.rs:2704-2745 | crates/html/src/quality.rs:866-908 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/quality.rs:2704` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (41–43 lines × 2) · ×1
  • Duplicated block (41–43 lines × 2) crates/hook/src/hook.rs:86 — crates/hook/src/hook.rs:86-128 | crates/hook/src/hook.rs:631-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (34–41 lines × 2) · ×1
  • Duplicated block (34–41 lines × 2) crates/core/src/browser/element_checks.rs:831 — crates/core/src/browser/element_checks.rs:831-871 | crates/core/src/browser/element_checks.rs:929-962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/element_checks.rs:831` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) crates/browser/src/html_snapshot.rs:78 — crates/browser/src/html_snapshot.rs:78-117 | crates/cli/src/capture_snapshot.rs:59-98 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/html_snapshot.rs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) crates/browser/src/html_snapshot.rs:237 — crates/browser/src/html_snapshot.rs:237-295 | crates/cli/src/capture_snapshot.rs:369-427 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) crates/core/src/browser/quality.rs:3297 — crates/core/src/browser/quality.rs:3297-3325 | crates/html/src/quality.rs:1221-1246 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/quality.rs:3297` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) crates/core/src/checks/css_scan.rs:180 — crates/core/src/checks/css_scan.rs:180-206 | crates/core/src/checks/rules.rs:2268-2292 — 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) crates/foundation/src/css/measures.rs:691 — crates/foundation/src/css/measures.rs:691-716 | crates/foundation/src/js_ext_a.rs:72-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) crates/browser/src/html_snapshot.rs:399 — crates/browser/src/html_snapshot.rs:399-424 | crates/cli/src/capture_snapshot.rs:494-518 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/browser/src/html_snapshot.rs:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) crates/context/src/context.rs:420 — crates/context/src/context.rs:420-437 | crates/detect/src/design_system.rs:1159-1180 — before extracting anything, compare `crates/context/src/context.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/context.rs:420` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) crates/context/src/design_parser.rs:119 — crates/context/src/design_parser.rs:119-140 | crates/live/src/design_md.rs:196-217 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) crates/detect/src/detect_text.rs:2239 — crates/detect/src/detect_text.rs:2239-2259 | crates/detect/src/detect_text.rs:2282-2302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/detect_text.rs:2239` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–20 lines × 2) · ×1
  • Duplicated block (14–20 lines × 2) crates/hook/src/admin.rs:783 — crates/hook/src/admin.rs:783-802 | REDACTED:516-529 — before extracting anything, compare `crates/hook/src/admin.rs` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crates/live/src/live_insert.rs:120 — crates/live/src/live_insert.rs:120-138 | crates/live/src/live_wrap.rs:84-103 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_insert.rs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) crates/core/src/browser/driver.rs:177 — crates/core/src/browser/driver.rs:177-195 | crates/detect/src/design_system.rs:932-949 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/driver.rs:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) crates/browser/src/html_snapshot.rs:297 — crates/browser/src/html_snapshot.rs:297-314 | crates/cli/src/capture_snapshot.rs:429-446 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) crates/detect/src/regex_matchers.rs:160 — crates/detect/src/regex_matchers.rs:160-172 | crates/detect/src/regex_matchers.rs:608-624 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) crates/live/src/live_insert.rs:140 — crates/live/src/live_insert.rs:140-155 | crates/live/src/live_wrap.rs:106-122 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_insert.rs:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/live/src/live_wrap.rs:123` calls `relative`, `resolve` and `crates/live/src/live_insert.rs:156` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) crates/live/src/svelte_component.rs:284 — crates/live/src/svelte_component.rs:284-298 | crates/live/src/svelte_component.rs:527-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/svelte_component.rs:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) crates/foundation/src/vectors/checks_b.rs:33 — crates/foundation/src/vectors/checks_b.rs:33-46 | crates/foundation/src/vectors/mod.rs:42-55 | crates/html/src/cascade/vectors.rs:56-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `crates/foundation/src/vectors/checks_b.rs:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/core/src/browser/page_checks.rs:3042 — crates/core/src/browser/page_checks.rs:3042-3055 | crates/html/src/page.rs:654-666 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/page_checks.rs:3042` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) crates/live/src/manual_edits/commit.rs:1995 — crates/live/src/manual_edits/commit.rs:1995-2006 | crates/live/src/manual_edits/commit.rs:2169-2182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1995` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–13 lines × 3) · ×1
  • Duplicated block (9–13 lines × 3) crates/context/src/design_parser.rs:229 — crates/context/src/design_parser.rs:229-237 | crates/detect/src/design_system.rs:402-414 | crates/live/src/design_md.rs:306-316 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/detect/src/design_system.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) crates/browser/src/html_snapshot.rs:156 — crates/browser/src/html_snapshot.rs:156-175 | crates/cli/src/capture_snapshot.rs:332-351 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (2–13 lines × 4) · ×1
  • Duplicated block (2–13 lines × 4) crates/context/src/design_parser.rs:162 — crates/context/src/design_parser.rs:162-163 | crates/context/src/design_parser.rs:167-179 | crates/live/src/design_md.rs:267-268 | crates/live/src/design_md.rs:272-284 — before extracting anything, compare `crates/context/src/design_parser.rs` and `crates/live/src/design_md.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/context/src/design_parser.rs:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/core/src/browser/text_layers.rs:968 — crates/core/src/browser/text_layers.rs:968-978 | crates/core/src/browser/text_layers.rs:1044-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/core/src/browser/text_layers.rs:968` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) crates/live/src/manual_edits/commit.rs:1875 — crates/live/src/manual_edits/commit.rs:1875-1884 | crates/live/src/manual_edits/commit.rs:1909-1918 | crates/live/src/manual_edits/commit.rs:1965-1974 | crates/live/src/manual_edits/commit.rs:1997-2006 | crates/live/src/manual_edits/commit.rs:2019-2028 | crates/live/src/manual_edits/commit.rs:2173-2182 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:1875` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) crates/core/src/browser/element_checks.rs:2747 — crates/core/src/browser/element_checks.rs:2747-2757 | crates/core/src/browser/visual.rs:2734-2743 | crates/core/src/browser/visual.rs:3027-3036 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) crates/live/src/live_accept.rs:952 — crates/live/src/live_accept.rs:952-959 | crates/live/src/svelte_component.rs:342-349 | crates/live/src/svelte_component.rs:1005-1012 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/live_accept.rs:952` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) crates/comp/src/jsnum.rs:36 — crates/comp/src/jsnum.rs:36-41 | crates/foundation/src/js.rs:328-335 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (5–7 lines × 2) · ×1
  • Duplicated block (5–7 lines × 2) crates/live/src/design_md.rs:1237 — crates/live/src/design_md.rs:1237-1243 | crates/live/src/design_md.rs:1260-1264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/design_md.rs:1237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/live/src/manual_edits/commit.rs:667 — crates/live/src/manual_edits/commit.rs:667-672 | crates/live/src/manual_edits/evidence.rs:744-750 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/live/src/manual_edits/commit.rs:667` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) crates/browser/src/cdp.rs:2197 — crates/browser/src/cdp.rs:2197-2201 | REDACTED:521-526 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:521` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) crates/detect/src/regex_matchers.rs:683 — crates/detect/src/regex_matchers.rs:683-695 | crates/detect/src/regex_matchers.rs:1220-1231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/detect/src/regex_matchers.rs:683` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) crates/detect/src/config.rs:223 — crates/detect/src/config.rs:223-231 | crates/hook/src/admin.rs:244-252 | crates/hook/src/hook_lib.rs:468-476 | crates/skills/src/providers.rs:561-569 — before extracting anything, compare `crates/detect/src/config.rs` and `crates/hook/src/hook_lib.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `values` to `Vec<String>` in one and `impl IntoIterator<Item = String>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) crates/live/src/live_accept.rs:92 — crates/live/src/live_accept.rs:92-98 | crates/live/src/live_complete.rs:63-69 | crates/live/src/live_inject.rs:35-41 | crates/live/src/live_insert.rs:77-83 | crates/live/src/live_resume.rs:260-266 | crates/live/src/live_wrap.rs:49-55 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 6 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: JsDom (LCOM4 19) crates/wasm/src/js_dom.rs:123 — JsDom's methods fall into 19 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 19 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.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 38 typed · 190 plain JS — the untyped files are browser-bundle/05-natives.js, browser-bundle/10-probe.js, browser-bundle/15-snapshot.js, browser-bundle/30-scan-common.js, browser-bundle/35-visual.js, browser-bundle/40-overlay.js (+184 more).
R10 · Code Duplication · Forked directory tree (41 identical files, ~18152 lines × 2 trees) · ×1
  • Forked directory tree (41 identical files, ~18152 lines × 2 trees) cursor-plugin/skills/impeccable/scripts/live-browser.js:1 — cursor-plugin/ and plugin/ are near-verbatim copies of each other: 41 files are byte-identical under the same relative paths (~18152 lines; the trees hold 65 and 63 files). That is one structural fact, not 41 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Duplicated block with local edits (63 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (63 matched lines × 2 locations) crates/wasm/tools/ab-diff.mjs:41 — crates/wasm/tools/ab-diff.mjs:41 · crates/wasm/tools/snapshot-diff.mjs:35 — the two spans are one implementation copied and then locally edited — 860 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) scripts/build.js:281 — scripts/build.js:281 · scripts/build.js:375 — 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 (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) REDACTED:55 — REDACTED:55 · REDACTED:35 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) scripts/release.mjs:229 — scripts/release.mjs:229 · scripts/release.mjs:499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (23 matched lines × 2 locations) REDACTED:231 — REDACTED:231 · extension/content/content-script.js:153 — the two spans are one implementation copied and then locally edited — 169 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) scripts/smoke-provider-hooks.mjs:506 — scripts/smoke-provider-hooks.mjs:506 · scripts/smoke-provider-hooks.mjs:566 — 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 (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) skill/scripts/live-browser.js:2451 — skill/scripts/live-browser.js:2451 · skill/scripts/live-browser.js:2541 — 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 (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) skill/scripts/live-browser.js:1486 — skill/scripts/live-browser.js:1486 · skill/scripts/live-browser.js:11865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) skill/scripts/live-browser.js:3946 — skill/scripts/live-browser.js:3946 · skill/scripts/live-browser.js:4055 — 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 (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) scripts/lib/utils.js:795 — scripts/lib/utils.js:795 · scripts/lib/utils.js:824 — the two spans are one implementation copied and then locally edited — 96 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×1
  • Duplicated block (16 lines × 2 locations) skill/scripts/live-browser.js:2477 — skill/scripts/live-browser.js:2477 · skill/scripts/live-browser.js:2558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) crates/context/assets/component-review.js:1591 — crates/context/assets/component-review.js:1591 · ui/component-review/review.ts:215 — the two spans are one implementation copied and then locally edited — 527 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (12 matched lines × 2 locations) extension/devtools/panel.js:9 — extension/devtools/panel.js:9 · extension/devtools/sidebar.js:7 — the two spans are one implementation copied and then locally edited — 98 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) browser-bundle/10-probe.js:355 — browser-bundle/10-probe.js:355 · browser-bundle/15-snapshot.js:642 — 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 (10 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (10 matched lines × 2 locations) extension/shared/findings-report.js:70 — extension/shared/findings-report.js:70 · extension/shared/findings-report.js:112 — the two spans are one implementation copied and then locally edited — 59 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (8 matched lines × 2 locations) browser-bundle/15-snapshot.js:449 — browser-bundle/15-snapshot.js:449 · browser-bundle/15-snapshot.js:616 — the two spans are one implementation copied and then locally edited — 59 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (8 lines × 3 locations) · ×1
  • Duplicated block (8 lines × 3 locations) crates/wasm/tools/ab-diff.mjs:22 — crates/wasm/tools/ab-diff.mjs:22 · crates/wasm/tools/ext-diff.mjs:24 · crates/wasm/tools/snapshot-diff.mjs:19 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R2 · Cyclomatic Complexity · Complex function H (cyclomatic 255, cognitive 246) · ×1
  • Complex function H (cyclomatic 255, cognitive 246) crates/context/assets/component-review.js:1588 — H has cyclomatic complexity 255 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 255, cognitive 246) · ×1
  • Complex function render (cyclomatic 255, cognitive 246) ui/component-review/review.ts:142 — render has cyclomatic complexity 255 and cognitive complexity 246; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 93, cognitive 141) · ×1
  • Complex function (anonymous) (cyclomatic 93, cognitive 141) tests/live-e2e.test.mjs:215 — (anonymous) has cyclomatic complexity 93 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 capture (cyclomatic 92, cognitive 162) · ×1
  • Complex function capture (cyclomatic 92, cognitive 162) browser-bundle/15-snapshot.js:758 — capture has cyclomatic complexity 92 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 runAgentLoop (cyclomatic 79, cognitive 183) · ×1
  • Complex function runAgentLoop (cyclomatic 79, cognitive 183) tests/live-e2e/agent.mjs:1921 — runAgentLoop has cyclomatic complexity 79 and cognitive complexity 183; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 handleKeyDown (cyclomatic 70, cognitive 92) · ×1
  • Complex function handleKeyDown (cyclomatic 70, cognitive 92) skill/scripts/live-browser.js:8379 — handleKeyDown has cyclomatic complexity 70 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 onmessage (cyclomatic 69, cognitive 71) · ×1
  • Complex function onmessage (cyclomatic 69, cognitive 71) skill/scripts/live-browser.js:7813 — onmessage has cyclomatic complexity 69 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 evaluatePullRequest (cyclomatic 66, cognitive 55) · ×1
  • Complex function evaluatePullRequest (cyclomatic 66, cognitive 55) scripts/github/sheriff.mjs:147 — evaluatePullRequest has cyclomatic complexity 66 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 64, cognitive 80) · ×1
  • Complex function (anonymous) (cyclomatic 64, cognitive 80) crates/cli/src/raster_coverage.js:28 — (anonymous) has cyclomatic complexity 64 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resumeSession (cyclomatic 64, cognitive 74) · ×1
  • Complex function resumeSession (cyclomatic 64, cognitive 74) skill/scripts/live-browser.js:10324 — resumeSession has cyclomatic complexity 64 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function exercise (cyclomatic 58, cognitive 83) · ×1
  • Complex function exercise (cyclomatic 58, cognitive 83) tests/launcher-download.test.mjs:22 — exercise has cyclomatic complexity 58 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 ot (cyclomatic 56, cognitive 53) · ×1
  • Complex function ot (cyclomatic 56, cognitive 53) crates/context/assets/component-review.js:1588 — ot has cyclomatic complexity 56 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onKey (cyclomatic 56, cognitive 53) · ×1
  • Complex function onKey (cyclomatic 56, cognitive 53) ui/component-review/plan-review.ts:587 — onKey has cyclomatic complexity 56 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function injectSvelteComponentsFromManifest (cyclomatic 50, cognitive 51) · ×1
  • Complex function injectSvelteComponentsFromManifest (cyclomatic 50, cognitive 51) skill/scripts/live-browser.js:6052 — injectSvelteComponentsFromManifest has cyclomatic complexity 50 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 43, cognitive 70) · ×1
  • Complex function (anonymous) (cyclomatic 43, cognitive 70) skill/scripts/live-browser.js:7258 — (anonymous) has cyclomatic complexity 43 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function build (cyclomatic 42, cognitive 79) · ×1
  • Complex function build (cyclomatic 42, cognitive 79) scripts/build.js:752 — build has cyclomatic complexity 42 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runManualEditStage (cyclomatic 42, cognitive 66) · ×1
  • Complex function runManualEditStage (cyclomatic 42, cognitive 66) tests/live-e2e.test.mjs:1934 — runManualEditStage has cyclomatic complexity 42 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function restoreSessionWithoutWrapper (cyclomatic 40, cognitive 29) · ×1
  • Complex function restoreSessionWithoutWrapper (cyclomatic 40, cognitive 29) skill/scripts/live-browser.js:9885 — restoreSessionWithoutWrapper has cyclomatic complexity 40 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleClick (cyclomatic 34, cognitive 32) · ×1
  • Complex function handleClick (cyclomatic 34, cognitive 32) skill/scripts/live-browser.js:8212 — handleClick has cyclomatic complexity 34 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function scan (cyclomatic 33, cognitive 56) · ×1
  • Complex function scan (cyclomatic 33, cognitive 56) crates/cli/src/asset_capture.js:24 — scan has cyclomatic complexity 33 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 handleManualEditActivity (cyclomatic 32, cognitive 44) · ×1
  • Complex function handleManualEditActivity (cyclomatic 32, cognitive 44) skill/scripts/live-browser.js:4531 — handleManualEditActivity has cyclomatic complexity 32 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function readSourceFiles (cyclomatic 32, cognitive 38) · ×1
  • Complex function readSourceFiles (cyclomatic 32, cognitive 38) scripts/lib/utils.js:250 — readSourceFiles has cyclomatic complexity 32 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 applyManualEditBatchToSource (cyclomatic 30, cognitive 80) · ×1
  • Complex function applyManualEditBatchToSource (cyclomatic 30, cognitive 80) tests/live-e2e/agent.mjs:894 — applyManualEditBatchToSource has cyclomatic complexity 30 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateManualEditCoverage (cyclomatic 29, cognitive 57) · ×1
  • Complex function validateManualEditCoverage (cyclomatic 29, cognitive 57) tests/live-e2e/agents/llm-agent.mjs:1061 — validateManualEditCoverage has cyclomatic complexity 29 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function unlockSteerChat (cyclomatic 29, cognitive 36) · ×1
  • Complex function unlockSteerChat (cyclomatic 29, cognitive 36) skill/scripts/live-browser.js:11241 — unlockSteerChat has cyclomatic complexity 29 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.
R2 · Cyclomatic Complexity · Complex function writeSvelteComponentVariants (cyclomatic 29, cognitive 30) · ×1
  • Complex function writeSvelteComponentVariants (cyclomatic 29, cognitive 30) tests/live-e2e/agent.mjs:1742 — writeSvelteComponentVariants has cyclomatic complexity 29 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 32) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 32) tests/live-e2e.test.mjs:214 — (anonymous) has cyclomatic complexity 28 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.
R2 · Cyclomatic Complexity · Complex function applyManualEdits (cyclomatic 27, cognitive 49) · ×1
  • Complex function applyManualEdits (cyclomatic 27, cognitive 49) tests/live-e2e/agents/llm-agent.mjs:456 — applyManualEdits has cyclomatic complexity 27 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildSveltePropValuesV2 (cyclomatic 26, cognitive 43) · ×1
  • Complex function buildSveltePropValuesV2 (cyclomatic 26, cognitive 43) skill/scripts/live-browser.js:5744 — buildSveltePropValuesV2 has cyclomatic complexity 26 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function main (cyclomatic 25, cognitive 43) · ×1
  • Complex function main (cyclomatic 25, cognitive 43) scripts/build-font-index.mjs:103 — main has cyclomatic complexity 25 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function diffResults (cyclomatic 25, cognitive 39) · ×1
  • Complex function diffResults (cyclomatic 25, cognitive 39) tests/oracle/lib.mjs:421 — diffResults has cyclomatic complexity 25 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 encode (cyclomatic 25, cognitive 31) · ×1
  • Complex function encode (cyclomatic 25, cognitive 31) tests/oracle/vectors/recorder.mjs:19 — encode has cyclomatic complexity 25 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 25, cognitive 29) · ×1
  • Complex function (anonymous) (cyclomatic 25, cognitive 29) extension/background/service-worker.js:247 — (anonymous) has cyclomatic complexity 25 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ct (cyclomatic 24, cognitive 21) · ×1
  • Complex function ct (cyclomatic 24, cognitive 21) crates/context/assets/component-review.js:1568 — ct has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function summary (cyclomatic 24, cognitive 21) · ×1
  • Complex function summary (cyclomatic 24, cognitive 21) ui/component-review/plan-review.ts:381 — summary has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseFrontmatter (cyclomatic 23, cognitive 59) · ×1
  • Complex function parseFrontmatter (cyclomatic 23, cognitive 59) scripts/lib/utils.js:129 — parseFrontmatter has cyclomatic complexity 23 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 generateVariants (cyclomatic 23, cognitive 37) · ×1
  • Complex function generateVariants (cyclomatic 23, cognitive 37) tests/live-e2e/agents/llm-agent.mjs:327 — generateVariants has cyclomatic complexity 23 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.
R2 · Cyclomatic Complexity · Complex function applyEditing (cyclomatic 23, cognitive 36) · ×1
  • Complex function applyEditing (cyclomatic 23, cognitive 36) skill/scripts/live-browser.js:4017 — applyEditing has cyclomatic complexity 23 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.
R2 · Cyclomatic Complexity · Complex function onPendingPillClick (cyclomatic 23, cognitive 30) · ×1
  • Complex function onPendingPillClick (cyclomatic 23, cognitive 30) skill/scripts/live-browser.js:4385 — onPendingPillClick has cyclomatic complexity 23 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.
R2 · Cyclomatic Complexity · Complex function mountSvelteComponentVariant (cyclomatic 23, cognitive 22) · ×1
  • Complex function mountSvelteComponentVariant (cyclomatic 23, cognitive 22) skill/scripts/live-browser.js:5904 — mountSvelteComponentVariant has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · crates/context/assets/component-review.js · ×1
  • crates/context/assets/component-review.js: 1469 lines of code crates/context/assets/component-review.js:1 — crates/context/assets/component-review.js has 1469 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 · browser-bundle/15-snapshot.js · ×1
  • browser-bundle/15-snapshot.js: 987 lines of code browser-bundle/15-snapshot.js:1 — browser-bundle/15-snapshot.js has 987 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 · ui/component-review/plan-review.ts · ×1
  • ui/component-review/plan-review.ts: 605 lines of code ui/component-review/plan-review.ts:1 — ui/component-review/plan-review.ts has 605 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 · browser-bundle/40-overlay.js · ×1
  • browser-bundle/40-overlay.js: 582 lines of code browser-bundle/40-overlay.js:1 — browser-bundle/40-overlay.js has 582 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 · ui/component-review/review.ts · ×1
  • ui/component-review/review.ts: 457 lines of code ui/component-review/review.ts:1 — ui/component-review/review.ts has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 438 lines of code REDACTED:1 — REDACTED has 438 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 · extension/background/service-worker.js · ×1
  • extension/background/service-worker.js: 416 lines of code extension/background/service-worker.js:1 — extension/background/service-worker.js has 416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded scripts/smoke-provider-hooks.mjs:15 — This repository declares test tooling, and the ✓ above records that declaration — but scripts/smoke-provider-hooks.mjs and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
R7 · Dead Code · Dead file (~461 LoC) · ×1
  • Dead file (~461 LoC) extension/background/service-worker.js — no import path from any entry point (188 application, 83 tooling, 313 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
R8 · Dependency Hygiene · Unused dependency '@anthropic-ai/claude-agent-sdk' · ×1
  • Unused dependency '@anthropic-ai/claude-agent-sdk' — Declared in the root REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'hono' · ×1
  • Unused dependency 'hono' — Declared in REDACTED 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.
Minor — 110 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:2351 — `!!btn && btn.getAttribute('aria-disabled') !== 'true'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:7061 — `!!currentSessionId || (state !== 'IDLE' && state !== 'PICKING')` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:5339 — `!!el && el.parentElement && document.body.contains(el) && !own(el) && !el.closest?.('[data-impeccable-variants],[data-impeccable-carbonize]'…` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser-dom.js:44 — `!!rect && rect.width > 0.5 && rect.height > 0.5` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser-dom.js, .agents/skills/impeccable/scripts/live-browser-dom.js, .claude/skills/impeccable/scripts/live-browser-dom.js, .cursor/skills/impeccable/scripts/live-browser-dom.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:2193 — `!!wrapper && wrapper.dataset.impeccableMode === 'insert'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:1777 — `!Number.isFinite(rect.height) || rect.height <= 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:1774 — `!Number.isFinite(rect.width) || rect.width <= 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:3325 — `!Object.hasOwn(saved, p.id) || !isValidSavedParamValue(p, saved[p.id])` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4897 — `!active.has(target) || !target.isConnected` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:1260 — `!barEl || barEl.style.display === 'none'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:1096 — `!candidate || !candidate.contains(leafEl)` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:1097 — `!candidate.id && candidate.classList.length === 0 && candidate.children.length < 2` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:3543 — `!child.dataset || !child.dataset.impeccableTextWrap` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:3786 — `!cls || cls.indexOf('impeccable-') === 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4349 — `!currentPageCount || currentPageCount <= 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:9487 — `!currentSessionId || arrivedVariants === 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:9965 — `!currentSessionId || state !== 'GENERATING'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:12543 — `!e.data || typeof e.data.source !== 'string'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4637 — `!el || !el.dataset || el.dataset.impeccableTextWrap !== 'true' || !el.parentElement` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:3639 — `!el || !el.isConnected || state !== 'EDITING'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4617 — `!el || typeof op.originalText !== 'string' || !canRestoreManualEditElement(el, op)` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4631 — `!el || typeof op?.originalText !== 'string'` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:4735 — `!el.classList || !el.classList.contains(cls)` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:3783 — `!el.classList || el.classList.length === 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:5888 — `!excludedEls || excludedEls.length === 0` appears character-identically in 23 files — .agent/skills/impeccable/scripts/live-browser.js, .agents/skills/impeccable/scripts/live-browser.js, .claude/skills/impeccable/scripts/live-browser.js, .cursor/skills/impeccable/scripts/live-browser.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×29
  • Silent fallback default on Err crates/agents/src/render.rs:166 — `drifted_hooks` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/browser/src/fullpage.rs:746 — `probe_layout` 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/cli/src/font_render.rs:77 — `js_string` turns every `Err` into `"\"\"".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/comp/src/hero.rs:509 — `svg_illustrations` turns every `Err` into `0.0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/comp-verbs/src/build_phase.rs:956 — `organic_clip_regions` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/context/src/critique_storage.rs:791 — `run_with_saved` turns every `Err` into `2` — 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/context/src/serve_question.rs:928 — `record_generated` turns every `Err` into `Ok(vec![])` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/context/src/staleness.rs:372 — `js_json_stringify` turns every `Err` into `"null".into()` — 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/context/src/util.rs:230 — `json_pretty` turns every `Err` into `"null".into()` — 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/context/src/util.rs:235 — `json_compact` turns every `Err` into `"null".into()` — 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/context/src/util.rs:265 — `homedir` turns every `Err` into `"C:\\".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/core/src/checks/hard_offset_shadow.rs:23 — `check_hard_offset_shadow` 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/detect/src/cli.rs:273 — `format_findings` turns every `Err` into `"[]".into()` — 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/detect/src/list_rules.rs:102 — `format_list_rules_json` turns every `Err` into `"[]".into()` — 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/hook/src/before_edit.rs:436 — `shell_here_doc_content` turns every `Err` into `String::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/hook/src/hook_sessions.rs:104 — `recorded_roots` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/html/src/dom.rs:283 — `query_selector_all` 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/html/src/dom.rs:598 — `query_selector_all` 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/live/src/pending_edits.rs:24 — `read_buffer` 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/live/src/svelte_component.rs:1248 — `read_declared_params` 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/skills/src/util.rs:286 — `json_pretty` turns every `Err` into `"null".into()` — 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/wasm/src/lib.rs:50 — `collect_browser_findings` turns every `Err` into `"{\"groups\":[],\"pageLevel\":[]}".into()` — 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/wasm/src/lib.rs:75 — `antipatterns_json` turns every `Err` into `"[]".into()` — 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/wasm/src/dom_source.rs:121 — `collect_findings_from_snapshot` turns every `Err` into `"{\"groups\":[],\"pageLevel\":[]}".into()` — 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/wasm/src/exports_detect.rs:110 — `findings_json` turns every `Err` into `"[]".into()` — 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.
  • + 4 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×11
  • Silent fallback default in catch browser-bundle/15-snapshot.js:289 — `__snapStyleRuleAppliesToLiveMatches` swallows every exception into `return false` — 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 browser-bundle/15-snapshot.js:426 — `__snapAnimationNamesDeclaredByRule` 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 browser-bundle/15-snapshot.js:546 — `__snapLinkedStylesheetText` 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 crates/live/assets/detect-antipatterns-browser.js:815 — `__snapStyleRuleAppliesToLiveMatches` swallows every exception into `return false` — 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 crates/live/assets/detect-antipatterns-browser.js:906 — `__snapConditionalCssRuleIsActive` swallows every exception into `return true` — 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 crates/live/assets/detect-antipatterns-browser.js:952 — `__snapAnimationNamesDeclaredByRule` 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 crates/live/assets/detect-antipatterns-browser.js:1072 — `__snapLinkedStylesheetText` 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 cursor-plugin/skills/impeccable/scripts/live-browser.js:5595 — `loadSvelteComponentParams` 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 cursor-plugin/skills/impeccable/scripts/live-browser.js:10676 — `detectPageTheme` swallows every exception into `return 'light'` — 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 plugin/skills/impeccable/scripts/live-browser.js:5595 — `loadSvelteComponentParams` 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 plugin/skills/impeccable/scripts/live-browser.js:10676 — `detectPageTheme` swallows every exception into `return 'light'` — 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.
X9 · Subsumed condition operand · Subsumed condition operand · ×3
  • Subsumed condition operand crates/live/src/manual_edits/commit.rs:850 — `kind.contains("context_text_match")` can never decide this `||` — every value satisfying `kind.contains("context_text_match")` also satisfies `kind.contains("text_match")`, 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.
  • Subsumed condition operand crates/core/src/browser/element_checks.rs:1205 — `w.ends_with("rem")` can never decide this `||` — every value satisfying `w.ends_with("rem")` also satisfies `w.ends_with("em")`, 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.
  • Subsumed condition operand crates/comp-verbs/tests/parity.rs:121 — `err.contains("covers 100% of the comp")` can never decide this `||` — every value satisfying `err.contains("covers 100% of the comp")` also satisfies `err.contains("% of the comp")`, 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.
D21 · Naming Consistency · `outerHTML` spells `HTML` where 19 names in the project spell it `Html` · ×2
  • `outerHTML` spells `HTML` where 19 names in the project spell it `Html` tests/live-e2e/agent.mjs:526 — 19 of 21 names in project impeccable spell the token `Html` (19 of 21; unit: names in project impeccable containing `Html`). Peers: live-browser.buildListHtml (cursor-plugin/skills/impeccable/scripts/live-browser.js:13742); live-browser.escapeHtml (cursor-plugin/skills/impeccable/scripts/live-browser.js:13784); panel.escapeHtml (extension/devtools/panel.js:411); sidebar.escapeHtml (extension/devtools/sidebar.js:99); live-browser.buildListHtml (plugin/skills/impeccable/scripts/live-browser.js:13742). Rename to `outerHtml`. [rule N6]
  • `outerHTML` spells `HTML` where 19 names in the project spell it `Html` tests/live-e2e/agent.mjs:552 — 19 of 21 names in project impeccable spell the token `Html` (19 of 21; unit: names in project impeccable containing `Html`). Peers: live-browser.buildListHtml (cursor-plugin/skills/impeccable/scripts/live-browser.js:13742); live-browser.escapeHtml (cursor-plugin/skills/impeccable/scripts/live-browser.js:13784); panel.escapeHtml (extension/devtools/panel.js:411); sidebar.escapeHtml (extension/devtools/sidebar.js:99); live-browser.buildListHtml (plugin/skills/impeccable/scripts/live-browser.js:13742). Rename to `outerHtml`. [rule N6]
D24 · Comment Value · redundant comment · ×2
  • redundant comment tests/lib/transformers/factory.test.js:117 — "User-invocable with hint" repeats the code it sits on: 3 of its 3 words (user, invocable, hint) are already in `const skills1 = [{ name: 'test', description: 'Test', userInvocable: true, argumentHint: '[target]', body: 'Body' }];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment tests/new-work-e2e.test.mjs:300 — "Terminal pick cleans the state file up." repeats the code it sits on: 4 of its 5 words (terminal, pick, state, file) are already in `assert.ok(!existsSync(path.join(cwd, '.impeccable', 'questions', `${key}.state.json`)),`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no map of the repository's parts README.md:1 — The repository has 6 units (`darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, `windows-x64`, ...); `README.md` and the documents it links name none of them. Add a short list of the parts and what each does.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:37 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 37).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 19 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. The most over is `(repository root)` (28946 LoC, 73 module-visible types across 16 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/account`, `crates/browser`, `crates/cli`, `crates/common` and 4 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch cargo · ×1
  • Dependabot does not watch cargo REDACTED:3 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `cargo`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'IMPECCABLE_HOOK_COMMAND_MARKER' · ×1
  • Unused export 'IMPECCABLE_HOOK_COMMAND_MARKER' scripts/lib/transformers/hooks.js:25 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'assetKindLabel' · ×1
  • Unused export 'assetKindLabel' ui/component-review/plan-model.ts:35 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused module-local declaration 'copyDistToBuild' · ×1
  • Unused module-local declaration 'copyDistToBuild' scripts/build.js:743 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'providerTestDir' · ×1
  • Unused module-local declaration 'providerTestDir' tests/lib/transformers/providers.test.js:10 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'countSourceVariants' · ×1
  • Unused module-local declaration 'countSourceVariants' tests/live-e2e.test.mjs:1673 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'escapeRegExp' · ×1
  • Unused module-local declaration 'escapeRegExp' tests/live-e2e.test.mjs:1677 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'waitForGenerationTimings' · ×1
  • Unused module-local declaration 'waitForGenerationTimings' tests/live-e2e.test.mjs:1681 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'clickPickToggle' · ×1
  • Unused module-local declaration 'clickPickToggle' tests/live-e2e.test.mjs:2347 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'PICKER_ID' · ×1
  • Unused module-local declaration 'PICKER_ID' tests/live-e2e/ui.mjs:19 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'HTML' · ×1
  • Unused module-local declaration 'HTML' tests/oracle/cases/live-accept.mjs:14 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'JSX' · ×1
  • Unused module-local declaration 'JSX' tests/oracle/cases/live-accept.mjs:15 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/20 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~38.6 `!` null assertions per 1k TypeScript source lines — 86 assertion(s) across the 2228 source line(s) of the 12 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: ui/component-review/review.ts (53), ui/component-review/plan-review.ts (30), ui/component-review/entry.ts (1). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 23 finding(s)
D12 · Dependency Hygiene · Outdated · ×11
  • Outdated: ego-tree — `ego-tree` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in crates/html/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ego-tree` and commit the updated REDACTED.
  • Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/context/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: indexmap — `indexmap` is locked at 2.14.1 but 2.14.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/html/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indexmap` and commit the updated REDACTED.
  • Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/account/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: rustls-native-certs — `rustls-native-certs` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/context/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-native-certs` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/account/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: thiserror — `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/html/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: unicode-normalization — `unicode-normalization` is locked at 0.1.25 but 0.1.26 is the current stable release on crates.io, and it already satisfies the `"0.1.25"` requirement declared in crates/context/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-normalization` and commit the updated REDACTED.
  • Outdated: wasm-bindgen — `wasm-bindgen` is locked at 0.2.127 but 0.2.130 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen` and commit the updated REDACTED.
  • Outdated: webpki-roots — `webpki-roots` is locked at 1.0.9 but 1.0.12 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/context/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p webpki-roots` and commit the updated REDACTED.
  • Outdated: zip — `zip` is locked at 9.3.0 but 9.5.1 is the current stable release on crates.io, and it already satisfies the `"9.3.0"` requirement declared in crates/skills/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zip` and commit the updated REDACTED.
D10 · Test Quality · Skipped (documented) · ×10
  • Skipped (documented): cleans accepted LLM DOM wrappers after carbonize cleanup tests/live-e2e-accept-cleanup-regression.test.mjs:48 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): applies a generic label/count/source-key batch through the selected provider tests/live-e2e-llm-agent.test.mjs:194 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): restores a generic source-key batch through the selected provider without leaving numeric strings tests/live-e2e-llm-agent.test.mjs:231 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): drives the full click → Go → cycle → accept cycle tests/live-e2e.test.mjs:215 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): recovers when the preflight reload makes the browser miss the done broadcast tests/live-e2e.test.mjs:1090 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): self-discards an orphaned session when its wrapper is edited out of source tests/live-e2e.test.mjs:1199 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): clears another project's leftover browser session instead of resuming it tests/live-e2e.test.mjs:1265 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): uploads annotations with generate and still accepts the variant tests/live-e2e.test.mjs:1382 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): Exit removes live chrome cleanly tests/live-e2e.test.mjs:1455 — 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 accepted variant styled and the others hidden tests/live-static-accept.test.mjs:79 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names scripts/lib/zip.js:18 — 1 of 30 documented parameters and 0 of 290 summaries in `impeccable` only repeat the member or parameter name (e.g. "Name of the provider" for `providerName`). Delete the restating tags, or add what the name does not say.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: impeccable-common — impeccable-common: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-bbfb434d689b41a1bfa8612b5f60ec80/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-bbfb434d689b41a1bfa8612b5f60ec80/tree.json --exit-code 0 --source .17artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude .agent --exclude .agents --exclude .claude --exclude .codex --exclude .cursor --exclude .devin --exclude .dsh --exclude .gemini --exclude .grok --exclude .hermes --exclude .kiro --exclude .omp --exclude .opencode --exclude .pi --exclude .qoder --exclude .rovodev --exclude .trae --exclude .trae-cn --exclude .veto --exclude .vibe --exclude cursor-plugin --exclude plugin --exclude tests/oracle/golden --exclude tests/oracle/vectors/calls/engines.static-html.css-cascade --exclude tests/oracle/vectors/calls/rules.checks --exclude tests/oracle/vectors/calls/shared.color --exclude tests/oracle/vectors/calls/shared.inline-ignores --exclude tests/oracle/workspaces/live-html/dist .18artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .12artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude .agent --exclude .agents --exclude .claude --exclude .codex --exclude .cursor --exclude .devin --exclude .dsh --exclude .gemini --exclude .grok --exclude .hermes --exclude .kiro --exclude .omp --exclude .opencode --exclude .pi --exclude .qoder --exclude .rovodev --exclude .trae --exclude .trae-cn --exclude .veto --exclude .vibe --exclude cursor-plugin --exclude plugin --exclude tests/oracle/golden --exclude tests/oracle/vectors/calls/engines.static-html.css-cascade --exclude tests/oracle/vectors/calls/rules.checks --exclude tests/oracle/vectors/calls/shared.color --exclude tests/oracle/vectors/calls/shared.inline-ignores --exclude tests/oracle/workspaces/live-html/dist .2artifacts/raw/semgrep-gdpr.json
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d5e0-de60-7efa-837d-62174bdc69b2 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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