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

pbakaus/impeccable

Measured 24 October 2026, 15:05 UTC, at code version 9368675

Regression: 1 dimension fell since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 47out of 100 At risk Up 3 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: 208,205 lines of product code in 22 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Production Readiness, 37

Findings by how serious they are

28 critical 1931 serious 124 minor

7 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 15:05 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 Watchdog. It is open to any tool that implements it, and today Watchdog 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. Watchdog works 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 ▸

78of 82 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
2047of 2083 findings point to an exact file and line, so you can open each one in the code. The other 36 concern the repository as a whole, such as missing documentation.
82dimensions across 7 lenses, read from 208,205 lines of product code in 22 projects.
Chapters

Executive summary

pbakaus/impeccable scores 47 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Production Readiness, which scores 37 and is rated Weak. Its Observability dimension scores 1 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 1 Leaked secret finding(s) in Secret Scanning and to resolve the 5 No assertions (empty test) finding(s) in Test Quality, and if Production Readiness rose to 70, the score would rise from 47 to about 54.

28 findings are critical: eight in Dependency Vulnerabilities, seven in Static Analysis (SAST), five in Page structure, five in Test Quality, two in Forms & labels and one in Secret Scanning.

Watchdog couldn't measure 6 dimensions in this code, among them Code Coverage, Test Reliability and Navigability, so they are left out of the score. The product code is 208,205 lines, which would take an estimated 1.5 person-years, around €220,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.
Production Readiness 37 · counts for 46%Code Health 43 · counts for 25%Performance 60 · counts for 14%Accessibility 63 · counts for 8%Maturity 65 · counts for 4%Security and Compliance 73 · counts for 2%Architecture 98 · counts for 1%

If Production Readiness rose from 37 to 70, the lowest score rated Strong, the score would rise from 47 to about 54.

Code composition: what the lines of code are
Product code 86%Tests 14%
New since the last survey: 379 findings

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

  • Cyclomatic Complexity · component-review.Ri::G (cyclomatic 265) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::check_element_colors_dom_in (cyclomatic 108) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · capture (cyclomatic 94) REDACTED
  • Cyclomatic Complexity · impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88) crates/detect/src/regex_matchers.rs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 64) crates/cli/src/raster_coverage.js
  • Cyclomatic Complexity · component-review.Di::ae (cyclomatic 56) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_core::checks::css_scan::path_is_rounded_rectangle (cyclomatic 53) crates/core/src/checks/css_scan.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::check_element_inset_stripe_dom (cyclomatic 48) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::painted::mask_alpha_at (cyclomatic 45) crates/core/src/browser/painted.rs
  • Cyclomatic Complexity · impeccable_browser::scan_loaded (cyclomatic 41) REDACTED
  • Cyclomatic Complexity · impeccable_core::checks::html_patterns::check_html_patterns_picking (cyclomatic 40) crates/core/src/checks/html_patterns.rs
  • Cyclomatic Complexity · impeccable_detect::regex_matchers::image_source_is_missing (cyclomatic 39) crates/detect/src/regex_matchers.rs
  • Cyclomatic Complexity · impeccable_detect::detect_text::mask_js_literals (cyclomatic 38) crates/detect/src/detect_text.rs
  • Cyclomatic Complexity · impeccable_common::http::read_request (cyclomatic 37) crates/common/src/http.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::read_pseudo_gradient_face (cyclomatic 37) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::layer_entry_fills (cyclomatic 30) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_layers::covered_by_a_later_picture (cyclomatic 30) crates/core/src/browser/text_layers.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_layers::fill_covers_ranked (cyclomatic 28) crates/core/src/browser/text_layers.rs
  • Cyclomatic Complexity · impeccable_core::checks::text_context::fine_print (cyclomatic 28) crates/core/src/checks/text_context.rs
  • Cyclomatic Complexity · 15-snapshot.__snapLastWordRects (cyclomatic 27) REDACTED
  • Cyclomatic Complexity · impeccable_context::concept_seed::run (cyclomatic 24) crates/context/src/concept_seed.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::blended_echo_over (cyclomatic 24) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · component-review.Di::xe (cyclomatic 24) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::spill_past_painted_box (cyclomatic 23) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::css_plan (cyclomatic 23) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · impeccable_core::checks::html_patterns::scan_html_for_shape_assembled_illustration (cyclomatic 23) crates/core/src/checks/html_patterns.rs
  • Cyclomatic Complexity · impeccable_core::checks::row_stripe::border_stripe (cyclomatic 23) crates/core/src/checks/row_stripe.rs
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::covering_ground (cyclomatic 22) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::quality::is_transparent_shell_for_flush (cyclomatic 22) crates/core/src/browser/quality.rs
  • 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 · CdpEntryRenderer::capture_at (cyclomatic 21) crates/cli/src/entry_capture.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::ink_paint (cyclomatic 21) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::ink_plateau_share (cyclomatic 21) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::share_left_by_covering_media (cyclomatic 21) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_live::inject::tag_strategy::read_reference (cyclomatic 21) crates/live/src/inject/tag_strategy.rs
  • Cyclomatic Complexity · component-review.Di::$e (cyclomatic 21) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::is_field_box (cyclomatic 20) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::scroller_page_insets (cyclomatic 20) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_core::checks::hard_offset_shadow::parse_layer (cyclomatic 20) crates/core/src/checks/hard_offset_shadow.rs
  • Cyclomatic Complexity · impeccable_core::checks::row_stripe::scan_css_text_for_row_stripe (cyclomatic 20) crates/core/src/checks/row_stripe.rs
  • Cyclomatic Complexity · impeccable_detect::detect_text::run_regex_matchers (cyclomatic 20) crates/detect/src/detect_text.rs
  • Cyclomatic Complexity · impeccable_foundation::css::scan::step_translation (cyclomatic 20) crates/foundation/src/css/scan.rs
  • Cyclomatic Complexity · impeccable_html::quality::insulates_side (cyclomatic 20) crates/html/src/quality.rs
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::laid_out_apart (cyclomatic 19) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::painted::buried_by_an_opaque_sibling (cyclomatic 19) crates/core/src/browser/painted.rs
  • Cyclomatic Complexity · impeccable_core::browser::quality::drawn_inner_edge (cyclomatic 19) crates/core/src/browser/quality.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_collectors::collect_numbered_section_label_candidates (cyclomatic 19) crates/core/src/browser/text_collectors.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::unread_paint_layers (cyclomatic 19) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · impeccable_hook::admin::repair_hook_manifests (cyclomatic 19) crates/hook/src/admin.rs
  • Cyclomatic Complexity · Ve (cyclomatic 19) crates/context/assets/component-review.js
  • Cyclomatic Complexity · impeccable_context::context_cli::automatic_hook_mode (cyclomatic 18) crates/context/src/context_cli.rs
  • Cyclomatic Complexity · impeccable_core::browser::driver::computed_paint_applies (cyclomatic 18) crates/core/src/browser/driver.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::check_element_glow_dom (cyclomatic 18) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_layers::covered_by_a_higher_sibling (cyclomatic 18) crates/core/src/browser/text_layers.rs
  • Cyclomatic Complexity · impeccable_core::browser::visual::layer_in_box (cyclomatic 18) crates/core/src/browser/visual.rs
  • Cyclomatic Complexity · impeccable_html::quality::is_transparent_wrapper_static (cyclomatic 18) crates/html/src/quality.rs
  • Cyclomatic Complexity · impeccable_live::instructions::instructions_for_event (cyclomatic 18) crates/live/src/instructions.rs
  • Cyclomatic Complexity · impeccable_skills::hook_manifest::copy_provider_hooks (cyclomatic 18) REDACTED
  • 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 · impeccable_browser::fullpage::capture_element_shots (cyclomatic 17) crates/browser/src/fullpage.rs
  • Cyclomatic Complexity · impeccable_core::browser::hidden_mockup::subtree_text (cyclomatic 17) crates/core/src/browser/hidden_mockup.rs
  • Cyclomatic Complexity · impeccable_core::browser::page_checks::is_output_block (cyclomatic 17) crates/core/src/browser/page_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::painted::turned_away (cyclomatic 17) crates/core/src/browser/painted.rs
  • Cyclomatic Complexity · impeccable_core::browser::painted::keyframe_x (cyclomatic 17) crates/core/src/browser/painted.rs
  • Cyclomatic Complexity · impeccable_core::browser::quality::visible_y_extent (cyclomatic 17) crates/core/src/browser/quality.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_layers::covered_by_a_later_fill (cyclomatic 17) crates/core/src/browser/text_layers.rs
  • Cyclomatic Complexity · impeccable_core::checks::decorative_text::classify_decorative_text (cyclomatic 17) crates/core/src/checks/decorative_text.rs
  • Cyclomatic Complexity · impeccable_detect::detect_text::detect_text (cyclomatic 17) crates/detect/src/detect_text.rs
  • Cyclomatic Complexity · impeccable_skills::bundle::download_file_capped (cyclomatic 17) crates/skills/src/bundle.rs
  • Cyclomatic Complexity · Ri::On (cyclomatic 17) crates/context/assets/component-review.js
  • Cyclomatic Complexity · Page::native_pseudo_boxes (cyclomatic 16) crates/browser/src/cdp.rs
  • Cyclomatic Complexity · impeccable_context::context::has_ui_signal (cyclomatic 16) crates/context/src/context.rs
  • Cyclomatic Complexity · impeccable_context::doctor::apply_fixes (cyclomatic 16) crates/context/src/doctor.rs
  • Cyclomatic Complexity · impeccable_context::telemetry::picker_choice (cyclomatic 16) crates/context/src/telemetry.rs
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::painted_overflow_extent (cyclomatic 16) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · impeccable_core::browser::text_collectors::in_an_unpainted_article (cyclomatic 16) crates/core/src/browser/text_collectors.rs
  • Cyclomatic Complexity · impeccable_detect::design_system::split_top_level_args (cyclomatic 16) crates/detect/src/design_system.rs
  • Cyclomatic Complexity · impeccable_detect::regex_matchers::sass_scope_statements (cyclomatic 16) crates/detect/src/regex_matchers.rs
  • Cyclomatic Complexity · impeccable_detect::regex_matchers::analyze_monotonous_spacing (cyclomatic 16) crates/detect/src/regex_matchers.rs
  • Cyclomatic Complexity · impeccable_skills::hook_manifest::repair_stale_hook_manifests (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · live-browser.buildInsertConfigureRow (cyclomatic 16) skill/scripts/live-browser.js
  • Cyclomatic Complexity · ensureOffscreenDocument (cyclomatic 16) extension/background/service-worker.js
  • 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_detect::regex_matchers::scan_markup_context (cognitive 212) crates/detect/src/regex_matchers.rs
  • Cognitive Complexity · (anonymous) (cognitive 186) crates/cli/src/raster_coverage.js
  • Cognitive Complexity · capture (cognitive 164) REDACTED
  • Cognitive Complexity · impeccable_core::browser::element_checks::check_element_colors_dom_in (cognitive 161) crates/core/src/browser/element_checks.rs
  • Cognitive Complexity · impeccable_core::browser::element_checks::read_pseudo_gradient_face (cognitive 79) crates/core/src/browser/element_checks.rs
  • Cognitive Complexity · impeccable_core::checks::css_scan::path_is_rounded_rectangle (cognitive 79) crates/core/src/checks/css_scan.rs
  • Cognitive Complexity · impeccable_common::http::read_request (cognitive 78) crates/common/src/http.rs
  • Cognitive Complexity · impeccable_core::browser::painted::mask_alpha_at (cognitive 68) crates/core/src/browser/painted.rs
  • Cognitive Complexity · impeccable_core::checks::html_patterns::check_html_patterns_picking (cognitive 63) crates/core/src/checks/html_patterns.rs
  • Cognitive Complexity · impeccable_core::browser::visual::blended_echo_over (cognitive 61) crates/core/src/browser/visual.rs
  • Cognitive Complexity · impeccable_detect::regex_matchers::image_source_is_missing (cognitive 61) crates/detect/src/regex_matchers.rs
  • Cognitive Complexity · impeccable_browser::scan_loaded (cognitive 60) REDACTED
  • Cognitive Complexity · impeccable_core::browser::element_checks::check_element_inset_stripe_dom (cognitive 60) crates/core/src/browser/element_checks.rs
  • Cognitive Complexity · impeccable_detect::detect_text::mask_js_literals (cognitive 59) crates/detect/src/detect_text.rs

Watchdog compares 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: 401 findings

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

  • Cyclomatic Complexity · component-review.De::G (cyclomatic 265) crates/context/assets/component-review.js
  • Cyclomatic Complexity · capture (cyclomatic 90) REDACTED
  • Cyclomatic Complexity · live-browser.connectSSE (cyclomatic 77) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.connectSSE (cyclomatic 77) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.resumeSession (cyclomatic 69) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.resumeSession (cyclomatic 69) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.handleKeyDown (cyclomatic 68) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.handleKeyDown (cyclomatic 68) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_core::browser::element_checks::check_element_colors_dom (cyclomatic 65) crates/core/src/browser/element_checks.rs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 60) crates/cli/src/raster_coverage.js
  • Cyclomatic Complexity · component-review.Oe::ai (cyclomatic 56) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser.injectSvelteComponentsFromManifest (cyclomatic 50) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.injectSvelteComponentsFromManifest (cyclomatic 50) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startVariantObserver (cyclomatic 43) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startVariantObserver (cyclomatic 43) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_browser::scan_page_inner (cyclomatic 40) REDACTED
  • Cyclomatic Complexity · live-browser.restoreSessionWithoutWrapper (cyclomatic 40) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.restoreSessionWithoutWrapper (cyclomatic 40) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildSveltePropValuesV2 (cyclomatic 39) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildSveltePropValuesV2 (cyclomatic 39) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_core::checks::html_patterns::check_html_patterns_with (cyclomatic 37) crates/core/src/checks/html_patterns.rs
  • Cyclomatic Complexity · live-browser.handleClick (cyclomatic 35) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.handleClick (cyclomatic 35) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.handleManualEditActivity (cyclomatic 32) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.handleManualEditActivity (cyclomatic 32) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.injectVariantsFromSource (cyclomatic 31) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.injectVariantsFromSource (cyclomatic 31) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_live::live_http::read_request (cyclomatic 27) crates/live/src/live_http.rs
  • Cyclomatic Complexity · live-browser.mountSvelteComponentVariant (cyclomatic 27) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startScrollLock (cyclomatic 27) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.unlockSteerChat (cyclomatic 27) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.mountSvelteComponentVariant (cyclomatic 27) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startScrollLock (cyclomatic 27) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.unlockSteerChat (cyclomatic 27) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.initPageChat (cyclomatic 25) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.initGlobalBar (cyclomatic 25) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.initPageChat (cyclomatic 25) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.initGlobalBar (cyclomatic 25) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · component-review.Oe::xi (cyclomatic 24) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser.buildParamsPanel (cyclomatic 24) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startVoice (cyclomatic 24) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildParamsPanel (cyclomatic 24) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.startVoice (cyclomatic 24) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_core::checks::text_context::is_fine_print (cyclomatic 22) crates/core/src/checks/text_context.rs
  • Cyclomatic Complexity · live-browser-ignores.pageCandidates (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser-ignores.js
  • Cyclomatic Complexity · live-browser.onAnnotDown (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.resolveBarAnchor (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.applyEditing (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.setPendingApplyLoading (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.onPendingPillClick (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.showShaderOverlay (cyclomatic 22) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser-ignores.pageCandidates (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser-ignores.js
  • Cyclomatic Complexity · live-browser.onAnnotDown (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.resolveBarAnchor (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.applyEditing (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.setPendingApplyLoading (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.onPendingPillClick (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.showShaderOverlay (cyclomatic 22) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · Oe::Gi (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · De::G::vi (cyclomatic 22) crates/context/assets/component-review.js
  • Cyclomatic Complexity · component-review.Oe::$i (cyclomatic 21) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser.hitSiblingInsertGap (cyclomatic 21) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.hitSiblingInsertGap (cyclomatic 21) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser-ignores.resolveDetectIgnores (cyclomatic 20) cursor-plugin/skills/impeccable/scripts/live-browser-ignores.js
  • Cyclomatic Complexity · live-browser.extractContext (cyclomatic 20) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildCyclingRow (cyclomatic 20) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser-ignores.resolveDetectIgnores (cyclomatic 20) plugin/skills/impeccable/scripts/live-browser-ignores.js
  • Cyclomatic Complexity · live-browser.extractContext (cyclomatic 20) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildCyclingRow (cyclomatic 20) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · impeccable_core::browser::driver::html_pattern_items (cyclomatic 19) crates/core/src/browser/driver.rs
  • Cyclomatic Complexity · live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.findLiveElementForOriginalMarkup (cyclomatic 19) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.completeSourceInjection (cyclomatic 19) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildSvelteExpressionTextMap (cyclomatic 19) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.updateGlobalBarState (cyclomatic 19) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.findLiveElementForOriginalMarkup (cyclomatic 19) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.completeSourceInjection (cyclomatic 19) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.buildSvelteExpressionTextMap (cyclomatic 19) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.updateGlobalBarState (cyclomatic 19) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · Vi (cyclomatic 19) crates/context/assets/component-review.js
  • Cyclomatic Complexity · Page::capture_pseudo_geometry (cyclomatic 18) crates/browser/src/cdp.rs
  • Cyclomatic Complexity · impeccable_detect::regex_matchers::sass_scope_corners (cyclomatic 18) crates/detect/src/regex_matchers.rs
  • Cyclomatic Complexity · component-review.Oe::Qi (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser.captureElementToBlob (cyclomatic 18) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.recoverMissedGenerationCompletion (cyclomatic 18) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.renderDesignVisual (cyclomatic 18) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.renderMarkdown (cyclomatic 18) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.captureElementToBlob (cyclomatic 18) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.recoverMissedGenerationCompletion (cyclomatic 18) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.renderDesignVisual (cyclomatic 18) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.renderMarkdown (cyclomatic 18) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · Oe::$n (cyclomatic 18) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser.collectEditableTextRows::visit (cyclomatic 17) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.captureAndEmit (cyclomatic 17) cursor-plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.collectEditableTextRows::visit (cyclomatic 17) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · live-browser.captureAndEmit (cyclomatic 17) plugin/skills/impeccable/scripts/live-browser.js
  • Cyclomatic Complexity · De::On (cyclomatic 17) crates/context/assets/component-review.js
  • Cyclomatic Complexity · live-browser-dom.createLiveBrowserDomHelpers.syncTopLayerHost (cyclomatic 16) cursor-plugin/skills/impeccable/scripts/live-browser-dom.js
  • Cyclomatic Complexity · live-browser.contextElementForManualEdit (cyclomatic 16) cursor-plugin/skills/impeccable/scripts/live-browser.js
Rebuild cost: about €220,000 · Estimate
Cost to rebuild€73,000 to €360,000, for 1,209 to 3,837 hours of work, about 1.5 person-years for 1 to 3 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 47. 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: 208,205 lines of product code

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

Top priorities

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

1
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 7 points · Low effort · Secret Scanning
2
Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with scenarios.test.mjs (2), full-build.test.mjs (2), activation.eval.mjs.
Raises the score by about 4 points · Low effort · Test Quality
3
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
Raises the score by about 4 points · Medium effort · Observability

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 €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Production Readiness, at 37 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for low effort, because it clears the 1 Secret Scanning 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 Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 333,288 lines over the last 90 days, which is about 1,351,668 lines a year. At that pace, the extra work comes to an estimated 184.8 to 1108.5 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 Watchdog's 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; 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 — a layering smell or cycle. A clean layered graph has none.

arch @impeccable/cli-darwin-arm64 cli-darwin-arm64 @impeccable/cli-darwin-x64 cli-darwin-x64 @impeccable/cli-linux-arm64 cli-linux-arm64 @impeccable/cli-linux-x64 cli-linux-x64 impeccable (Cargo) impeccable (Cargo) 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-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__ +2 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.

391 modules, with 388 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 351 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_browser.cdp2 impeccable_common3 impeccable_comp.raster4 impeccable_comp_verbs.entry_capture5 impeccable_context.context6 impeccable_foundation.color7 impeccable.asset_capture8 impeccable_comp.metrics9 impeccable_context.serve_question10 impeccable_context.staleness11 impeccable_core.browser.background12 impeccable_detect.ignores13 impeccable_foundation.rules.types14 impeccable_foundation.vectors15 impeccable_comp.font_fingerprint16 impeccable_comp_verbs.comp_diff17 impeccable_context.doctor18 impeccable_core.browser.visual19 impeccable_core.checks.rules20 impeccable_detect.design_system21 impeccable_foundation.browser22 impeccable_foundation.css.measures23 impeccable_html.cascade.csstree.parser24 impeccable_comp_verbs.build_phase25 impeccable_comp_verbs.font_match26 impeccable_core.browser.page_checks27 impeccable_core.checks.measures28 impeccable_detect.detect_text29 impeccable_detect.engines30 impeccable_foundation.browser.dom31 impeccable_foundation.css.scan32 impeccable_core.browser.driver33 impeccable_detect.cli34 impeccable_foundation.browser.snapshot35 impeccable_hook.hook_lib36 impeccable_browser37 impeccable_core.browser.element_checks38 impeccable_html.dom39 impeccable_html.adapters40 impeccable_html.static_engine
1 impeccable_browser.cdp
2 impeccable_common
3 impeccable_comp.raster
4 impeccable_comp_verbs.entry_capture
5 impeccable_context.context
6 impeccable_foundation.color
7 impeccable.asset_capture41
8 impeccable_comp.metrics1
9 impeccable_context.serve_question1
10 impeccable_context.staleness2
11 impeccable_core.browser.background3
12 impeccable_detect.ignores1
13 impeccable_foundation.rules.types5
14 impeccable_foundation.vectors1
15 impeccable_comp.font_fingerprint11
16 impeccable_comp_verbs.comp_diff131
17 impeccable_context.doctor111
18 impeccable_core.browser.visual241
19 impeccable_core.checks.rules114
20 impeccable_detect.design_system31
21 impeccable_foundation.browser11
22 impeccable_foundation.css.measures141
23 impeccable_html.cascade.csstree.parser1
24 impeccable_comp_verbs.build_phase1112
25 impeccable_comp_verbs.font_match122
26 impeccable_core.browser.page_checks11113
27 impeccable_core.checks.measures1215
28 impeccable_detect.detect_text1112
29 impeccable_detect.engines11
30 impeccable_foundation.browser.dom21
31 impeccable_foundation.css.scan1
32 impeccable_core.browser.driver2151
33 impeccable_detect.cli2114
34 impeccable_foundation.browser.snapshot23
35 impeccable_hook.hook_lib211
36 impeccable_browser51163
37 impeccable_core.browser.element_checks2211211111
38 impeccable_html.dom11
39 impeccable_html.adapters11121113
40 impeccable_html.static_engine2223
Uses a module listed above itPart of a loopThe module itself
1 impeccable_browser.cdp2 impeccable_common3 impeccable_comp.raster4 impeccable_comp_verbs.entry_capture5 impeccable_context.context6 impeccable_foundation.color7 impeccable.asset_capture8 impeccable_comp.metrics9 impeccable_context.serve_question10 impeccable_context.staleness11 impeccable_core.browser.background12 impeccable_detect.ignores13 impeccable_foundation.rules.types14 impeccable_foundation.vectors15 impeccable_comp.font_fingerprint16 impeccable_comp_verbs.comp_diff17 impeccable_context.doctor18 impeccable_core.browser.visual19 impeccable_core.checks.rules20 impeccable_detect.design_system21 impeccable_foundation.browser22 impeccable_foundation.css.measures23 impeccable_html.cascade.csstree.parser24 impeccable_comp_verbs.build_phase25 impeccable_comp_verbs.font_match26 impeccable_core.browser.page_checks27 impeccable_core.checks.measures28 impeccable_detect.detect_text29 impeccable_detect.engines30 impeccable_foundation.browser.dom31 impeccable_foundation.css.scan32 impeccable_core.browser.driver33 impeccable_detect.cli34 impeccable_foundation.browser.snapshot35 impeccable_hook.hook_lib36 impeccable_browser37 impeccable_core.browser.element_checks38 impeccable_html.dom39 impeccable_html.adapters40 impeccable_html.static_engineimpeccable_browser.cdp1impeccable_common2impeccable_comp.raster3impeccable_comp_verbs.entry_capture4impeccable_context.context5impeccable_foundation.color6impeccable.asset_capture7impeccable_comp.metrics8impeccable_context.serve_question9impeccable_context.staleness10impeccable_core.browser.background11impeccable_detect.ignores12impeccable_foundation.rules.types13impeccable_foundation.vectors14impeccable_comp.font_fingerprint15impeccable_comp_verbs.comp_diff16impeccable_context.doctor17impeccable_core.browser.visual18impeccable_core.checks.rules19impeccable_detect.design_system20impeccable_foundation.browser21impeccable_foundation.css.measures22impeccable_html.cascade.csstree.parser23impeccable_comp_verbs.build_phase24impeccable_comp_verbs.font_match25impeccable_core.browser.page_checks26impeccable_core.checks.measures27impeccable_detect.detect_text28impeccable_detect.engines29impeccable_foundation.browser.dom30impeccable_foundation.css.scan31impeccable_core.browser.driver32impeccable_detect.cli33impeccable_foundation.browser.snapshot34impeccable_hook.hook_lib35impeccable_browser36impeccable_core.browser.element_checks37impeccable_html.dom38impeccable_html.adapters39impeccable_html.static_engine4041112315111131111241114311114111112122111131215111211211215121142321151163221121111111111211132223+351 more modules (most-connected shown)

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

At a glance — Architecture · 98% · Exemplary ·

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

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

At a glance — Security · 73% · Adequate · gated by D29, D30 ·

At a glance — Accessibility · 63% · Adequate ·

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 — Injection20High / Critical
A03:2025 — Software Supply Chain Failures16High / Critical
A01:2025 — Broken Access Control2Medium
A07:2025 — Authentication Failures1High / Critical

Roadmap

Immediately resolve the leaked secret in REDACTED and fix the five empty test files to ensure basic security and test integrity. Next, implement structured logging with tracing in all binaries and migrate the remaining JavaScript files to TypeScript to improve observability and type safety. Finally, enforce resilience on all outbound HTTP calls by adding timeouts, retries, and circuit breakers to prevent cascading failures.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+7.1 ptsLowSecret Scanning
Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with scenarios.test.mjs (2), full-build.test.mjs (2), activation.eval.mjs.+3.6 ptsLowTest Quality
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.+3.6 ptsMediumObservability
Migrate the remaining .js/.jsx files to TypeScript.+2.4 ptsMediumType Safety
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.+2.2 ptsMediumOutbound HTTP resilience
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.+2.2 ptsMediumSecurity & performance tooling
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.9 ptsLowADR Quality
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.+1.5 ptsMediumAsync & latency hygiene

File quality

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

FileScoreBandWorst signal
REDACTED1.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.6SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
crates/detect/src/cli.rs5.5MixedCyclomatic Complexity: impeccable_detect::cli::detect_cli (cyclomatic 78)
REDACTED5.7MixedSecret Scanning: Leaked secret: REDACTED
crates/core/src/checks/text_rules.rs6.0MixedExplicit Debt: TodoComment
REDACTED6.1MixedDependency Vulnerabilities: Medium CVE: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
crates/context/assets/component-review.js7.0MixedCyclomatic Complexity: component-review.Ri::G (cyclomatic 265)
crates/core/src/browser/quality.rs7.0MixedCyclomatic Complexity: impeccable_core::browser::quality::check_quality (cyclomatic 204)
crates/context/src/serve_question.rs7.0MixedCyclomatic Complexity: impeccable_context::serve_question::run (cyclomatic 157)
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 108)
crates/detect/src/regex_matchers.rs7.0MixedCyclomatic Complexity: impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88)

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

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

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

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

Could not be resolved — 7

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 78 of 82 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 82 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D17D19D20D21D22D26D28D29D30D32D34D35D36D43D44AC1AC2AC3AC5AC6AC7AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R2R3R4R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X27X28X29X3X30X5

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, 2047 of 2083 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16e72-12f2-72c3-a4eb-3ed01313f95e.

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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: 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. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 803 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 130 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs, .tsx, .ts, .mjs, .js, .jsx) and this repository declares a Cargo test suite (repository root, 253 test files), but it was not re-run: its build outgrew the 7 GB scratch ceiling (7.056 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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 (61 contributor(s) across 2558 commit(s) sampled, automation and bot accounts excluded). One of them holds 85% of the history; the other 60 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.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `browser-bundle/00-header.js`, `browser-bundle/99-footer.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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 74 further occurrence(s) are not listed individually; the score already reflects all 114.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 6 further occurrence(s) are not listed individually; the score already reflects all 46.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

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

441 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was component-review.Ri::G 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. 6 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/cli/src/main.rs (impeccable::run at 37), crates/html/src/cascade/csstree/ast.rs (Node::type_name at 35), REDACTED (impeccable_html::select::alias_selector at 23), crates/context/src/provider.rs (impeccable_context::provider::provider_from_skill_dir at 21), and 1 more not listed here. 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 204) · ×106crates/core/src/browser/quality.rs:2041
impeccable_live::session::apply_event (cyclomatic 82) · ×54crates/live/src/session.rs:432
impeccable_context::serve_question::run (cyclomatic 157) · ×33crates/context/src/serve_question.rs:1226
impeccable_detect::regex_matchers::scan_markup_context (cyclomatic 88) · ×25crates/detect/src/regex_matchers.rs:2056
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 6 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with component-review.Ri::G (cyclomatic 265), Ri::G (cyclomatic 255), review.mountComponentReview.render (cyclomatic 248). — 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 6 together lifts Cyclomatic Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

impeccable_core::browser::quality::check_quality (cognitive 416) · ×156crates/core/src/browser/quality.rs:2041
impeccable_live::session::apply_event (cognitive 175) · ×116crates/live/src/session.rs:432
impeccable_context::serve_question::run (cognitive 353) · ×60crates/context/src/serve_question.rs:1226
impeccable_detect::regex_matchers::scan_markup_context (cognitive 212) · ×44crates/detect/src/regex_matchers.rs:2056
impeccable_html::quality::check_quality (cognitive 182) · ×25crates/html/src/quality.rs:695

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

What to do

  1. Bring the 79 bodies over 60 down to 60 or less in Cognitive Complexity — start with impeccable_core::browser::quality::check_quality (cognitive 416), impeccable_context::serve_question::run (cognitive 353), 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 79 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.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

174 god class(es) detected.

FunctionTooLong: impeccable_core::browser::quality::check_quality · ×87crates/core/src/browser/quality.rs:2041
FileTooLong: scripts/live-browser.js · ×69skill/scripts/live-browser.js
MethodTooLong: ServerState.page · ×7crates/context/src/serve_question.rs:2203
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 87 FunctionTooLong finding(s) in God Classes — start with live-browser.js (10), live_server.rs (6), build_phase.rs (5). — One of this dimension's main actionable groups (87 warning-level).
  2. Resolve the 69 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 (69 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).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.4 / 10Stronggated by 259 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

255 duplicated block group(s) detected. A further 4 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) · ×39crates/browser/src/screenshot_contrast.rs:695
Duplicated block (6 lines × 2) · ×28crates/browser/src/html_snapshot.rs:156
Duplicated block (7 lines × 2) · ×24crates/context/src/serve_question.rs:202
Duplicated block (10 lines × 2) · ×16crates/browser/src/html_snapshot.rs:316
Duplicated block (9 lines × 2) · ×15crates/common/src/http.rs:91

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

What to do

  1. Resolve the 39 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with font_fingerprint.rs (2), element_checks.rs (2), page_checks.rs (2). — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 28 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with page_checks.rs (2), quality.rs (2), live_generate.rs (2). — One of this dimension's main actionable groups (28 warning-level).
  3. Resolve the 24 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with element_checks.rs (3), config.rs (2), commit.rs (2). — One of this dimension's main actionable groups (24 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.9 / 10Strong✓ Tool-verified

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

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

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

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

22 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 16 of the 22 (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).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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 85 classes have LCOM4 above 3.

Low cohesion: JsDom (LCOM4 18)crates/wasm/src/js_dom.rs:120

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).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

3170 test methods: 2248 unit, 777 integration, 0 BDD, 145 e2e. The JavaScript/TypeScript suite contributes 803 `it`/`test` case(s) across 63 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 2367 `#[test]` function(s) across 253 file(s) declaring at least one; its unit/integration split is Cargo's own — 116 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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

9 skipped (9 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 803 tests. Measured on the JavaScript/TypeScript suite only — at least 130 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-behavior/scenarios.test.mjs:142
Fixed-sleep synchronisation: ends a stubborn child without awaiting anything · ×3tests/process-group.test.mjs:95
Skipped (documented): drives the full click → Go → cycle → accept cycle · ×9tests/live-e2e.test.mjs:214

What to do

  1. Resolve the 5 No assertions (empty test) finding(s) in Test Quality — start with scenarios.test.mjs (2), full-build.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).
  3. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

9 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 · ×9

✓ On the Gold path — maintain.

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

D13 · Secret Scanning5.0 / 10Adequate✓ Tool-verified

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 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.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 189 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 package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.1 / 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.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/core/src/browser/quality.rs (58×204=11832); crates/core/src/browser/element_checks.rs (84×108=9072); crates/core/src/browser/page_checks.rs (50×143=7150) Repeated repair below the complexity floor: tests/oracle/cases/detect.mjs (9 of 15 changes were fixes); tests/oracle/cases/hooks.mjs (3 of 5 changes were fixes); crates/context/src/hook_markers.rs (3 of 5 changes were fixes)

Hotspot: crates/core/src/browser/quality.rs · ×69crates/core/src/browser/quality.rs:2041
Repeated repair: tests/oracle/cases/detect.mjs · ×5tests/oracle/cases/detect.mjs:67

What to do

  1. Resolve the 69 Hotspot finding(s) in Churn × Complexity Hotspots — start with quality.rs (2), rules.rs (2), background.rs (2). — One of this dimension's main actionable groups (69 warning-level).
  2. Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with detect.mjs, hooks.mjs, hook_markers.rs. — One of this dimension's main actionable groups (5 warning-level).

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

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 208205 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).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's documentation is comprehensive and well-structured: 13 READMEs for per-directory usage (extension-scan/ tests/oracle/vectors/, comp-copy/) plus 21 architecture/design docs (BUNDLE-SIGNING.md, CLI-CONTRACT.md, COMP-FIDELITY.md, COMP-GATE-INTEGRITY.md, CURSOR-PLUGIN.md) cover the project's scope, installation, usage, contribution, and licensing. The root README is not shown but its overview/installation/usage/contributing sections are present in the summary; all visible documents are complete with clear headings. The documentation is comprehensive and well-structured for a Rust project. The READMEs describe the engine's purpose (Rust runtime behind every skill verb) and its layout, while architecture/Docs markdown files cover the live v2 plan, harness capabilities reference, native static-entry capture, and a porting guide with sources-of-truth and rules. Every visible document is present in the outline; the only unshown section is the missing overview for the root README (installation, usage) which would fall under its own scope. (10 of 25 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)

Documentation: written for insidersdocs/BUNDLE-SIGNING.md

✓ On the Gold path — maintain.

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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — 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 ConsistencyExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyWeak◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

7 API inconsistencies across a 400-member sample of 684 exposed types.

Screenshot methods are fragmented and inconsistent in naming and parameterization. `screenshot_viewport` returns an ambiguous result (likely raw bytes or base64 without format indication), while `screenshot_viewport_png` and `screenshot_viewport_jpeg` are explicit. `screenshot_clip` and `screenshot_jpeg` take explicit coordinates but differ in return type implication (one is generic, one is JPEG). There is no unified `screenshot` method that accepts a format enum and optional clip rect.
Two methods for JavaScript evaluation with unclear distinction. `evaluate` and `evaluate_value` likely differ in return type (void vs value), but the naming is confusing. `evaluate_value_in_world` exists for isolated worlds, but the main page methods lack a consistent pattern (e.g., `evaluate_void` vs `evaluate_value`).
Duplicate type definition across modules. `imperfect_browser.html_snapshot.HtmlSnapshot` and `imperfect.capture_snapshot.HtmlSnapshot` appear to serve the same purpose (managing HTML snapshots) with nearly identical methods (`freeze`, `digest`, `manifest`, `entry`, `bytes`, `verify_current`, `serve_path`, `serve`). This suggests a refactoring artifact or split between 'browser-level' and 'capture-service-level' concerns that should be unified.
Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotSelection` and `imperfect.capture_snapshot.SnapshotSelection` have identical properties (`root`, `entry`, `served`, `bound`).
Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotServer` and `imperfect.capture_snapshot.SnapshotServer` both expose `entry_url()`. This indicates redundant server implementations.

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

What to do

  1. Resolve the 1 Screenshot methods are fragmented and inconsistent in naming and… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Two methods for JavaScript evaluation with unclear distinction.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Duplicate type definition across modules.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D26 · Project Cohesion8.8 / 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, LLM-independent.

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

1 of 17 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.5 / 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.5 / 10 · rule-coverage 100% · ceiling Documented

20 finding(s): 0 critical, 7 high, 13 medium, 0 low. semgrep hit a parse error in 27 file(s) — `.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`, `.dsh/skills/impeccable/scripts/live-browser.js`, … (+22 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

+ 3 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 Vulnerabilities3.2 / 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.

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 7 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 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 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 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 Watchdog's 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 4 file(s) — `browser-bundle/00-header.js`, `browser-bundle/99-footer.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 269 of the 305 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 60%

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. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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 structure4.9 / 10Weak✓ 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>. (×4) — 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>. (×3) — extension/devtools/sidebar.html:2, extension/popup/popup.html:2, scripts/build-font-index.mjs:142
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — scripts/build-font-index.mjs:142

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.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 34 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain you already use: enable Biome's a11y rule group in your biome.json `linter.rules` (it is off whenever `recommended` is false and the group is unlisted), then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add a README to the 22 of 22 project(s) that lack one — worth up to 2 pts.
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 repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy9.7 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/COMP-FIDELITY.md names `build-phase.mjs`, but no file or folder `build-phase.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/COMP-FIDELITY.md:3
  • docs/COMP-FIDELITY.md names `comp-diff.mjs`, but no file or folder `comp-diff.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/COMP-FIDELITY.md:81
  • docs/COMP-FIDELITY.md documents the environment variable `COMP_ROUND_OPEN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/COMP-FIDELITY.md:270
  • docs/HARNESSES.md names `.gemini/commands/`, but no file or folder `.gemini/commands` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/HARNESSES.md:144
  • docs/adr-live-variant-mode.md names `live-server.mjs`, but no file or folder `live-server.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adr-live-variant-mode.md:32
  • docs/adr-live-variant-mode.md names `live-poll.mjs`, but no file or folder `live-poll.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adr-live-variant-mode.md:33
  • docs/adr-live-variant-mode.md names `tests/live-wrap.test.mjs`, but no file or folder `tests/live-wrap.test.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adr-live-variant-mode.md:254
  • docs/adr-live-variant-mode.md names `tests/live-server.test.mjs`, but no file or folder `tests/live-server.test.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adr-live-variant-mode.md:255
  • ui/component-review/README.md names `crates/browser/html_snapshot`, but no file or folder `crates/browser/html_snapshot` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — ui/component-review/README.md:90

What to do

  • Reconcile the README with reality: docs/COMP-FIDELITY.md names `build-phase.mjs`, but no file or folder `build-phase.mjs` exists; docs/COMP-FIDELITY.md names `comp-diff.mjs`, but no file or folder `comp-diff.mjs` exists; docs/COMP-FIDELITY.md documents the environment variable `COMP_ROUND_OPEN`, but no code, script or configuration file names it; docs/HARNESSES.md names `.gemini/commands/`, but no file or folder `.gemini/commands` exists; docs/adr-live-variant-mode.md names `live-server.mjs`, but no file or folder `live-server.mjs` exists.
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 & versioning6.0 / 10Adequate✓ Tool-verified

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

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

  • 423/604 types (70%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.

What to do

  • Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
P2 · Observability1.0 / 10Critical✓ Tool-verified

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

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

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

What to do

  • Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
  • Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
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 45769 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.

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 `npm`, `cargo` — add those `package-ecosystem` entries 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 Watchdog 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. (×16) — cli/bin/cli.js:33, cli/bin/cli.js:40, scripts/build-font-index.mjs:108, …
  • `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:39
  • `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:458

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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `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
  • `rmSync` in `teardown` 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. — tests/live-e2e/session.mjs:348
  • `readFileSync` in `runSteerSmoke` 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. — tests/live-e2e/steer.mjs:47
  • `readFileSync` in `waitForSource` 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. — tests/live-e2e/steer.mjs:65
  • `fs.readdirSync` in `allCases` 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. — tests/oracle/lib.mjs:75
  • `fs.readFileSync` in `load` 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. — tests/oracle/vectors/hooks-impl.mjs:47
  • `fs.readFileSync` in `callback to wrapped.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/oracle/vectors/hooks-impl.mjs:69
  • `fs.existsSync` in `execute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — tests/skill-behavior/harness.mjs:326, tests/skill-behavior/harness.mjs:363, tests/skill-workflow/browser.mjs:98, …
  • `fs.statSync` in `execute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tests/skill-behavior/harness.mjs:327, tests/skill-behavior/harness.mjs:364
  • `fs.readFileSync` in `execute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tests/skill-behavior/harness.mjs:329, tests/skill-workflow/browser.mjs:117
  • `fs.realpathSync` in `execute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tests/skill-behavior/harness.mjs:345, tests/skill-workflow/browser.mjs:86
  • `fs.mkdirSync` in `execute` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tests/skill-behavior/harness.mjs:348, tests/skill-workflow/browser.mjs:99
  • `fs.writeFileSync` in `execute` 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. — tests/skill-behavior/harness.mjs:349
  • `fs.readdirSync` in `execute` 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. — tests/skill-behavior/harness.mjs:366
  • `fs.statSync` in `callback to map` 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. — tests/skill-behavior/harness.mjs:367
  • `fs.mkdirSync` in `saveTrace` 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. — tests/skill-behavior/harness.mjs:434
  • `fs.writeFileSync` in `saveTrace` 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. — tests/skill-behavior/harness.mjs:435
  • `fs.statSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/skill-workflow/browser.mjs:46
  • `fs.readFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tests/skill-workflow/browser.mjs:48

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.8 / 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 · 173 plain JS — the untyped files are browser-bundle/05-natives.js, browser-bundle/10-probe.js, REDACTED, browser-bundle/30-scan-common.js, browser-bundle/35-visual.js, browser-bundle/40-overlay.js (+167 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
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: 40 files are byte-identical under the same relative paths (~17670 lines; the trees hold 64 and 62 files). That is one structural fact, not 40 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/fetch-engine.mjs:50 · scripts/publish-platform-packages.mjs:79 — the two spans are one implementation copied and then locally edited — 245 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/fetch-engine.mjs:50
  • scripts/release.mjs:182 · scripts/release.mjs:434 — both copies are in the same file, so extract the 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:182
  • REDACTED:224 · extension/content/content-script.js:132 — the two spans are one implementation copied and then locally edited — 163 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:224
  • 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:2443 · skill/scripts/live-browser.js:2533 — 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:2443
  • skill/scripts/live-browser.js:1478 · skill/scripts/live-browser.js:11638 — both copies are in the same file, so extract the 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:1478
  • scripts/lib/utils.js:772 · scripts/lib/utils.js:801 — 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:772
  • skill/scripts/live-browser.js:2469 · skill/scripts/live-browser.js:2550 — both copies are in the same file, so extract the 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:2469
  • browser-bundle/10-probe.js:63 · REDACTED: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:6240 · skill/scripts/live-browser.js:6276 — 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:6240
  • skill/scripts/live-browser.js:9490 · skill/scripts/live-browser.js:9916 — both copies are in the same file, so extract the 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:9490
  • 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:8332 · skill/scripts/live-browser.js:8437 — both copies are in the same file, so extract the 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:8332
  • 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:13158 · skill/scripts/live-browser.js:13228 — both copies are in the same file, so extract the 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:13158
  • browser-bundle/10-probe.js:338 · REDACTED:576 — 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:338
  • extension/background/service-worker.js:286 · extension/background/service-worker.js:319 — 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:286
  • skill/scripts/live-browser.js:1212 · skill/scripts/live-browser.js: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. — skill/scripts/live-browser.js:1212
  • skill/scripts/live-browser.js:5492 · skill/scripts/live-browser.js:5529 — 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:5492
  • 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:1816 · skill/scripts/live-browser.js:1840 — 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:1816
  • skill/scripts/live-browser.js:13192 · skill/scripts/live-browser.js:13219 — both copies are in the same file, so extract the 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:13192
  • browser-bundle/10-probe.js:80 · REDACTED: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
  • REDACTED:383 · REDACTED:550 — 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. — REDACTED:383
  • 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:1145 · skill/scripts/live-browser.js:2972 — 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:1145
  • skill/scripts/live-browser.js:3802 · skill/scripts/live-browser.js:3837 — 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:3802
  • skill/scripts/live-browser.js:5952 · skill/scripts/live-browser.js:6005 — both copies are in the same file, so extract the 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:5952
  • skill/scripts/live-browser.js:8403 · skill/scripts/live-browser.js:8485 — both copies are in the same file, so extract the 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:8403

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.

  • G 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 94 and cognitive complexity 142; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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
  • 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. — REDACTED:692
  • runAgentLoop has cyclomatic complexity 77 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:1912
  • 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:7648
  • handleKeyDown has cyclomatic complexity 68 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skill/scripts/live-browser.js:8203
  • (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:10097
  • evaluatePullRequest has cyclomatic complexity 63 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:146
  • ae 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:5887
  • (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:7093
  • 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:1933
  • build has cyclomatic complexity 40 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:711
  • 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:9681
  • exercise has cyclomatic complexity 37 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/launcher-download.test.mjs:28
  • handleClick has cyclomatic complexity 35 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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:8044
  • 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

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.5 / 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
  • REDACTED has 921 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
  • 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
  • extension/devtools/panel.js has 459 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/devtools/panel.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 434 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

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage6.2 / 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. (×28) — scripts/build.js:1, REDACTED:1, REDACTED: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 package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • This repository declares test tooling, and the ✓ above records that declaration — but 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 package.json 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
  • Unreachable from the 176 application, 80 tooling and 294 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 (176 application, 80 tooling, 294 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. (×10) — scripts/build.js:702, tests/fixtures/antipatterns/pseudo-stripe.vue:8, tests/lib/transformers/providers.test.js:10, …

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 package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Declared in tests/oracle/workspaces/ctx-monorepo-tooling/apps/api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Declared in 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 package.json 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 package.json 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:2414, 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:2414` (`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.

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

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

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

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

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

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

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.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

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

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

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

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

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

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

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

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

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/23 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `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 })`. (×3) — cli/bin/cli.js:31, scripts/publish-platform-packages.mjs:82, scripts/fetch-engine.mjs:53
  • `lr` 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
  • `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) — crates/context/assets/component-review.js:1633, ui/component-review/entry.ts:51
  • `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
  • `isPublished` 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 })`. — scripts/publish-platform-packages.mjs:114
  • `urlExists` 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 })`. — scripts/check-engine-release.mjs:41
  • `npmVersionExists` 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 })`. — scripts/check-engine-release.mjs:56
  • `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:3858
  • `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:4215
  • `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:4228
  • `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:4275
  • `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:4325
  • `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:4345
  • `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:5415
  • `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:5887
  • `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:8534
  • `collectFontCssText` 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:8557
  • `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:8800
  • `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:12852
  • `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

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped5.1 / 10Adequate✓ Tool-verified

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

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

  • `J({x:0,y:0,w:1,h:1})` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1524
  • `K(r,s.beforeUrl,"gen before")` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1537
  • `J(r.box)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1566
  • `Hi` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1584
  • `T(K.description||J.name)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1588
  • `T(n.title)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1589
  • `te` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/context/assets/component-review.js:1591, crates/context/assets/component-review.js:1630
  • `I` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1593
  • `z` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1595
  • `n.comp.width` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — crates/context/assets/component-review.js:1596
  • `Mn(n.comp.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — crates/context/assets/component-review.js:1597
  • `In(Kn)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — crates/context/assets/component-review.js:1598
  • `E.kind` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/context/assets/component-review.js:1599, crates/context/assets/component-review.js:1631
  • `In(e.box)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — crates/context/assets/component-review.js:1600
  • `T(e.id)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1601
  • `T(kn?tn.label:$?.name??D?.name??"Component")` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1609
  • `x.approved` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1610
  • `V.feedbackRound` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1612
  • `T(e)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1613
  • `T(kn?tn.label:q.name)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1616
  • `T(tn.label)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1617
  • `!kn&&q?ee(pn,q):""` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1618
  • `L?`Comp · Round ${c.packet.round}`:p?"Approved comp":di?.related.length?"Full comp crop":"In the comp"` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1619
  • `L?`Previous · Round ${c.packet.round}`:p?"Assembled page":mn?"In context":c?`${Vn.caption} · Round ${n.round}`:Vn.cap…` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1620
  • `mn` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1622
  • `T(nr)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1623
  • `!di?.related.length?T(q.note):""` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1624
  • `n.round` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — crates/context/assets/component-review.js:1625, crates/context/assets/component-review.js:1632
  • `T(r.feedback)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1626
  • `T(M||(w?"Your decision is saved.":v?"Sending…":r?"":"Approval confirms the composition and that nothing is missing."))` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — crates/context/assets/component-review.js:1627
  • `catKey` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extension/devtools/panel.js:450
  • `CATEGORY_LABELS[catKey]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extension/devtools/panel.js:451
  • `catCount` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extension/devtools/panel.js:452
  • `html.join('')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extension/devtools/sidebar.js:96
  • `family` is text this program did not author, and it is written into a script or style context through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — scripts/build-font-index.mjs:82
  • `ICONS[action.value]||''` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — skill/scripts/live-browser.js:3011
  • `pending.acceptedHtml` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — skill/scripts/live-browser.js:9470

What to do

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

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

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

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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

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

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

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

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

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

X3 · Exception handling3.9 / 10Weak✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×18) — browser-bundle/60-offscreen.js:69, REDACTED:131, REDACTED:176, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×11) — browser-bundle/60-offscreen.js:218, browser-bundle/40-overlay.js:291, browser-bundle/40-overlay.js:612, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×11) — REDACTED:396, REDACTED:454, REDACTED:475, …

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

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.

  • ~39.5 `!` null assertions per 1k TypeScript source lines — 86 assertion(s) across the 2176 source line(s) of the 11 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.

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
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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 Health43%Weak — gated by D1, D2, R1, X3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture98%ExemplaryStrongest area.
Maturity65%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness37%Weak — gated by P2, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security73%Adequate — gated by D29, D30Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility63%AdequateAcceptable, with room to improve.
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.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 4 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 — 46 check(s) not relevant to this codebase

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

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; 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 — Not applicable: 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 did not expose a crawlable HTTP endpoint in time — no runtime evidence 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.
  • 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (24 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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • 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
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.

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 — 28 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×7
  • REDACTED
  • 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-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.
  • No assertions (empty test): skipped, ${PROVIDERS[provider].envKey} is unset tests/skill-behavior/activation.eval.mjs:289 — 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-workflow/full-build.test.mjs:136 — 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:140 — Test method has an empty body — it asserts nothing and exercises no code.
AC3 · Page structure · Document without a <title> · ×4
  • 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>.
  • Document without a <title> scripts/build-font-index.mjs:142 — 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
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang scripts/build-font-index.mjs:142 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D13 · Secret Scanning · Leaked secret · ×1
  • 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 — 1931 finding(s)
D2 · Cognitive Complexity · impeccable_core · ×156
  • impeccable_core::browser::quality::check_quality (cognitive 416) crates/core/src/browser/quality.rs:2041 — impeccable_core::browser::quality::check_quality has cognitive complexity 416 (threshold 15). Drivers by points: if/else 105 (281 pts), boolean chains 97, loops 10 (34 pts), match/switch 3 (4 pts) (nesting depth added 201). 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:4492 — 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 161) crates/core/src/browser/element_checks.rs:2566 — impeccable_core::browser::element_checks::check_element_colors_dom_in has cognitive complexity 161 (threshold 15). Drivers by points: if/else 59 (92 pts), boolean chains 50, match/switch 9 (13 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:2190 — 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::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::browser::element_checks::read_pseudo_gradient_face (cognitive 79) crates/core/src/browser/element_checks.rs:822 — impeccable_core::browser::element_checks::read_pseudo_gradient_face has cognitive complexity 79 (threshold 15). Drivers by points: if/else 20 (53 pts), loops 5 (12 pts), boolean chains 11, 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::checks::css_scan::path_is_rounded_rectangle (cognitive 79) crates/core/src/checks/css_scan.rs:2162 — 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:698 — 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::text_collectors::collect_repeated_container_text_findings (cognitive 73) crates/core/src/browser/text_collectors.rs:815 — 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::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:350 — 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::check_edge_flush_cards_dom (cognitive 66) crates/core/src/browser/page_checks.rs:3494 — 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:5200 — 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::visual::css_plan (cognitive 66) crates/core/src/browser/visual.rs:3570 — impeccable_core::browser::visual::css_plan has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (51 pts), match/switch 2 (8 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • impeccable_core::browser::driver::collect_browser_findings (cognitive 64) crates/core/src/browser/driver.rs:2764 — impeccable_core::browser::driver::collect_browser_findings has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 11, loops 6 (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_core::browser::quality::text_descendants_flush_sides (cognitive 63) crates/core/src/browser/quality.rs:1273 — 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:2456 — 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::element_checks::check_element_inset_stripe_dom (cognitive 60) crates/core/src/browser/element_checks.rs:526 — impeccable_core::browser::element_checks::check_element_inset_stripe_dom has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 20, match/switch 2 (4 pts), loops 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_core::browser::page_checks::measure_hidden_text_dom (cognitive 59) crates/core/src/browser/page_checks.rs:3193 — 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::checks::css_scan::scan_css_text_for_pulsing_dot (cognitive 57) crates/core/src/checks/css_scan.rs:2971 — 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:879 — 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.
  • impeccable_core::browser::visual::collect_visual_contrast_reasons (cognitive 54) crates/core/src/browser/visual.rs:109 — impeccable_core::browser::visual::collect_visual_contrast_reasons has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 12, loops 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.
  • impeccable_core::browser::background::walk_surface (cognitive 52) crates/core/src/browser/background.rs:171 — impeccable_core::browser::background::walk_surface has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (35 pts), boolean chains 8, match/switch 3 (8 pts), loops 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.
  • + 131 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_live · ×116
  • 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::live_wrap::wrap_cli (cognitive 116) crates/live/src/live_wrap.rs:70 — impeccable_live::live_wrap::wrap_cli has cognitive complexity 116 (threshold 15). Drivers by points: if/else 55 (89 pts), loops 7 (17 pts), match/switch 4 (7 pts), boolean chains 3 (nesting depth added 47). To reduce it, split the body into named stages: move each independent 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:1480 — 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:1551 — 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_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:274 — 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:288 — 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::live_server::handle_manual_edit_route (cognitive 63) crates/live/src/live_server.rs:1993 — impeccable_live::live_server::handle_manual_edit_route has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (40 pts), match/switch 9 (21 pts), loops 1 (2 pts) (nesting depth added 34). 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::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:2315 — 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:621 — 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:879 — 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.
  • + 91 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_core · ×106
  • impeccable_core::browser::quality::check_quality (cyclomatic 204) crates/core/src/browser/quality.rs:2041 — impeccable_core::browser::quality::check_quality has cyclomatic complexity 204 (threshold 15). To reduce it, separate the cases: extract each independent 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:4492 — 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 108) crates/core/src/browser/element_checks.rs:2566 — impeccable_core::browser::element_checks::check_element_colors_dom_in has cyclomatic complexity 108 (threshold 15). To reduce it, separate the cases: extract each independent 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:2190 — 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:2162 — 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::element_checks::check_element_inset_stripe_dom (cyclomatic 48) crates/core/src/browser/element_checks.rs:526 — impeccable_core::browser::element_checks::check_element_inset_stripe_dom has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • 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:698 — 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::quality::text_descendants_flush_sides (cyclomatic 42) crates/core/src/browser/quality.rs:1273 — 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::browser::driver::collect_browser_findings (cyclomatic 40) crates/core/src/browser/driver.rs:2764 — impeccable_core::browser::driver::collect_browser_findings 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::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::read_pseudo_gradient_face (cyclomatic 37) crates/core/src/browser/element_checks.rs:822 — impeccable_core::browser::element_checks::read_pseudo_gradient_face 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_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:406 — 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:5926 — 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::page_checks::check_edge_flush_cards_dom (cyclomatic 33) crates/core/src/browser/page_checks.rs:3494 — 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:5200 — 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:1046 — 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:1118 — 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:975 — 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:1887 — 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.
  • impeccable_core::browser::text_collectors::collect_repeated_container_text_findings (cyclomatic 29) crates/core/src/browser/text_collectors.rs:815 — impeccable_core::browser::text_collectors::collect_repeated_container_text_findings 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.
  • impeccable_core::checks::css_scan::scan_css_text_for_pulsing_dot (cyclomatic 29) crates/core/src/checks/css_scan.rs:2971 — impeccable_core::checks::css_scan::scan_css_text_for_pulsing_dot 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.
  • + 81 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×87
  • FunctionTooLong: impeccable_core::browser::quality::check_quality crates/core/src/browser/quality.rs:2041 — FunctionTooLong — impeccable_core::browser::quality::check_quality runs 537 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 437 over it, 5.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: 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:1226 — FunctionTooLong — impeccable_context::serve_question::run runs 459 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 359 over it, 4.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • 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:1745 — 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 373 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 273 over it, 3.73× 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: live-browser.initGlobalBar skill/scripts/live-browser.js:11696 — FunctionTooLong — initGlobalBar runs 356 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 256 over it, 3.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_core::browser::element_checks::check_element_colors_dom_in crates/core/src/browser/element_checks.rs:2566 — FunctionTooLong — impeccable_core::browser::element_checks::check_element_colors_dom_in runs 355 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 255 over it, 3.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_live::live_wrap::wrap_cli crates/live/src/live_wrap.rs:70 — FunctionTooLong — impeccable_live::live_wrap::wrap_cli runs 350 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 250 over it, 3.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_live::live_server::handle_poll_post crates/live/src/live_server.rs:1551 — 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:2315 — FunctionTooLong — impeccable_live::live_server::handle_manual_edit_commit runs 293 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 193 over it, 2.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_comp_verbs::build_phase::run_with_renderer crates/comp-verbs/src/build_phase.rs:3355 — 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_detect::cli::detect_cli crates/detect/src/cli.rs:493 — FunctionTooLong — impeccable_detect::cli::detect_cli runs 274 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 174 over it, 2.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: impeccable_live::live_server::handle_connection crates/live/src/live_server.rs:621 — 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_live::live_server::handle_manual_edit_route crates/live/src/live_server.rs:1993 — FunctionTooLong — impeccable_live::live_server::handle_manual_edit_route runs 252 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 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: impeccable_hook::hook::run_stop_hook crates/hook/src/hook.rs:620 — FunctionTooLong — impeccable_hook::hook::run_stop_hook runs 250 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 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: 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_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_core::checks::vectors_a::call crates/core/src/checks/vectors_a.rs:123 — FunctionTooLong — impeccable_core::checks::vectors_a::call 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 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.
  • + 62 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×69
  • Hotspot: crates/core/src/browser/quality.rs crates/core/src/browser/quality.rs:2041 — crates/core/src/browser/quality.rs changed 58 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 204 in impeccable_core::browser::quality::check_quality at line 2041. 4 of those changes were fix/bug commits, and the other 54 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:2566 — crates/core/src/browser/element_checks.rs changed 84 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 108 in impeccable_core::browser::element_checks::check_element_colors_dom_in at line 2566. 5 of those changes were fix/bug commits, and the other 79 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:4492 — crates/core/src/browser/page_checks.rs changed 50 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 4492. 3 of those changes were fix/bug commits, and the other 47 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:7641 — skill/scripts/live-browser.js changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in live-browser.connectSSE at line 7641. 20 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:1226 — crates/context/src/serve_question.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in impeccable_context::serve_question::run at line 1226. 2 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:2056 — crates/detect/src/regex_matchers.rs changed 25 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 2056. 8 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:2764 — crates/core/src/browser/driver.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in impeccable_core::browser::driver::collect_browser_findings at line 2764. 5 of those changes were fix/bug commits, and the other 44 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:1745 — crates/comp-verbs/src/build_phase.rs changed 14 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 1745. 4 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/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. 3 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/html/src/adapters.rs crates/html/src/adapters.rs:970 — crates/html/src/adapters.rs changed 40 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 970. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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:1183 — REDACTED changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in impeccable_browser::scan_loaded at line 1183. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/core/src/checks/rules.rs crates/core/src/checks/rules.rs:311 — crates/core/src/checks/rules.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in impeccable_core::checks::rules::check_borders at line 311. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/detect/src/cli.rs crates/detect/src/cli.rs:493 — crates/detect/src/cli.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in impeccable_detect::cli::detect_cli at line 493. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/browser/visual.rs crates/core/src/browser/visual.rs:109 — crates/core/src/browser/visual.rs changed 27 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/hook/src/hook.rs crates/hook/src/hook.rs:81 — crates/hook/src/hook.rs changed 12 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/core/src/checks/css_scan.rs crates/core/src/checks/css_scan.rs:698 — crates/core/src/checks/css_scan.rs changed 17 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 698. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/html/src/engine.rs crates/html/src/engine.rs:199 — crates/html/src/engine.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/browser/src/cdp.rs crates/browser/src/cdp.rs:955 — crates/browser/src/cdp.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in Page::on_event at line 955. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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: scripts/build.js scripts/build.js:711 — scripts/build.js changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in build.build at line 711. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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/detect/src/detect_text.rs crates/detect/src/detect_text.rs:1270 — crates/detect/src/detect_text.rs changed 17 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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: REDACTED REDACTED:550 — REDACTED changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in 15-snapshot.__snapRunningAnimations at line 550. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/live/src/live_server.rs crates/live/src/live_server.rs:621 — crates/live/src/live_server.rs changed 12 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 621. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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: crates/live/src/live_generate.rs crates/live/src/live_generate.rs:423 — crates/live/src/live_generate.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in impeccable_live::live_generate::run at line 423. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- crates/live/src/live_generate.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/concept_seed.rs crates/context/src/concept_seed.rs:436 — crates/context/src/concept_seed.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in impeccable_context::concept_seed::render_roll at line 436. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- crates/context/src/concept_seed.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.
  • + 44 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×69
  • FileTooLong: scripts/live-browser.js skill/scripts/live-browser.js — FileTooLong — 9532 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9032 over it, 19.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/element_checks.rs crates/core/src/browser/element_checks.rs — FileTooLong — 3547 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 166 free functions. The bar is 500 significant lines; this is 3047 over it, 7.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/page_checks.rs crates/core/src/browser/page_checks.rs — FileTooLong — 3074 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 139 free functions. The bar is 500 significant lines; this is 2574 over it, 6.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/visual.rs crates/core/src/browser/visual.rs — FileTooLong — 2527 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 137 free functions. The bar is 500 significant lines; this is 2027 over it, 5.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/build_phase.rs crates/comp-verbs/src/build_phase.rs — FileTooLong — 2452 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 90 free functions. The bar is 500 significant lines; this is 1952 over it, 4.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/live_server.rs crates/live/src/live_server.rs — FileTooLong — 2168 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 1668 over it, 4.34× 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 — 2110 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 1610 over it, 4.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: checks/css_scan.rs crates/core/src/checks/css_scan.rs — FileTooLong — 2030 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 1530 over it, 4.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: browser/quality.rs crates/core/src/browser/quality.rs — FileTooLong — 1915 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 69 free functions. The bar is 500 significant lines; this is 1415 over it, 3.83× 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 — 1857 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 89 free functions. The bar is 500 significant lines; this is 1357 over it, 3.71× 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: 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/hook_lib.rs crates/hook/src/hook_lib.rs — FileTooLong — 1630 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 113 free functions. The bar is 500 significant lines; this is 1130 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 — 1590 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 102 free functions. The bar is 500 significant lines; this is 1090 over it, 3.18× 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 — 1470 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 970 over it, 2.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/design_system.rs crates/detect/src/design_system.rs — FileTooLong — 1449 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 84 free functions. The bar is 500 significant lines; this is 949 over it, 2.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: checks/rules.rs crates/core/src/checks/rules.rs — FileTooLong — 1404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 62 free functions. The bar is 500 significant lines; this is 904 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1365 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 865 over it, 2.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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 — 1322 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 822 over it, 2.64× 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 — 1237 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 737 over it, 2.47× 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 — 1222 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 722 over it, 2.44× 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 — 1164 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-1275). The bar is 500 significant lines; this is 664 over it, 2.33× 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.
  • + 44 more in this group — see findings.md.
D2 · Cognitive Complexity · impeccable_context · ×60
  • impeccable_context::serve_question::run (cognitive 353) crates/context/src/serve_question.rs:1226 — impeccable_context::serve_question::run has cognitive complexity 353 (threshold 15). Drivers by points: if/else 117 (289 pts), boolean chains 38, match/switch 9 (18 pts), loops 4 (8 pts) (nesting depth added 185). 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::critique_storage::run (cognitive 100) crates/context/src/critique_storage.rs:441 — impeccable_context::critique_storage::run has cognitive complexity 100 (threshold 15). Drivers by points: if/else 30 (62 pts), match/switch 10 (23 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent 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::generate_image::run_with_api_base (cognitive 66) crates/context/src/generate_image.rs:319 — 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::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::context_cli::automatic_hook_mode (cognitive 41) crates/context/src/context_cli.rs:91 — impeccable_context::context_cli::automatic_hook_mode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 2 (3 pts), boolean chains 2 (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_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::doctor::apply_fixes (cognitive 37) crates/context/src/doctor.rs:131 — 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.
  • impeccable_context::surface_briefs::parse_surface_brief (cognitive 33) crates/context/src/surface_briefs.rs:171 — impeccable_context::surface_briefs::parse_surface_brief has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 3, loops 2 (3 pts), match/switch 2 (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.
  • + 35 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_live · ×54
  • 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::live_wrap::wrap_cli (cyclomatic 55) crates/live/src/live_wrap.rs:70 — impeccable_live::live_wrap::wrap_cli 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_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:1551 — 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:621 — 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_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:288 — 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:2315 — 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::manual_edits::apply::push_batch_in_chunks_and_wait (cyclomatic 35) crates/live/src/manual_edits/apply.rs:1480 — 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:748 — 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:274 — 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:1148 — 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::live_server::handle_manual_edit_route (cyclomatic 32) crates/live/src/live_server.rs:1993 — impeccable_live::live_server::handle_manual_edit_route 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:136 — impeccable_live::live_insert::insert_cli 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_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.
  • + 29 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:2056 — 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 126) crates/detect/src/cli.rs:493 — impeccable_detect::cli::detect_cli has cognitive complexity 126 (threshold 15). Drivers by points: if/else 59 (92 pts), boolean chains 14, match/switch 7 (11 pts), loops 5 (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_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:952 — 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:1935 — 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:1187 — 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:1035 — 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:1462 — 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:2083 — 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:358 — 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.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×40
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1524 — `J({x:0,y:0,w:1,h:1})` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1537 — `K(r,s.beforeUrl,"gen before")` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1566 — `J(r.box)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1584 — `Hi` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1588 — `T(K.description||J.name)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1589 — `T(n.title)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1591 — `te` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1593 — `I` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1595 — `z` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1596 — `n.comp.width` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1597 — `Mn(n.comp.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1598 — `In(Kn)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1599 — `E.kind` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1600 — `In(e.box)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1601 — `T(e.id)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1609 — `T(kn?tn.label:$?.name??D?.name??"Component")` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1610 — `x.approved` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1612 — `V.feedbackRound` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1613 — `T(e)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1616 — `T(kn?tn.label:q.name)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1617 — `T(tn.label)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1618 — `!kn&&q?ee(pn,q):""` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1619 — `L?`Comp · Round ${c.packet.round}`:p?"Approved comp":di?.related.length?"Full comp crop":"In the comp"` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1620 — `L?`Previous · Round ${c.packet.round}`:p?"Assembled page":mn?"In context":c?`${Vn.caption} · Round ${n.round}`:Vn.cap…` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped crates/context/assets/component-review.js:1622 — `mn` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×39
  • Duplicated block (5 lines × 2) crates/browser/src/screenshot_contrast.rs:695 — crates/browser/src/screenshot_contrast.rs:695-699 | crates/live/src/inject/detect_utils.rs:35-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.
  • 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.
  • 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:565-569 — 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:195 — crates/context/src/serve_question.rs:195-199 | crates/context/src/serve_question.rs:216-220 — both copies are in the same file, so extract the 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:2457 — crates/core/src/browser/element_checks.rs:2457-2461 | crates/core/src/browser/painted.rs:173-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 (5 lines × 2) crates/core/src/browser/page_checks.rs:2576 — crates/core/src/browser/page_checks.rs:2576-2580 | crates/core/src/browser/page_checks.rs:2650-2654 — both copies are in the same file, so extract the 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/painted.rs:1243 — crates/core/src/browser/painted.rs:1243-1247 | crates/core/src/checks/text_context.rs:216-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.
  • Duplicated block (5 lines × 2) crates/core/src/browser/text_collectors.rs:895 — crates/core/src/browser/text_collectors.rs:895-899 | crates/html/src/page.rs:586-590 — 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/core/src/browser/text_layers.rs:828 — crates/core/src/browser/text_layers.rs:828-832 | crates/core/src/browser/text_layers.rs:917-921 — both copies are in the same file, so extract the 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/checks/rules.rs:1761 — crates/core/src/checks/rules.rs:1761-1765 | 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.
  • Duplicated block (5 lines × 2) crates/detect/src/ignores.rs:124 — crates/detect/src/ignores.rs:124-128 | crates/hook/src/admin.rs:1186-1190 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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 (5 lines × 2) crates/detect/src/regex_matchers.rs:683 — crates/detect/src/regex_matchers.rs:683-687 | crates/detect/src/regex_matchers.rs:1220-1224 — both copies are in the same file, so extract the 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/foundation/src/fdlibm_trig.rs:309 — crates/foundation/src/fdlibm_trig.rs:309-313 | crates/foundation/src/fdlibm_trig.rs:316-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 (5 lines × 2) crates/hook/src/hook_lib.rs:2003 — crates/hook/src/hook_lib.rs:2003-2007 | crates/hook/src/hook_lib.rs:2065-2069 — both copies are in the same file, so extract the 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/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.
  • Duplicated block (5 lines × 2) crates/html/src/cascade/shorthand.rs:267 — crates/html/src/cascade/shorthand.rs:267-271 | crates/html/src/cascade/shorthand.rs:310-314 — both copies are in the same file, so extract the 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/live/src/live_accept.rs:1254 — crates/live/src/live_accept.rs:1254-1258 | 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.
  • Duplicated block (5 lines × 2) REDACTED:451 — REDACTED:451-455 | REDACTED:493-497 — both copies are in the same file, so extract the 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/live/src/manual_edits/evidence.rs:600 — crates/live/src/manual_edits/evidence.rs:600-604 | 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/core/src/browser/element_checks.rs:1872 — crates/core/src/browser/element_checks.rs:1872-1876 | crates/core/src/browser/element_checks.rs:1881-1887 — both copies are in the same file, so extract the 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/comp-verbs/src/build_phase.rs:1543 — crates/comp-verbs/src/build_phase.rs:1543-1547 | crates/comp-verbs/src/build_phase.rs:2425-2429 — both copies are in the same file, so extract the 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/context_cli.rs:584 — crates/context/src/context_cli.rs:584-588 | 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.
  • 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.
  • 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.
  • Duplicated block (5 lines × 2) crates/live/src/manual_edits/apply.rs:279 — crates/live/src/manual_edits/apply.rs:279-283 | crates/live/src/server_state.rs:1324-1328 — 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.
  • + 14 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×34
  • 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.
  • Sync-over-async blocking tests/live-e2e/session.mjs:348 — `rmSync` in `teardown` 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 tests/live-e2e/steer.mjs:47 — `readFileSync` in `runSteerSmoke` 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 tests/live-e2e/steer.mjs:65 — `readFileSync` in `waitForSource` 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 tests/oracle/lib.mjs:75 — `fs.readdirSync` in `allCases` 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 tests/oracle/vectors/hooks-impl.mjs:47 — `fs.readFileSync` in `load` 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 tests/oracle/vectors/hooks-impl.mjs:69 — `fs.readFileSync` in `callback to wrapped.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tests/skill-behavior/harness.mjs:326 — `fs.existsSync` in `execute` 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 tests/skill-behavior/harness.mjs:327 — `fs.statSync` in `execute` 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 tests/skill-behavior/harness.mjs:329 — `fs.readFileSync` in `execute` 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 tests/skill-behavior/harness.mjs:345 — `fs.realpathSync` in `execute` 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 tests/skill-behavior/harness.mjs:348 — `fs.mkdirSync` in `execute` 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 tests/skill-behavior/harness.mjs:349 — `fs.writeFileSync` in `execute` 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 tests/skill-behavior/harness.mjs:363 — `fs.existsSync` in `execute` 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 tests/skill-behavior/harness.mjs:364 — `fs.statSync` in `execute` 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 tests/skill-behavior/harness.mjs:366 — `fs.readdirSync` in `execute` 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 tests/skill-behavior/harness.mjs:367 — `fs.statSync` in `callback to map` 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.
  • + 9 more in this group — see findings.md.
D1 · Cyclomatic Complexity · impeccable_context · ×33
  • impeccable_context::serve_question::run (cyclomatic 157) crates/context/src/serve_question.rs:1226 — impeccable_context::serve_question::run has cyclomatic complexity 157 (threshold 15). To reduce it, separate the cases: extract each independent 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::critique_storage::run (cyclomatic 57) crates/context/src/critique_storage.rs:441 — impeccable_context::critique_storage::run has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent 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_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::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:319 — 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::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.
  • impeccable_context::component_review::visual_approval::identity (cyclomatic 21) crates/context/src/component_review/visual_approval.rs:6 — impeccable_context::component_review::visual_approval::identity 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.
  • + 8 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×29
  • Swallowed exception (empty catch) browser-bundle/60-offscreen.js:69 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) browser-bundle/60-offscreen.js:218 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) browser-bundle/40-overlay.js:291 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) browser-bundle/40-overlay.js:612 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:643 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) browser-bundle/05-natives.js:108 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) browser-bundle/05-natives.js:109 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) crates/cli/src/raster_coverage.js:52 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) crates/context/assets/component-review.js:1521 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:131 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:176 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:33 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:38 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:47 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:55 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:158 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:169 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:183 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:202 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:212 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:225 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:260 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:309 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:311 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) extension/background/service-worker.js:313 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×28
  • Duplicated block (6 lines × 2) crates/browser/src/html_snapshot.rs:156 — crates/browser/src/html_snapshot.rs:156-161 | crates/cli/src/capture_snapshot.rs:332-337 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 215 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/cli/src/font_render.rs:58 — crates/cli/src/font_render.rs:58-63 | crates/comp-verbs/src/build_phase.rs:1105-1110 — 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/comp-verbs/src/comp_diff.rs:454 — crates/comp-verbs/src/comp_diff.rs:454-459 | crates/comp-verbs/src/comp_diff.rs:509-514 — both copies are in the same file, so extract the 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/comp-verbs/src/font_match.rs:575 — crates/comp-verbs/src/font_match.rs:575-580 | crates/comp-verbs/src/font_match.rs:710-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 (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.
  • 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:1598-1603 — 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/core/src/browser/page_checks.rs:1659 — crates/core/src/browser/page_checks.rs:1659-1664 | crates/core/src/browser/page_checks.rs:2088-2094 — both copies are in the same file, so extract the 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/page_checks.rs:4005 — crates/core/src/browser/page_checks.rs:4005-4010 | crates/core/src/browser/quality.rs:677-682 — 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.
  • Duplicated block (6 lines × 2) crates/core/src/browser/quality.rs:876 — crates/core/src/browser/quality.rs:876-881 | crates/core/src/browser/quality.rs:1585-1590 — both copies are in the same file, so extract the 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/quality.rs:2553 — crates/core/src/browser/quality.rs:2553-2558 | crates/html/src/quality.rs:866-871 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 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/core/src/checks/css_scan.rs:2035 — crates/core/src/checks/css_scan.rs:2035-2040 | crates/core/src/checks/css_scan.rs:2076-2081 — both copies are in the same file, so extract the 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/detect/src/regex_matchers.rs:689 — crates/detect/src/regex_matchers.rs:689-695 | crates/detect/src/regex_matchers.rs:1226-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.
  • Duplicated block (6 lines × 2) crates/hook/src/hook_lib.rs:2009 — crates/hook/src/hook_lib.rs:2009-2014 | crates/hook/src/hook_lib.rs:2080-2085 — both copies are in the same file, so extract the 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.
  • 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.
  • 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.
  • 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.
  • 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:698 — crates/skills/src/bundle.rs:698-703 | crates/skills/src/bundle.rs:766-771 — both copies are in the same file, so extract the 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/prompt.rs:158 — crates/skills/src/prompt.rs:158-163 | crates/skills/src/prompt.rs:251-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.
  • Duplicated block (6 lines × 2) crates/core/src/browser/text_collectors.rs:130 — crates/core/src/browser/text_collectors.rs:130-135 | 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:1087 — crates/detect/src/config.rs:1087-1092 | crates/hook/src/hook_lib.rs:1200-1205 — 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:296-301 — 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/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.
  • + 3 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×28
  • No test reaches this file scripts/build.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 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 extension/content/content-script.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/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 scripts/run-tests.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/60-offscreen.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 scripts/build-font-index.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 scripts/generate-promo-tile.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/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 extension/devtools/sidebar.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/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 extension/popup/popup.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 scripts/lib/zip.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/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 scripts/generate-extension-icons.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.
  • + 3 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:2056 — 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 78) crates/detect/src/cli.rs:493 — impeccable_detect::cli::detect_cli 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_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:952 — 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:1935 — 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:1187 — 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:1338 — 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_args (cyclomatic 16) crates/detect/src/design_system.rs:924 — impeccable_detect::design_system::split_top_level_args 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:2768 — 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_html · ×25
  • 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 135) crates/html/src/engine.rs:199 — impeccable_html::engine::detect_html_source has cognitive complexity 135 (threshold 15). Drivers by points: if/else 39 (108 pts), loops 9 (19 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 82). 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:970 — 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:510 — 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::cascade::shorthand::expand_static_declaration (cognitive 59) crates/html/src/cascade/shorthand.rs:224 — impeccable_html::cascade::shorthand::expand_static_declaration has cognitive complexity 59 (threshold 15). Drivers by points: if/else 34 (51 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_html::static_engine::collect_static_design_system_findings (cognitive 56) crates/html/src/static_engine.rs:206 — 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:865 — 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::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 29) crates/html/src/page.rs:436 — impeccable_html::page::check_page_layout has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, loops 3 (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_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:1328 — 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::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.
  • impeccable_html::cascade::values::extract_static_color (cognitive 16) crates/html/src/cascade/values.rs:193 — impeccable_html::cascade::values::extract_static_color has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×24
  • Duplicated block (7 lines × 2) crates/context/src/serve_question.rs:202 — crates/context/src/serve_question.rs:202-208 | crates/context/src/serve_question.rs:222-228 — both copies are in the same file, so extract the 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/context/src/util.rs:139 — crates/context/src/util.rs:139-145 | crates/skills/src/util.rs:111-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.
  • 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.
  • Duplicated block (7 lines × 2) crates/core/src/browser/element_checks.rs:2199 — crates/core/src/browser/element_checks.rs:2199-2205 | crates/html/src/adapters.rs:776-782 — 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/core/src/browser/element_checks.rs:2207 — crates/core/src/browser/element_checks.rs:2207-2213 | crates/html/src/adapters.rs:784-790 — 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/core/src/browser/element_checks.rs:4612 — crates/core/src/browser/element_checks.rs:4612-4618 | crates/core/src/browser/element_checks.rs:4662-4668 — both copies are in the same file, so extract the 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/page_checks.rs:3646 — crates/core/src/browser/page_checks.rs:3646-3652 | crates/core/src/browser/page_checks.rs:4563-4569 — both copies are in the same file, so extract the 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/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.
  • Duplicated block (7 lines × 2) crates/detect/src/config.rs:1070 — crates/detect/src/config.rs:1070-1076 | crates/hook/src/hook_lib.rs:1182-1188 — 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 (7 lines × 2) crates/foundation/src/color.rs:1079 — crates/foundation/src/color.rs:1079-1085 | crates/foundation/src/color.rs:1090-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.
  • 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:138-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • 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.
  • Duplicated block (7 lines × 2) crates/live/src/manual_edits/commit.rs:1543 — crates/live/src/manual_edits/commit.rs:1543-1549 | crates/live/src/manual_edits/commit.rs:2068-2074 — both copies are in the same file, so extract the 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/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/live/src/svelte_ast.rs:1616 — crates/live/src/svelte_ast.rs:1616-1622 | crates/live/src/svelte_ast.rs:1628-1634 — both copies are in the same file, so extract the 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:789 — crates/skills/src/bundle.rs:789-795 | crates/skills/src/bundle.rs:991-997 — both copies are in the same file, so extract the 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 12 separate duplicated blocks between them, totalling at least 215 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 (7 lines × 2) crates/context/src/concept_seed.rs:334 — crates/context/src/concept_seed.rs:334-340 | crates/context/src/serve_question.rs:1177-1183 — 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/hook/src/admin.rs:1073 — crates/hook/src/admin.rs:1073-1079 | crates/hook/src/admin.rs:1128-1134 — both copies are in the same file, so extract the 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/checks/html_patterns.rs:909 — crates/core/src/checks/html_patterns.rs:909-915 | crates/core/src/checks/html_patterns.rs:917-923 — both copies are in the same file, so extract the 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/visual.rs:3111 — crates/core/src/browser/visual.rs:3111-3117 | crates/core/src/browser/visual.rs:3168-3174 — both copies are in the same file, so extract the 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) REDACTED:2290 — REDACTED:2290-2296 | crates/live/src/event_validation.rs:18-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
X2 · Cancellation propagation · Async function without AbortSignal · ×23
  • Async function without AbortSignal: download cli/bin/cli.js:31 — `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: lr crates/context/assets/component-review.js:1633 — `lr` 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 })`.
  • 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: download scripts/publish-platform-packages.mjs:82 — `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: isPublished scripts/publish-platform-packages.mjs:114 — `isPublished` 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: download scripts/fetch-engine.mjs:53 — `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: urlExists scripts/check-engine-release.mjs:41 — `urlExists` 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: npmVersionExists scripts/check-engine-release.mjs:56 — `npmVersionExists` 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:3858 — `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:4215 — `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:4228 — `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:4275 — `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:4325 — `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:4345 — `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:5415 — `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:5887 — `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:8534 — `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: collectFontCssText skill/scripts/live-browser.js:8557 — `collectFontCssText` 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:8800 — `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:12852 — `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: 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 })`.
D2 · Cognitive Complexity · impeccable_comp_verbs · ×22
  • impeccable_comp_verbs::build_phase::gate_hero_inner (cognitive 220) crates/comp-verbs/src/build_phase.rs:1745 — 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 173) crates/comp-verbs/src/build_phase.rs:3355 — impeccable_comp_verbs::build_phase::run_with_renderer has cognitive complexity 173 (threshold 15). Drivers by points: if/else 63 (131 pts), loops 8 (23 pts), boolean chains 12, match/switch 4 (7 pts) (nesting depth added 86). 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 51) crates/comp-verbs/src/build_phase.rs:2803 — impeccable_comp_verbs::build_phase::advance has cognitive complexity 51 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 7 (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_comp_verbs::build_phase::write_scaffold (cognitive 46) crates/comp-verbs/src/build_phase.rs:984 — 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:837 — 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:2447 — 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:1426 — 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:1142 — 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:570 — 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:386 — 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:694 — 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:806 — 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:1660 — 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.
  • impeccable_comp_verbs::build_phase::next_instruction (cognitive 16) crates/comp-verbs/src/build_phase.rs:2919 — impeccable_comp_verbs::build_phase::next_instruction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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.
D2 · Cognitive Complexity · impeccable_hook · ×20
  • 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 107) crates/hook/src/hook.rs:620 — impeccable_hook::hook::run_stop_hook has cognitive complexity 107 (threshold 15). Drivers by points: if/else 50 (80 pts), match/switch 5 (10 pts), loops 6 (9 pts), boolean chains 8 (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_hook::admin::repair_hook_manifests (cognitive 39) crates/hook/src/admin.rs:745 — impeccable_hook::admin::repair_hook_manifests has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (33 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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:1224 — 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:2336 — 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:1013 — 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:677 — 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:1319 — 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:1170 — 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:486 — 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:1102 — 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.
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 50) crates/html/src/engine.rs:199 — impeccable_html::engine::detect_html_source has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent 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 38) crates/html/src/cascade/shorthand.rs:224 — impeccable_html::cascade::shorthand::expand_static_declaration 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_html::adapters::check_element_colors (cyclomatic 36) crates/html/src/adapters.rs:970 — 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::adapters::check_element_stripe_child (cyclomatic 34) crates/html/src/adapters.rs:865 — 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:510 — 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:206 — 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::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::page::check_page_layout (cyclomatic 18) crates/html/src/page.rs:436 — impeccable_html::page::check_page_layout 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.
D2 · Cognitive Complexity · impeccable_foundation · ×18
  • 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:723 — 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:628 — 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::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:383 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×18
  • Outbound HTTP without resilience cli/bin/cli.js:33 — `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 cli/bin/cli.js: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 crates/context/src/http.rs:39 — `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:458 — `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 scripts/build-font-index.mjs:108 — `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 scripts/check-engine-release.mjs:43 — `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 scripts/check-engine-release.mjs:59 — `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 scripts/fetch-engine.mjs:54 — `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 scripts/publish-platform-packages.mjs:83 — `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 scripts/publish-platform-packages.mjs:116 — `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 scripts/release.mjs:316 — `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 skill/scripts/live-browser.js:8832 — `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 skill/scripts/live-browser.js:11668 — `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 skill/scripts/live-browser.js:11680 — `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 skill/scripts/live-browser.js:12858 — `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 skill/scripts/live-browser.js:12859 — `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: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 · impeccable_comp_verbs · ×16
  • impeccable_comp_verbs::build_phase::gate_hero_inner (cyclomatic 116) crates/comp-verbs/src/build_phase.rs:1745 — 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:3355 — 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:2447 — 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::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::advance (cyclomatic 35) crates/comp-verbs/src/build_phase.rs:2803 — impeccable_comp_verbs::build_phase::advance 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_comp_verbs::build_phase::gate_spec (cyclomatic 27) crates/comp-verbs/src/build_phase.rs:386 — 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:837 — 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:570 — 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:1426 — 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:984 — 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:1142 — 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 19) crates/comp-verbs/src/build_phase.rs:2919 — impeccable_comp_verbs::build_phase::next_instruction 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.
  • 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:694 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×16
  • 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 12 separate duplicated blocks between them, totalling at least 215 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) REDACTED:1257 — REDACTED:1257-1266 | REDACTED:1394-1403 — both copies are in the same file, so extract the 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:2036 — REDACTED:2036-2045 | crates/core/src/browser/visual.rs:4012-4021 — 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/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.
  • 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.
  • 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:574-583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/core/src/browser/visual.rs:989 — crates/core/src/browser/visual.rs:989-998 | crates/core/src/browser/visual.rs:2701-2710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/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.
  • 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.
  • 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.
  • 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.
  • 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:447-456 — 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.
  • 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.
  • Duplicated block (10 lines × 2) crates/detect/src/ignores.rs:96 — crates/detect/src/ignores.rs:96-105 | crates/hook/src/admin.rs:1149-1158 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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:25 — crates/live/src/live_commit_manual_edits.rs:25-34 | crates/live/src/live_discard_manual_edits.rs:13-22 — 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.
D2 · Cognitive Complexity · impeccable_skills · ×15
  • impeccable_skills::commands::install (cognitive 69) crates/skills/src/commands.rs:558 — impeccable_skills::commands::install has cognitive complexity 69 (threshold 15). Drivers by points: if/else 30 (49 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 46) crates/skills/src/commands.rs:773 — impeccable_skills::commands::update has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (33 pts), match/switch 6 (8 pts), boolean chains 5 (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_skills::bundle::is_up_to_date (cognitive 41) crates/skills/src/bundle.rs:580 — 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::copy_provider_hooks (cognitive 40) REDACTED:629 — impeccable_skills::hook_manifest::copy_provider_hooks has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (29 pts), boolean chains 4, match/switch 1 (4 pts), loops 2 (3 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_skills::hook_manifest::repair_stale_hook_manifests (cognitive 38) REDACTED:724 — 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:169 — 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:737 — 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:975 — 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:671 — 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:478 — 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:557 — 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:281 — 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:109 — 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:874 — 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::choose_install_scope (cognitive 16) crates/skills/src/commands.rs:372 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×15
  • 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.
  • 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.
  • Duplicated block (9 lines × 2) crates/context/src/serve_question.rs:1373 — crates/context/src/serve_question.rs:1373-1381 | crates/context/src/serve_question.rs:1423-1431 — both copies are in the same file, so extract the 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/core/src/browser/text_collectors.rs:907 — crates/core/src/browser/text_collectors.rs:907-915 | crates/html/src/page.rs:598-606 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/core/src/checks/rules.rs:1570 — crates/core/src/checks/rules.rs:1570-1578 | crates/core/src/checks/rules.rs:1830-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.
  • Duplicated block (9 lines × 2) crates/detect/src/config.rs:131 — crates/detect/src/config.rs:131-139 | crates/hook/src/hook_lib.rs:501-509 — 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 (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.
  • Duplicated block (9 lines × 2) crates/detect/src/regex_matchers.rs:2116 — crates/detect/src/regex_matchers.rs:2116-2124 | crates/detect/src/regex_matchers.rs:2343-2351 — both copies are in the same file, so extract the 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/hook/src/admin.rs:1003 — crates/hook/src/admin.rs:1003-1011 | REDACTED:549-557 — 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.
  • Duplicated block (9 lines × 2) crates/live/src/live_server.rs:2585 — crates/live/src/live_server.rs:2585-2593 | crates/live/src/live_server.rs:2630-2638 — both copies are in the same file, so extract the 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/core/src/browser/element_checks.rs:1349 — crates/core/src/browser/element_checks.rs:1349-1357 | 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:235 — crates/browser/src/cdp.rs:235-244 | crates/browser/src/cdp.rs:252-260 — both copies are in the same file, so extract the 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/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.
  • 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×15
  • 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.
  • 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.
  • Duplicated block (8 lines × 2) crates/context/src/context_cli.rs:722 — crates/context/src/context_cli.rs:722-729 | crates/context/src/context_cli.rs:745-752 — both copies are in the same file, so extract the 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/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.
  • Duplicated block (8 lines × 2) crates/core/src/browser/text_collectors.rs:871 — crates/core/src/browser/text_collectors.rs:871-878 | crates/html/src/page.rs:564-571 — 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/detect/src/ignores.rs:129 — crates/detect/src/ignores.rs:129-136 | crates/hook/src/admin.rs:1191-1198 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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 (8 lines × 2) crates/hook/src/admin.rs:871 — crates/hook/src/admin.rs:871-878 | REDACTED:596-603 — 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.
  • Duplicated block (8 lines × 2) crates/live/src/copy_edit_agent.rs:487 — crates/live/src/copy_edit_agent.rs:487-494 | crates/live/src/copy_edit_agent.rs:1368-1375 — both copies are in the same file, so extract the 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/design_md.rs:123 — crates/live/src/design_md.rs:123-130 | crates/live/src/design_md.rs:158-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.
  • 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.
  • 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/live_insert.rs:309 — crates/live/src/live_insert.rs:309-316 | crates/live/src/live_wrap.rs:479-488 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/live/src/manual_edits/apply.rs:789 — crates/live/src/manual_edits/apply.rs:789-796 | crates/live/src/manual_edits/apply.rs:798-805 — both copies are in the same file, so extract the 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/detect/src/ignores.rs:139 — crates/detect/src/ignores.rs:139-146 | crates/hook/src/admin.rs:1201-1208 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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 (8 lines × 2) crates/detect/src/design_system.rs:832 — crates/detect/src/design_system.rs:832-839 | crates/detect/src/design_system.rs:1036-1043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · impeccable_browser · ×13
  • impeccable_browser::scan_loaded (cognitive 60) REDACTED:1183 — 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::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::run_visual_contrast_fallback (cognitive 30) REDACTED:2096 — impeccable_browser::run_visual_contrast_fallback has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • impeccable_browser::capture_post_scan (cognitive 22) REDACTED:1734 — 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:1855 — 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:1956 — 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:2138 — 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.
D1 · Cyclomatic Complexity · impeccable_foundation · ×11
  • 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:723 — 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::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_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 · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) crates/browser/src/html_snapshot.rs:163 — crates/browser/src/html_snapshot.rs:163-175 | crates/cli/src/capture_snapshot.rs:339-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 12 separate duplicated blocks between them, totalling at least 215 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 (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 12 separate duplicated blocks between them, totalling at least 215 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 (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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Duplicated block (13 lines × 2) crates/live/src/live_insert.rs:225 — crates/live/src/live_insert.rs:225-237 | crates/live/src/live_wrap.rs:164-177 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/live/src/live_server.rs:1734 — crates/live/src/live_server.rs:1734-1746 | crates/live/src/live_server.rs:1825-1837 — both copies are in the same file, so extract the 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/live/src/wrap_common.rs:157 — crates/live/src/wrap_common.rs:157-169 | crates/live/src/wrap_common.rs:182-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×11
  • Swallowed exception (caught, then discarded) REDACTED:396 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:454 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:475 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:516 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:567 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:600 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:804 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) browser-bundle/10-probe.js:136 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) browser-bundle/10-probe.js:166 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) browser-bundle/10-probe.js:337 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) browser-bundle/05-natives.js:56 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D29 · Static Analysis (SAST) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) crates/browser/src/html_snapshot.rs:190 — crates/browser/src/html_snapshot.rs:190-201 | crates/cli/src/capture_snapshot.rs:299-310 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 215 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 (12 lines × 2) crates/context/src/generate_image.rs:343 — crates/context/src/generate_image.rs:343-354 | crates/context/src/generate_image.rs:375-386 — both copies are in the same file, so extract the 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:359 — crates/core/src/browser/background.rs:359-370 | crates/core/src/browser/element_checks.rs:2305-2316 — 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:2249 — crates/core/src/browser/element_checks.rs:2249-2260 | crates/core/src/browser/element_checks.rs:2630-2641 — both copies are in the same file, so extract the 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.
  • Duplicated block (12 lines × 2) crates/html/src/adapters.rs:1096 — crates/html/src/adapters.rs:1096-1107 | crates/html/src/adapters.rs:1238-1249 — both copies are in the same file, so extract the 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/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.
  • Duplicated block (12 lines × 2) crates/live/src/manual_edits/apply.rs:1136 — crates/live/src/manual_edits/apply.rs:1136-1147 | crates/live/src/manual_edits/apply.rs:1279-1290 — both copies are in the same file, so extract the 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/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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×9
  • Duplicated block (11 lines × 2) crates/context/src/context_cli.rs:447 — crates/context/src/context_cli.rs:447-457 | crates/skills/src/providers.rs:560-570 — 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/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.
  • Duplicated block (11 lines × 2) crates/detect/src/design_system.rs:1348 — crates/detect/src/design_system.rs:1348-1358 | crates/detect/src/design_system.rs:1369-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.
  • Duplicated block (11 lines × 2) crates/hook/src/hook_lib.rs:1403 — crates/hook/src/hook_lib.rs:1403-1413 | crates/hook/src/hook_lib.rs:1535-1545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/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.
  • 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.
  • Duplicated block (11 lines × 2) crates/live/src/live_server.rs:1883 — crates/live/src/live_server.rs:1883-1893 | crates/live/src/live_server.rs:1923-1933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/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.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×9
  • Duplicated block (8 lines × 2 locations) browser-bundle/10-probe.js:80 — browser-bundle/10-probe.js:80 · REDACTED: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:1145 — skill/scripts/live-browser.js:1145 · skill/scripts/live-browser.js:2972 — 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:3802 — skill/scripts/live-browser.js:3802 · skill/scripts/live-browser.js:3837 — 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:5952 — skill/scripts/live-browser.js:5952 · skill/scripts/live-browser.js:6005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2 locations) skill/scripts/live-browser.js:8403 — skill/scripts/live-browser.js:8403 · skill/scripts/live-browser.js:8485 — both copies are in the same file, so extract the 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_skills · ×8
  • impeccable_skills::commands::install (cyclomatic 43) crates/skills/src/commands.rs:558 — 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 33) crates/skills/src/commands.rs:773 — impeccable_skills::commands::update 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_skills::hook_manifest::copy_provider_hooks (cyclomatic 18) REDACTED:629 — impeccable_skills::hook_manifest::copy_provider_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.
  • impeccable_skills::bundle::download_file_capped (cyclomatic 17) crates/skills/src/bundle.rs:169 — 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:580 — 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:478 — 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:724 — 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:557 — 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.
D1 · Cyclomatic Complexity · impeccable_hook · ×7
  • 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 63) crates/hook/src/hook.rs:620 — impeccable_hook::hook::run_stop_hook has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • 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 19) crates/hook/src/admin.rs:745 — impeccable_hook::admin::repair_hook_manifests 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_hook::admin::add_ignore_value (cyclomatic 18) crates/hook/src/admin.rs:1224 — 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::expand_scan_targets (cyclomatic 16) crates/hook/src/hook_lib.rs:2336 — 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.
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.
D2 · Cognitive Complexity · impeccable · ×7
  • 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::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::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.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: ServerState.page crates/context/src/serve_question.rs:2203 — 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:1333 — 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 · 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.
  • 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.
  • Duplicated block (17 lines × 2) crates/core/src/browser/quality.rs:2094 — crates/core/src/browser/quality.rs:2094-2110 | 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 5 separate duplicated blocks between them, totalling at least 87 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 (17 lines × 2) crates/core/src/browser/visual.rs:2561 — crates/core/src/browser/visual.rs:2561-2577 | crates/core/src/browser/visual.rs:2851-2867 — both copies are in the same file, so extract the 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:1130-1146 — 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 (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.
  • 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) crates/browser/src/cdp.rs:362 — crates/browser/src/cdp.rs:362-375 | crates/browser/src/cdp.rs:416-429 — both copies are in the same file, so extract the 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/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 12 separate duplicated blocks between them, totalling at least 215 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 (14 lines × 2) crates/core/src/browser/page_checks.rs:780 — crates/core/src/browser/page_checks.rs:780-793 | crates/core/src/browser/page_checks.rs:810-823 — both copies are in the same file, so extract the 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:379 — crates/core/src/checks/css_scan.rs:379-392 | 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:1069 — crates/core/src/checks/css_scan.rs:1069-1082 | 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.
  • 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.
  • Duplicated block (14 lines × 2) crates/detect/src/ignores.rs:254 — crates/detect/src/ignores.rs:254-267 | crates/hook/src/admin.rs:1033-1046 — before extracting anything, compare `crates/detect/src/ignores.rs` and `crates/hook/src/admin.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 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.
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:1183 — 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::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::run_visual_contrast_fallback (cyclomatic 21) REDACTED:2096 — impeccable_browser::run_visual_contrast_fallback 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_browser::cdp::client_error_message (cyclomatic 17) crates/browser/src/cdp.rs:2138 — 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 · ×6
  • 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::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::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::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 · ×5
  • 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), 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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: tests/oracle/cases/hooks.mjs tests/oracle/cases/hooks.mjs:62 — tests/oracle/cases/hooks.mjs 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 2 (its worst body is setup at line 62), 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: “Find projects below the session cwd on Stop (fixes #1101) (#1130)”; “Fix: ignoreFiles waives a linked stylesheet's page-level findings (#1087) (#1092)”; “Fix: distinguish existing Stop findings from new debt (#754)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- tests/oracle/cases/hooks.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/hook_markers.rs crates/context/src/hook_markers.rs:435 — crates/context/src/hook_markers.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is impeccable_context::hook_markers::strip_json_comments at line 435), 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: Windows hook commands PowerShell could not parse (#859, #848) (#915)”; “Fix: keep UNC prefix when normalizing hook paths (#784)”; “Fix: user-scope Windows hook group duplication (#784)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07:00' --full-history --no-merges -- crates/context/src/hook_markers.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), 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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: 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), 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 18:46:19 -07:00' --until='2026-10-23 18:46:19 -07: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 · 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.Di · ×5
  • component-review.Di::$e (cognitive 37) crates/context/assets/component-review.js:1537 — component-review.Di::$e 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.Di::re, component-review.Di::Ge, component-review.Di::Qe, …) 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.Di::Qe (cognitive 35) crates/context/assets/component-review.js:1562 — component-review.Di::Qe 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.Di::$e, component-review.Di::re, component-review.Di::Ge, …) 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.Di::xe (cognitive 35) crates/context/assets/component-review.js:1568 — component-review.Di::xe 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.Di::$e, component-review.Di::re, component-review.Di::Ge, …) 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.Di::Ge (cognitive 23) crates/context/assets/component-review.js:1548 — component-review.Di::Ge 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.Di::$e, component-review.Di::re, component-review.Di::Qe, …) 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.Di::re (cognitive 21) crates/context/assets/component-review.js:1537 — component-review.Di::re 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.Di::$e, component-review.Di::Ge, component-review.Di::Qe, …) 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 · Duplicated block (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) crates/context/src/context.rs:926 — crates/context/src/context.rs:926-931 | crates/detect/src/design_system.rs:1348-1353 | crates/detect/src/design_system.rs:1369-1374 — 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 (6 lines × 3) crates/core/src/browser/element_checks.rs:1877 — crates/core/src/browser/element_checks.rs:1877-1882 | crates/core/src/browser/element_checks.rs:1888-1893 | crates/core/src/browser/element_checks.rs:1899-1904 — 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 (6 lines × 3) crates/live/src/live_accept.rs:185 — crates/live/src/live_accept.rs:185-190 | crates/live/src/live_insert.rs:137-142 | crates/live/src/live_wrap.rs:71-76 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/core/src/checks/css_scan.rs:2602 — crates/core/src/checks/css_scan.rs:2602-2614 | 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.
D1 · Cyclomatic Complexity · component-review.Di · ×4
  • component-review.Di::ae (cyclomatic 56) crates/context/assets/component-review.js:1588 — component-review.Di::ae 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.Di::$e, component-review.Di::Qe, component-review.Di::xe) 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.Di::xe (cyclomatic 24) crates/context/assets/component-review.js:1568 — component-review.Di::xe 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.Di::$e, component-review.Di::Qe, component-review.Di::ae) 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.Di::$e (cyclomatic 21) crates/context/assets/component-review.js:1537 — component-review.Di::$e 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.Di::Qe, component-review.Di::xe, component-review.Di::ae) 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.Di::Qe (cyclomatic 18) crates/context/assets/component-review.js:1562 — component-review.Di::Qe 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.Di::$e, component-review.Di::xe, component-review.Di::ae) 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)::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.
  • (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.
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:34 — TooManyFunctions — 48 free functions. The bar is 30 free functions; 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.
  • 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 — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Page crates/browser/src/cdp.rs:728 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • 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.
  • 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:406-416 | 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.
  • Duplicated block (11 lines × 3) crates/live/src/manual_edits/commit.rs:1908 — crates/live/src/manual_edits/commit.rs:1908-1918 | crates/live/src/manual_edits/commit.rs:1964-1974 | crates/live/src/manual_edits/commit.rs:2018-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.
  • 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) crates/core/src/browser/quality.rs:1042 — crates/core/src/browser/quality.rs:1042-1051 | crates/core/src/browser/quality.rs:1088-1098 — both copies are in the same file, so extract the 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/browser/quality.rs:2560 — crates/core/src/browser/quality.rs:2560-2569 | crates/html/src/quality.rs:873-883 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 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–11 lines × 2) crates/html/src/engine.rs:280 — crates/html/src/engine.rs:280-290 | crates/html/src/engine.rs:332-341 — both copies are in the same file, so extract the 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/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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×4
  • Duplicated block (7 lines × 3) crates/live/src/copy_edit_agent.rs:1090 — crates/live/src/copy_edit_agent.rs:1090-1096 | crates/live/src/copy_edit_agent.rs:1130-1136 | crates/live/src/copy_edit_agent.rs:1138-1144 — 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/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/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.
  • Duplicated block (7 lines × 3) crates/core/src/browser/text_layers.rs:819 — crates/core/src/browser/text_layers.rs:819-825 | crates/core/src/browser/text_layers.rs:892-898 | crates/core/src/browser/text_layers.rs:1120-1126 — 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.
AC3 · Page structure · Page without a main landmark · ×3
  • 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>.
  • Page without a main landmark scripts/build-font-index.mjs:142 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · ServerState · ×3
  • ServerState::page (cyclomatic 85) crates/context/src/serve_question.rs:2203 — 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:1166 — 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:2112 — 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 55) crates/browser/src/cdp.rs:955 — Page::on_event 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.
  • Page::goto (cyclomatic 23) crates/browser/src/cdp.rs:1303 — 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:1508 — 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.
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:2203 — 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:1166 — 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:2112 — 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 85) crates/browser/src/cdp.rs:955 — Page::on_event has cognitive complexity 85 (threshold 15). Drivers by points: if/else 33 (75 pts), boolean chains 5, 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:1303 — 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:1508 — 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • 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.
  • Duplicated block (16 lines × 2) crates/core/src/browser/page_checks.rs:3496 — crates/core/src/browser/page_checks.rs:3496-3511 | crates/core/src/browser/page_checks.rs:5210-5225 — both copies are in the same file, so extract the 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:873 — crates/live/src/copy_edit_agent.rs:873-888 | crates/live/src/manual_edits/evidence.rs:471-486 — 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 (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) crates/core/src/browser/element_checks.rs:1783 — crates/core/src/browser/element_checks.rs:1783-1797 | 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.
  • Duplicated block (15 lines × 2) crates/live/src/manual_edits/evidence.rs:792 — crates/live/src/manual_edits/evidence.rs:792-806 | crates/live/src/manual_edits/evidence.rs:822-836 — both copies are in the same file, so extract the 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 (8–9 lines × 2) · ×3
  • 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.
  • 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.
  • 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.
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.07, instability 0.00, distance 0.93 — 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 · REDACTED: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:6240 — skill/scripts/live-browser.js:6240 · skill/scripts/live-browser.js:6276 — 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:9490 — skill/scripts/live-browser.js:9490 · skill/scripts/live-browser.js:9916 — both copies are in the same file, so extract the 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:13158 — skill/scripts/live-browser.js:13158 · skill/scripts/live-browser.js:13228 — both copies are in the same file, so extract the 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:286 — extension/background/service-worker.js:286 · extension/background/service-worker.js:319 — 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:1212 — skill/scripts/live-browser.js:1212 · skill/scripts/live-browser.js: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.
  • Duplicated block (10 lines × 2 locations) skill/scripts/live-browser.js:5492 — skill/scripts/live-browser.js:5492 · skill/scripts/live-browser.js:5529 — 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:1816 — skill/scripts/live-browser.js:1816 · skill/scripts/live-browser.js:1840 — 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:13192 — skill/scripts/live-browser.js:13192 · skill/scripts/live-browser.js:13219 — both copies are in the same file, so extract the 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:2414 — 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.
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 · Di · ×2
  • Di::Ge (cyclomatic 22) crates/context/assets/component-review.js:1548 — Di::Ge 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.
  • Di::$n (cyclomatic 18) crates/context/assets/component-review.js:1521 — Di::$n 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 · Ri · ×2
  • Ri::G::ve (cyclomatic 22) crates/context/assets/component-review.js:1633 — Ri::G::ve 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.
  • Ri::On (cyclomatic 17) crates/context/assets/component-review.js:1588 — Ri::On 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 · (anonymous) (cyclomatic 18) · ×2
  • (anonymous) (cyclomatic 18) extension/background/service-worker.js:272 — (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 305, 278, 317, …). 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) 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.
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 · Ri · ×2
  • Ri::G (cognitive 246) crates/context/assets/component-review.js:1588 — Ri::G 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.
  • Ri::On (cognitive 16) crates/context/assets/component-review.js:1588 — Ri::On 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 · Sys · ×2
  • Sys::migrate_unprefix_impeccable (cognitive 20) crates/skills/src/providers.rs:237 — 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:393 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: ServerState crates/live/src/server_state.rs:110 — TooManyFields — 35 stored fields beside 45 methods. 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.
  • 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 · Duplicated block (24 lines × 2) · ×2
  • 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.
  • Duplicated block (24 lines × 2) crates/core/src/browser/quality.rs:2571 — crates/core/src/browser/quality.rs:2571-2594 | crates/html/src/quality.rs:885-908 — before extracting anything, compare `crates/core/src/browser/quality.rs` and `crates/html/src/quality.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 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 (22 lines × 2) · ×2
  • 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.
  • Duplicated block (22 lines × 2) crates/live/src/live_insert.rs:188 — crates/live/src/live_insert.rs:188-209 | crates/live/src/live_wrap.rs:116-137 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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.
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.
  • Duplicated block (17 lines × 3) crates/live/src/live_server.rs:1155 — crates/live/src/live_server.rs:1155-1171 | crates/live/src/live_server.rs:1559-1575 | crates/live/src/live_server.rs:2009-2025 — 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.
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.
  • Duplicated block (15–16 lines × 2) crates/core/src/checks/decorative_text.rs:431 — crates/core/src/checks/decorative_text.rs:431-446 | crates/core/src/checks/rules.rs:765-779 — 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 (11–12 lines × 2) · ×2
  • 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.
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) crates/live/src/live_generate.rs:572 — crates/live/src/live_generate.rs:572-576 | crates/live/src/live_generate.rs:655-659 | crates/live/src/live_generate.rs:673-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.
  • Duplicated block (5 lines × 3) crates/live/src/svelte_ast.rs:559 — crates/live/src/svelte_ast.rs:559-563 | crates/live/src/svelte_ast.rs:1215-1219 | crates/live/src/svelte_ast.rs:1456-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.
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:283 — crates/core/src/browser/element_checks.rs:283-291 | crates/core/src/browser/text_collectors.rs:592-600 | 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.
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:8332 — skill/scripts/live-browser.js:8332 · skill/scripts/live-browser.js:8437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 34 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · component-review.Ri · ×1
  • component-review.Ri::G (cyclomatic 265) crates/context/assets/component-review.js:1588 — component-review.Ri::G 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) REDACTED:692 — 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:7641 — 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.resumeSession (cyclomatic 69) · ×1
  • live-browser.resumeSession (cyclomatic 69) skill/scripts/live-browser.js:10097 — 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 · live-browser.handleKeyDown (cyclomatic 68) · ×1
  • live-browser.handleKeyDown (cyclomatic 68) skill/scripts/live-browser.js:8203 — live-browser.handleKeyDown 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.
D1 · Cyclomatic Complexity · sheriff.evaluatePullRequest (cyclomatic 65) · ×1
  • sheriff.evaluatePullRequest (cyclomatic 65) scripts/github/sheriff.mjs:146 — sheriff.evaluatePullRequest has cyclomatic complexity 65 (threshold 15). Of this number, 63 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (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:5887 — 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:7090 — 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 7093). 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 · build.build (cyclomatic 40) · ×1
  • build.build (cyclomatic 40) scripts/build.js:711 — build.build 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.
D1 · Cyclomatic Complexity · live-browser.restoreSessionWithoutWrapper (cyclomatic 40) · ×1
  • live-browser.restoreSessionWithoutWrapper (cyclomatic 40) skill/scripts/live-browser.js:9681 — 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:5579 — 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 35) · ×1
  • live-browser.handleClick (cyclomatic 35) skill/scripts/live-browser.js:8044 — live-browser.handleClick has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 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:4387 — 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 · live-browser.injectVariantsFromSource (cyclomatic 31) · ×1
  • live-browser.injectVariantsFromSource (cyclomatic 31) skill/scripts/live-browser.js:6480 — 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 6524, 6547, 6498, …). 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) REDACTED:425 — 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 · live-browser.unlockSteerChat (cyclomatic 29) · ×1
  • live-browser.unlockSteerChat (cyclomatic 29) skill/scripts/live-browser.js:11014 — 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) REDACTED: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 · utils.readSourceFiles (cyclomatic 28) · ×1
  • utils.readSourceFiles (cyclomatic 28) scripts/lib/utils.js:249 — utils.readSourceFiles has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · 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) REDACTED: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 · build-font-index.main (cyclomatic 27) · ×1
  • build-font-index.main (cyclomatic 27) scripts/build-font-index.mjs:103 — build-font-index.main has cyclomatic complexity 27 (threshold 15). Of this number, 25 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 · live-browser.mountSvelteComponentVariant (cyclomatic 27) · ×1
  • live-browser.mountSvelteComponentVariant (cyclomatic 27) skill/scripts/live-browser.js:5739 — 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:6920 — 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 6974, a function literal at line 7024, …). 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 · (anonymous) (cyclomatic 27) · ×1
  • (anonymous) (cyclomatic 27) extension/background/service-worker.js:187 — (anonymous) has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · 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:3329 — 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:11365 — 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 11530, 11522, 11481, …). 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:11696 — 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 · service-worker.chrome.runtime.onMessage.addListener() (cyclomatic 24) · ×1
  • service-worker.chrome.runtime.onMessage.addListener() (cyclomatic 24) extension/background/service-worker.js:187 — service-worker.chrome.runtime.onMessage.addListener() has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · live-browser.startVoice (cyclomatic 24) · ×1
  • live-browser.startVoice (cyclomatic 24) skill/scripts/live-browser.js:11172 — 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 · CssHostIndex · ×1
  • CssHostIndex::new (cyclomatic 23) crates/core/src/checks/css_scan.rs:1333 — 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 · utils.parseFrontmatter (cyclomatic 23) · ×1
  • utils.parseFrontmatter (cyclomatic 23) scripts/lib/utils.js:128 — utils.parseFrontmatter 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 · 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:622 — 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:2107 — 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:3858 — 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.setPendingApplyLoading (cyclomatic 22) · ×1
  • live-browser.setPendingApplyLoading (cyclomatic 22) skill/scripts/live-browser.js:4161 — live-browser.setPendingApplyLoading 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:4228 — 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:9140 — 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 · (anonymous) (cyclomatic 22) · ×1
  • (anonymous) (cyclomatic 22) browser-bundle/60-offscreen.js:201 — (anonymous) has cyclomatic complexity 22 (threshold 15). Of this number, 16 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 · 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) REDACTED:550 — 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 · 60-offscreen.chrome.runtime.onMessage.addListener() (cyclomatic 21) · ×1
  • 60-offscreen.chrome.runtime.onMessage.addListener() (cyclomatic 21) browser-bundle/60-offscreen.js:201 — 60-offscreen.chrome.runtime.onMessage.addListener() has cyclomatic complexity 21 (threshold 15). Of this number, 15 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 · REDACTED.select (cyclomatic 21) · ×1
  • REDACTED.select (cyclomatic 21) REDACTED:257 — REDACTED.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:1797 — 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) REDACTED:383 — 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 · sheriff.parseArgs (cyclomatic 20) · ×1
  • sheriff.parseArgs (cyclomatic 20) scripts/github/sheriff.mjs:453 — sheriff.parseArgs has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · 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:1006 — 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:2700 — 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 · build-extension.manifestReferences (cyclomatic 19) · ×1
  • build-extension.manifestReferences (cyclomatic 19) REDACTED:78 — build-extension.manifestReferences has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) · ×1
  • live-browser.findLiveElementFromAnchorSnapshot (cyclomatic 19) skill/scripts/live-browser.js:5202 — 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:5225 — 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:6407 — 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:6593 — 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:12146 — 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 12170, a function literal at line 12188). 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:319 — 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 · Ve (cyclomatic 19) · ×1
  • Ve (cyclomatic 19) crates/context/assets/component-review.js:1286 — Ve 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 · (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 · RenderedTextCount · ×1
  • RenderedTextCount::feed (cyclomatic 18) crates/core/src/browser/quality.rs:1005 — 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 · live-browser.captureElementToBlob (cyclomatic 18) · ×1
  • live-browser.captureElementToBlob (cyclomatic 18) skill/scripts/live-browser.js:8729 — 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:9760 — 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:12955 — 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:13440 — 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 · build.generateCounts (cyclomatic 17) · ×1
  • build.generateCounts (cyclomatic 17) scripts/build.js:45 — build.generateCounts has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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:3477 — 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.captureAndEmit (cyclomatic 17) · ×1
  • live-browser.captureAndEmit (cyclomatic 17) skill/scripts/live-browser.js:8800 — 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:218 — 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.__snapConditionalCssRuleIsActive (cyclomatic 16) · ×1
  • 15-snapshot.__snapConditionalCssRuleIsActive (cyclomatic 16) REDACTED:307 — 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) REDACTED:511 — 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 · content-script.runScan (cyclomatic 16) · ×1
  • content-script.runScan (cyclomatic 16) extension/content/content-script.js:186 — content-script.runScan has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 199). 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-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:1063 — 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:2526 — 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 2574, 2552, 2603, …). 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:3514 — 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.cleanup (cyclomatic 16) · ×1
  • live-browser.cleanup (cyclomatic 16) skill/scripts/live-browser.js:9843 — 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:11111 — 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:12339 — 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:83 — 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 85, 120, 125, …). 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 · or (cyclomatic 16) · ×1
  • or (cyclomatic 16) crates/context/assets/component-review.js:1521 — or 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) REDACTED:692 — 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 97) · ×1
  • live-browser.handleKeyDown (cognitive 97) skill/scripts/live-browser.js:8203 — live-browser.handleKeyDown has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (58 pts), boolean chains 20, ternaries 4 (10 pts), loops 3 (9 pts) (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.
D2 · Cognitive Complexity · build.build (cognitive 77) · ×1
  • build.build (cognitive 77) scripts/build.js:711 — build.build has cognitive complexity 77 (threshold 15). Drivers by points: if/else 25 (55 pts), loops 8 (19 pts), boolean chains 3 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.resumeSession (cognitive 72) · ×1
  • live-browser.resumeSession (cognitive 72) skill/scripts/live-browser.js:10097 — 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:7090 — 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 7093). 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 · sheriff.evaluatePullRequest (cognitive 54) · ×1
  • sheriff.evaluatePullRequest (cognitive 54) scripts/github/sheriff.mjs:146 — sheriff.evaluatePullRequest has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 29, if/else 14 (16 pts), ternaries 7, loops 2 (nesting depth added 2). Of this number, 52 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Di · ×1
  • Di::ae (cognitive 53) crates/context/assets/component-review.js:1588 — Di::ae 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:6480 — 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:5579 — 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 · build-font-index.main (cognitive 45) · ×1
  • build-font-index.main (cognitive 45) scripts/build-font-index.mjs:103 — build-font-index.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 7 (13 pts), loops 5 (9 pts), error handling 2 (5 pts), boolean chains 4 (nesting depth added 19). Of this number, 43 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.injectSvelteComponentsFromManifest (cognitive 43) · ×1
  • live-browser.injectSvelteComponentsFromManifest (cognitive 43) skill/scripts/live-browser.js:5887 — 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:1333 — 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) REDACTED: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:4387 — 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 · 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) REDACTED: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:9843 — 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 9867, 9893). 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 · 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 · utils.parseFrontmatter (cognitive 36) · ×1
  • utils.parseFrontmatter (cognitive 36) scripts/lib/utils.js:128 — utils.parseFrontmatter has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 1 (4 pts), boolean chains 3, loops 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.
D2 · Cognitive Complexity · live-browser.resolveBarAnchor (cognitive 36) · ×1
  • live-browser.resolveBarAnchor (cognitive 36) skill/scripts/live-browser.js:2107 — 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:5225 — 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) REDACTED:550 — 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:1006 — 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:201 — (anonymous) has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7, error handling 2 (6 pts), ternaries 1 (2 pts) (nesting depth added 14). 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:3858 — 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 · utils.readSourceFiles (cognitive 33) · ×1
  • utils.readSourceFiles (cognitive 33) scripts/lib/utils.js:249 — utils.readSourceFiles has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, if/else 6 (8 pts), loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). 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.buildCyclingRow (cognitive 33) · ×1
  • live-browser.buildCyclingRow (cognitive 33) skill/scripts/live-browser.js:2700 — 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 · live-browser.handleClick (cognitive 33) · ×1
  • live-browser.handleClick (cognitive 33) skill/scripts/live-browser.js:8044 — live-browser.handleClick has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 10, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderFindings (cognitive 33) · ×1
  • renderFindings (cognitive 33) extension/devtools/panel.js:400 — 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 · (anonymous) (cognitive 33) · ×1
  • (anonymous) (cognitive 33) extension/background/service-worker.js:187 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, error handling 3 (6 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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) REDACTED:511 — 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:201 — 60-offscreen.chrome.runtime.onMessage.addListener() has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 7, error handling 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). 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.hitSiblingInsertGap (cognitive 31) · ×1
  • live-browser.hitSiblingInsertGap (cognitive 31) skill/scripts/live-browser.js:1797 — 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:6593 — 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:272 — (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 305, 278, 317, …). 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:9681 — 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:13440 — 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) REDACTED:383 — __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:1005 — 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:622 — 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:5739 — 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 · build.generateCounts (cognitive 28) · ×1
  • build.generateCounts (cognitive 28) scripts/build.js:45 — build.generateCounts has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 12). Of this number, 26 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 · running_animation_properties (cognitive 28) · ×1
  • running_animation_properties (cognitive 28) browser-bundle/10-probe.js:319 — 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 · service-worker.chrome.runtime.onMessage.addListener() (cognitive 27) · ×1
  • service-worker.chrome.runtime.onMessage.addListener() (cognitive 27) extension/background/service-worker.js:187 — service-worker.chrome.runtime.onMessage.addListener() has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, loops 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.
D2 · Cognitive Complexity · live-browser.completeSourceInjection (cognitive 27) · ×1
  • live-browser.completeSourceInjection (cognitive 27) skill/scripts/live-browser.js:6407 — 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 · (anonymous) (cognitive 27) · ×1
  • (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 · 15-snapshot.__snapLinkedStylesheetText · ×1
  • 15-snapshot.__snapLinkedStylesheetText::appendRules (cognitive 26) REDACTED:430 — 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:3329 — 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:5669 — 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 · utils.generateYamlFrontmatter (cognitive 25) · ×1
  • utils.generateYamlFrontmatter (cognitive 25) scripts/lib/utils.js:791 — utils.generateYamlFrontmatter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildDots (cognitive 25) · ×1
  • live-browser.buildDots (cognitive 25) skill/scripts/live-browser.js:2900 — 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:9140 — 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:571 — 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:4228 — 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:8131 — 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:11365 — 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 11530, 11522, 11487, …). 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:83 — 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 85, 120, 125, …). 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 · SafeTagTextSeen · ×1
  • SafeTagTextSeen::keep_first_keyed_claiming (cognitive 23) crates/core/src/checks/rules.rs:629 — SafeTagTextSeen::keep_first_keyed_claiming has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (6 pts), boolean chains 3, 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 · live-server-processes.pidsWithEnvMarker (cognitive 23) · ×1
  • live-server-processes.pidsWithEnvMarker (cognitive 23) scripts/lib/live-server-processes.mjs:240 — live-server-processes.pidsWithEnvMarker has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.findLiveElementFromAnchorSnapshot (cognitive 23) · ×1
  • live-browser.findLiveElementFromAnchorSnapshot (cognitive 23) skill/scripts/live-browser.js:5202 — 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:218 — 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 226, 237, 236, …). 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 · (anonymous) (cognitive 23) · ×1
  • (anonymous) (cognitive 23) extension/content/content-script.js:258 — (anonymous) has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 9). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · service-worker.chrome.runtime.onConnect.addListener() (cognitive 22) · ×1
  • service-worker.chrome.runtime.onConnect.addListener() (cognitive 22) extension/background/service-worker.js:272 — 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 · 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.collectFontCssText (cognitive 22) · ×1
  • live-browser.collectFontCssText (cognitive 22) skill/scripts/live-browser.js:8557 — live-browser.collectFontCssText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), error handling 2 (5 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.
D2 · Cognitive Complexity · live-browser.captureAndEmit (cognitive 22) · ×1
  • live-browser.captureAndEmit (cognitive 22) skill/scripts/live-browser.js:8800 — 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:163 — 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 · build-extension.manifestReferences (cognitive 21) · ×1
  • build-extension.manifestReferences (cognitive 21) REDACTED:78 — build-extension.manifestReferences has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (11 pts), boolean chains 9, if/else 1 (nesting depth added 3). 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, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · sheriff.parseArgs (cognitive 21) · ×1
  • sheriff.parseArgs (cognitive 21) scripts/github/sheriff.mjs:453 — sheriff.parseArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 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 · live-browser.collectEditableTextRows · ×1
  • live-browser.collectEditableTextRows::visit (cognitive 21) skill/scripts/live-browser.js:3477 — 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:7641 — 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:8729 — 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:11111 — 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 · validate-plugin-versions.readSkillFrontmatterVersion (cognitive 20) · ×1
  • validate-plugin-versions.readSkillFrontmatterVersion (cognitive 20) scripts/lib/validate-plugin-versions.js:34 — validate-plugin-versions.readSkillFrontmatterVersion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.renderEditBadge (cognitive 20) · ×1
  • live-browser.renderEditBadge (cognitive 20) skill/scripts/live-browser.js:4805 — live-browser.renderEditBadge has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 5). Of this number, 19 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.startScrollLock (cognitive 20) · ×1
  • live-browser.startScrollLock (cognitive 20) skill/scripts/live-browser.js:6920 — 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 7024, 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.drive (cognitive 19) · ×1
  • content-script.drive (cognitive 19) extension/content/content-script.js:162 — content-script.drive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content-script.runScan (cognitive 19) · ×1
  • content-script.runScan (cognitive 19) extension/content/content-script.js:186 — content-script.runScan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 199). 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 · validate-plugin-manifest.collectPluginManifestFindings (cognitive 19) · ×1
  • validate-plugin-manifest.collectPluginManifestFindings (cognitive 19) scripts/lib/validate-plugin-manifest.js:95 — validate-plugin-manifest.collectPluginManifestFindings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:3514 — 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.ensureAcceptedDomClean (cognitive 19) · ×1
  • live-browser.ensureAcceptedDomClean (cognitive 19) skill/scripts/live-browser.js:9408 — live-browser.ensureAcceptedDomClean has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). 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.unlockSteerChat (cognitive 19) · ×1
  • live-browser.unlockSteerChat (cognitive 19) skill/scripts/live-browser.js:11014 — 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:11696 — 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 · REDACTED.renderList (cognitive 18) · ×1
  • REDACTED.renderList (cognitive 18) REDACTED:186 — REDACTED.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 · build.validateProse (cognitive 18) · ×1
  • build.validateProse (cognitive 18) scripts/build.js:251 — build.validateProse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (checkLine, scan). 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 · live-browser.startVoice (cognitive 18) · ×1
  • live-browser.startVoice (cognitive 18) skill/scripts/live-browser.js:11172 — 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 · 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 · __snapConditionalCssRuleIsActive (cognitive 18) · ×1
  • __snapConditionalCssRuleIsActive (cognitive 18) REDACTED:307 — __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 · 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) REDACTED: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.zi (cognitive 17) · ×1
  • component-review.zi (cognitive 17) crates/context/assets/component-review.js:1 — component-review.zi 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.Ee (cognitive 17) · ×1
  • component-review.Ee (cognitive 17) crates/context/assets/component-review.js:1521 — component-review.Ee 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 · content-script.analyzeCandidate (cognitive 17) · ×1
  • content-script.analyzeCandidate (cognitive 17) extension/content/content-script.js:224 — content-script.analyzeCandidate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 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.
D2 · Cognitive Complexity · content-script.chrome.runtime.onMessage.addListener() (cognitive 17) · ×1
  • content-script.chrome.runtime.onMessage.addListener() (cognitive 17) extension/content/content-script.js:258 — content-script.chrome.runtime.onMessage.addListener() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.detectInsertAxisFromStyle (cognitive 17) · ×1
  • live-browser.detectInsertAxisFromStyle (cognitive 17) skill/scripts/live-browser.js:1725 — 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:5524 — 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:7207 — 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) REDACTED: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) REDACTED:325 — 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 · REDACTED.select (cognitive 16) · ×1
  • REDACTED.select (cognitive 16) REDACTED:257 — REDACTED.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 · utils.appendYamlObject (cognitive 16) · ×1
  • utils.appendYamlObject (cognitive 16) scripts/lib/utils.js:763 — utils.appendYamlObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build.mirrorDirContentsSync (cognitive 16) · ×1
  • build.mirrorDirContentsSync (cognitive 16) scripts/build.js:534 — build.mirrorDirContentsSync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2, ternaries 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.
D2 · Cognitive Complexity · publish-platform-packages.main (cognitive 16) · ×1
  • publish-platform-packages.main (cognitive 16) scripts/publish-platform-packages.mjs:166 — publish-platform-packages.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (4 pts), loops 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · live-browser.buildInsertConfigureRow (cognitive 16) · ×1
  • live-browser.buildInsertConfigureRow (cognitive 16) skill/scripts/live-browser.js:2526 — 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 2574, 2552, 2603, …). 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:4546 — 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:5698 — 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.onDetectMessage (cognitive 16) · ×1
  • live-browser.onDetectMessage (cognitive 16) skill/scripts/live-browser.js:12315 — 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:12955 — 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:13241 — 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 · Ve (cognitive 16) · ×1
  • Ve (cognitive 16) crates/context/assets/component-review.js:1286 — Ve 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.
D22 · Internal API Consistency · Screenshot methods are fragmented and inconsistent in naming and parameterization. `screenshot_viewport` returns an ambiguous result (likely raw bytes or base64 without format indication), while `screenshot_viewport_png` and `screenshot_viewport_jpeg` are explicit. `screenshot_clip` and `screenshot_jpeg` take explicit coordinates but differ in return type implication (one is generic, one is JPEG). There is no unified `screenshot` method that accepts a format enum and optional clip rect. · ×1
  • Screenshot methods are fragmented and inconsistent in naming and parameterization. `screenshot_viewport` returns an ambiguous result (likely raw bytes or base64 without format indication), while `screenshot_viewport_png` and `screenshot_viewport_jpeg` are explicit. `screenshot_clip` and `screenshot_jpeg` take explicit coordinates but differ in return type implication (one is generic, one is JPEG). There is no unified `screenshot` method that accepts a format enum and optional clip rect. — Unify into a single `screenshot(format: ScreenshotFormat, clip: Option<Clip>)` method, or at least ensure `screenshot_viewport` returns a typed `Screenshot` struct (like `imperfect_browser.Screenshot`) rather than an ambiguous `CdpResult`. (signatures: imperfect_browser.cdp.Page.screenshot_viewport() | imperfect_browser.cdp.Page.screenshot_viewport_png() | imperfect_browser.cdp.Page.screenshot_viewport_jpeg(quality: u32) | imperfect_browser.cdp.Page.screenshot_clip(x: f64, y: f64, width: f64, height: f64) | imperfect_browser.cdp.Page.screenshot_jpeg(x: f64, y: f64, width: f64, height: f64, quality: u32))
D22 · Internal API Consistency · Two methods for JavaScript evaluation with unclear distinction. `evaluate` and `evaluate_value` likely differ in return type (void vs value), but the naming is confusing. `evaluate_value_in_world` exists for isolated worlds, but the main page methods lack a consistent pattern (e.g., `evaluate_void` vs `evaluate_value`). · ×1
  • Two methods for JavaScript evaluation with unclear distinction. `evaluate` and `evaluate_value` likely differ in return type (void vs value), but the naming is confusing. `evaluate_value_in_world` exists for isolated worlds, but the main page methods lack a consistent pattern (e.g., `evaluate_void` vs `evaluate_value`). — Rename to `evaluate_void` and `evaluate_value` for clarity, or use a single `evaluate` method that returns a generic `Value` type (allowing callers to ignore the result if needed). (signatures: imperfect_browser.cdp.Page.evaluate(expression: str) | imperfect_browser.cdp.Page.evaluate_value(expression: str))
D22 · Internal API Consistency · Duplicate type definition across modules. `imperfect_browser.html_snapshot.HtmlSnapshot` and `imperfect.capture_snapshot.HtmlSnapshot` appear to serve the same purpose (managing HTML snapshots) with nearly identical methods (`freeze`, `digest`, `manifest`, `entry`, `bytes`, `verify_current`, `serve_path`, `serve`). This suggests a refactoring artifact or split between 'browser-level' and 'capture-service-level' concerns that should be unified. · ×1
  • Duplicate type definition across modules. `imperfect_browser.html_snapshot.HtmlSnapshot` and `imperfect.capture_snapshot.HtmlSnapshot` appear to serve the same purpose (managing HTML snapshots) with nearly identical methods (`freeze`, `digest`, `manifest`, `entry`, `bytes`, `verify_current`, `serve_path`, `serve`). This suggests a refactoring artifact or split between 'browser-level' and 'capture-service-level' concerns that should be unified. — Merge into a single `HtmlSnapshot` type, possibly with a trait or builder pattern to handle the different contexts (browser vs service). (signatures: imperfect_browser.html_snapshot.HtmlSnapshot | imperfect.capture_snapshot.HtmlSnapshot)
D22 · Internal API Consistency · Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotSelection` and `imperfect.capture_snapshot.SnapshotSelection` have identical properties (`root`, `entry`, `served`, `bound`). · ×1
  • Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotSelection` and `imperfect.capture_snapshot.SnapshotSelection` have identical properties (`root`, `entry`, `served`, `bound`). — Merge into a single `SnapshotSelection` type in a shared module. (signatures: imperfect_browser.html_snapshot.SnapshotSelection | imperfect.capture_snapshot.SnapshotSelection)
D22 · Internal API Consistency · Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotServer` and `imperfect.capture_snapshot.SnapshotServer` both expose `entry_url()`. This indicates redundant server implementations. · ×1
  • Duplicate type definition. `imperfect_browser.html_snapshot.SnapshotServer` and `imperfect.capture_snapshot.SnapshotServer` both expose `entry_url()`. This indicates redundant server implementations. — Merge into a single `SnapshotServer` type. (signatures: imperfect_browser.html_snapshot.SnapshotServer | imperfect.capture_snapshot.SnapshotServer)
D22 · Internal API Consistency · Viewport handling is scattered. `Page.set_viewport` takes a `Viewport` struct, but other functions like `capture_full_page` and `capture_visual_contrast_candidate` take raw `f64` dimensions or `Value` objects. This forces callers to construct `Viewport` structs or parse values repeatedly. · ×1
  • Viewport handling is scattered. `Page.set_viewport` takes a `Viewport` struct, but other functions like `capture_full_page` and `capture_visual_contrast_candidate` take raw `f64` dimensions or `Value` objects. This forces callers to construct `Viewport` structs or parse values repeatedly. — Standardize on a `Viewport` struct for all viewport-related operations, or provide helper functions to convert raw dimensions to `Viewport`. (signatures: imperfect_browser.cdp.Page.set_viewport(viewport: Viewport) | imperfect_browser.fullpage.capture_full_page(page: Page, max_height: f64, quality: u32) | imperfect_browser.screenshot_contrast.capture_visual_contrast_candidate(page: Page, candidate: Value, viewport_width: f64))
D22 · Internal API Consistency · Inconsistent path handling API. `imperfect_common.jsp` provides a flat namespace with `to_posix`, `is_absolute`, etc., while `imperfect_common.jsp.posix` and `imperfect_common.jsp.win32` provide platform-specific sub-modules with the same method names. This creates confusion · ×1
  • Inconsistent path handling API. `imperfect_common.jsp` provides a flat namespace with `to_posix`, `is_absolute`, etc., while `imperfect_common.jsp.posix` and `imperfect_common.jsp.win32` provide platform-specific sub-modules with the same method names. This creates confusion: should one use `jsp.is_absolute` (which might be platform-aware or default to posix) or `posix.is_absolute`? — Remove the flat `jsp` namespace methods if platform-specific modules exist, or clearly document that `jsp` methods are platform-agnostic defaults. Better yet, use a single `Path` trait or module that abstracts platform differences. (signatures: imperfect_common.jsp.to_posix(p: str) | imperfect_common.jsp.posix.is_absolute(p: str) | imperfect_common.jsp.posix.normalize(p: str) | imperfect_common.jsp.win32.is_absolute(p: str) | imperfect_common.jsp.win32.normalize(p: str))
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: ServerState crates/live/src/server_state.rs:110 — ClassTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 2 blocks, lines 110-1275. The bar is 400 significant lines; this is 305 over it, 1.76× 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.
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 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `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…; `f288af47` Fix: detect honors a configured extension's engine (#795) (#1013) — 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 · Near-duplicate member pair (21 shared lines) · ×1
  • Near-duplicate member pair (21 shared lines) crates/core/src/browser/text_layers.rs:818 — crates/core/src/browser/text_layers.rs:818-867 | crates/core/src/browser/text_layers.rs:891-939 — These two members are variants of one another: 21 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 (11 corresponding lines) · ×1
  • 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.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) crates/live/src/copy_edit_agent.rs:872 — crates/live/src/copy_edit_agent.rs:872-893 | crates/live/src/manual_edits/evidence.rs:470-492 — 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 (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:625-665 — both copies are in the same file, so extract the 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 (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 12 separate duplicated blocks between them, totalling at least 215 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 (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) crates/browser/src/html_snapshot.rs:264 — crates/browser/src/html_snapshot.rs:264-295 | crates/cli/src/capture_snapshot.rs:396-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 12 separate duplicated blocks between them, totalling at least 215 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 (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) crates/core/src/browser/quality.rs:3117 — crates/core/src/browser/quality.rs:3117-3145 | 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 5 separate duplicated blocks between them, totalling at least 87 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 (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) crates/core/src/checks/css_scan.rs:174 — crates/core/src/checks/css_scan.rs:174-200 | crates/core/src/checks/rules.rs:2141-2165 — 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) crates/browser/src/html_snapshot.rs:237 — crates/browser/src/html_snapshot.rs:237-262 | crates/cli/src/capture_snapshot.rs:369-394 — before extracting anything, compare `crates/browser/src/html_snapshot.rs` and `crates/cli/src/capture_snapshot.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 215 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 (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) crates/browser/src/html_snapshot.rs:401 — crates/browser/src/html_snapshot.rs:401-424 | crates/cli/src/capture_snapshot.rs:496-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 12 separate duplicated blocks between them, totalling at least 215 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 (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:1154-1175 — 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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) crates/core/src/browser/element_checks.rs:740 — crates/core/src/browser/element_checks.rs:740-761 | crates/core/src/browser/element_checks.rs:827-847 — both copies are in the same file, so extract the 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 (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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) crates/live/src/live_insert.rs:167 — crates/live/src/live_insert.rs:167-186 | crates/live/src/live_wrap.rs:93-113 — before extracting anything, compare `crates/live/src/live_insert.rs` and `crates/live/src/live_wrap.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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.
D4 · Code Duplication · Duplicated block (14–20 lines × 2) · ×1
  • Duplicated block (14–20 lines × 2) crates/hook/src/admin.rs:945 — crates/hook/src/admin.rs:945-964 | REDACTED:507-520 — 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.
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:927-944 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) 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 12 separate duplicated blocks between them, totalling at least 215 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 (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 (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.
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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/core/src/browser/page_checks.rs:2726 — crates/core/src/browser/page_checks.rs:2726-2739 | crates/html/src/page.rs:641-653 — 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 (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.
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.
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.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/core/src/browser/text_layers.rs:848 — crates/core/src/browser/text_layers.rs:848-858 | crates/core/src/browser/text_layers.rs:924-932 — both copies are in the same file, so extract the 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 (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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) crates/core/src/browser/element_checks.rs:2663 — crates/core/src/browser/element_checks.rs:2663-2673 | crates/core/src/browser/visual.rs:2569-2578 | crates/core/src/browser/visual.rs:2859-2868 — 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:949 — crates/live/src/live_accept.rs:949-956 | 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.
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 (7–8 lines × 2) · ×1
  • 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.
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.
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:741-747 — 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 (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) crates/browser/src/cdp.rs:2166 — crates/browser/src/cdp.rs:2166-2170 | REDACTED:517-522 — 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 (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) crates/comp-verbs/src/build_phase.rs:1245 — crates/comp-verbs/src/build_phase.rs:1245-1250 | crates/comp-verbs/src/build_phase.rs:2667-2669 | crates/comp-verbs/src/build_phase.rs:2684-2688 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • 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.
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:471-479 | crates/hook/src/hook_lib.rs:466-474 | crates/skills/src/providers.rs:514-522 — 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.
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:76-82 | 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 7 separate duplicated blocks between them, totalling at least 86 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 18) crates/wasm/src/js_dom.rs:120 — JsDom's methods fall into 18 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 18 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 331 JavaScript/TypeScript, Rust production file(s) this check read across 17 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 38 typed · 173 plain JS — the untyped files are browser-bundle/05-natives.js, browser-bundle/10-probe.js, REDACTED, browser-bundle/30-scan-common.js, browser-bundle/35-visual.js, browser-bundle/40-overlay.js (+167 more).
R10 · Code Duplication · Forked directory tree (40 identical files, ~17670 lines × 2 trees) · ×1
  • Forked directory tree (40 identical files, ~17670 lines × 2 trees) cursor-plugin/skills/impeccable/scripts/live-browser.js:1 — cursor-plugin/ and plugin/ are near-verbatim copies of each other: 40 files are byte-identical under the same relative paths (~17670 lines; the trees hold 64 and 62 files). That is one structural fact, not 40 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 with local edits (27 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (27 matched lines × 2 locations) scripts/fetch-engine.mjs:50 — scripts/fetch-engine.mjs:50 · scripts/publish-platform-packages.mjs:79 — the two spans are one implementation copied and then locally edited — 245 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) scripts/release.mjs:182 — scripts/release.mjs:182 · scripts/release.mjs:434 — both copies are in the same file, so extract the 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:224 — REDACTED:224 · extension/content/content-script.js:132 — the two spans are one implementation copied and then locally edited — 163 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:2443 — skill/scripts/live-browser.js:2443 · skill/scripts/live-browser.js:2533 — 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:1478 — skill/scripts/live-browser.js:1478 · skill/scripts/live-browser.js:11638 — both copies are in the same file, so extract the 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 (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) scripts/lib/utils.js:772 — scripts/lib/utils.js:772 · scripts/lib/utils.js:801 — 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:2469 — skill/scripts/live-browser.js:2469 · skill/scripts/live-browser.js:2550 — both copies are in the same file, so extract the 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:338 — browser-bundle/10-probe.js:338 · REDACTED:576 — 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 (8 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (8 matched lines × 2 locations) REDACTED:383 — REDACTED:383 · REDACTED:550 — 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 G (cyclomatic 255, cognitive 246) · ×1
  • Complex function G (cyclomatic 255, cognitive 246) crates/context/assets/component-review.js:1588 — G 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 94, cognitive 142) · ×1
  • Complex function (anonymous) (cyclomatic 94, cognitive 142) tests/live-e2e.test.mjs:214 — (anonymous) has cyclomatic complexity 94 and cognitive complexity 142; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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) REDACTED:692 — 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 77, cognitive 182) · ×1
  • Complex function runAgentLoop (cyclomatic 77, cognitive 182) tests/live-e2e/agent.mjs:1912 — runAgentLoop has cyclomatic complexity 77 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:7648 — 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 handleKeyDown (cyclomatic 68, cognitive 97) · ×1
  • Complex function handleKeyDown (cyclomatic 68, cognitive 97) skill/scripts/live-browser.js:8203 — handleKeyDown has cyclomatic complexity 68 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (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:10097 — 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 evaluatePullRequest (cyclomatic 63, cognitive 52) · ×1
  • Complex function evaluatePullRequest (cyclomatic 63, cognitive 52) scripts/github/sheriff.mjs:146 — evaluatePullRequest has cyclomatic complexity 63 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 ae (cyclomatic 56, cognitive 53) · ×1
  • Complex function ae (cyclomatic 56, cognitive 53) crates/context/assets/component-review.js:1588 — ae 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:5887 — 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:7093 — (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 runManualEditStage (cyclomatic 42, cognitive 66) · ×1
  • Complex function runManualEditStage (cyclomatic 42, cognitive 66) tests/live-e2e.test.mjs:1933 — 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 build (cyclomatic 40, cognitive 77) · ×1
  • Complex function build (cyclomatic 40, cognitive 77) scripts/build.js:711 — build has cyclomatic complexity 40 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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:9681 — 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 exercise (cyclomatic 37, cognitive 55) · ×1
  • Complex function exercise (cyclomatic 37, cognitive 55) tests/launcher-download.test.mjs:28 — exercise has cyclomatic complexity 37 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleClick (cyclomatic 35, cognitive 33) · ×1
  • Complex function handleClick (cyclomatic 35, cognitive 33) skill/scripts/live-browser.js:8044 — handleClick has cyclomatic complexity 35 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
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 · REDACTED · ×1
  • REDACTED: 921 lines of code REDACTED:1 — REDACTED has 921 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 · extension/devtools/panel.js · ×1
  • extension/devtools/panel.js: 459 lines of code extension/devtools/panel.js:1 — extension/devtools/panel.js has 459 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: 434 lines of code REDACTED:1 — REDACTED has 434 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 (~373 LoC) · ×1
  • Dead file (~373 LoC) extension/background/service-worker.js — no import path from any entry point (176 application, 80 tooling, 294 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 package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'hono' · ×1
  • Unused dependency 'hono' — Declared in tests/oracle/workspaces/ctx-monorepo-tooling/apps/api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'react' · ×1
  • 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 package.json 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 package.json 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.
Minor — 105 finding(s)
X7 · Silent fallback defaults · Silent fallback default on Err · ×27
  • 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:918 — `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/serve_question.rs:880 — `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:593 — `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.
  • Silent fallback default on Err crates/wasm/src/exports_detect.rs:175 — `immediate_tier_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/wasm/src/exports_driver.rs:40 — `measure_hidden_text` turns every `Err` into `"{\"totalChars\":0,\"hiddenChars\":0,\"hiddenSamples\":[]}".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.
  • + 2 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate .agent/skills/impeccable/scripts/live-browser.js:2343 — `!!btn && btn.getAttribute('aria-disabled') !== 'true'` appears character-identically in 22 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:6896 — `!!currentSessionId || (state !== 'IDLE' && state !== 'PICKING')` appears character-identically in 22 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:5174 — `!!el && el.parentElement && document.body.contains(el) && !own(el) && !el.closest?.('[data-impeccable-variants],[data-impeccable-carbonize]'…` appears character-identically in 22 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 22 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:2185 — `!!wrapper && wrapper.dataset.impeccableMode === 'insert'` appears character-identically in 22 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:1769 — `!Number.isFinite(rect.height) || rect.height <= 0` appears character-identically in 22 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:1766 — `!Number.isFinite(rect.width) || rect.width <= 0` appears character-identically in 22 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:3316 — `!Object.hasOwn(saved, p.id) || !isValidSavedParamValue(p, saved[p.id])` appears character-identically in 22 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:9513 — `!accepted || !accepted.firstElementChild` appears character-identically in 22 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:4741 — `!active.has(target) || !target.isConnected` appears character-identically in 22 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:1252 — `!barEl || barEl.style.display === 'none'` appears character-identically in 22 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:1088 — `!candidate || !candidate.contains(leafEl)` appears character-identically in 22 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:1089 — `!candidate.id && candidate.classList.length === 0 && candidate.children.length < 2` appears character-identically in 22 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:3534 — `!child.dataset || !child.dataset.impeccableTextWrap` appears character-identically in 22 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:3777 — `!cls || cls.indexOf('impeccable-') === 0` appears character-identically in 22 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:4193 — `!currentPageCount || currentPageCount <= 0` appears character-identically in 22 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:9285 — `!currentSessionId || arrivedVariants === 0` appears character-identically in 22 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:9761 — `!currentSessionId || state !== 'GENERATING'` appears character-identically in 22 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:12316 — `!e.data || typeof e.data.source !== 'string'` appears character-identically in 22 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:4489 — `!el || !el.dataset || el.dataset.impeccableTextWrap !== 'true' || !el.parentElement` appears character-identically in 22 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:3630 — `!el || !el.isConnected || state !== 'EDITING'` appears character-identically in 22 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:4469 — `!el || typeof op.originalText !== 'string' || !canRestoreManualEditElement(el, op)` appears character-identically in 22 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:4483 — `!el || typeof op?.originalText !== 'string'` appears character-identically in 22 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:4587 — `!el.classList || !el.classList.contains(cls)` appears character-identically in 22 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:3774 — `!el.classList || el.classList.length === 0` appears character-identically in 22 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×13
  • Silent fallback default in catch REDACTED: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 REDACTED:360 — `__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 REDACTED:480 — `__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:798 — `__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:823 — `__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:869 — `__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:989 — `__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:5430 — `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:10449 — `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:5430 — `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:10449 — `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 scripts/smoke-provider-hooks.mjs:927 — `readMaybe` 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 skill/scripts/live-browser.js:5430 — `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.
M4 · Documentation accuracy · README/code drift · ×9
  • README/code drift docs/COMP-FIDELITY.md:3 — docs/COMP-FIDELITY.md names `build-phase.mjs`, but no file or folder `build-phase.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/COMP-FIDELITY.md:81 — docs/COMP-FIDELITY.md names `comp-diff.mjs`, but no file or folder `comp-diff.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/COMP-FIDELITY.md:270 — docs/COMP-FIDELITY.md documents the environment variable `COMP_ROUND_OPEN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/HARNESSES.md:144 — docs/HARNESSES.md names `.gemini/commands/`, but no file or folder `.gemini/commands` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/adr-live-variant-mode.md:32 — docs/adr-live-variant-mode.md names `live-server.mjs`, but no file or folder `live-server.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/adr-live-variant-mode.md:33 — docs/adr-live-variant-mode.md names `live-poll.mjs`, but no file or folder `live-poll.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/adr-live-variant-mode.md:254 — docs/adr-live-variant-mode.md names `tests/live-wrap.test.mjs`, but no file or folder `tests/live-wrap.test.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/adr-live-variant-mode.md:255 — docs/adr-live-variant-mode.md names `tests/live-server.test.mjs`, but no file or folder `tests/live-server.test.mjs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift ui/component-review/README.md:90 — ui/component-review/README.md names `crates/browser/html_snapshot`, but no file or folder `crates/browser/html_snapshot` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex scripts/smoke-provider-hooks.mjs:502 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/release.mjs:236 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/release.mjs:345 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex scripts/release.mjs:348 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
X9 · Subsumed condition operand · Subsumed condition operand · ×4
  • 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.
  • Subsumed condition operand crates/core/src/browser/element_checks.rs:1121 — `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/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/skills/src/providers.rs:526 — `e.ends_with("-teach-impeccable")` can never decide this `||` — every value satisfying `e.ends_with("-teach-impeccable")` also satisfies `e.ends_with("-impeccable")`, 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.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: written for insiders docs/BUNDLE-SIGNING.md — The Ed25519 signing key reference `op://<vault ID>/<item ID>/private-key` and the dry-run sign-on line quote a private-key field in an environment variable, which is internal jargon not explained by the document. Explain what the signed ZIP's metadata proves (no new trusted keys) and why the signing key must stay concealed.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 8.8/10. The most over is `(repository root)` (27773 LoC, 70 module-visible types across 14 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.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 423/604 types (70%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 45769 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.
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:702 — 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 'label' · ×1
  • Unused module-local declaration 'label' tests/fixtures/antipatterns/pseudo-stripe.vue:8 — 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:1672 — 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:1676 — 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:1680 — 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:2346 — 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/23 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~39.5 `!` null assertions per 1k TypeScript source lines — 86 assertion(s) across the 2176 source line(s) of the 11 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.
Minor — 19 finding(s)
D10 · Test Quality · Skipped (documented) · ×9
  • Skipped (documented): drives the full click → Go → cycle → accept cycle tests/live-e2e.test.mjs:214 — 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:1089 — 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:1198 — 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:1264 — 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:1381 — 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:1454 — 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:158 — 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:195 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): cleans accepted LLM DOM wrappers after carbonize cleanup tests/live-e2e-accept-cleanup-regression.test.mjs:50 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
D12 · Dependency Hygiene · Outdated · ×9
  • 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: 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/common/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/browser/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.129 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.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 webpki-roots` and commit the updated REDACTED.
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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-43e46ebf034942459bb5a5d8d8936a8a/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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-43e46ebf034942459bb5a5d8d8936a8a/tree.json --exit-code 0 --source .19artifacts/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .20artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update14artifacts/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 .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/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16e72-12f2-72c3-a4eb-3ed01313f95e · 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