diff --git a/.sc/repowise/data/repowise-dead-code.json b/.sc/repowise/data/repowise-dead-code.json index 1cffebf8..06fec4f6 100644 --- a/.sc/repowise/data/repowise-dead-code.json +++ b/.sc/repowise/data/repowise-dead-code.json @@ -1,4 +1,3 @@ -repowise dead-code — /Users/randlee/Documents/github/sc-compose-worktrees/sc/repowise-update2 [ { "kind": "unreachable_file", @@ -36,6 +35,19 @@ repowise dead-code — /Users/randlee/Documents/github/sc-compose-worktrees/sc/r "lines": 60, "primary_owner": "Rand Lee" }, + { + "kind": "unreachable_file", + "file_path": ".github/scripts/go_native_module.py", + "symbol_name": null, + "confidence": 0.4, + "reason": "File has no importers (in_degree=0)", + "safe_to_delete": false, + "risk_factors": [ + "script" + ], + "lines": 230, + "primary_owner": "Rand Lee" + }, { "kind": "unreachable_file", "file_path": ".github/scripts/install_uniffi_bindgen_go.py", @@ -147,7 +159,7 @@ repowise dead-code — /Users/randlee/Documents/github/sc-compose-worktrees/sc/r "reason": "File has no importers (in_degree=0)", "safe_to_delete": false, "risk_factors": [], - "lines": 80, + "lines": 100, "primary_owner": "Rand Lee" }, { @@ -1969,7 +1981,7 @@ repowise dead-code — /Users/randlee/Documents/github/sc-compose-worktrees/sc/r "reason": "Package 'plugins' has no importers from other packages", "safe_to_delete": false, "risk_factors": [], - "lines": 2820, + "lines": 2830, "primary_owner": "Rand Lee" }, { diff --git a/.sc/repowise/data/repowise-health-compose.json b/.sc/repowise/data/repowise-health-compose.json index 695f3033..ecabc0b8 100644 --- a/.sc/repowise/data/repowise-health-compose.json +++ b/.sc/repowise/data/repowise-health-compose.json @@ -1,164 +1,152 @@ -repowise health — -/Users/randlee/Documents/github/sc-compose-worktrees/repowise-analysis +2026-09-06 19:30:36 [debug ] duplication_token_cache hits=1003 misses=0 { "kpis": { - "hotspot_health": 4.67, - "average_health": 7.88, - "worst_performer_path": "crates/sc-compose/src/cli.rs", - "worst_performer_score": 1.55, - "file_count": 286, - "maintainability_average": 8.96, - "maintainability_hotspot": 7.38, - "performance_average": 9.76, - "performance_hotspot": 9.38 + "hotspot_health": 5.21, + "average_health": 8.32, + "worst_performer_path": ".github/scripts/release_artifacts.py", + "worst_performer_score": 1.9, + "file_count": 1017, + "maintainability_average": 9.09, + "maintainability_hotspot": 7.45, + "performance_average": 9.77, + "performance_hotspot": 9.24 }, "metrics": [ { - "file_path": "crates/sc-compose/src/cli.rs", - "score": 1.55, - "max_ccn": 17, + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "score": 2.58, + "max_ccn": 9, "max_nesting": 4, - "nloc": 489, - "has_test_file": false, + "nloc": 576, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 27.7 + "duplication_pct": 11.66 }, { - "file_path": "crates/sc-composer/src/validation.rs", - "score": 2.37, - "max_ccn": 11, + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "score": 4.21, + "max_ccn": 10, "max_nesting": 4, - "nloc": 1655, + "nloc": 393, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 25.2 + "duplication_pct": null }, { - "file_path": "crates/sc-composer/src/types.rs", - "score": 3.04, - "max_ccn": 11, - "max_nesting": 6, - "nloc": 561, + "file_path": "crates/sc-composer/src/resolver.rs", + "score": 4.44, + "max_ccn": 7, + "max_nesting": 4, + "nloc": 714, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 26.9 - }, - { - "file_path": "crates/sc-compose/src/reporting/output.rs", - "score": 3.96, - "max_ccn": 4, - "max_nesting": 2, - "nloc": 257, - "has_test_file": false, - "line_coverage_pct": null, - "branch_coverage_pct": null, - "duplication_pct": 30.74 + "duplication_pct": 30.27 }, { - "file_path": "crates/sc-compose/src/render_request.rs", - "score": 4.0, - "max_ccn": 6, + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "score": 4.44, + "max_ccn": 13, "max_nesting": 4, - "nloc": 323, + "nloc": 227, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 4.95 + "duplication_pct": null }, { "file_path": "crates/sc-composer/src/diagnostics.rs", - "score": 4.04, - "max_ccn": 2, - "max_nesting": 1, - "nloc": 150, + "score": 4.5, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 9, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 29.76 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/reporting/catalog.rs", - "score": 4.34, - "max_ccn": 3, + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "score": 4.65, + "max_ccn": 10, "max_nesting": 2, - "nloc": 201, - "has_test_file": false, + "nloc": 685, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 27.36 + "duplication_pct": 14.6 }, { - "file_path": "crates/sc-compose/src/commands/compose.rs", - "score": 4.43, - "max_ccn": 8, + "file_path": "crates/sc-composer-beads/src/execute.rs", + "score": 4.65, + "max_ccn": 16, "max_nesting": 2, - "nloc": 536, - "has_test_file": false, + "nloc": 936, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 19.59 + "duplication_pct": 20.69 }, { - "file_path": "crates/sc-compose/src/path_utils.rs", - "score": 4.5, - "max_ccn": 6, - "max_nesting": 2, - "nloc": 69, - "has_test_file": false, + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "score": 4.7, + "max_ccn": 21, + "max_nesting": 6, + "nloc": 706, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 48.81 }, { - "file_path": "crates/sc-compose/tests/cli.rs", - "score": 4.75, - "max_ccn": 4, - "max_nesting": 3, - "nloc": 3339, + "file_path": "crates/sc-composer/src/discovery.rs", + "score": 4.71, + "max_ccn": 9, + "max_nesting": 4, + "nloc": 271, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 64.94 + "duplication_pct": 3.91 }, { - "file_path": "crates/sc-composer/src/frontmatter.rs", - "score": 4.78, - "max_ccn": 8, + "file_path": "crates/sc-composer-beads/src/runner.rs", + "score": 4.75, + "max_ccn": 9, "max_nesting": 3, - "nloc": 372, + "nloc": 406, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 9.7 + "duplication_pct": 3.67 }, { - "file_path": "crates/sc-composer/src/composer.rs", - "score": 4.92, - "max_ccn": 5, - "max_nesting": 2, - "nloc": 584, + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "score": 4.77, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 1102, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 49.18 + "duplication_pct": 29.22 }, { - "file_path": "crates/sc-compose/src/observer_impl.rs", - "score": 4.97, + "file_path": "crates/sc-composer/src/composer.rs", + "score": 4.78, "max_ccn": 8, "max_nesting": 2, - "nloc": 819, + "nloc": 690, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 16.23 + "duplication_pct": 39.29 }, { "file_path": "crates/sc-composer/src/init_workspace.rs", - "score": 5.13, + "score": 4.93, "max_ccn": 13, "max_nesting": 3, "nloc": 221, @@ -168,2931 +156,12993 @@ repowise health — "duplication_pct": 15.95 }, { - "file_path": "crates/sc-compose/tests/json_cli.rs", - "score": 5.4, - "max_ccn": 2, - "max_nesting": 1, - "nloc": 1671, + "file_path": "crates/sc-composer/src/renderer.rs", + "score": 5.05, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 1079, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 75.79 + "duplication_pct": 16.38 }, { - "file_path": "crates/sc-compose/src/reporting/init.rs", - "score": 5.75, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 153, - "has_test_file": false, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "score": 5.12, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 534, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 38.56 + "duplication_pct": 7.02 }, { - "file_path": "crates/sc-composer/src/renderer.rs", - "score": 5.75, - "max_ccn": 2, - "max_nesting": 1, - "nloc": 169, + "file_path": "crates/sc-compose/src/commands/compose.rs", + "score": 5.13, + "max_ccn": 11, + "max_nesting": 3, + "nloc": 427, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "score": 5.78, - "max_ccn": 6, + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "score": 5.31, + "max_ccn": 12, "max_nesting": 3, - "nloc": 265, + "nloc": 506, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 13.96 + "duplication_pct": null }, { - "file_path": "crates/sc-composer/src/error.rs", - "score": 6.05, - "max_ccn": 4, - "max_nesting": 2, - "nloc": 583, + "file_path": "crates/sc-composer/src/extract/toml.rs", + "score": 5.32, + "max_ccn": 18, + "max_nesting": 4, + "nloc": 509, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 56.41 + "duplication_pct": 49.9 }, { - "file_path": "crates/sc-compose/src/reporting/index.rs", - "score": 6.15, - "max_ccn": 6, - "max_nesting": 3, - "nloc": 156, - "has_test_file": false, + "file_path": "crates/sc-compose/src/observer_impl.rs", + "score": 5.33, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 967, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 17.95 + "duplication_pct": 17.44 }, { - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "score": 6.15, + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "score": 5.4, "max_ccn": 3, - "max_nesting": 2, - "nloc": 325, - "has_test_file": false, + "max_nesting": 1, + "nloc": 396, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 12.8 + "duplication_pct": 64.65 }, { - "file_path": "crates/sc-compose/src/reporting/templates.rs", - "score": 6.15, - "max_ccn": 4, - "max_nesting": 2, - "nloc": 328, - "has_test_file": false, + "file_path": "crates/sc-compose/tests/cli/render.rs", + "score": 5.4, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 2317, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 17.68 + "duplication_pct": 64.24 }, { - "file_path": "crates/sc-compose/src/commands/mod.rs", - "score": 6.35, - "max_ccn": 4, - "max_nesting": 3, - "nloc": 81, - "has_test_file": false, + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "score": 5.4, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 1280, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 9.88 + "duplication_pct": 71.4 }, { - "file_path": "crates/sc-compose/src/template_store.rs", - "score": 6.49, - "max_ccn": 5, - "max_nesting": 2, - "nloc": 488, - "has_test_file": false, + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "score": 5.4, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 686, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 8.2 + "duplication_pct": 75.51 }, { - "file_path": "crates/sc-compose/src/main.rs", - "score": 6.5, - "max_ccn": 5, - "max_nesting": 2, - "nloc": 71, - "has_test_file": true, + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "score": 5.47, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 345, + "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 24.64 }, { - "file_path": "crates/sc-compose/src/observability.rs", - "score": 6.5, - "max_ccn": 6, - "max_nesting": 2, - "nloc": 188, + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "score": 5.49, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 139, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 12.95 }, { - "file_path": "crates/sc-compose/src/var_file.rs", - "score": 6.5, - "max_ccn": 3, - "max_nesting": 1, - "nloc": 92, - "has_test_file": false, + "file_path": "crates/sc-composer/src/types.rs", + "score": 5.5, + "max_ccn": 9, + "max_nesting": 3, + "nloc": 575, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 21.36 }, { - "file_path": "crates/sc-composer/src/lib.rs", - "score": 6.5, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 185, + "file_path": "crates/sc-composer/tests/integration.rs", + "score": 5.54, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 502, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 3.92 + "duplication_pct": 48.61 }, { - "file_path": "crates/sc-compose/src/reporting/spec.rs", - "score": 6.54, + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "score": 5.7, "max_ccn": 3, "max_nesting": 1, - "nloc": 316, - "has_test_file": false, + "nloc": 231, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 29.11 + "duplication_pct": 48.52 }, { - "file_path": "crates/sc-composer/src/resolver.rs", - "score": 6.87, - "max_ccn": 7, - "max_nesting": 4, - "nloc": 450, + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "score": 5.73, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 246, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 22.15 + "duplication_pct": 47.94 }, { - "file_path": "crates/sc-composer/src/include.rs", - "score": 7.01, - "max_ccn": 8, + "file_path": "crates/sc-composer/src/extract/xml.rs", + "score": 5.78, + "max_ccn": 6, "max_nesting": 3, - "nloc": 442, - "has_test_file": true, + "nloc": 296, + "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 34.51 + "duplication_pct": 9.62 }, { - "file_path": "crates/sc-composer/src/observer.rs", - "score": 7.19, - "max_ccn": 2, - "max_nesting": 1, - "nloc": 191, - "has_test_file": true, + "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "score": 5.84, + "max_ccn": 3, + "max_nesting": 2, + "nloc": 201, + "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 48.35 + "duplication_pct": 27.36 }, { - "file_path": "crates/sc-compose/tests/support/mod.rs", - "score": 7.35, - "max_ccn": 2, - "max_nesting": 1, - "nloc": 125, + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "score": 5.85, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 154, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 11.11 + "duplication_pct": 44.81 }, { - "file_path": "crates/sc-composer/tests/integration.rs", - "score": 7.35, + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "score": 5.85, "max_ccn": 2, "max_nesting": 1, - "nloc": 332, + "nloc": 241, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 58.13 + "duplication_pct": 61.83 }, { - "file_path": "crates/sc-composer/src/validate.rs", - "score": 7.5, - "max_ccn": 4, - "max_nesting": 1, - "nloc": 150, - "has_test_file": true, + "file_path": "crates/sc-compose/src/template_store.rs", + "score": 5.89, + "max_ccn": 5, + "max_nesting": 2, + "nloc": 482, + "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 67.7 + "duplication_pct": 8.3 }, { - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "score": 7.69, - "max_ccn": 9, + "file_path": "crates/sc-composer/src/include.rs", + "score": 5.9, + "max_ccn": 4, "max_nesting": 2, - "nloc": 580, + "nloc": 958, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 10.86 + "duplication_pct": 70.91 }, { - "file_path": "crates/sc-compose/src/commands/dispatch.rs", - "score": 8.05, - "max_ccn": 15, - "max_nesting": 3, - "nloc": 179, + "file_path": "crates/sc-composer-beads/src/error.rs", + "score": 5.98, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 135, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 10.06 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/commands/reports/mod.rs", - "score": 8.09, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 127, + "file_path": "crates/sc-compose/src/reporting/index.rs", + "score": 6.09, + "max_ccn": 6, + "max_nesting": 3, + "nloc": 156, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 70.87 + "duplication_pct": 17.95 }, { - "file_path": "crates/sc-compose/src/reporting/mod.rs", - "score": 8.09, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 13, + "file_path": "crates/sc-compose/src/reporting/templates.rs", + "score": 6.15, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 328, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 100.0 + "duplication_pct": 17.68 }, { - "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", - "score": 8.41, - "max_ccn": 5, - "max_nesting": 4, - "nloc": 106, - "has_test_file": false, + "file_path": "crates/sc-composer/src/error.rs", + "score": 6.15, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 260, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 37.74 + "duplication_pct": 30.97 }, { - "file_path": "crates/sc-compose/src/commands/examples.rs", - "score": 8.45, + "file_path": "crates/sc-composer/src/lib.rs", + "score": 6.15, "max_ccn": 1, "max_nesting": 0, - "nloc": 38, - "has_test_file": false, + "nloc": 230, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 34.21 + "duplication_pct": 21.26 }, { - "file_path": "crates/sc-compose/src/main_tests.rs", - "score": 8.65, + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "score": 6.22, "max_ccn": 1, "max_nesting": 0, - "nloc": 138, + "nloc": 201, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 56.52 + "duplication_pct": 77.61 }, { - "file_path": "crates/sc-compose/src/commands/templates.rs", - "score": 8.65, + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "score": 6.24, + "max_ccn": 11, + "max_nesting": 4, + "nloc": 529, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 43.67 + }, + { + "file_path": "crates/sc-composer/src/extract/json.rs", + "score": 6.26, + "max_ccn": 15, + "max_nesting": 4, + "nloc": 541, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 60.36 + }, + { + "file_path": "crates/sc-compose/src/reporting/spec.rs", + "score": 6.29, "max_ccn": 3, "max_nesting": 1, - "nloc": 88, + "nloc": 316, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 14.77 + "duplication_pct": 29.11 }, { - "file_path": "crates/sc-composer/src/frontmatter_init.rs", - "score": 8.65, - "max_ccn": 6, + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "score": 6.3, + "max_ccn": 2, "max_nesting": 1, - "nloc": 128, + "nloc": 202, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 15.56 + "duplication_pct": 55.77 }, { - "file_path": "crates/sc-compose/src/reporting/mermaid.rs", - "score": 8.85, - "max_ccn": 11, - "max_nesting": 2, - "nloc": 182, - "has_test_file": true, + "file_path": "crates/sc-compose/src/cli/schema.rs", + "score": 6.35, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 472, + "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 7.69 + "duplication_pct": 23.53 }, { - "file_path": "crates/sc-compose/src/commands/reports/render.rs", - "score": 8.95, + "file_path": "crates/sc-compose/src/commands/mod.rs", + "score": 6.35, "max_ccn": 4, - "max_nesting": 2, - "nloc": 89, + "max_nesting": 3, + "nloc": 86, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 29.21 + "duplication_pct": 15.12 }, { - "file_path": "crates/sc-composer/src/verify.rs", - "score": 8.95, - "max_ccn": 5, + "file_path": "crates/sc-compose/src/main.rs", + "score": 6.5, + "max_ccn": 3, "max_nesting": 2, - "nloc": 378, + "nloc": 138, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 39.54 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/reporting/source_entry.rs", - "score": 9.15, - "max_ccn": 5, - "max_nesting": 3, - "nloc": 206, - "has_test_file": false, + "file_path": "crates/sc-compose/src/var_file.rs", + "score": 6.5, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 401, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 14.08 + "duplication_pct": 5.49 }, { - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "score": 9.2, - "max_ccn": 6, - "max_nesting": 3, - "nloc": 82, + "file_path": "crates/sc-compose/tests/cli.rs", + "score": 6.5, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 15, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, "duplication_pct": null }, { - "file_path": "crates/sc-composer/src/path_utils.rs", - "score": 9.3, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 7, + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "score": 6.5, + "max_ccn": 9, + "max_nesting": 5, + "nloc": 149, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 8.0 }, { - "file_path": "crates/sc-compose/src/commands/reports/publish.rs", - "score": 9.35, - "max_ccn": 5, + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "score": 6.5, + "max_ccn": 8, "max_nesting": 3, - "nloc": 74, - "has_test_file": false, + "nloc": 166, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 62.16 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/reporting/report_context.rs", - "score": 9.55, - "max_ccn": 2, + "file_path": "crates/sc-composer-beads/src/render.rs", + "score": 6.5, + "max_ccn": 3, "max_nesting": 1, - "nloc": 139, + "nloc": 211, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 18.71 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/commands/workspace.rs", - "score": 9.7, - "max_ccn": 6, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "score": 6.51, + "max_ccn": 4, "max_nesting": 2, - "nloc": 104, - "has_test_file": false, + "nloc": 442, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 10.42 }, { - "file_path": "crates/sc-compose/src/reporting/scaffold.rs", - "score": 9.7, - "max_ccn": 3, + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "score": 6.58, + "max_ccn": 2, "max_nesting": 1, - "nloc": 134, - "has_test_file": false, + "nloc": 381, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 35.86 }, { - "file_path": "crates/sc-compose/src/command_error.rs", - "score": 9.85, - "max_ccn": 3, - "max_nesting": 1, - "nloc": 149, - "has_test_file": false, + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "score": 6.59, + "max_ccn": 10, + "max_nesting": 5, + "nloc": 238, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 10.07 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/commands/verify.rs", - "score": 9.85, + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "score": 6.62, "max_ccn": 7, - "max_nesting": 2, - "nloc": 124, + "max_nesting": 3, + "nloc": 1370, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.4 + }, + { + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "score": 6.64, + "max_ccn": 20, + "max_nesting": 5, + "nloc": 87, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 12.9 + "duplication_pct": null }, { - "file_path": "crates/sc-compose/src/reporting/path.rs", - "score": 9.85, + "file_path": "crates/sc-compose/tests/cli/help.rs", + "score": 6.73, "max_ccn": 2, "max_nesting": 1, - "nloc": 56, + "nloc": 190, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": 16.07 + "duplication_pct": 3.68 }, { - "file_path": "crates/sc-compose/Cargo.toml", - "score": 10.0, + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "score": 6.75, "max_ccn": 1, "max_nesting": 0, - "nloc": 28, - "has_test_file": false, + "nloc": 133, + "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 64.66 }, { - "file_path": "crates/sc-compose/src/exit_codes.rs", - "score": 10.0, + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "score": 6.78, "max_ccn": 1, "max_nesting": 0, - "nloc": 3, + "nloc": 386, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.45 + }, + { + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "score": 6.89, + "max_ccn": 13, + "max_nesting": 5, + "nloc": 228, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 2.28 }, { - "file_path": "crates/sc-compose/src/json_output.rs", - "score": 10.0, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 48, + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "score": 6.9, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 496, "has_test_file": true, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null + "duplication_pct": 71.57 }, { - "file_path": "crates/sc-composer/Cargo.toml", - "score": 10.0, - "max_ccn": 1, - "max_nesting": 0, - "nloc": 22, + "file_path": "crates/sc-compose/src/var_file_json.rs", + "score": 6.94, + "max_ccn": 17, + "max_nesting": 3, + "nloc": 171, "has_test_file": false, "line_coverage_pct": null, "branch_coverage_pct": null, - "duplication_pct": null - } - ], - "findings": [ - { - "biomarker_type": "brain_method", - "severity": "high", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "parse_pass_inputs", - "health_impact": 0.6, - "details": { - "ccn": 14, - "nloc": 90, - "max_nesting": 4, - "dependents_count": 9, - "centrality_floor": 5 - }, - "reason": "Brain Method: parse_pass_inputs is 90 lines, CCN 14, in a file imported by 9 others" + "duplication_pct": 32.75 }, { - "biomarker_type": "nested_complexity", - "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "parse_pass_inputs", - "health_impact": 0.938, - "details": { - "max_nesting": 4, - "ccn": 14, - "cognitive": 38 - }, - "reason": "parse_pass_inputs nests 4 levels deep" + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "score": 6.96, + "max_ccn": 10, + "max_nesting": 4, + "nloc": 317, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 14.55 }, { - "biomarker_type": "complex_method", - "severity": "high", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "command_wants_json", - "health_impact": 0.542, - "details": { - "ccn": 17, - "cognitive": 36, - "nloc": 32 - }, - "reason": "command_wants_json has cyclomatic complexity 17" + "file_path": "crates/sc-compose/src/commands/extract.rs", + "score": 7.03, + "max_ccn": 7, + "max_nesting": 2, + "nloc": 331, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 6.95 }, { - "biomarker_type": "complex_method", - "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "filtered_args_for_clap", - "health_impact": 0.316, - "details": { - "ccn": 11, - "cognitive": 17, - "nloc": 44 - }, - "reason": "filtered_args_for_clap has cyclomatic complexity 11" + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "score": 7.09, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 165, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.82 }, { - "biomarker_type": "complex_method", - "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "parse_pass_inputs", - "health_impact": 0.316, - "details": { - "ccn": 14, - "cognitive": 38, - "nloc": 90 - }, - "reason": "parse_pass_inputs has cyclomatic complexity 14" + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "score": 7.11, + "max_ccn": 14, + "max_nesting": 4, + "nloc": 174, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 11.49 + }, + { + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "score": 7.19, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 894, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 59.89 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "score": 7.22, + "max_ccn": 12, + "max_nesting": 3, + "nloc": 79, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "score": 7.23, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 197, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 9.14 + }, + { + "file_path": "crates/sc-compose/src/reporting/init.rs", + "score": 7.25, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 153, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 38.56 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "score": 7.44, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 136, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 36.17 + }, + { + "file_path": "crates/sc-composer/src/verify.rs", + "score": 7.44, + "max_ccn": 5, + "max_nesting": 2, + "nloc": 378, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.58 + }, + { + "file_path": "crates/sc-composer-beads/tests/contract.rs", + "score": 7.54, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 202, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "score": 7.59, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 104, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 51.4 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "score": 7.59, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 157, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 54.14 + }, + { + "file_path": "crates/sc-compose/src/reporting/output.rs", + "score": 7.65, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 379, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.66 + }, + { + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "score": 7.65, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 525, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.69 + }, + { + "file_path": "crates/sc-composer/src/render_check.rs", + "score": 7.71, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 428, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 16.35 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "score": 7.79, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 139, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 13.19 + }, + { + "file_path": "crates/sc-composer/src/extract/tests.rs", + "score": 7.8, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 432, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 10.88 + }, + { + "file_path": "crates/sc-compose/src/var_file_yaml.rs", + "score": 7.92, + "max_ccn": 13, + "max_nesting": 4, + "nloc": 113, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 19.47 + }, + { + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "score": 7.92, + "max_ccn": 11, + "max_nesting": 4, + "nloc": 68, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/cli/capability.rs", + "score": 7.93, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 333, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.61 + }, + { + "file_path": "crates/sc-compose/src/path_utils.rs", + "score": 8.0, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 120, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/json_cli.rs", + "score": 8.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 15, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/reports/mod.rs", + "score": 8.09, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 127, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 77.95 + }, + { + "file_path": "crates/sc-compose/src/commands/examples.rs", + "score": 8.2, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 38, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 34.21 + }, + { + "file_path": "crates/sc-composer/src/validate.rs", + "score": 8.2, + "max_ccn": 4, + "max_nesting": 1, + "nloc": 170, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 51.27 + }, + { + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "score": 8.2, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 70, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.49 + }, + { + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "score": 8.35, + "max_ccn": 9, + "max_nesting": 3, + "nloc": 131, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.27 + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "score": 8.4, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 174, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 29.89 + }, + { + "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", + "score": 8.41, + "max_ccn": 5, + "max_nesting": 4, + "nloc": 106, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 37.74 + }, + { + "file_path": "crates/sc-compose/src/commands/workspace.rs", + "score": 8.44, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 104, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/templates.rs", + "score": 8.45, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 88, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 14.77 + }, + { + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "score": 8.45, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 175, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 21.43 + }, + { + "file_path": "crates/sc-composer/src/observer.rs", + "score": 8.45, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 191, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 48.35 + }, + { + "file_path": "crates/sc-compose/src/main_tests.rs", + "score": 8.5, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 195, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 47.18 + }, + { + "file_path": "crates/sc-composer/src/extract/error.rs", + "score": 8.5, + "max_ccn": 4, + "max_nesting": 3, + "nloc": 243, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 33.94 + }, + { + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "score": 8.5, + "max_ccn": 10, + "max_nesting": 2, + "nloc": 118, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "score": 8.61, + "max_ccn": 5, + "max_nesting": 4, + "nloc": 141, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 21.28 + }, + { + "file_path": "crates/sc-compose/src/commands/bead.rs", + "score": 8.65, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 115, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 20.51 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "score": 8.7, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 151, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 38.41 + }, + { + "file_path": "crates/sc-composer/src/validation/mod.rs", + "score": 8.7, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 621, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 37.48 + }, + { + "file_path": "crates/sc-compose/src/help_topics/mod.rs", + "score": 8.74, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 46, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "score": 8.8, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 113, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 6.67 + }, + { + "file_path": "crates/sc-compose/src/reporting/mermaid.rs", + "score": 8.85, + "max_ccn": 11, + "max_nesting": 2, + "nloc": 182, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 7.69 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "score": 8.85, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 118, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 60.17 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "score": 8.85, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 90, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 74.44 + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "score": 8.85, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 115, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 63.48 + }, + { + "file_path": "crates/sc-composer/src/include/expansion.rs", + "score": 8.9, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 282, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/reports/render.rs", + "score": 8.95, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 89, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 29.21 + }, + { + "file_path": "crates/sc-compose/src/reporting/source_entry.rs", + "score": 8.95, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 206, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 14.08 + }, + { + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", + "score": 8.95, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 188, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 30.69 + }, + { + "file_path": "crates/sc-composer/src/validation/state.rs", + "score": 9.03, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 479, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.32 + }, + { + "file_path": "crates/sc-composer/src/error/config.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 63, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/include.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 62, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/resolve.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 62, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/validation.rs", + "score": 9.05, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 108, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 56.3 + }, + { + "file_path": "crates/sc-composer/src/extract/mod.rs", + "score": 9.05, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 378, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 40.43 + }, + { + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "score": 9.15, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 163, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 81.1 + }, + { + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "score": 9.15, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 1062, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 55.76 + }, + { + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "score": 9.15, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 106, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 87.85 + }, + { + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "score": 9.15, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 578, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 75.9 + }, + { + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "score": 9.15, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 427, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 74.53 + }, + { + "file_path": "crates/sc-compose/src/cli/mod.rs", + "score": 9.3, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 126, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/help.rs", + "score": 9.3, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 54, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/path_utils.rs", + "score": 9.3, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 8, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/reports/publish.rs", + "score": 9.35, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 74, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 62.16 + }, + { + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "score": 9.35, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 359, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 13.09 + }, + { + "file_path": "crates/sc-compose/src/reporting/mod.rs", + "score": 9.35, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 13, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", + "score": 9.35, + "max_ccn": 5, + "max_nesting": 1, + "nloc": 86, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.38 + }, + { + "file_path": "crates/sc-composer-beads/src/lib.rs", + "score": 9.35, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 17, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 26.92 + }, + { + "file_path": "crates/sc-compose/src/commands/compose_output.rs", + "score": 9.47, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 184, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "score": 9.5, + "max_ccn": 5, + "max_nesting": 1, + "nloc": 285, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/report_context.rs", + "score": 9.55, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 139, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 18.71 + }, + { + "file_path": "crates/sc-composer/src/include/path.rs", + "score": 9.55, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 77, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/src/contract.rs", + "score": 9.55, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 129, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.63 + }, + { + "file_path": "crates/sc-compose/src/commands/compose_request.rs", + "score": 9.65, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 88, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 29.55 + }, + { + "file_path": "crates/sc-compose/src/reporting/output/materialization.rs", + "score": 9.65, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 50, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 32.0 + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/model.rs", + "score": 9.65, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 33, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 45.45 + }, + { + "file_path": "crates/sc-composer/src/diagnostics/filesystem.rs", + "score": 9.65, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 103, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 28.16 + }, + { + "file_path": "crates/sc-compose/src/reporting/scaffold.rs", + "score": 9.7, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 134, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/template_ext.rs", + "score": 9.7, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 50, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/template_scanner.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 52, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/input_limits.rs", + "score": 9.7, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 16, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/raw.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 242, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 3.57 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_serialize.rs", + "score": 9.7, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 40, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/include/directive.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 1, + "nloc": 77, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/command_error.rs", + "score": 9.85, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 169, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 8.88 + }, + { + "file_path": "crates/sc-compose/src/render_request/blocks.rs", + "score": 9.85, + "max_ccn": 6, + "max_nesting": 1, + "nloc": 85, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 9.41 + }, + { + "file_path": "crates/sc-compose/src/render_request/mode.rs", + "score": 9.85, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 76, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 11.84 + }, + { + "file_path": "crates/sc-compose/src/reporting/path.rs", + "score": 9.85, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 56, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 16.07 + }, + { + "file_path": "crates/sc-compose/src/reporting/output/metadata.rs", + "score": 9.85, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 44, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 18.18 + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/error.rs", + "score": 9.85, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 83, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 9.64 + }, + { + "file_path": "crates/sc-composer/src/discovery/scope.rs", + "score": 9.85, + "max_ccn": 4, + "max_nesting": 1, + "nloc": 69, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 10.14 + }, + { + "file_path": "crates/sc-compose/Cargo.toml", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 93, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/README.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 27, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/bead.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 30, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/examples.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 55, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/exit-codes.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 20, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/extract.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 37, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/frontmatter-init.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 47, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/init.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 44, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/observability-health.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 80, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/render.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 68, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/reports.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 79, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/resolve.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 30, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/template-init.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 38, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/templates.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 62, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/validate.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 55, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/docs/manual/verify.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 35, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/exit_codes.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 3, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/json_output.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 48, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/var_file_decode.rs", + "score": 10.0, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 31, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/var_file_validate.rs", + "score": 10.0, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 51, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/commands/verify.rs", + "score": 10.0, + "max_ccn": 7, + "max_nesting": 2, + "nloc": 125, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/observability/json.rs", + "score": 10.0, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 48, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/observability/logger.rs", + "score": 10.0, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 52, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/observability/mod.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 11, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/observability/tests.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 90, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/observability/text.rs", + "score": 10.0, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 46, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/render_request/mod.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 8, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/render_request/request.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 87, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/output/layout.rs", + "score": 10.0, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 37, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/archive.rs", + "score": 10.0, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 34, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/files.rs", + "score": 10.0, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 51, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/mod.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 9, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/report.rs", + "score": 10.0, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 26, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/src/reporting/publish_manifest/write.rs", + "score": 10.0, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 45, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/bead.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 4, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_template_contracts.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 60, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/sc_lint_utility_discovery.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 35, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-compose/tests/template_contracts_cli.rs", + "score": 10.0, + "max_ccn": 2, + "max_nesting": 0, + "nloc": 45, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/Cargo.toml", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 26, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/path_containment.rs", + "score": 10.0, + "max_ccn": 6, + "max_nesting": 3, + "nloc": 96, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/diagnostics/envelope.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 72, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/diagnostics/record.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 75, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/discovery/scanner.rs", + "score": 10.0, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 88, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/display.rs", + "score": 10.0, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 49, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/recovery.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 36, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/render.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 45, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/include/fingerprint.rs", + "score": 10.0, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 105, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/Cargo.toml", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 31, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/README.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 8, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/tests/runner.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 24, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + } + ], + "findings": [ + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/command_error.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 8.88, + "clone_pair_count": 1, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/command_error.rs", + "worst_clone_co_change": 0 + }, + "reason": "9% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/command_error.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/src/main.rs", + "function_name": null, + "health_impact": 1.062, + "details": { + "change_entropy": 12.2142, + "change_entropy_pct": 99.3, + "commit_count_90d": 5 + }, + "reason": "changes are scattered across noisy commits (top 0.7% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/main.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 25, + "commit_count_90d": 5 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/main.rs", + "function_name": null, + "health_impact": 1.172, + "details": { + "prior_defect_count": 34, + "window_days": 180 + }, + "reason": "34 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 47.18, + "clone_pair_count": 10, + "worst_clone_lines": 27, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 0 + }, + "reason": "47% of file duplicated; worst clone shares 27 lines with crates/sc-composer/src/composer.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/main_tests.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_64b2d871b8147063bb40" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "bumpy_road", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": "normalize_event_labels", + "health_impact": 0.15, + "details": { + "bumps": 3, + "ccn": 8, + "max_nesting": 2 + }, + "reason": "normalize_event_labels has 3 nested blocks at the same level (bumpy road)" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": "cli_observer_emits_command_and_pipeline_events_to_logger", + "health_impact": 0.375, + "details": { + "nloc": 65, + "ccn": 3 + }, + "reason": "cli_observer_emits_command_and_pipeline_events_to_logger is 65 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 17.44, + "clone_pair_count": 20, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/src/observer_impl.rs", + "worst_clone_co_change": 0 + }, + "reason": "17% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/observer_impl.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 1.472, + "details": { + "change_entropy": 5.3713, + "change_entropy_pct": 95.6, + "commit_count_90d": 5 + }, + "reason": "changes are scattered across noisy commits (top 4.4% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 1.053, + "details": { + "scatter": 25, + "commit_count_90d": 5 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.975, + "details": { + "prior_defect_count": 19, + "window_days": 180 + }, + "reason": "19 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_d3e5c4066cc455f5735b" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/observer_impl.rs", + "function_name": "read_log_lines", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_945a465b8b86c44c0326" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/path_utils.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 17, + "window_days": 180 + }, + "reason": "17 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": "TemplateStore", + "health_impact": 0.6, + "details": { + "class_name": "TemplateStore", + "lcom4": 3, + "method_count": 11, + "field_count": 2 + }, + "reason": "TemplateStore has low cohesion (LCOM4=3): its 11 methods split into 3 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 8.3, + "clone_pair_count": 4, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-compose/src/template_store.rs", + "worst_clone_co_change": 0 + }, + "reason": "8% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/template_store.rs" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": null, + "health_impact": 2.16, + "details": { + "scatter": 17, + "commit_count_90d": 3 + }, + "reason": "co-changes with 17 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": "copy_directory_recursive", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_2f20d6acff671b6ab719" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/template_store.rs", + "function_name": "list_templates", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/template_store.rs::TemplateStore::list_templates", + "crates/sc-compose/src/template_store.rs::load_manifest" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_2008628f3a38ab96216a" + }, + "reason": "a filesystem call is reached once per loop iteration through list_templates -> load_manifest (cross-function N+1)" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/src/var_file.rs", + "function_name": null, + "health_impact": 0.367, + "details": { + "relative_churn": 2.44, + "churn_percentile": 97.4, + "lines_added_90d": 427, + "lines_deleted_90d": 553, + "commit_count_90d": 12, + "nloc": 401 + }, + "reason": "90-day churn rewrote 2.4x the file's size (980 lines over 401 NLOC, top 2.6% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-compose/src/var_file.rs", + "function_name": null, + "health_impact": 1.318, + "details": { + "change_entropy": 5.343, + "change_entropy_pct": 95.3, + "commit_count_90d": 12 + }, + "reason": "changes are scattered across noisy commits (top 4.7% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/var_file.rs", + "function_name": null, + "health_impact": 0.943, + "details": { + "scatter": 17, + "commit_count_90d": 12 + }, + "reason": "co-changes with 17 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/var_file.rs", + "function_name": null, + "health_impact": 0.873, + "details": { + "prior_defect_count": 15, + "window_days": 180 + }, + "reason": "15 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/var_file.rs", + "function_name": "load_var_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e934f2e0db379d2860c5" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-compose/src/var_file_json.rs", + "function_name": "find_out_of_range_json_integer", + "health_impact": 1.452, + "details": { + "ccn": 17, + "cognitive": 28, + "nloc": 55 + }, + "reason": "find_out_of_range_json_integer has cyclomatic complexity 17" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/var_file_json.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 32.75, + "clone_pair_count": 3, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-compose/src/var_file_yaml.rs", + "worst_clone_co_change": 0 + }, + "reason": "33% of file duplicated; worst clone shares 22 lines with crates/sc-compose/src/var_file_yaml.rs" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/var_file_json.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 3 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/src/var_file_yaml.rs", + "function_name": "unquoted_uncommented", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 13, + "cognitive": 32 + }, + "reason": "unquoted_uncommented nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/var_file_yaml.rs", + "function_name": "unquoted_uncommented", + "health_impact": 0.847, + "details": { + "ccn": 13, + "cognitive": 32, + "nloc": 28 + }, + "reason": "unquoted_uncommented has cyclomatic complexity 13" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/var_file_yaml.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 19.47, + "clone_pair_count": 1, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-compose/src/var_file_json.rs", + "worst_clone_co_change": 0 + }, + "reason": "19% of file duplicated; worst clone shares 22 lines with crates/sc-compose/src/var_file_json.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/var_file_yaml.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/capability.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 12.61, + "clone_pair_count": 4, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/cli/capability.rs", + "worst_clone_co_change": 0 + }, + "reason": "13% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/cli/capability.rs" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/capability.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.1, + "churn_percentile": 84.1, + "lines_added_90d": 335, + "lines_deleted_90d": 30, + "commit_count_90d": 5, + "nloc": 333 + }, + "reason": "90-day churn rewrote 1.1x the file's size (365 lines over 333 NLOC, top 16% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/capability.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 5 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/capability.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/mod.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": "parse_pass_inputs", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 14, + "cognitive": 38 + }, + "reason": "parse_pass_inputs nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": "filtered_args_for_clap", + "health_impact": 0.495, + "details": { + "ccn": 11, + "cognitive": 17, + "nloc": 44 + }, + "reason": "filtered_args_for_clap has cyclomatic complexity 11" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": "parse_pass_inputs", + "health_impact": 0.495, + "details": { + "ccn": 14, + "cognitive": 38, + "nloc": 90 + }, + "reason": "parse_pass_inputs has cyclomatic complexity 14" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": "parse_pass_inputs", + "health_impact": 0.511, + "details": { + "nloc": 90, + "ccn": 14 + }, + "reason": "parse_pass_inputs is 90 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 11.49, + "clone_pair_count": 1, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-compose/src/cli/pass_input.rs", + "worst_clone_co_change": 0 + }, + "reason": "11% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/cli/pass_input.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/pass_input.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/cli/schema.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 23.53, + "clone_pair_count": 15, + "worst_clone_lines": 45, + "worst_clone_partner": "crates/sc-compose/src/commands/reports/mod.rs", + "worst_clone_co_change": 0 + }, + "reason": "24% of file duplicated; worst clone shares 45 lines with crates/sc-compose/src/commands/reports/mod.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/schema.rs", + "function_name": null, + "health_impact": 0.944, + "details": { + "change_entropy": 2.6118, + "change_entropy_pct": 84.4, + "commit_count_90d": 9 + }, + "reason": "changes are scattered across noisy commits (top 16% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/cli/schema.rs", + "function_name": null, + "health_impact": 1.93, + "details": { + "scatter": 25, + "commit_count_90d": 9 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/cli/schema.rs", + "function_name": null, + "health_impact": 0.625, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/bead.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 20.51, + "clone_pair_count": 4, + "worst_clone_lines": 16, + "worst_clone_partner": "bindings/sc-composer-beads-python/src/lib.rs", + "worst_clone_co_change": 2 + }, + "reason": "21% of file duplicated; worst clone shares 16 lines with bindings/sc-composer-beads-python/src/lib.rs (co-changed 2x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/bead.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": "run_validate", + "health_impact": 0.847, + "details": { + "ccn": 11, + "cognitive": 12, + "nloc": 67 + }, + "reason": "run_validate has cyclomatic complexity 11" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": "run_validate", + "health_impact": 0.375, + "details": { + "nloc": 67, + "ccn": 11 + }, + "reason": "run_validate is 67 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": "run_checked_validate", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "run_checked_validate takes 5 parameters" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": "run_checked_validate", + "health_impact": 0.427, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 + }, + "reason": "run_checked_validate has been modified across 4 commits (repo p80=2) and carries CCN=5 / nesting=3" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": "run_validate", + "health_impact": 0.427, + "details": { + "modification_count": 7, + "repo_p80": 2, + "ccn": 11, + "max_nesting": 2 + }, + "reason": "run_validate has been modified across 7 commits (repo p80=2) and carries CCN=11 / nesting=2" + }, + { + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": null, + "health_impact": 0.442, + "details": { + "relative_churn": 2.97, + "churn_percentile": 97.7, + "lines_added_90d": 642, + "lines_deleted_90d": 625, + "commit_count_90d": 16, + "nloc": 427 + }, + "reason": "90-day churn rewrote 3.0x the file's size (1267 lines over 427 NLOC, top 2.3% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": null, + "health_impact": 0.927, + "details": { + "change_entropy": 7.139, + "change_entropy_pct": 96.7, + "commit_count_90d": 16 + }, + "reason": "changes are scattered across noisy commits (top 3.3% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": null, + "health_impact": 0.663, + "details": { + "scatter": 25, + "commit_count_90d": 16 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/commands/compose.rs", + "function_name": null, + "health_impact": 0.614, + "details": { + "prior_defect_count": 11, + "window_days": 180 + }, + "reason": "11 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose_output.rs", + "function_name": "emit_render_output", + "health_impact": 0.375, + "details": { + "nloc": 88, + "ccn": 8 + }, + "reason": "emit_render_output is 88 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose_output.rs", + "function_name": "emit_render_output", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "emit_render_output takes 6 parameters" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": "build_custom_render_context", + "health_impact": 0.375, + "details": { + "nloc": 66, + "ccn": 6 + }, + "reason": "build_custom_render_context is 66 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": "checked_render_output", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "checked_render_output takes 6 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": "execute_render_with_expanded", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "execute_render_with_expanded takes 6 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 24.64, + "clone_pair_count": 4, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 4 + }, + "reason": "25% of file duplicated; worst clone shares 11 lines with crates/sc-composer/src/composer.rs (co-changed 4x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": "custom_variable_sources", + "health_impact": 0.414, + "details": { + "modification_count": 2, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 + }, + "reason": "custom_variable_sources has been modified across 2 commits (repo p80=2) and carries CCN=8 / nesting=3" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": null, + "health_impact": 0.428, + "details": { + "relative_churn": 1.53, + "churn_percentile": 91.6, + "lines_added_90d": 444, + "lines_deleted_90d": 83, + "commit_count_90d": 10, + "nloc": 345 + }, + "reason": "90-day churn rewrote 1.5x the file's size (527 lines over 345 NLOC, top 8.4% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": null, + "health_impact": 0.539, + "details": { + "change_entropy": 3.0329, + "change_entropy_pct": 87.3, + "commit_count_90d": 10 + }, + "reason": "changes are scattered across noisy commits (top 13% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": null, + "health_impact": 1.101, + "details": { + "scatter": 18, + "commit_count_90d": 10 + }, + "reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/commands/compose_render.rs", + "function_name": null, + "health_impact": 1.019, + "details": { + "prior_defect_count": 6, + "window_days": 180 + }, + "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/compose_request.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 29.55, + "clone_pair_count": 1, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/commands/compose_request.rs", + "worst_clone_co_change": 0 + }, + "reason": "30% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/compose_request.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 9.14, + "clone_pair_count": 1, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-compose/src/commands/dispatch.rs", + "worst_clone_co_change": 0 + }, + "reason": "9% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/commands/dispatch.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.1643, + "change_entropy_pct": 81.1, + "commit_count_90d": 3 + }, + "reason": "changes are scattered across noisy commits (top 19% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 12, + "commit_count_90d": 3 + }, + "reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/examples.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 34.21, + "clone_pair_count": 1, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/commands/templates.rs", + "worst_clone_co_change": 3 + }, + "reason": "34% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/templates.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/examples.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "bumpy_road", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/extract.rs", + "function_name": "emit_text", + "health_impact": 0.15, + "details": { + "bumps": 3, + "ccn": 7, + "max_nesting": 2 + }, + "reason": "emit_text has 3 nested blocks at the same level (bumpy road)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/extract.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.27, + "churn_percentile": 87.9, + "lines_added_90d": 387, + "lines_deleted_90d": 32, + "commit_count_90d": 8, + "nloc": 331 + }, + "reason": "90-day churn rewrote 1.3x the file's size (419 lines over 331 NLOC, top 12% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/extract.rs", + "function_name": null, + "health_impact": 2.16, + "details": { + "scatter": 18, + "commit_count_90d": 8 + }, + "reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/extract.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/help.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/mod.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 15.12, + "clone_pair_count": 2, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/reporting/mod.rs", + "worst_clone_co_change": 0 + }, + "reason": "15% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/reporting/mod.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/mod.rs", + "function_name": null, + "health_impact": 1.062, + "details": { + "change_entropy": 3.9259, + "change_entropy_pct": 91.3, + "commit_count_90d": 4 + }, + "reason": "changes are scattered across noisy commits (top 8.7% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/mod.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 23, + "commit_count_90d": 4 + }, + "reason": "co-changes with 23 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/commands/mod.rs", + "function_name": null, + "health_impact": 1.172, + "details": { + "prior_defect_count": 10, + "window_days": 180 + }, + "reason": "10 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": "classify_outcome", + "health_impact": 0.847, + "details": { + "ccn": 12, + "cognitive": 12, + "nloc": 42 + }, + "reason": "classify_outcome has cyclomatic complexity 12" + }, + { + "biomarker_type": "complex_conditional", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": "classify_outcome", + "health_impact": 1.596, + "details": { + "operator_count": 5, + "enclosing_construct": "if" + }, + "reason": "if condition combines 5 boolean operators" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": "classify_outcome", + "health_impact": 0.812, + "details": { + "modification_count": 2, + "repo_p80": 2, + "ccn": 12, + "max_nesting": 2 + }, + "reason": "classify_outcome has been modified across 2 commits (repo p80=2) and carries CCN=12 / nesting=2" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 1.85, + "churn_percentile": 96.5, + "lines_added_90d": 739, + "lines_deleted_90d": 196, + "commit_count_90d": 5, + "nloc": 506 + }, + "reason": "90-day churn rewrote 1.8x the file's size (935 lines over 506 NLOC, top 3.5% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/sc_lint.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "find_available_spans", + "health_impact": 0.451, + "details": { + "ccn": 10, + "cognitive": 12, + "nloc": 31 + }, + "reason": "find_available_spans has cyclomatic complexity 10" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "apply_replacements", + "health_impact": 0.451, + "details": { + "ccn": 9, + "cognitive": 11, + "nloc": 63 + }, + "reason": "apply_replacements has cyclomatic complexity 9" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "apply_replacements", + "health_impact": 0.2, + "details": { + "nloc": 63, + "ccn": 9 + }, + "reason": "apply_replacements is 63 lines long" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "template_init_file", + "health_impact": 0.2, + "details": { + "nloc": 68, + "ccn": 7 + }, + "reason": "template_init_file is 68 lines long" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "run_template_init", + "health_impact": 0.2, + "details": { + "nloc": 72, + "ccn": 6 + }, + "reason": "run_template_init is 72 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 14.6, + "clone_pair_count": 19, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/init_workspace.rs", + "worst_clone_co_change": 3 + }, + "reason": "15% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/init_workspace.rs (co-changed 3x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": null, + "health_impact": 1.052, + "details": { + "change_entropy": 2.7977, + "change_entropy_pct": 86.2, + "commit_count_90d": 4 + }, + "reason": "changes are scattered across noisy commits (top 14% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": null, + "health_impact": 1.254, + "details": { + "scatter": 14, + "commit_count_90d": 4 + }, + "reason": "co-changes with 14 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": null, + "health_impact": 1.194, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "fuzz_001_template_init_uses_shared_json_path_detector", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/commands/template_init.rs::tests::fuzz_001_template_init_uses_shared_json_path_detector", + "crates/sc-compose/src/commands/template_init.rs::template_init_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_689d61c141a62baa8c2a" + }, + "reason": "a filesystem call is reached once per loop iteration through fuzz_001_template_init_uses_shared_json_path_detector -> template_init_file (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "fuzz_001_template_init_uses_shared_json_path_detector", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/commands/template_init.rs::tests::fuzz_001_template_init_uses_shared_json_path_detector", + "crates/sc-compose/src/commands/template_init.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_afb0f16142a8a01d9dfe" + }, + "reason": "a filesystem call is reached once per loop iteration through fuzz_001_template_init_uses_shared_json_path_detector -> write_file (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "template_init_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_592c81c573c5ab19f60e" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c1b6e35ec43da51d8bcb" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_init.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_61257a4b503ad020d978" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 9, + "cognitive": 15 + }, + "reason": "analyze_template_source nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.727, + "details": { + "ccn": 9, + "cognitive": 15, + "nloc": 62 + }, + "reason": "analyze_template_source has cyclomatic complexity 9" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "lint_repository_template", + "health_impact": 0.322, + "details": { + "nloc": 81, + "ccn": 8 + }, + "reason": "lint_repository_template is 81 lines long" }, { "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.322, + "details": { + "nloc": 62, + "ccn": 9 + }, + "reason": "analyze_template_source is 62 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.129, + "details": { + "param_count": 5 + }, + "reason": "analyze_template_source takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 11.66, + "clone_pair_count": 5, + "worst_clone_lines": 12, + "worst_clone_partner": "crates/sc-compose/src/commands/template_lint.rs", + "worst_clone_co_change": 0 + }, + "reason": "12% of file duplicated; worst clone shares 12 lines with crates/sc-compose/src/commands/template_lint.rs" + }, + { + "biomarker_type": "complex_conditional", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "is_scalar_expression", + "health_impact": 0.931, + "details": { + "operator_count": 4, + "enclosing_construct": "if" + }, + "reason": "if condition combines 4 boolean operators" + }, + { + "biomarker_type": "complex_conditional", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.399, + "details": { + "operator_count": 3, + "enclosing_construct": "if" + }, + "reason": "if condition combines 3 boolean operators" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "visit_template_dir", + "health_impact": 0.333, + "details": { + "modification_count": 3, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 + }, + "reason": "visit_template_dir has been modified across 3 commits (repo p80=2) and carries CCN=8 / nesting=3" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "lint_repository_template", + "health_impact": 0.333, + "details": { + "modification_count": 3, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 + }, + "reason": "lint_repository_template has been modified across 3 commits (repo p80=2) and carries CCN=8 / nesting=3" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": "analyze_template_source", + "health_impact": 0.571, + "details": { + "modification_count": 6, + "repo_p80": 2, + "ccn": 9, + "max_nesting": 4 + }, + "reason": "analyze_template_source has been modified across 6 commits (repo p80=2) and carries CCN=9 / nesting=4" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": null, + "health_impact": 0.345, + "details": { + "relative_churn": 2.02, + "churn_percentile": 98.0, + "lines_added_90d": 933, + "lines_deleted_90d": 232, + "commit_count_90d": 11, + "nloc": 576 + }, + "reason": "90-day churn rewrote 2.0x the file's size (1165 lines over 576 NLOC, top 2% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": null, + "health_impact": 0.744, + "details": { + "change_entropy": 3.651, + "change_entropy_pct": 90.5, + "commit_count_90d": 11 + }, + "reason": "changes are scattered across noisy commits (top 9.5% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": null, + "health_impact": 0.886, + "details": { + "scatter": 15, + "commit_count_90d": 11 + }, + "reason": "co-changes with 15 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/template_lint.rs", + "function_name": null, + "health_impact": 0.287, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/templates.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 14.77, + "clone_pair_count": 1, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/commands/examples.rs", + "worst_clone_co_change": 3 + }, + "reason": "15% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/examples.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/templates.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/workspace.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 11, + "commit_count_90d": 3 + }, + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/workspace.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/mod.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 77.95, + "clone_pair_count": 11, + "worst_clone_lines": 45, + "worst_clone_partner": "crates/sc-compose/src/cli/schema.rs", + "worst_clone_co_change": 0 + }, + "reason": "78% of file duplicated; worst clone shares 45 lines with crates/sc-compose/src/cli/schema.rs" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/commands/reports/mod.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 6, + "commit_count_90d": 0, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 6 dependents" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/publish.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 62.16, + "clone_pair_count": 5, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-compose/src/commands/reports/render.rs", + "worst_clone_co_change": 2 + }, + "reason": "62% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/commands/reports/render.rs (co-changed 2x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/reports/publish.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/render.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 29.21, + "clone_pair_count": 3, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-compose/src/commands/reports/publish.rs", + "worst_clone_co_change": 2 + }, + "reason": "29% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/commands/reports/publish.rs (co-changed 2x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/render.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", + "function_name": "run_reports_index", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 5, + "cognitive": 10 + }, + "reason": "run_reports_index nests 4 levels deep" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 37.74, + "clone_pair_count": 3, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-compose/src/commands/reports/render.rs", + "worst_clone_co_change": 2 + }, + "reason": "38% of file duplicated; worst clone shares 16 lines with crates/sc-compose/src/commands/reports/render.rs (co-changed 2x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/src/help_topics/mod.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 6 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/blocks.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 9.41, + "clone_pair_count": 1, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/render_request/vars.rs", + "worst_clone_co_change": 0 + }, + "reason": "9% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/render_request/vars.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/mode.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 11.84, + "clone_pair_count": 1, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-compose/src/cli/schema.rs", + "worst_clone_co_change": 0 + }, + "reason": "12% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/cli/schema.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 13.09, + "clone_pair_count": 17, + "worst_clone_lines": 23, + "worst_clone_partner": "crates/sc-compose/src/reporting/render_many.rs", + "worst_clone_co_change": 0 + }, + "reason": "13% of file duplicated; worst clone shares 23 lines with crates/sc-compose/src/reporting/render_many.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_47f5b8fbe227a661e349" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/tests.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_0d633a2372d824343b47" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "function_name": "load_prefixed_env_vars", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 5, + "cognitive": 10 + }, + "reason": "load_prefixed_env_vars nests 4 levels deep" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 21.28, + "clone_pair_count": 2, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-compose/src/render_request/vars.rs", + "worst_clone_co_change": 0 + }, + "reason": "21% of file duplicated; worst clone shares 11 lines with crates/sc-compose/src/render_request/vars.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "function_name": "collect_pass_union", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/render_request/vars.rs::collect_pass_union", + "crates/sc-compose/src/render_request/vars.rs::load_pass_input_vars", + "crates/sc-compose/src/render_request/vars.rs::load_var_file_vars", + "crates/sc-compose/src/render_request/vars.rs::load_var_source", + "crates/sc-compose/src/var_file.rs::load_var_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_b802d741345fcd2b43f8" + }, + "reason": "a filesystem call is reached once per loop iteration through collect_pass_union -> load_pass_input_vars -> load_var_file_vars -> load_var_source -> load_var_file (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/render_request/vars.rs", + "function_name": "load_var_file_vars", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/render_request/vars.rs::load_var_file_vars", + "crates/sc-compose/src/render_request/vars.rs::load_var_source", + "crates/sc-compose/src/var_file.rs::load_var_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_b802d741345fcd2b43f8" + }, + "reason": "a filesystem call is reached once per loop iteration through load_var_file_vars -> load_var_source -> load_var_file (cross-function N+1)" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 27.36, + "clone_pair_count": 7, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-compose/src/reporting/templates.rs", + "worst_clone_co_change": 6 + }, + "reason": "27% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/templates.rs (co-changed 6x)" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 5, + "commit_count_90d": 1, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 5 dependents" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 12, + "window_days": 180 + }, + "reason": "12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/index.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 17.95, + "clone_pair_count": 4, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", + "worst_clone_co_change": 5 + }, + "reason": "18% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/reporting/init.rs (co-changed 5x)" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/index.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 7, + "commit_count_90d": 1, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 7 dependents" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/index.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 5, + "window_days": 180 + }, + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/index.rs", + "function_name": "build_report_index", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/index.rs::build_report_index", + "crates/sc-compose/src/reporting/index.rs::index_entry", + "crates/sc-compose/src/reporting/index.rs::read_metadata" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_73dd829959cb81f681cc" + }, + "reason": "a filesystem call is reached once per loop iteration through build_report_index -> index_entry -> read_metadata (cross-function N+1)" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/init.rs", + "function_name": "run_smoke_report", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "run_smoke_report takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/init.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 38.56, + "clone_pair_count": 11, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/src/reporting/output.rs", + "worst_clone_co_change": 6 + }, + "reason": "39% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/output.rs (co-changed 6x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/init.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 20, + "window_days": 180 + }, + "reason": "20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/mermaid.rs", + "function_name": "render_state_machine", + "health_impact": 0.847, + "details": { + "ccn": 11, + "cognitive": 17, + "nloc": 48 + }, + "reason": "render_state_machine has cyclomatic complexity 11" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/mermaid.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/mod.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 100.0, + "clone_pair_count": 2, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/src/commands/mod.rs", + "worst_clone_co_change": 0 + }, + "reason": "100% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/mod.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/mod.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/output.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 12.66, + "clone_pair_count": 13, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", + "worst_clone_co_change": 6 + }, + "reason": "13% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/init.rs (co-changed 6x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/output.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 6, + "window_days": 180 + }, + "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/output.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_8ac5991a2465d0e71f91" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/output.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_28abfdfbf54a38058727" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/path.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 16.07, + "clone_pair_count": 2, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-compose/src/main_tests.rs", + "worst_clone_co_change": 0 + }, + "reason": "16% of file duplicated; worst clone shares 11 lines with crates/sc-compose/src/main_tests.rs" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/path.rs", + "function_name": "resolve_relative_path", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c7f520aceb01d2c32977" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 12.69, + "clone_pair_count": 23, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/reporting/output.rs", + "worst_clone_co_change": 4 + }, + "reason": "13% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/output.rs (co-changed 4x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 20, + "window_days": 180 + }, + "reason": "20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "function_name": "render_many", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/render_many.rs::render_many", + "crates/sc-compose/src/reporting/render_many.rs::write_rendered_entry" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_79e9103b5c893dbbbcdb" + }, + "reason": "a filesystem call is reached once per loop iteration through render_many -> write_rendered_entry (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "function_name": "discover_sources", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/render_many.rs::discover_sources", + "crates/sc-compose/src/reporting/source_entry.rs::SourceEntry::load" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_2981e8a9f03a925881f8" + }, + "reason": "a filesystem call is reached once per loop iteration through discover_sources -> load (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "function_name": "render_many", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_cb17354dcd346fe5d15d" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/report_context.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 18.71, + "clone_pair_count": 9, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", + "worst_clone_co_change": 0 + }, + "reason": "19% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/reporting/init.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/report_context.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/scaffold.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/scaffold.rs", + "function_name": "write_report_scaffold", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/scaffold.rs::write_report_scaffold", + "crates/sc-compose/src/reporting/scaffold.rs::ensure_dir" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_52c154214cad718bb5b6" + }, + "reason": "a filesystem call is reached once per loop iteration through write_report_scaffold -> ensure_dir (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/scaffold.rs", + "function_name": "write_report_scaffold", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/scaffold.rs::write_report_scaffold", + "crates/sc-compose/src/reporting/scaffold.rs::write_if_missing" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_a2e1310bb3a169332ff9" + }, + "reason": "a filesystem call is reached once per loop iteration through write_report_scaffold -> write_if_missing (cross-function N+1)" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/source_entry.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 14.08, + "clone_pair_count": 3, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-compose/src/reporting/render_many.rs", + "worst_clone_co_change": 3 + }, + "reason": "14% of file duplicated; worst clone shares 15 lines with crates/sc-compose/src/reporting/render_many.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/source_entry.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "low_cohesion", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/spec.rs", + "function_name": "ReportSpec", + "health_impact": 0.35, + "details": { + "class_name": "ReportSpec", + "lcom4": 2, + "method_count": 6, + "field_count": 0 + }, + "reason": "ReportSpec has low cohesion (LCOM4=2): its 6 methods split into 2 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/spec.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 29.11, + "clone_pair_count": 12, + "worst_clone_lines": 12, + "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", + "worst_clone_co_change": 4 + }, + "reason": "29% of file duplicated; worst clone shares 12 lines with crates/sc-compose/src/reporting/init.rs (co-changed 4x)" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/spec.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 4, + "commit_count_90d": 0, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/spec.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/templates.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 17.68, + "clone_pair_count": 6, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-compose/src/reporting/catalog.rs", + "worst_clone_co_change": 6 + }, + "reason": "18% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/catalog.rs (co-changed 6x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/templates.rs", + "function_name": null, + "health_impact": 0.709, + "details": { + "change_entropy": 2.6276, + "change_entropy_pct": 84.7, + "commit_count_90d": 3 + }, + "reason": "changes are scattered across noisy commits (top 15% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/src/reporting/templates.rs", + "function_name": null, + "health_impact": 1.449, + "details": { + "scatter": 16, + "commit_count_90d": 3 + }, + "reason": "co-changes with 16 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/src/reporting/templates.rs", + "function_name": null, + "health_impact": 1.342, + "details": { + "prior_defect_count": 11, + "window_days": 180 + }, + "reason": "11 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/output/materialization.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 32.0, + "clone_pair_count": 3, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/reporting/output/materialization.rs", + "worst_clone_co_change": 0 + }, + "reason": "32% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/output/materialization.rs" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/output/materialization.rs", + "function_name": "archive_artifacts", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/src/reporting/output/materialization.rs::archive_artifacts", + "crates/sc-compose/src/reporting/output/materialization.rs::copy_relative_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_bea4fd2e6d7f6ccbf6d7" + }, + "reason": "a filesystem call is reached once per loop iteration through archive_artifacts -> copy_relative_file (cross-function N+1)" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/output/metadata.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 18.18, + "clone_pair_count": 5, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/reporting/output.rs", + "worst_clone_co_change": 0 + }, + "reason": "18% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/output.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/error.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 9.64, + "clone_pair_count": 1, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/reporting/index.rs", + "worst_clone_co_change": 0 + }, + "reason": "10% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/index.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/model.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 45.45, + "clone_pair_count": 3, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", + "worst_clone_co_change": 0 + }, + "reason": "45% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/init.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 29.89, + "clone_pair_count": 4, + "worst_clone_lines": 17, + "worst_clone_partner": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "worst_clone_co_change": 0 + }, + "reason": "30% of file duplicated; worst clone shares 17 lines with crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 29, + 33 + ], + "partner_file": "crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + "reason": "assertion block at lines 29-33 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 70, + 75 + ], + "partner_file": "crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + "reason": "assertion block at lines 70-75 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 50, + 55 + ], + "partner_file": "crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + "reason": "assertion block at lines 50-55 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/src/reporting/publish_manifest/tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli.rs", + "function_name": null, + "health_impact": 1.062, + "details": { + "change_entropy": 16.8575, + "change_entropy_pct": 99.6, + "commit_count_90d": 4 + }, + "reason": "changes are scattered across noisy commits (top 0.4% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 25, + "commit_count_90d": 4 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/cli.rs", + "function_name": null, + "health_impact": 1.172, + "details": { + "prior_defect_count": 43, + "window_days": 180 + }, + "reason": "43 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 47.94, + "clone_pair_count": 8, + "worst_clone_lines": 23, + "worst_clone_partner": "crates/sc-compose/tests/fuzz_regressions.rs", + "worst_clone_co_change": 0 + }, + "reason": "48% of file duplicated; worst clone shares 23 lines with crates/sc-compose/tests/fuzz_regressions.rs" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.35, + "churn_percentile": 83.2, + "lines_added_90d": 316, + "lines_deleted_90d": 17, + "commit_count_90d": 14, + "nloc": 246 + }, + "reason": "90-day churn rewrote 1.4x the file's size (333 lines over 246 NLOC, top 17% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 3.2258, + "change_entropy_pct": 88.7, + "commit_count_90d": 14 + }, + "reason": "changes are scattered across noisy commits (top 11% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 7, + "window_days": 180 + }, + "reason": "7 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 135, + 139 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 135-139 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 156, + 165 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 156-165 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 203, + 209 + ], + "partner_file": "crates/sc-compose/tests/fuzz_regressions.rs" + }, + "reason": "assertion block at lines 203-209 is duplicated in crates/sc-compose/tests/fuzz_regressions.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 240, + 246 + ], + "partner_file": "crates/sc-compose/tests/fuzz_regressions.rs" + }, + "reason": "assertion block at lines 240-246 is duplicated in crates/sc-compose/tests/fuzz_regressions.rs" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": "clap_usage_errors_exit_with_usage_fail_in_plain_text_mode", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/tests/fuzz_regressions.rs::clap_usage_errors_exit_with_usage_fail_in_plain_text_mode", + "crates/sc-compose/tests/support/mod.rs::sc_compose", + "crates/sc-compose/tests/support/mod.rs::TempFixture::new", + "crates/sc-compose/tests/support/mod.rs::temp_root_with_prefix" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_d081d08275dd8f090204" + }, + "reason": "a filesystem call is reached once per loop iteration through clap_usage_errors_exit_with_usage_fail_in_plain_text_mode -> sc_compose -> new -> temp_root_with_prefix (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/fuzz_regressions.rs", + "function_name": "help_and_version_preserve_clap_display_output_in_both_modes", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/tests/fuzz_regressions.rs::help_and_version_preserve_clap_display_output_in_both_modes", + "crates/sc-compose/tests/support/mod.rs::sc_compose", + "crates/sc-compose/tests/support/mod.rs::TempFixture::new", + "crates/sc-compose/tests/support/mod.rs::temp_root_with_prefix" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_d081d08275dd8f090204" + }, + "reason": "a filesystem call is reached once per loop iteration through help_and_version_preserve_clap_display_output_in_both_modes -> sc_compose -> new -> temp_root_with_prefix (cross-function N+1)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/json_cli.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 27, + "window_days": 180 + }, + "reason": "27 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_manifest_dependency_rules", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 10, + "cognitive": 19 + }, + "reason": "assert_manifest_dependency_rules nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_manifest_dependency_rules", + "health_impact": 0.847, + "details": { + "ccn": 10, + "cognitive": 19, + "nloc": 38 + }, + "reason": "assert_manifest_dependency_rules has cyclomatic complexity 10" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_manifest_dependency_rules", + "health_impact": 0.933, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 10, + "max_nesting": 4 + }, + "reason": "assert_manifest_dependency_rules has been modified across 4 commits (repo p80=2) and carries CCN=10 / nesting=4" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_source_boundary_rules", + "health_impact": 0.544, + "details": { + "modification_count": 3, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 + }, + "reason": "assert_source_boundary_rules has been modified across 3 commits (repo p80=2) and carries CCN=5 / nesting=3" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.709, + "details": { + "change_entropy": 3.1064, + "change_entropy_pct": 87.6, + "commit_count_90d": 9 + }, + "reason": "changes are scattered across noisy commits (top 12% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.845, + "details": { + "scatter": 11, + "commit_count_90d": 9 + }, + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.469, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": null, + "health_impact": 0.045, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_source_boundary_rules", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_141b950fdc24ecfd4d56" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "assert_manifest_dependency_rules", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_cead1f1da4b2f249d13d" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "boundary_fixture", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_c21e6419685bc2ec2c07" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "function_name": "source_files", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-compose/tests/repo_boundaries.rs::source_files", + "crates/sc-compose/tests/repo_boundaries.rs::walk_files" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_d941693ae882ca0329c8" + }, + "reason": "a filesystem call is reached once per loop iteration through source_files -> walk_files (cross-function N+1)" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 60.17, + "clone_pair_count": 30, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "worst_clone_co_change": 0 + }, + "reason": "60% of file duplicated; worst clone shares 13 lines with crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + { + "biomarker_type": "large_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": "check_native_pass_preserves_workflow_envelope_and_materializes_evidence", + "health_impact": 0.1, + "details": { + "function": "check_native_pass_preserves_workflow_envelope_and_materializes_evidence", + "assertion_count": 15 + }, + "reason": "check_native_pass_preserves_workflow_envelope_and_materializes_evidence runs 15 assertions in one block" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 38, + 63 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 38-63 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 89, + 104 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 89-104 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 108, + 115 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + "reason": "assertion block at lines 108-115 is duplicated in crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 67, + 69 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 67-69 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_check_native.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 36.17, + "clone_pair_count": 12, + "worst_clone_lines": 18, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_ci.rs", + "worst_clone_co_change": 2 + }, + "reason": "36% of file duplicated; worst clone shares 18 lines with crates/sc-compose/tests/sc_lint_ci.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 10, + "commit_count_90d": 4 + }, + "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "large_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": "check_xwin_pass_preserves_workflow_envelope_and_report", + "health_impact": 0.167, + "details": { + "function": "check_xwin_pass_preserves_workflow_envelope_and_report", + "assertion_count": 15 + }, + "reason": "check_xwin_pass_preserves_workflow_envelope_and_report runs 15 assertions in one block" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 32, + 57 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 32-57 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 74, + 100 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 74-100 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 55.77, + "clone_pair_count": 21, + "worst_clone_lines": 32, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "worst_clone_co_change": 3 + }, + "reason": "56% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_lint_full.rs (co-changed 3x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 2.47, + "churn_percentile": 91.0, + "lines_added_90d": 363, + "lines_deleted_90d": 135, + "commit_count_90d": 6, + "nloc": 202 + }, + "reason": "90-day churn rewrote 2.5x the file's size (498 lines over 202 NLOC, top 9% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 6 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "large_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": "ci_pass_preserves_composite_envelope_and_excludes_xwin", + "health_impact": 0.125, + "details": { + "function": "ci_pass_preserves_composite_envelope_and_excludes_xwin", + "assertion_count": 16 + }, + "reason": "ci_pass_preserves_composite_envelope_and_excludes_xwin runs 16 assertions in one block" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 80, + 100 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 80-100 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 42, + 65 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 42-65 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 115, + 128 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 115-128 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": null, + "health_impact": 0.056, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": "materialize_python_tools", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_0691e1d9d60dfc758e02" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_ci.rs", + "function_name": "assert_report_materialized", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fea58715cf248ff191b7" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 64.66, + "clone_pair_count": 31, + "worst_clone_lines": 21, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "worst_clone_co_change": 2 + }, + "reason": "65% of file duplicated; worst clone shares 21 lines with crates/sc-compose/tests/sc_lint_lint_fast.rs (co-changed 2x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 2.41, + "churn_percentile": 81.8, + "lines_added_90d": 230, + "lines_deleted_90d": 90, + "commit_count_90d": 5, + "nloc": 133 + }, + "reason": "90-day churn rewrote 2.4x the file's size (320 lines over 133 NLOC, top 18% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 5 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "large_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": "clippy_native_pass_preserves_workflow_envelope_and_materializes_evidence", + "health_impact": 0.083, + "details": { + "function": "clippy_native_pass_preserves_workflow_envelope_and_materializes_evidence", + "assertion_count": 16 + }, + "reason": "clippy_native_pass_preserves_workflow_envelope_and_materializes_evidence runs 16 assertions in one block" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 39, + 69 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 39-69 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 100, + 115 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 100-115 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 119, + 126 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 119-126 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 78, + 80 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_lint_fast.rs" + }, + "reason": "assertion block at lines 78-80 is duplicated in crates/sc-compose/tests/sc_lint_lint_fast.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 136, + 139 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_lint_fast.rs" + }, + "reason": "assertion block at lines 136-139 is duplicated in crates/sc-compose/tests/sc_lint_lint_fast.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 38.41, + "clone_pair_count": 13, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "worst_clone_co_change": 0 + }, + "reason": "38% of file duplicated; worst clone shares 13 lines with crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 136, + 154 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 136-154 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 72, + 77 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 72-77 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 118, + 129 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 118-129 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 84, + 94 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 84-94 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 96, + 103 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 96-103 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "assertion_lines": [ + 156, + 163 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 156-163 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 13.19, + "clone_pair_count": 4, + "worst_clone_lines": 6, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_check_xwin.rs", + "worst_clone_co_change": 2 + }, + "reason": "13% of file duplicated; worst clone shares 6 lines with crates/sc-compose/tests/sc_lint_check_xwin.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 3 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 0.25, + "details": { + "assertion_lines": [ + 32, + 59 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 32-59 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 0.25, + "details": { + "assertion_lines": [ + 79, + 96 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_identity_literals.rs" + }, + "reason": "assertion block at lines 79-96 is duplicated in crates/sc-compose/tests/sc_lint_identity_literals.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_identity_literals.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 51.4, + "clone_pair_count": 22, + "worst_clone_lines": 13, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "worst_clone_co_change": 2 + }, + "reason": "51% of file duplicated; worst clone shares 13 lines with crates/sc-compose/tests/sc_lint_sc_boundary.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 13, + "commit_count_90d": 4 + }, + "reason": "co-changes with 13 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 58, + 75 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 58-75 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 79, + 81 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 79-81 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 97, + 103 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 97-103 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 106, + 108 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + "reason": "assertion block at lines 106-108 is duplicated in crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 113, + 114 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + "reason": "assertion block at lines 113-114 is duplicated in crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 44.81, + "clone_pair_count": 17, + "worst_clone_lines": 29, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "worst_clone_co_change": 2 + }, + "reason": "45% of file duplicated; worst clone shares 29 lines with crates/sc-compose/tests/sc_lint_lint_fast.rs (co-changed 2x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 1.44, + "details": { + "relative_churn": 2.99, + "churn_percentile": 90.8, + "lines_added_90d": 312, + "lines_deleted_90d": 148, + "commit_count_90d": 7, + "nloc": 154 + }, + "reason": "90-day churn rewrote 3.0x the file's size (460 lines over 154 NLOC, top 9.2% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 10, + "commit_count_90d": 7 + }, + "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 24, + 41 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 24-41 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 85, + 101 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 85-101 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 105, + 112 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 105-112 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 49, + 56 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_lint_ci.rs" + }, + "reason": "assertion block at lines 49-56 is duplicated in crates/sc-compose/tests/sc_lint_lint_ci.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 54.14, + "clone_pair_count": 27, + "worst_clone_lines": 29, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_lint_ci.rs", + "worst_clone_co_change": 2 + }, + "reason": "54% of file duplicated; worst clone shares 29 lines with crates/sc-compose/tests/sc_lint_lint_ci.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 4 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 55, + 63 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 55-63 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 125, + 141 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 125-141 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 145, + 152 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 145-152 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 71, + 98 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + "reason": "assertion block at lines 71-98 is duplicated in crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 162, + 165 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + "reason": "assertion block at lines 162-165 is duplicated in crates/sc-compose/tests/sc_lint_clippy_native.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_fast.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 48.52, + "clone_pair_count": 21, + "worst_clone_lines": 32, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_ci.rs", + "worst_clone_co_change": 3 + }, + "reason": "49% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_ci.rs (co-changed 3x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 1.44, + "details": { + "relative_churn": 2.71, + "churn_percentile": 93.6, + "lines_added_90d": 441, + "lines_deleted_90d": 184, + "commit_count_90d": 6, + "nloc": 231 + }, + "reason": "90-day churn rewrote 2.7x the file's size (625 lines over 231 NLOC, top 6.4% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 6 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 114, + 134 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 114-134 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 82, + 98 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 82-98 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 153, + 166 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + "reason": "assertion block at lines 153-166 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": "materialize_python_tools", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_bee1b884bed051546805" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", + "function_name": "assert_report_materialized", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_57eb6cdb18cdeaaf9f29" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 12.95, + "clone_pair_count": 7, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-compose/tests/support/mod.rs", + "worst_clone_co_change": 3 + }, + "reason": "13% of file duplicated; worst clone shares 9 lines with crates/sc-compose/tests/support/mod.rs (co-changed 3x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 2.07, + "churn_percentile": 77.5, + "lines_added_90d": 220, + "lines_deleted_90d": 68, + "commit_count_90d": 7, + "nloc": 139 + }, + "reason": "90-day churn rewrote 2.1x the file's size (288 lines over 139 NLOC, top 23% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.3216, + "change_entropy_pct": 81.8, + "commit_count_90d": 7 + }, + "reason": "changes are scattered across noisy commits (top 18% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 12, + "commit_count_90d": 7 + }, + "reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.5, + "details": { + "assertion_lines": [ + 120, + 132 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 120-132 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", + "function_name": null, + "health_impact": 0.083, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 61.83, + "clone_pair_count": 30, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "worst_clone_co_change": 2 + }, + "reason": "62% of file duplicated; worst clone shares 14 lines with crates/sc-compose/tests/sc_lint_sc_portability.rs (co-changed 2x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 1.67, + "churn_percentile": 87.6, + "lines_added_90d": 327, + "lines_deleted_90d": 76, + "commit_count_90d": 7, + "nloc": 241 + }, + "reason": "90-day churn rewrote 1.7x the file's size (403 lines over 241 NLOC, top 12% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 2.16, + "details": { + "scatter": 15, + "commit_count_90d": 7 + }, + "reason": "co-changes with 15 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 38, + 52 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 38-52 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 56, + 57 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 56-57 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 71, + 98 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 71-98 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 103, + 105 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 103-105 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 153, + 155 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + "reason": "assertion block at lines 153-155 is duplicated in crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 190, + 191 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + "reason": "assertion block at lines 190-191 is duplicated in crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 227, + 228 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + "reason": "assertion block at lines 227-228 is duplicated in crates/sc-compose/tests/sc_lint_sc_boundary.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 74.44, + "clone_pair_count": 24, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_sc_boundary.rs", + "worst_clone_co_change": 2 + }, + "reason": "74% of file duplicated; worst clone shares 14 lines with crates/sc-compose/tests/sc_lint_sc_boundary.rs (co-changed 2x)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 38, + 51 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 38-51 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 55, + 56 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 55-56 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 87, + 88 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 87-88 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 93, + 95 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 93-95 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 76, + 83 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_portability.rs" + }, + "reason": "assertion block at lines 76-83 is duplicated in crates/sc-compose/tests/sc_lint_sc_portability.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 63.48, + "clone_pair_count": 21, + "worst_clone_lines": 14, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_sc_portability.rs", + "worst_clone_co_change": 2 + }, + "reason": "63% of file duplicated; worst clone shares 14 lines with crates/sc-compose/tests/sc_lint_sc_portability.rs (co-changed 2x)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 39, + 52 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 39-52 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 56, + 57 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_check_native.rs" + }, + "reason": "assertion block at lines 56-57 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 104, + 115 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 104-115 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 119, + 122 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + "reason": "assertion block at lines 119-122 is duplicated in crates/sc-compose/tests/sc_lint_line_counts.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 78, + 85 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_sc_runtime.rs" + }, + "reason": "assertion block at lines 78-85 is duplicated in crates/sc-compose/tests/sc_lint_sc_runtime.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_sc_runtime.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 41.82, + "clone_pair_count": 14, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-compose/tests/sc_lint_line_counts.rs", + "worst_clone_co_change": 2 + }, + "reason": "42% of file duplicated; worst clone shares 10 lines with crates/sc-compose/tests/sc_lint_line_counts.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 9, + "commit_count_90d": 4 + }, + "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 54, + 58 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 54-58 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 126, + 135 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + "reason": "assertion block at lines 126-135 is duplicated in crates/sc-compose/tests/sc_lint_clippy_xwin.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 84, + 90 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + "reason": "assertion block at lines 84-90 is duplicated in crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 150, + 157 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + "reason": "assertion block at lines 150-157 is duplicated in crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 99, + 105 + ], + "partner_file": "crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + "reason": "assertion block at lines 99-105 is duplicated in crates/sc-compose/tests/sc_lint_view_findings.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/sc_lint_view_findings.rs", + "function_name": "install_pinned_view_utilities", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_06954e10b0f2ac57fa0b" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": "write_request", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "write_request takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 41.45, + "clone_pair_count": 25, + "worst_clone_lines": 17, + "worst_clone_partner": "crates/sc-compose/tests/cli/bead.rs", + "worst_clone_co_change": 0 + }, + "reason": "41% of file duplicated; worst clone shares 17 lines with crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.18, + "churn_percentile": 87.3, + "lines_added_90d": 444, + "lines_deleted_90d": 13, + "commit_count_90d": 6, + "nloc": 386 + }, + "reason": "90-day churn rewrote 1.2x the file's size (457 lines over 386 NLOC, top 13% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.1522, + "change_entropy_pct": 80.4, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 20% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 174, + 181 + ], + "partner_file": "crates/sc-compose/tests/cli/bead.rs" + }, + "reason": "assertion block at lines 174-181 is duplicated in crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 206, + 214 + ], + "partner_file": "crates/sc-compose/tests/cli/bead.rs" + }, + "reason": "assertion block at lines 206-214 is duplicated in crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 235, + 242 + ], + "partner_file": "crates/sc-compose/tests/cli/bead.rs" + }, + "reason": "assertion block at lines 235-242 is duplicated in crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 365, + 369 + ], + "partner_file": "crates/sc-compose/tests/cli/bead.rs" + }, + "reason": "assertion block at lines 365-369 is duplicated in crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 400, + 404 + ], + "partner_file": "crates/sc-compose/tests/cli/bead.rs" + }, + "reason": "assertion block at lines 400-404 is duplicated in crates/sc-compose/tests/cli/bead.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": null, + "health_impact": 0.05, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": "copy_canonical_template", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_86e0f84551b627204498" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/bead.rs", + "function_name": "write_fake_bd", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_77f71fe0955fcbedb159" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 64.65, + "clone_pair_count": 33, + "worst_clone_lines": 48, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/extract.rs", + "worst_clone_co_change": 9 + }, + "reason": "65% of file duplicated; worst clone shares 48 lines with crates/sc-compose/tests/json_cli/extract.rs (co-changed 9x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.226, + "details": { + "relative_churn": 1.16, + "churn_percentile": 89.9, + "lines_added_90d": 450, + "lines_deleted_90d": 9, + "commit_count_90d": 12, + "nloc": 396 + }, + "reason": "90-day churn rewrote 1.2x the file's size (459 lines over 396 NLOC, top 10% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.663, + "details": { + "change_entropy": 2.727, + "change_entropy_pct": 85.5, + "commit_count_90d": 12 + }, + "reason": "changes are scattered across noisy commits (top 15% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 1.356, + "details": { + "scatter": 22, + "commit_count_90d": 12 + }, + "reason": "co-changes with 22 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 1.255, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 105, + 106 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 105-106 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 115, + 116 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 115-116 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 128, + 129 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 128-129 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 141, + 142 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 141-142 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 205, + 206 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 205-206 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 315, + 316 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 315-316 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 221, + 223 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 221-223 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 238, + 239 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 238-239 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 281, + 284 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 281-284 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 92, + 93 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 92-93 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 188, + 190 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 188-190 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 334, + 337 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 334-337 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 354, + 357 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 354-357 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/extract.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 374, + 377 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 374-377 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/help.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.1627, + "change_entropy_pct": 80.7, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 19% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/help.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 6 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/help.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/help.rs", + "function_name": null, + "health_impact": 0.5, + "details": { + "assertion_lines": [ + 124, + 129 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 124-129 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/help.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 81.1, + "clone_pair_count": 59, + "worst_clone_lines": 34, + "worst_clone_partner": "crates/sc-compose/tests/cli/render.rs", + "worst_clone_co_change": 2 + }, + "reason": "81% of file duplicated; worst clone shares 34 lines with crates/sc-compose/tests/cli/render.rs (co-changed 2x)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 106, + 111 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" + }, + "reason": "assertion block at lines 106-111 is duplicated in crates/sc-compose/tests/cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 45, + 63 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" + }, + "reason": "assertion block at lines 45-63 is duplicated in crates/sc-compose/tests/cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 173, + 178 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" + }, + "reason": "assertion block at lines 173-178 is duplicated in crates/sc-compose/tests/cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/observability.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "assertion_lines": [ + 122, + 130 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" + }, + "reason": "assertion block at lines 122-130 is duplicated in crates/sc-compose/tests/cli/observability.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 64.24, + "clone_pair_count": 1608, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-composer/src/renderer.rs", + "worst_clone_co_change": 6 + }, + "reason": "64% of file duplicated; worst clone shares 8 lines with crates/sc-composer/src/renderer.rs (co-changed 6x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 1.472, + "details": { + "change_entropy": 7.234, + "change_entropy_pct": 97.1, + "commit_count_90d": 21 + }, + "reason": "changes are scattered across noisy commits (top 2.9% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 1.053, + "details": { + "scatter": 25, + "commit_count_90d": 21 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.975, + "details": { + "prior_defect_count": 15, + "window_days": 180 + }, + "reason": "15 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 696, + 698 + ], + "partner_file": "crates/sc-compose/tests/cli/help.rs" + }, + "reason": "assertion block at lines 696-698 is duplicated in crates/sc-compose/tests/cli/help.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 726, + 727 + ], + "partner_file": "crates/sc-compose/tests/cli/help.rs" + }, + "reason": "assertion block at lines 726-727 is duplicated in crates/sc-compose/tests/cli/help.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 35, + 36 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 35-36 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2508, + 2509 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2508-2509 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 303, + 307 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 303-307 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 336, + 340 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 336-340 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 363, + 367 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 363-367 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 473, + 477 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 473-477 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 579, + 583 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 579-583 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 642, + 643 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 642-643 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 668, + 669 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 668-669 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 875, + 876 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 875-876 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 751, + 752 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 751-752 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 849, + 850 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 849-850 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 938, + 942 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 938-942 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 975, + 979 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 975-979 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1286, + 1290 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1286-1290 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1080, + 1084 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1080-1084 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1108, + 1112 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1108-1112 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1251, + 1259 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1251-1259 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1383, + 1387 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1383-1387 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1321, + 1325 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1321-1325 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1436, + 1440 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1436-1440 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1352, + 1356 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1352-1356 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1411, + 1415 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1411-1415 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1466, + 1474 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1466-1474 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1581, + 1583 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1581-1583 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1614, + 1615 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1614-1615 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1674, + 1679 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1674-1679 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1773, + 1777 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1773-1777 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1806, + 1811 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1806-1811 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1835, + 1836 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1835-1836 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1859, + 1864 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1859-1864 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1887, + 1892 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1887-1892 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1942, + 1947 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1942-1947 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2032, + 2033 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2032-2033 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2056, + 2057 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2056-2057 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2233, + 2235 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2233-2235 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2302, + 2306 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2302-2306 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2454, + 2455 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2454-2455 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2481, + 2482 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 2481-2482 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1646, + 1647 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 1646-1647 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 1742, + 1744 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 1742-1744 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2082, + 2087 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 2082-2087 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2269, + 2273 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 2269-2273 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 268, + 273 + ], + "partner_file": "crates/sc-compose/tests/fuzz_regressions.rs" + }, + "reason": "assertion block at lines 268-273 is duplicated in crates/sc-compose/tests/fuzz_regressions.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/render.rs", + "function_name": null, + "health_impact": 0.011, + "details": { + "assertion_lines": [ + 2399, + 2403 + ], + "partner_file": "crates/sc-composer/src/composer.rs" + }, + "reason": "assertion block at lines 2399-2403 is duplicated in crates/sc-composer/src/composer.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 55.76, + "clone_pair_count": 237, + "worst_clone_lines": 42, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/reports.rs", + "worst_clone_co_change": 2 + }, + "reason": "56% of file duplicated; worst clone shares 42 lines with crates/sc-compose/tests/json_cli/reports.rs (co-changed 2x)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 167, + 188 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" + }, + "reason": "assertion block at lines 167-188 is duplicated in crates/sc-compose/tests/cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 65, + 66 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 65-66 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 368, + 369 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 368-369 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 509, + 510 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 509-510 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 26, + 28 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 26-28 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 420, + 424 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 420-424 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 199, + 200 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 199-200 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 338, + 340 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 338-340 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 640, + 642 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 640-642 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 915, + 920 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 915-920 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 676, + 677 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 676-677 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 988, + 1012 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" + }, + "reason": "assertion block at lines 988-1012 is duplicated in crates/sc-compose/tests/cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 1103, + 1107 + ], + "partner_file": "crates/sc-compose/tests/json_cli/reports.rs" + }, + "reason": "assertion block at lines 1103-1107 is duplicated in crates/sc-compose/tests/json_cli/reports.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/reports.rs", + "function_name": null, + "health_impact": 0.036, + "details": { + "assertion_lines": [ + 1150, + 1153 + ], + "partner_file": "crates/sc-compose/tests/json_cli/reports.rs" + }, + "reason": "assertion block at lines 1150-1153 is duplicated in crates/sc-compose/tests/json_cli/reports.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 59.89, + "clone_pair_count": 234, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/templates.rs", + "worst_clone_co_change": 2 + }, + "reason": "60% of file duplicated; worst clone shares 16 lines with crates/sc-compose/tests/json_cli/templates.rs (co-changed 2x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 12, + "commit_count_90d": 3 + }, + "reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 702, + 707 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 702-707 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 582, + 583 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 582-583 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 602, + 603 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 602-603 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 837, + 838 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 837-838 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 883, + 884 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 883-884 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 901, + 902 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 901-902 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 922, + 923 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 922-923 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 988, + 989 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 988-989 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 390, + 393 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 390-393 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 1007, + 1008 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 1007-1008 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 42, + 45 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 42-45 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 254, + 255 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 254-255 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 236, + 240 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 236-240 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 355, + 356 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 355-356 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 268, + 269 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 268-269 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 807, + 808 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 807-808 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 310, + 311 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 310-311 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 329, + 336 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 329-336 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 629, + 630 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 629-630 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 451, + 454 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 451-454 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 534, + 540 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 534-540 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 733, + 734 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 733-734 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 654, + 658 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 654-658 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 674, + 678 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 674-678 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 773, + 778 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 773-778 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 757, + 764 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 757-764 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/templates.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "assertion_lines": [ + 856, + 863 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" + }, + "reason": "assertion block at lines 856-863 is duplicated in crates/sc-compose/tests/cli/templates.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 77.61, + "clone_pair_count": 88, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/validate.rs", + "worst_clone_co_change": 4 + }, + "reason": "78% of file duplicated; worst clone shares 20 lines with crates/sc-compose/tests/json_cli/validate.rs (co-changed 4x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.31, + "churn_percentile": 75.4, + "lines_added_90d": 263, + "lines_deleted_90d": 1, + "commit_count_90d": 6, + "nloc": 201 + }, + "reason": "90-day churn rewrote 1.3x the file's size (264 lines over 201 NLOC, top 25% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.2634, + "change_entropy_pct": 81.5, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 19% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 6 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 84, + 85 + ], + "partner_file": "crates/sc-compose/tests/cli/help.rs" + }, + "reason": "assertion block at lines 84-85 is duplicated in crates/sc-compose/tests/cli/help.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 114, + 116 + ], + "partner_file": "crates/sc-compose/tests/cli/help.rs" + }, + "reason": "assertion block at lines 114-116 is duplicated in crates/sc-compose/tests/cli/help.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 149, + 154 + ], + "partner_file": "crates/sc-compose/tests/cli/help.rs" + }, + "reason": "assertion block at lines 149-154 is duplicated in crates/sc-compose/tests/cli/help.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 24, + 28 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" + }, + "reason": "assertion block at lines 24-28 is duplicated in crates/sc-compose/tests/cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/cli/validate.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 52, + 57 + ], + "partner_file": "crates/sc-compose/tests/cli/validate.rs" + }, + "reason": "assertion block at lines 52-57 is duplicated in crates/sc-compose/tests/cli/validate.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 71.57, + "clone_pair_count": 126, + "worst_clone_lines": 48, + "worst_clone_partner": "crates/sc-compose/tests/cli/extract.rs", + "worst_clone_co_change": 9 + }, + "reason": "72% of file duplicated; worst clone shares 48 lines with crates/sc-compose/tests/cli/extract.rs (co-changed 9x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 5, + "window_days": 180 + }, + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 58, + 70 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 58-70 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 199, + 203 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 199-203 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 220, + 230 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 220-230 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 247, + 254 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 247-254 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 361, + 374 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 361-374 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 441, + 443 + ], + "partner_file": "crates/sc-compose/tests/cli/extract.rs" + }, + "reason": "assertion block at lines 441-443 is duplicated in crates/sc-compose/tests/cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 54, + 55 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 54-55 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 99, + 100 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 99-100 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 124, + 128 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 124-128 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 297, + 298 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 297-298 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 301, + 309 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 301-309 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 85, + 86 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 85-86 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 88, + 89 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 88-89 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 102, + 106 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 102-106 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 143, + 144 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 143-144 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 156, + 157 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 156-157 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 173, + 174 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 173-174 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 196, + 197 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 196-197 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 217, + 218 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 217-218 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 244, + 245 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 244-245 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 276, + 277 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 276-277 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 489, + 490 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 489-490 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 335, + 339 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 335-339 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 357, + 358 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 357-358 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 390, + 391 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 390-391 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 424, + 425 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 424-425 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 459, + 460 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 459-460 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 493, + 497 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 493-497 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 394, + 398 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 394-398 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 428, + 435 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 428-435 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 463, + 464 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 463-464 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/extract.rs", + "function_name": null, + "health_impact": 0.016, + "details": { + "assertion_lines": [ + 524, + 525 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" + }, + "reason": "assertion block at lines 524-525 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": "template_contract_lint_passes_for_a_clean_o4_corpus", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_f245b58f2a983dd3dbef" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "parse_pass_inputs", - "health_impact": 0.326, + "file_path": "crates/sc-compose/tests/json_cli/o4_templates.rs", + "function_name": "template_contract_lint_passes_for_a_clean_o4_corpus", + "health_impact": 0.0, "details": { - "nloc": 90, - "ccn": 14 + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_03d5d9ff087b767033c3" }, - "reason": "parse_pass_inputs is 90 lines long" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", "function_name": null, "health_impact": 0.35, "details": { - "duplication_pct": 27.7, - "clone_pair_count": 16, - "worst_clone_lines": 45, - "worst_clone_partner": "crates/sc-compose/src/commands/reports/mod.rs", - "worst_clone_co_change": 0 + "duplication_pct": 87.85, + "clone_pair_count": 84, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/reports.rs", + "worst_clone_co_change": 2 }, - "reason": "28% of file duplicated; worst clone shares 45 lines with crates/sc-compose/src/commands/reports/mod.rs" + "reason": "88% of file duplicated; worst clone shares 22 lines with crates/sc-compose/tests/json_cli/reports.rs (co-changed 2x)" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/cli.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.071, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 9, - "commit_count_90d": 5, - "has_test_file": false + "assertion_lines": [ + 23, + 24 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 9 dependents" + "reason": "assertion block at lines 23-24 is duplicated in crates/sc-compose/tests/cli/observability.rs" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "command_wants_json", - "health_impact": 1.046, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 17, - "max_nesting": 3 + "assertion_lines": [ + 109, + 110 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" }, - "reason": "command_wants_json has been modified across 2 commits (repo p80=2) and carries CCN=17 / nesting=3" + "reason": "assertion block at lines 109-110 is duplicated in crates/sc-compose/tests/cli/observability.rs" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "filtered_args_for_clap", - "health_impact": 0.61, + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 11, - "max_nesting": 3 + "assertion_lines": [ + 113, + 118 + ], + "partner_file": "crates/sc-compose/tests/cli/observability.rs" }, - "reason": "filtered_args_for_clap has been modified across 2 commits (repo p80=2) and carries CCN=11 / nesting=3" + "reason": "assertion block at lines 113-118 is duplicated in crates/sc-compose/tests/cli/observability.rs" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 27, + 36 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 27-36 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 96, + 97 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 96-97 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 51, + 55 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" + }, + "reason": "assertion block at lines 51-55 is duplicated in crates/sc-compose/tests/json_cli/render.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/observability.rs", + "function_name": null, + "health_impact": 0.071, + "details": { + "assertion_lines": [ + 58, + 62 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" + }, + "reason": "assertion block at lines 58-62 is duplicated in crates/sc-compose/tests/json_cli/render.rs" + }, + { + "biomarker_type": "dry_violation", "severity": "high", - "file_path": "crates/sc-compose/src/cli.rs", - "function_name": "parse_pass_inputs", - "health_impact": 1.046, + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.6, "details": { - "modification_count": 4, - "repo_p80": 2, - "ccn": 14, - "max_nesting": 4 + "duplication_pct": 71.4, + "clone_pair_count": 1118, + "worst_clone_lines": 25, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/validate.rs", + "worst_clone_co_change": 4 }, - "reason": "parse_pass_inputs has been modified across 4 commits (repo p80=2) and carries CCN=14 / nesting=4" + "reason": "71% of file duplicated; worst clone shares 25 lines with crates/sc-compose/tests/json_cli/validate.rs (co-changed 4x)" }, { - "biomarker_type": "churn_risk", - "severity": "low", - "file_path": "crates/sc-compose/src/cli.rs", + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.271, + "health_impact": 1.062, "details": { - "relative_churn": 1.24, - "churn_percentile": 0.802, - "lines_added_90d": 568, - "lines_deleted_90d": 37, - "commit_count_90d": 5, - "nloc": 489 + "change_entropy": 3.5289, + "change_entropy_pct": 90.2, + "commit_count_90d": 9 + }, + "reason": "changes are scattered across noisy commits (top 9.8% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 25, + "commit_count_90d": 9 }, - "reason": "90-day churn rewrote 1.2x the file's size (605 lines over 489 NLOC, top 20% of repo churn)" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", - "severity": "medium", - "file_path": "crates/sc-compose/src/cli.rs", + "severity": "critical", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.526, + "health_impact": 1.172, "details": { - "prior_defect_count": 2, + "prior_defect_count": 4, "window_days": 180 }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/command_error.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.014, "details": { - "duplication_pct": 10.07, - "clone_pair_count": 1, - "worst_clone_lines": 8, - "worst_clone_partner": "crates/sc-compose/src/command_error.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 1305, + 1306 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" }, - "reason": "10% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/command_error.rs" + "reason": "assertion block at lines 1305-1306 is duplicated in crates/sc-compose/tests/cli/render.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/main.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.21, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/templates.rs", - "correlation": 0.5, - "co_change_count": 6, - "self_commits": 55, - "partner_commits": 12 + "assertion_lines": [ + 545, + 555 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" }, - "reason": "crates/sc-compose/src/reporting/templates.rs co-changes with this file 6 times (50% of shared commits) but no static dependency exists" + "reason": "assertion block at lines 545-555 is duplicated in crates/sc-compose/tests/cli/render.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/main.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.21, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/output.rs", - "correlation": 0.5, - "co_change_count": 5, - "self_commits": 55, - "partner_commits": 10 + "assertion_lines": [ + 183, + 187 + ], + "partner_file": "crates/sc-compose/tests/cli/validate.rs" }, - "reason": "crates/sc-compose/src/reporting/output.rs co-changes with this file 5 times (50% of shared commits) but no static dependency exists" + "reason": "assertion block at lines 183-187 is duplicated in crates/sc-compose/tests/cli/validate.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/main.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.21, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/index.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 55, - "partner_commits": 6 + "assertion_lines": [ + 510, + 511 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "crates/sc-compose/src/reporting/index.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "assertion block at lines 510-511 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "churn_risk", - "severity": "critical", - "file_path": "crates/sc-compose/src/main.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.719, + "health_impact": 0.014, "details": { - "relative_churn": 50.79, - "churn_percentile": 0.989, - "lines_added_90d": 928, - "lines_deleted_90d": 2678, - "commit_count_90d": 28, - "nloc": 71 + "assertion_lines": [ + 1258, + 1259 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "90-day churn rewrote 50.8x the file's size (3606 lines over 71 NLOC, top 1% of repo churn)" + "reason": "assertion block at lines 1258-1259 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "change_entropy", - "severity": "critical", - "file_path": "crates/sc-compose/src/main.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.905, + "health_impact": 0.014, "details": { - "change_entropy": 12.1684, - "change_entropy_pct": 0.96, - "commit_count_90d": 28 + "assertion_lines": [ + 1188, + 1192 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "changes are scattered across noisy commits (top 4% change entropy); a strong history-based fault predictor" + "reason": "assertion block at lines 1188-1192 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-compose/src/main.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.647, + "health_impact": 0.014, "details": { - "scatter": 44, - "commit_count_90d": 28 + "assertion_lines": [ + 1219, + 1223 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "co-changes with 44 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 1219-1223 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/main.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.599, + "health_impact": 0.014, "details": { - "prior_defect_count": 30, - "window_days": 180 + "assertion_lines": [ + 882, + 883 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "30 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 882-883 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/main_tests.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.014, "details": { - "duplication_pct": 56.52, - "clone_pair_count": 10, - "worst_clone_lines": 27, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 917, + 918 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "57% of file duplicated; worst clone shares 27 lines with crates/sc-composer/src/composer.rs" + "reason": "assertion block at lines 917-918 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/main_tests.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.7, + "health_impact": 0.014, "details": { - "prior_defect_count": 2, - "window_days": 180 + "assertion_lines": [ + 980, + 981 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 980-981 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/main_tests.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.014, "details": { - "kind": "unsafe_unwrap" + "assertion_lines": [ + 665, + 669 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "assertion block at lines 665-669 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/main_tests.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.014, "details": { - "kind": "unsafe_unwrap" + "assertion_lines": [ + 702, + 706 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "assertion block at lines 702-706 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "assertion_lines": [ + 748, + 752 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 748-752 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "assertion_lines": [ + 794, + 798 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 794-798 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "assertion_lines": [ + 828, + 832 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 828-832 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "assertion_lines": [ + 1047, + 1051 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" + }, + "reason": "assertion block at lines 1047-1051 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/main_tests.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 1082, + 1086 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 1082-1086 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "change_entropy", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/observability.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.857, + "health_impact": 0.014, "details": { - "change_entropy": 4.5787, - "change_entropy_pct": 0.853, - "commit_count_90d": 19 + "assertion_lines": [ + 1119, + 1123 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "changes are scattered across noisy commits (top 15% change entropy); a strong history-based fault predictor" + "reason": "assertion block at lines 1119-1123 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "co_change_scatter", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/observability.rs", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 1.022, + "health_impact": 0.014, "details": { - "scatter": 9, - "commit_count_90d": 19 + "assertion_lines": [ + 1126, + 1131 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 1126-1131 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/observability.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 1.621, + "health_impact": 0.014, "details": { - "prior_defect_count": 18, - "window_days": 180 + "assertion_lines": [ + 159, + 160 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "18 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 159-160 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "bumpy_road", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", - "function_name": "normalize_event_labels", - "health_impact": 0.15, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "bumps": 3, - "ccn": 8, - "max_nesting": 2 + "assertion_lines": [ + 91, + 92 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "normalize_event_labels has 3 nested blocks at the same level (bumpy road)" + "reason": "assertion block at lines 91-92 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", - "function_name": "cli_observer_emits_command_and_pipeline_events_to_logger", - "health_impact": 0.375, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "nloc": 65, - "ccn": 3 + "assertion_lines": [ + 95, + 103 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "cli_observer_emits_command_and_pipeline_events_to_logger is 65 lines long" + "reason": "assertion block at lines 95-103 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/observer_impl.rs", - "function_name": "emit_log", - "health_impact": 0.35, + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "param_count": 7 + "assertion_lines": [ + 225, + 233 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "emit_log takes 7 parameters" + "reason": "assertion block at lines 225-233 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.014, "details": { - "duplication_pct": 16.23, - "clone_pair_count": 13, - "worst_clone_lines": 14, - "worst_clone_partner": "crates/sc-compose/src/observer_impl.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 270, + 271 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "16% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/observer_impl.rs" + "reason": "assertion block at lines 270-271 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "change_entropy", - "severity": "high", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 1.062, + "health_impact": 0.014, "details": { - "change_entropy": 6.1463, - "change_entropy_pct": 0.933, - "commit_count_90d": 13 + "assertion_lines": [ + 339, + 340 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "changes are scattered across noisy commits (top 7% change entropy); a strong history-based fault predictor" + "reason": "assertion block at lines 339-340 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 1.266, + "health_impact": 0.014, "details": { - "scatter": 21, - "commit_count_90d": 13 + "assertion_lines": [ + 443, + 446 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "co-changes with 21 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 443-446 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 1.172, + "health_impact": 0.014, "details": { - "prior_defect_count": 17, - "window_days": 180 + "assertion_lines": [ + 485, + 487 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "17 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 485-487 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.1, + "health_impact": 0.014, "details": { - "kind": "panic_macro" + "assertion_lines": [ + 1330, + 1334 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "assertion block at lines 1330-1334 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.1, + "health_impact": 0.014, "details": { - "kind": "panic_macro" + "assertion_lines": [ + 672, + 678 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "assertion block at lines 672-678 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.1, + "health_impact": 0.014, "details": { - "kind": "panic_macro" + "assertion_lines": [ + 711, + 715 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "assertion block at lines 711-715 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.1, + "health_impact": 0.014, "details": { - "kind": "panic_macro" + "assertion_lines": [ + 886, + 887 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "assertion block at lines 886-887 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 0.1, + "health_impact": 0.014, "details": { - "kind": "panic_macro" + "assertion_lines": [ + 1010, + 1014 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "assertion block at lines 1010-1014 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 1018, + 1020 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 1018-1020 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/observer_impl.rs", - "function_name": "read_log_lines", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 1154, + 1158 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 1154-1158 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "untested_hotspot", - "severity": "critical", - "file_path": "crates/sc-compose/src/path_utils.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/render.rs", "function_name": null, - "health_impact": 2.0, + "health_impact": 0.014, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 18, - "commit_count_90d": 24, - "has_test_file": false + "assertion_lines": [ + 400, + 402 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 18 dependents" + "reason": "assertion block at lines 400-402 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "change_entropy", - "severity": "high", - "file_path": "crates/sc-compose/src/path_utils.rs", + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.25, + "health_impact": 0.35, "details": { - "change_entropy": 5.3372, - "change_entropy_pct": 0.907, - "commit_count_90d": 24 + "duplication_pct": 75.9, + "clone_pair_count": 249, + "worst_clone_lines": 42, + "worst_clone_partner": "crates/sc-compose/tests/cli/reports.rs", + "worst_clone_co_change": 2 }, - "reason": "changes are scattered across noisy commits (top 9% change entropy); a strong history-based fault predictor" + "reason": "76% of file duplicated; worst clone shares 42 lines with crates/sc-compose/tests/cli/reports.rs (co-changed 2x)" }, { - "biomarker_type": "co_change_scatter", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/path_utils.rs", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.869, + "health_impact": 0.021, "details": { - "scatter": 12, - "commit_count_90d": 24 + "assertion_lines": [ + 550, + 557 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" }, - "reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 550-557 is duplicated in crates/sc-compose/tests/cli/reports.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/path_utils.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.38, + "health_impact": 0.021, "details": { - "prior_defect_count": 17, - "window_days": 180 + "assertion_lines": [ + 605, + 612 + ], + "partner_file": "crates/sc-compose/tests/cli/reports.rs" }, - "reason": "17 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 605-612 is duplicated in crates/sc-compose/tests/cli/reports.rs" }, { - "biomarker_type": "nested_complexity", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "load_env", - "health_impact": 0.938, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "max_nesting": 4, - "ccn": 5, - "cognitive": 10 + "assertion_lines": [ + 36, + 37 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "load_env nests 4 levels deep" + "reason": "assertion block at lines 36-37 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/render_request.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.021, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 5, - "commit_count_90d": 12, - "has_test_file": false + "assertion_lines": [ + 101, + 102 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 5 dependents" + "reason": "assertion block at lines 101-102 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "load_env", - "health_impact": 0.605, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "modification_count": 4, - "repo_p80": 2, - "ccn": 5, - "max_nesting": 4 + "assertion_lines": [ + 147, + 148 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "load_env has been modified across 4 commits (repo p80=2) and carries CCN=5 / nesting=4" + "reason": "assertion block at lines 147-148 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "churn_risk", - "severity": "high", - "file_path": "crates/sc-compose/src/render_request.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.626, + "health_impact": 0.021, "details": { - "relative_churn": 2.72, - "churn_percentile": 0.923, - "lines_added_90d": 288, - "lines_deleted_90d": 590, - "commit_count_90d": 12, - "nloc": 323 + "assertion_lines": [ + 210, + 211 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "90-day churn rewrote 2.7x the file's size (878 lines over 323 NLOC, top 8% of repo churn)" + "reason": "assertion block at lines 210-211 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "change_entropy", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/render_request.rs", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.46, + "health_impact": 0.021, "details": { - "change_entropy": 3.8865, - "change_entropy_pct": 0.813, - "commit_count_90d": 12 + "assertion_lines": [ + 265, + 266 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "changes are scattered across noisy commits (top 19% change entropy); a strong history-based fault predictor" + "reason": "assertion block at lines 265-266 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-compose/src/render_request.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.939, + "health_impact": 0.021, "details": { - "scatter": 15, - "commit_count_90d": 12 + "assertion_lines": [ + 300, + 301 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "co-changes with 15 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 300-301 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/render_request.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.87, + "health_impact": 0.021, "details": { - "prior_defect_count": 11, - "window_days": 180 + "assertion_lines": [ + 360, + 361 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "11 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 360-361 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "load_vars", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/render_request.rs::load_vars", - "crates/sc-compose/src/render_request.rs::load_var_source", - "crates/sc-compose/src/var_file.rs::load_var_file" - ] + "assertion_lines": [ + 396, + 397 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a filesystem call is reached once per loop iteration through load_vars -> load_var_source -> load_var_file (cross-function N+1)" + "reason": "assertion block at lines 396-397 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "load_pass_vars", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/render_request.rs::load_pass_vars", - "crates/sc-compose/src/render_request.rs::load_var_source", - "crates/sc-compose/src/var_file.rs::load_var_file" - ] + "assertion_lines": [ + 500, + 501 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a filesystem call is reached once per loop iteration through load_pass_vars -> load_var_source -> load_var_file (cross-function N+1)" + "reason": "assertion block at lines 500-501 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "collect_pass_union", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/render_request.rs::collect_pass_union", - "crates/sc-compose/src/render_request.rs::load_pass_vars", - "crates/sc-compose/src/render_request.rs::load_var_source", - "crates/sc-compose/src/var_file.rs::load_var_file" - ] + "assertion_lines": [ + 73, + 77 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a filesystem call is reached once per loop iteration through collect_pass_union -> load_pass_vars -> load_var_source -> load_var_file (cross-function N+1)" + "reason": "assertion block at lines 73-77 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/render_request.rs", - "function_name": "read_block", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 456, + 457 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 456-457 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-compose/src/template_store.rs", - "function_name": "TemplateStore", - "health_impact": 0.6, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "class_name": "TemplateStore", - "lcom4": 4, - "method_count": 12, - "field_count": 2 + "assertion_lines": [ + 546, + 547 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "TemplateStore has low cohesion (LCOM4=4): its 12 methods split into 4 groups that share no fields or calls" + "reason": "assertion block at lines 546-547 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/template_store.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.021, "details": { - "duplication_pct": 8.2, - "clone_pair_count": 4, - "worst_clone_lines": 9, - "worst_clone_partner": "crates/sc-compose/src/template_store.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 601, + 602 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "8% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/template_store.rs" + "reason": "assertion block at lines 601-602 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/template_store.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.021, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 5, - "commit_count_90d": 0, - "has_test_file": false + "assertion_lines": [ + 40, + 45 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 5 dependents" + "reason": "assertion block at lines 40-45 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-compose/src/template_store.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 0.021, "details": { - "prior_defect_count": 3, - "window_days": 180 + "assertion_lines": [ + 105, + 118 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 105-118 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/template_store.rs", - "function_name": "copy_directory_recursive", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "assertion_lines": [ + 151, + 161 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "assertion block at lines 151-161 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/template_store.rs", - "function_name": "list_templates", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/template_store.rs::TemplateStore::list_templates", - "crates/sc-compose/src/template_store.rs::load_manifest" - ] + "assertion_lines": [ + 214, + 216 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "a filesystem call is reached once per loop iteration through list_templates -> load_manifest (cross-function N+1)" + "reason": "assertion block at lines 214-216 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/var_file.rs", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.385, + "health_impact": 0.021, "details": { - "partner": "crates/sc-compose/src/commands/mod.rs", - "correlation": 0.667, - "co_change_count": 4, - "self_commits": 6, - "partner_commits": 12 + "assertion_lines": [ + 269, + 270 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "crates/sc-compose/src/commands/mod.rs co-changes with this file 4 times (67% of shared commits) but no static dependency exists" + "reason": "assertion block at lines 269-270 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "churn_risk", - "severity": "critical", - "file_path": "crates/sc-compose/src/var_file.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.321, + "health_impact": 0.021, "details": { - "relative_churn": 6.39, - "churn_percentile": 0.758, - "lines_added_90d": 588, - "lines_deleted_90d": 0, - "commit_count_90d": 6, - "nloc": 92 + "assertion_lines": [ + 364, + 376 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "90-day churn rewrote 6.4x the file's size (588 lines over 92 NLOC, top 24% of repo churn)" + "reason": "assertion block at lines 364-376 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "co_change_scatter", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/var_file.rs", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 0.693, + "health_impact": 0.021, "details": { - "scatter": 8, - "commit_count_90d": 6 + "assertion_lines": [ + 400, + 412 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 400-412 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/var_file.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", "function_name": null, - "health_impact": 1.101, + "health_impact": 0.021, "details": { - "prior_defect_count": 6, - "window_days": 180 + "assertion_lines": [ + 504, + 519 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 504-519 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/var_file.rs", - "function_name": "load_var_file", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/reports.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 460, + 472 + ], + "partner_file": "crates/sc-compose/tests/json_cli/reports.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 460-472 is duplicated in crates/sc-compose/tests/json_cli/reports.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "build_custom_render_context", - "health_impact": 0.341, + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.35, "details": { - "nloc": 70, - "ccn": 6 + "duplication_pct": 74.53, + "clone_pair_count": 182, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-compose/tests/cli/templates.rs", + "worst_clone_co_change": 2 }, - "reason": "build_custom_render_context is 70 lines long" + "reason": "75% of file duplicated; worst clone shares 16 lines with crates/sc-compose/tests/cli/templates.rs (co-changed 2x)" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "emit_render_output", - "health_impact": 0.341, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 65, - "ccn": 7 + "assertion_lines": [ + 89, + 93 + ], + "partner_file": "crates/sc-compose/tests/cli/render.rs" }, - "reason": "emit_render_output is 65 lines long" + "reason": "assertion block at lines 89-93 is duplicated in crates/sc-compose/tests/cli/render.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "execute_custom_delimiter_render", - "health_impact": 0.341, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 69, - "ccn": 3 + "assertion_lines": [ + 242, + 247 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" }, - "reason": "execute_custom_delimiter_render is 69 lines long" + "reason": "assertion block at lines 242-247 is duplicated in crates/sc-compose/tests/cli/templates.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "run_validate", - "health_impact": 0.341, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 62, - "ccn": 8 + "assertion_lines": [ + 300, + 310 + ], + "partner_file": "crates/sc-compose/tests/cli/templates.rs" }, - "reason": "run_validate is 62 lines long" + "reason": "assertion block at lines 300-310 is duplicated in crates/sc-compose/tests/cli/templates.rs" }, { - "biomarker_type": "primitive_obsession", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "emit_render_output", - "health_impact": 0.136, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "param_count": 5 + "assertion_lines": [ + 143, + 144 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "emit_render_output takes 5 parameters" + "reason": "assertion block at lines 143-144 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.021, "details": { - "duplication_pct": 19.59, - "clone_pair_count": 7, - "worst_clone_lines": 16, - "worst_clone_partner": "crates/sc-compose/src/commands/verify.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 193, + 197 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "20% of file duplicated; worst clone shares 16 lines with crates/sc-compose/src/commands/verify.rs" + "reason": "assertion block at lines 193-197 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/commands/compose.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 1.56, - "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 4, - "commit_count_90d": 5, - "has_test_file": false + "health_impact": 0.021, + "details": { + "assertion_lines": [ + 217, + 221 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + "reason": "assertion block at lines 217-221 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "churn_risk", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.36, + "health_impact": 0.021, "details": { - "relative_churn": 1.44, - "churn_percentile": 0.835, - "lines_added_90d": 666, - "lines_deleted_90d": 105, - "commit_count_90d": 5, - "nloc": 536 + "assertion_lines": [ + 470, + 474 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "90-day churn rewrote 1.4x the file's size (771 lines over 536 NLOC, top 16% of repo churn)" + "reason": "assertion block at lines 470-474 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/commands/compose.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 2.0, + "health_impact": 0.021, "details": { - "prior_defect_count": 3, - "window_days": 180 + "assertion_lines": [ + 429, + 430 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 429-430 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "emit_render_output", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 451, + 452 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 451-452 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "function_name": "render_would_change", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 262, + 263 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 262-263 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "complex_method", - "severity": "high", - "file_path": "crates/sc-compose/src/commands/dispatch.rs", - "function_name": "run", - "health_impact": 1.192, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "ccn": 15, - "cognitive": 30, - "nloc": 88 + "assertion_lines": [ + 266, + 276 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "run has cyclomatic complexity 15" + "reason": "assertion block at lines 266-276 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/dispatch.rs", - "function_name": "run", - "health_impact": 0.308, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 88, - "ccn": 15 + "assertion_lines": [ + 296, + 297 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "run is 88 lines long" + "reason": "assertion block at lines 296-297 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.021, "details": { - "duplication_pct": 10.06, - "clone_pair_count": 1, - "worst_clone_lines": 9, - "worst_clone_partner": "crates/sc-compose/src/commands/dispatch.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 330, + 331 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "10% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/commands/dispatch.rs" + "reason": "assertion block at lines 330-331 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/dispatch.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.021, "details": { - "prior_defect_count": 1, - "window_days": 180 + "assertion_lines": [ + 334, + 347 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 334-347 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/examples.rs", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.021, "details": { - "duplication_pct": 34.21, - "clone_pair_count": 1, - "worst_clone_lines": 13, - "worst_clone_partner": "crates/sc-compose/src/commands/templates.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 364, + 365 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "34% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/templates.rs" + "reason": "assertion block at lines 364-365 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-compose/src/commands/examples.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 0.021, "details": { - "prior_defect_count": 3, - "window_days": 180 + "assertion_lines": [ + 387, + 388 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 387-388 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/mod.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.021, "details": { - "duplication_pct": 9.88, - "clone_pair_count": 1, - "worst_clone_lines": 13, - "worst_clone_partner": "crates/sc-compose/src/reporting/mod.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 391, + 400 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "10% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/reporting/mod.rs" + "reason": "assertion block at lines 391-400 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/mod.rs", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.513, + "health_impact": 0.021, "details": { - "partner": "crates/sc-compose/src/var_file.rs", - "correlation": 0.667, - "co_change_count": 4, - "self_commits": 12, - "partner_commits": 6 + "assertion_lines": [ + 26, + 30 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "crates/sc-compose/src/var_file.rs co-changes with this file 4 times (67% of shared commits) but no static dependency exists" + "reason": "assertion block at lines 26-30 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/mod.rs", - "function_name": "print_pack_list", - "health_impact": 0.596, + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 4, - "max_nesting": 3 + "assertion_lines": [ + 57, + 61 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "print_pack_list has been modified across 2 commits (repo p80=2) and carries CCN=4 / nesting=3" + "reason": "assertion block at lines 57-61 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "co_change_scatter", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/mod.rs", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 0.924, + "health_impact": 0.021, "details": { - "scatter": 8, - "commit_count_90d": 10 + "assertion_lines": [ + 117, + 121 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 117-121 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/commands/mod.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", "function_name": null, - "health_impact": 1.467, + "health_impact": 0.021, "details": { - "prior_defect_count": 10, - "window_days": 180 + "assertion_lines": [ + 166, + 170 + ], + "partner_file": "crates/sc-compose/tests/json_cli/observability.rs" }, - "reason": "10 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 166-170 is duplicated in crates/sc-compose/tests/json_cli/observability.rs" }, { - "biomarker_type": "complex_method", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "apply_replacements", - "health_impact": 0.796, + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "ccn": 9, - "cognitive": 11, - "nloc": 58 + "assertion_lines": [ + 237, + 238 + ], + "partner_file": "crates/sc-compose/tests/json_cli/reports.rs" }, - "reason": "apply_replacements has cyclomatic complexity 9" + "reason": "assertion block at lines 237-238 is duplicated in crates/sc-compose/tests/json_cli/reports.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "template_init_file", - "health_impact": 0.352, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 67, - "ccn": 7 + "assertion_lines": [ + 33, + 39 + ], + "partner_file": "crates/sc-compose/tests/json_cli/templates.rs" }, - "reason": "template_init_file is 67 lines long" + "reason": "assertion block at lines 33-39 is duplicated in crates/sc-compose/tests/json_cli/templates.rs" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "run_template_init", - "health_impact": 0.352, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/templates.rs", + "function_name": null, + "health_impact": 0.021, "details": { - "nloc": 71, - "ccn": 6 + "assertion_lines": [ + 64, + 68 + ], + "partner_file": "crates/sc-compose/tests/json_cli/templates.rs" }, - "reason": "run_template_init is 71 lines long" + "reason": "assertion block at lines 64-68 is duplicated in crates/sc-compose/tests/json_cli/templates.rs" }, { "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.6, "details": { - "duplication_pct": 10.86, - "clone_pair_count": 13, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-composer/src/init_workspace.rs", - "worst_clone_co_change": 2 + "duplication_pct": 75.51, + "clone_pair_count": 153, + "worst_clone_lines": 25, + "worst_clone_partner": "crates/sc-compose/tests/json_cli/render.rs", + "worst_clone_co_change": 4 }, - "reason": "11% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/init_workspace.rs (co-changed 2x)" + "reason": "76% of file duplicated; worst clone shares 25 lines with crates/sc-compose/tests/json_cli/render.rs (co-changed 4x)" }, { "biomarker_type": "churn_risk", "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.36, + "health_impact": 0.199, "details": { - "relative_churn": 1.17, - "churn_percentile": 0.769, - "lines_added_90d": 657, - "lines_deleted_90d": 23, - "commit_count_90d": 5, - "nloc": 580 + "relative_churn": 1.12, + "churn_percentile": 96.2, + "lines_added_90d": 755, + "lines_deleted_90d": 12, + "commit_count_90d": 11, + "nloc": 686 }, - "reason": "90-day churn rewrote 1.2x the file's size (680 lines over 580 NLOC, top 23% of repo churn)" + "reason": "90-day churn rewrote 1.1x the file's size (767 lines over 686 NLOC, top 3.8% among repository files eligible for churn ranking)" }, { - "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 1.002, "details": { - "prior_defect_count": 1, - "window_days": 180 + "change_entropy": 3.8124, + "change_entropy_pct": 90.9, + "commit_count_90d": 11 }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "changes are scattered across noisy commits (top 9.1% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "template_init_file", - "health_impact": 0.0, + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "function_name": null, + "health_impact": 1.194, "details": { - "boundary_kind": "filesystem" + "scatter": 18, + "commit_count_90d": 11 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "function_name": null, + "health_impact": 1.105, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/template_init.rs", - "function_name": "write_file", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "function_name": null, + "health_impact": 0.042, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 26, + 27 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 26-27 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/templates.rs", - "function_name": null, - "health_impact": 0.15, - "details": { - "duplication_pct": 14.77, - "clone_pair_count": 1, - "worst_clone_lines": 13, - "worst_clone_partner": "crates/sc-compose/src/commands/examples.rs", - "worst_clone_co_change": 0 + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "function_name": null, + "health_impact": 0.042, + "details": { + "assertion_lines": [ + 30, + 45 + ], + "partner_file": "crates/sc-compose/tests/json_cli/extract.rs" }, - "reason": "15% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/examples.rs" + "reason": "assertion block at lines 30-45 is duplicated in crates/sc-compose/tests/json_cli/extract.rs" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-compose/src/commands/templates.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 0.042, "details": { - "prior_defect_count": 3, - "window_days": 180 + "assertion_lines": [ + 125, + 133 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 125-133 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/verify.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.042, "details": { - "duplication_pct": 12.9, - "clone_pair_count": 1, - "worst_clone_lines": 16, - "worst_clone_partner": "crates/sc-compose/src/commands/compose.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 735, + 742 + ], + "partner_file": "crates/sc-compose/tests/json_cli/render.rs" }, - "reason": "13% of file duplicated; worst clone shares 16 lines with crates/sc-compose/src/commands/compose.rs" + "reason": "assertion block at lines 735-742 is duplicated in crates/sc-compose/tests/json_cli/render.rs" }, { - "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/workspace.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.042, "details": { - "prior_defect_count": 1, - "window_days": 180 + "assertion_lines": [ + 159, + 160 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 159-160 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/mod.rs", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.042, "details": { - "duplication_pct": 70.87, - "clone_pair_count": 10, - "worst_clone_lines": 45, - "worst_clone_partner": "crates/sc-compose/src/cli.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 163, + 178 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "71% of file duplicated; worst clone shares 45 lines with crates/sc-compose/src/cli.rs" + "reason": "assertion block at lines 163-178 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/commands/reports/mod.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.042, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 6, - "commit_count_90d": 1, - "has_test_file": false + "assertion_lines": [ + 206, + 207 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 6 dependents" + "reason": "assertion block at lines 206-207 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/publish.rs", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.042, "details": { - "duplication_pct": 62.16, - "clone_pair_count": 5, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-compose/src/commands/reports/render.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 465, + 480 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "62% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/commands/reports/render.rs" + "reason": "assertion block at lines 465-480 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/commands/reports/publish.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.042, "details": { - "prior_defect_count": 1, - "window_days": 180 + "assertion_lines": [ + 547, + 554 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 547-554 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/render.rs", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.042, "details": { - "duplication_pct": 29.21, - "clone_pair_count": 3, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-compose/src/commands/reports/publish.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 582, + 589 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "29% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/commands/reports/publish.rs" + "reason": "assertion block at lines 582-589 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/render.rs", + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", "function_name": null, - "health_impact": 0.7, + "health_impact": 0.042, "details": { - "prior_defect_count": 2, - "window_days": 180 + "assertion_lines": [ + 616, + 618 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 616-618 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "nested_complexity", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", - "function_name": "run_reports_index", - "health_impact": 0.938, + "file_path": "crates/sc-compose/tests/json_cli/validate.rs", + "function_name": null, + "health_impact": 0.042, "details": { - "max_nesting": 4, - "ccn": 5, - "cognitive": 10 + "assertion_lines": [ + 646, + 650 + ], + "partner_file": "crates/sc-compose/tests/json_cli/validate.rs" }, - "reason": "run_reports_index nests 4 levels deep" + "reason": "assertion block at lines 646-650 is duplicated in crates/sc-compose/tests/json_cli/validate.rs" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "low_cohesion", "severity": "medium", - "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", - "function_name": null, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "ScComposeCommand", "health_impact": 0.35, "details": { - "duplication_pct": 37.74, - "clone_pair_count": 3, - "worst_clone_lines": 16, - "worst_clone_partner": "crates/sc-compose/src/commands/reports/render.rs", - "worst_clone_co_change": 0 + "class_name": "ScComposeCommand", + "lcom4": 2, + "method_count": 8, + "field_count": 2 }, - "reason": "38% of file duplicated; worst clone shares 16 lines with crates/sc-compose/src/commands/reports/render.rs" + "reason": "ScComposeCommand has low cohesion (LCOM4=2): its 8 methods split into 2 groups that share no fields or calls" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "large_method", "severity": "low", - "file_path": "crates/sc-compose/src/commands/reports/scaffold.rs", - "function_name": null, - "health_impact": 0.3, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "write_fake_cargo", + "health_impact": 0.375, "details": { - "prior_defect_count": 1, - "window_days": 180 + "nloc": 64, + "ccn": 5 }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "write_fake_cargo is 64 lines long" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", - "function_name": null, - "health_impact": 0.6, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "finalize_report", + "health_impact": 0.15, "details": { - "duplication_pct": 27.36, - "clone_pair_count": 7, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-compose/src/reporting/templates.rs", - "worst_clone_co_change": 4 + "param_count": 5 }, - "reason": "27% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/templates.rs (co-changed 4x)" + "reason": "finalize_report takes 5 parameters" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", - "function_name": null, - "health_impact": 1.56, + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "copy_directory", + "health_impact": 0.419, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 5, - "commit_count_90d": 13, - "has_test_file": false + "modification_count": 2, + "repo_p80": 2, + "ccn": 4, + "max_nesting": 3 }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 5 dependents" + "reason": "copy_directory has been modified across 2 commits (repo p80=2) and carries CCN=4 / nesting=3" }, { "biomarker_type": "change_entropy", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "severity": "high", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.857, + "health_impact": 0.935, "details": { - "change_entropy": 4.0264, - "change_entropy_pct": 0.827, - "commit_count_90d": 13 + "change_entropy": 4.8766, + "change_entropy_pct": 93.1, + "commit_count_90d": 11 }, - "reason": "changes are scattered across noisy commits (top 17% change entropy); a strong history-based fault predictor" + "reason": "changes are scattered across noisy commits (top 6.9% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "severity": "high", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.022, + "health_impact": 1.114, "details": { - "scatter": 10, - "commit_count_90d": 13 + "scatter": 25, + "commit_count_90d": 11 }, - "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.621, + "health_impact": 1.032, "details": { - "prior_defect_count": 12, + "prior_defect_count": 7, "window_days": 180 }, - "reason": "12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "7 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/catalog.rs", - "function_name": "load_report_catalog_from_path", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.014, "details": { - "duplication_pct": 17.95, - "clone_pair_count": 4, - "worst_clone_lines": 9, - "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", - "worst_clone_co_change": 3 + "kind": "unsafe_unwrap" }, - "reason": "18% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/reporting/init.rs (co-changed 3x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/render_many.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 6, - "partner_commits": 17 + "kind": "unsafe_unwrap" }, - "reason": "crates/sc-compose/src/reporting/render_many.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/templates.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 6, - "partner_commits": 12 + "kind": "unsafe_unwrap" }, - "reason": "crates/sc-compose/src/reporting/templates.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/main.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 6, - "partner_commits": 55 + "kind": "panic_macro" }, - "reason": "crates/sc-compose/src/main.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { - "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.823, + "health_impact": 0.014, "details": { - "scatter": 8, - "commit_count_90d": 6 + "kind": "unsafe_unwrap" }, - "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/index.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.306, + "health_impact": 0.014, "details": { - "prior_defect_count": 5, - "window_days": 180 + "kind": "panic_macro" }, - "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/index.rs", - "function_name": "build_report_index", - "health_impact": 0.0, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/index.rs::build_report_index", - "crates/sc-compose/src/reporting/index.rs::index_entry", - "crates/sc-compose/src/reporting/index.rs::read_metadata" - ] + "kind": "unsafe_unwrap" }, - "reason": "a filesystem call is reached once per loop iteration through build_report_index -> index_entry -> read_metadata (cross-function N+1)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/init.rs", - "function_name": "run_smoke_report", - "health_impact": 0.15, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "param_count": 5 + "kind": "unsafe_unwrap" }, - "reason": "run_smoke_report takes 5 parameters" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.6, + "health_impact": 0.014, "details": { - "duplication_pct": 38.56, - "clone_pair_count": 10, - "worst_clone_lines": 14, - "worst_clone_partner": "crates/sc-compose/src/reporting/output.rs", - "worst_clone_co_change": 4 + "kind": "unsafe_unwrap" }, - "reason": "39% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/output.rs (co-changed 4x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.251, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/templates.rs", - "correlation": 0.5, - "co_change_count": 6, - "self_commits": 23, - "partner_commits": 12 + "kind": "unsafe_unwrap" }, - "reason": "crates/sc-compose/src/reporting/templates.rs co-changes with this file 6 times (50% of shared commits) but no static dependency exists" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.251, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/reporting/index.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 23, - "partner_commits": 6 + "kind": "unsafe_unwrap" }, - "reason": "crates/sc-compose/src/reporting/index.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "churn_risk", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.86, + "health_impact": 0.014, "details": { - "relative_churn": 8.57, - "churn_percentile": 0.934, - "lines_added_90d": 533, - "lines_deleted_90d": 778, - "commit_count_90d": 23, - "nloc": 153 + "kind": "unsafe_unwrap" }, - "reason": "90-day churn rewrote 8.6x the file's size (1311 lines over 153 NLOC, top 7% of repo churn)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "change_entropy", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.649, + "health_impact": 0.014, "details": { - "change_entropy": 6.5567, - "change_entropy_pct": 0.947, - "commit_count_90d": 23 + "kind": "unsafe_unwrap" }, - "reason": "changes are scattered across noisy commits (top 5% change entropy); a strong history-based fault predictor" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.774, + "health_impact": 0.014, "details": { - "scatter": 18, - "commit_count_90d": 23 + "kind": "unsafe_unwrap" }, - "reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/init.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.716, + "health_impact": 0.014, "details": { - "prior_defect_count": 20, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/init.rs", - "function_name": "init_report_scaffold", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/init.rs", - "function_name": "run_smoke_report", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "complex_method", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/mermaid.rs", - "function_name": "render_state_machine", - "health_impact": 0.847, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "ccn": 11, - "cognitive": 17, - "nloc": 48 + "kind": "unsafe_unwrap" }, - "reason": "render_state_machine has cyclomatic complexity 11" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/mermaid.rs", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.014, "details": { - "prior_defect_count": 1, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/mod.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.014, "details": { - "duplication_pct": 100.0, - "clone_pair_count": 2, - "worst_clone_lines": 13, - "worst_clone_partner": "crates/sc-compose/src/commands/mod.rs", - "worst_clone_co_change": 0 + "kind": "unsafe_unwrap" }, - "reason": "100% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/mod.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/mod.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.26, + "health_impact": 0.014, "details": { - "scatter": 8, - "commit_count_90d": 9 + "kind": "unsafe_unwrap" }, - "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/mod.rs", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.014, "details": { - "prior_defect_count": 1, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "large_method", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/output.rs", - "function_name": "write_report_metadata_and_archive", - "health_impact": 0.375, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "nloc": 75, - "ccn": 4 + "kind": "panic_macro" }, - "reason": "write_report_metadata_and_archive is 75 lines long" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/output.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.6, + "health_impact": 0.014, "details": { - "duplication_pct": 30.74, - "clone_pair_count": 17, - "worst_clone_lines": 14, - "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", - "worst_clone_co_change": 4 + "kind": "unsafe_unwrap" }, - "reason": "31% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/init.rs (co-changed 4x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "untested_hotspot", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/output.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.014, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 7, - "commit_count_90d": 10, - "has_test_file": false + "kind": "unsafe_unwrap" }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 7 dependents" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/output.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.619, + "health_impact": 0.014, "details": { - "partner": "crates/sc-compose/src/main.rs", - "correlation": 0.5, - "co_change_count": 5, - "self_commits": 10, - "partner_commits": 55 + "kind": "unsafe_unwrap" }, - "reason": "crates/sc-compose/src/main.rs co-changes with this file 5 times (50% of shared commits) but no static dependency exists" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/output.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.114, + "health_impact": 0.014, "details": { - "scatter": 10, - "commit_count_90d": 10 + "kind": "unsafe_unwrap" }, - "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/output.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 1.768, + "health_impact": 0.014, "details": { - "prior_defect_count": 6, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/output.rs", - "function_name": "write_report_metadata_and_archive", - "health_impact": 0.0, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/output.rs::write_report_metadata_and_archive", - "crates/sc-compose/src/reporting/output.rs::copy_relative_file" - ] + "kind": "unsafe_unwrap" }, - "reason": "a filesystem call is reached once per loop iteration through write_report_metadata_and_archive -> copy_relative_file (cross-function N+1)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/output.rs", - "function_name": "write_report_metadata_and_archive", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/path.rs", + "file_path": "crates/sc-compose/tests/support/mod.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.014, "details": { - "duplication_pct": 16.07, - "clone_pair_count": 3, - "worst_clone_lines": 11, - "worst_clone_partner": "crates/sc-compose/src/main_tests.rs", - "worst_clone_co_change": 0 + "kind": "unsafe_unwrap" }, - "reason": "16% of file duplicated; worst clone shares 11 lines with crates/sc-compose/src/main_tests.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/path.rs", - "function_name": "resolve_relative_path", - "health_impact": 0.0, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "large_method", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": "write_publish_manifest", - "health_impact": 0.375, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": null, + "health_impact": 0.014, "details": { - "nloc": 80, - "ccn": 6 + "kind": "unsafe_unwrap" }, - "reason": "write_publish_manifest is 80 lines long" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": null, - "health_impact": 0.35, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "materialize_sc_lint_runtime_from", + "health_impact": 0.0, "details": { - "duplication_pct": 13.96, - "clone_pair_count": 8, - "worst_clone_lines": 8, - "worst_clone_partner": "crates/sc-compose/src/reporting/render_many.rs", - "worst_clone_co_change": 4 + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_76bd049b5a3ef8ac3cb5" }, - "reason": "14% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/render_many.rs (co-changed 4x)" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": null, - "health_impact": 0.448, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "copy_directory", + "health_impact": 0.0, "details": { - "partner": "crates/sc-compose/src/reporting/templates.rs", - "correlation": 0.571, - "co_change_count": 4, - "self_commits": 7, - "partner_commits": 12 + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_3e04ab8f0eb1e04fb19d" }, - "reason": "crates/sc-compose/src/reporting/templates.rs co-changes with this file 4 times (57% of shared commits) but no static dependency exists" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": null, - "health_impact": 0.448, + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "copy_directory", + "health_impact": 0.0, "details": { - "partner": "crates/sc-compose/src/reporting/render_many.rs", - "correlation": 0.571, - "co_change_count": 4, - "self_commits": 7, - "partner_commits": 17 + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_cc3ee3bc083c9670298b" }, - "reason": "crates/sc-compose/src/reporting/render_many.rs co-changes with this file 4 times (57% of shared commits) but no static dependency exists" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { - "biomarker_type": "function_hotspot", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": "write_publish_manifest", - "health_impact": 0.519, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "from_checked_in_fixture", + "health_impact": 0.0, "details": { - "modification_count": 3, - "repo_p80": 2, - "ccn": 6, - "max_nesting": 3 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_5bbd8bfedc6bc33cac0b" }, - "reason": "write_publish_manifest has been modified across 3 commits (repo p80=2) and carries CCN=6 / nesting=3" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": null, - "health_impact": 0.806, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "scatter": 8, - "commit_count_90d": 7 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_d95614856323d09e8565" }, - "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": null, - "health_impact": 1.279, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "write_fake_cargo", + "health_impact": 0.0, "details": { - "prior_defect_count": 6, - "window_days": 180 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e389b9cb027a00f9534e" }, - "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/publish_manifest.rs", - "function_name": "write_publish_manifest", + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-compose/tests/support/mod.rs", + "function_name": "copy_directory", "health_impact": 0.0, "details": { "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/publish_manifest.rs::write_publish_manifest", - "crates/sc-compose/src/reporting/publish_manifest.rs::latest_archive_root" - ] + "opportunity_id": "perf2_5dae53044414533074a2" }, - "reason": "a filesystem call is reached once per loop iteration through write_publish_manifest -> latest_archive_root (cross-function N+1)" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": null, - "health_impact": 0.35, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "CapturingObserver", + "health_impact": 0.6, "details": { - "duplication_pct": 12.8, - "clone_pair_count": 7, - "worst_clone_lines": 8, - "worst_clone_partner": "crates/sc-compose/src/reporting/publish_manifest.rs", - "worst_clone_co_change": 4 + "class_name": "CapturingObserver", + "lcom4": 5, + "method_count": 5, + "field_count": 5 }, - "reason": "13% of file duplicated; worst clone shares 8 lines with crates/sc-compose/src/reporting/publish_manifest.rs (co-changed 4x)" + "reason": "CapturingObserver has low cohesion (LCOM4=5): its 5 methods split into 5 groups that share no fields or calls" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": null, - "health_impact": 0.329, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "render_all_with_observer", + "health_impact": 0.375, "details": { - "partner": "crates/sc-compose/src/reporting/publish_manifest.rs", - "correlation": 0.571, - "co_change_count": 4, - "self_commits": 17, - "partner_commits": 7 + "nloc": 61, + "ccn": 8 }, - "reason": "crates/sc-compose/src/reporting/publish_manifest.rs co-changes with this file 4 times (57% of shared commits) but no static dependency exists" + "reason": "render_all_with_observer is 61 lines long" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": null, - "health_impact": 0.329, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "render_all_with_observer", + "health_impact": 0.15, "details": { - "partner": "crates/sc-compose/src/reporting/index.rs", - "correlation": 0.5, - "co_change_count": 3, - "self_commits": 17, - "partner_commits": 6 + "param_count": 6 }, - "reason": "crates/sc-compose/src/reporting/index.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists" + "reason": "render_all_with_observer takes 6 parameters" }, { - "biomarker_type": "churn_risk", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", "function_name": null, - "health_impact": 0.394, + "health_impact": 0.6, "details": { - "relative_churn": 2.26, - "churn_percentile": 0.824, - "lines_added_90d": 533, - "lines_deleted_90d": 202, - "commit_count_90d": 17, - "nloc": 325 + "duplication_pct": 39.29, + "clone_pair_count": 122, + "worst_clone_lines": 31, + "worst_clone_partner": "crates/sc-composer/src/validate.rs", + "worst_clone_co_change": 10 }, - "reason": "90-day churn rewrote 2.3x the file's size (735 lines over 325 NLOC, top 18% of repo churn)" + "reason": "39% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/validate.rs (co-changed 10x)" }, { "biomarker_type": "change_entropy", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", "function_name": null, - "health_impact": 0.496, + "health_impact": 1.062, "details": { - "change_entropy": 4.5759, - "change_entropy_pct": 0.84, - "commit_count_90d": 17 + "change_entropy": 5.9939, + "change_entropy_pct": 96.0, + "commit_count_90d": 8 }, - "reason": "changes are scattered across noisy commits (top 16% change entropy); a strong history-based fault predictor" + "reason": "changes are scattered across noisy commits (top 4% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "co_change_scatter", "severity": "high", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "file_path": "crates/sc-composer/src/composer.rs", "function_name": null, - "health_impact": 1.014, + "health_impact": 1.266, "details": { - "scatter": 16, - "commit_count_90d": 17 + "scatter": 25, + "commit_count_90d": 8 }, - "reason": "co-changes with 16 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", + "file_path": "crates/sc-composer/src/composer.rs", "function_name": null, - "health_impact": 0.939, + "health_impact": 1.172, "details": { - "prior_defect_count": 15, + "prior_defect_count": 13, "window_days": 180 }, - "reason": "15 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "13 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": "render_many", + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "temp_root", "health_impact": 0.0, "details": { "boundary_kind": "filesystem", - "cross_function": false + "opportunity_id": "perf2_9f25629ff66207426d8b" }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": "render_many", + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "write_file", "health_impact": 0.0, "details": { "boundary_kind": "filesystem", - "cross_function": false + "opportunity_id": "perf2_1f27102639d2a811db29" }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": "discover_sources", - "health_impact": 0.0, + "biomarker_type": "untested_hotspot", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 2.0, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/render_many.rs::discover_sources", - "crates/sc-compose/src/reporting/source_entry.rs::SourceEntry::load" - ] + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 37, + "commit_count_90d": 6, + "has_test_file": false, + "reached_by_tests": false }, - "reason": "a filesystem call is reached once per loop iteration through discover_sources -> load (cross-function N+1)" + "reason": "Hotspot with no paired test file and no coverage data \u2014 37 dependents" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/src/reporting/render_many.rs", - "function_name": "render_many", - "health_impact": 0.0, + "biomarker_type": "churn_risk", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 1.003, + "details": { + "relative_churn": 56.33, + "churn_percentile": 85.8, + "lines_added_90d": 94, + "lines_deleted_90d": 413, + "commit_count_90d": 6, + "nloc": 9 + }, + "reason": "90-day churn rewrote 56.3x the file's size (507 lines over 9 NLOC, top 14% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 0.758, "details": { - "boundary_kind": "filesystem" + "change_entropy": 5.0281, + "change_entropy_pct": 93.8, + "commit_count_90d": 6 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "changes are scattered across noisy commits (top 6.2% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/src/reporting/report_context.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.903, "details": { - "duplication_pct": 18.71, - "clone_pair_count": 9, - "worst_clone_lines": 10, - "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", - "worst_clone_co_change": 0 + "scatter": 25, + "commit_count_90d": 6 }, - "reason": "19% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/reporting/init.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/reporting/report_context.rs", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", "function_name": null, - "health_impact": 0.3, + "health_impact": 0.836, "details": { - "prior_defect_count": 1, + "prior_defect_count": 8, "window_days": 180 }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "prior_defect", - "severity": "low", - "file_path": "crates/sc-compose/src/reporting/scaffold.rs", - "function_name": null, - "health_impact": 0.3, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "scan_directives", + "health_impact": 1.608, "details": { - "prior_defect_count": 1, - "window_days": 180 + "max_nesting": 5, + "ccn": 10, + "cognitive": 28 }, - "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "scan_directives nests 5 levels deep" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/scaffold.rs", - "function_name": "write_report_scaffold", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "block_tag", + "health_impact": 0.75, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/scaffold.rs::write_report_scaffold", - "crates/sc-compose/src/reporting/scaffold.rs::ensure_dir" - ] + "ccn": 10, + "cognitive": 12, + "nloc": 22 }, - "reason": "a filesystem call is reached once per loop iteration through write_report_scaffold -> ensure_dir (cross-function N+1)" + "reason": "block_tag has cyclomatic complexity 10" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/scaffold.rs", - "function_name": "write_report_scaffold", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "scan_directives", + "health_impact": 0.75, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-compose/src/reporting/scaffold.rs::write_report_scaffold", - "crates/sc-compose/src/reporting/scaffold.rs::write_if_missing" - ] + "ccn": 10, + "cognitive": 28, + "nloc": 47 }, - "reason": "a filesystem call is reached once per loop iteration through write_report_scaffold -> write_if_missing (cross-function N+1)" + "reason": "scan_directives has cyclomatic complexity 10" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/source_entry.rs", + "file_path": "crates/sc-composer/src/directive_inspection.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.3, "details": { - "duplication_pct": 14.08, - "clone_pair_count": 3, - "worst_clone_lines": 15, - "worst_clone_partner": "crates/sc-compose/src/reporting/render_many.rs", - "worst_clone_co_change": 2 + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "14% of file duplicated; worst clone shares 15 lines with crates/sc-compose/src/reporting/render_many.rs (co-changed 2x)" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/source_entry.rs", - "function_name": null, - "health_impact": 0.7, + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.938, "details": { - "prior_defect_count": 2, - "window_days": 180 + "max_nesting": 4, + "ccn": 9, + "cognitive": 16 }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "discover_tokens_with_delimiters nests 4 levels deep" }, { - "biomarker_type": "low_cohesion", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/spec.rs", - "function_name": "ReportSpec", - "health_impact": 0.35, + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.847, "details": { - "class_name": "ReportSpec", - "lcom4": 2, - "method_count": 6, - "field_count": 0 + "ccn": 9, + "cognitive": 16, + "nloc": 29 }, - "reason": "ReportSpec has low cohesion (LCOM4=2): its 6 methods split into 2 groups that share no fields or calls" + "reason": "discover_tokens_with_delimiters has cyclomatic complexity 9" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/spec.rs", - "function_name": null, - "health_impact": 0.35, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.827, "details": { - "duplication_pct": 29.11, - "clone_pair_count": 12, - "worst_clone_lines": 12, - "worst_clone_partner": "crates/sc-compose/src/reporting/init.rs", - "worst_clone_co_change": 2 + "modification_count": 4, + "repo_p80": 2, + "ccn": 9, + "max_nesting": 4 }, - "reason": "29% of file duplicated; worst clone shares 12 lines with crates/sc-compose/src/reporting/init.rs (co-changed 2x)" + "reason": "discover_tokens_with_delimiters has been modified across 4 commits (repo p80=2) and carries CCN=9 / nesting=4" }, { - "biomarker_type": "untested_hotspot", + "biomarker_type": "churn_risk", "severity": "high", - "file_path": "crates/sc-compose/src/reporting/spec.rs", + "file_path": "crates/sc-composer/src/discovery.rs", "function_name": null, - "health_impact": 1.56, + "health_impact": 0.856, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 4, + "relative_churn": 2.93, + "churn_percentile": 95.1, + "lines_added_90d": 422, + "lines_deleted_90d": 371, "commit_count_90d": 6, - "has_test_file": false + "nloc": 271 }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + "reason": "90-day churn rewrote 2.9x the file's size (793 lines over 271 NLOC, top 4.9% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": null, + "health_impact": 0.628, + "details": { + "change_entropy": 2.3346, + "change_entropy_pct": 82.2, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 18% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-compose/src/reporting/spec.rs", + "severity": "critical", + "file_path": "crates/sc-composer/src/discovery.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 1.189, "details": { "prior_defect_count": 4, "window_days": 180 @@ -3102,2780 +13152,2564 @@ repowise health — { "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "file_path": "crates/sc-composer/src/error.rs", "function_name": null, "health_impact": 0.35, "details": { - "duplication_pct": 17.68, - "clone_pair_count": 6, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-compose/src/reporting/catalog.rs", - "worst_clone_co_change": 4 + "duplication_pct": 30.97, + "clone_pair_count": 8, + "worst_clone_lines": 26, + "worst_clone_partner": "crates/sc-composer/src/error.rs", + "worst_clone_co_change": 0 }, - "reason": "18% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/catalog.rs (co-changed 4x)" + "reason": "31% of file duplicated; worst clone shares 26 lines with crates/sc-composer/src/error.rs" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "file_path": "crates/sc-composer/src/error.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 0.709, "details": { - "partner": "crates/sc-compose/src/reporting/publish_manifest.rs", - "correlation": 0.571, - "co_change_count": 4, - "self_commits": 12, - "partner_commits": 7 + "change_entropy": 2.4285, + "change_entropy_pct": 83.3, + "commit_count_90d": 3 }, - "reason": "crates/sc-compose/src/reporting/publish_manifest.rs co-changes with this file 4 times (57% of shared commits) but no static dependency exists" + "reason": "changes are scattered across noisy commits (top 17% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/error.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 1.449, "details": { - "partner": "crates/sc-compose/src/reporting/init.rs", - "correlation": 0.5, - "co_change_count": 6, - "self_commits": 12, - "partner_commits": 23 + "scatter": 24, + "commit_count_90d": 3 }, - "reason": "crates/sc-compose/src/reporting/init.rs co-changes with this file 6 times (50% of shared commits) but no static dependency exists" + "reason": "co-changes with 24 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/error.rs", "function_name": null, - "health_impact": 0.457, + "health_impact": 1.342, "details": { - "partner": "crates/sc-compose/src/main.rs", - "correlation": 0.5, - "co_change_count": 6, - "self_commits": 12, - "partner_commits": 55 + "prior_defect_count": 5, + "window_days": 180 }, - "reason": "crates/sc-compose/src/main.rs co-changes with this file 6 times (50% of shared commits) but no static dependency exists" + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "co_change_scatter", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", "function_name": null, - "health_impact": 0.823, + "health_impact": 0.35, "details": { - "scatter": 14, - "commit_count_90d": 12 + "duplication_pct": 21.43, + "clone_pair_count": 16, + "worst_clone_lines": 24, + "worst_clone_partner": "crates/sc-composer/src/init_workspace.rs", + "worst_clone_co_change": 4 }, - "reason": "co-changes with 14 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "21% of file duplicated; worst clone shares 24 lines with crates/sc-composer/src/init_workspace.rs (co-changed 4x)" }, { "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/src/reporting/templates.rs", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", "function_name": null, - "health_impact": 1.306, + "health_impact": 1.2, "details": { - "prior_defect_count": 11, + "prior_defect_count": 3, "window_days": 180 }, - "reason": "11 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/templates.rs", - "function_name": "resolve_template_family", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "frontmatter_init", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_1f6209f76dc8e2010f6e" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/src/reporting/templates.rs", - "function_name": "resolve_repo_template", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "temp_root", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_2926bb8db4173e0529e5" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "finalize_report", - "health_impact": 0.15, + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "param_count": 5 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_735c80e6245e13bd0f5d" }, - "reason": "finalize_report takes 5 parameters" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "dry_violation", "severity": "high", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/include.rs", "function_name": null, "health_impact": 0.6, "details": { - "duplication_pct": 64.94, - "clone_pair_count": 730, - "worst_clone_lines": 42, - "worst_clone_partner": "crates/sc-compose/tests/json_cli.rs", - "worst_clone_co_change": 27 + "duplication_pct": 70.91, + "clone_pair_count": 149, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-composer/src/resolver.rs", + "worst_clone_co_change": 8 + }, + "reason": "71% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/resolver.rs (co-changed 8x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 0.199, + "details": { + "relative_churn": 1.39, + "churn_percentile": 98.3, + "lines_added_90d": 961, + "lines_deleted_90d": 372, + "commit_count_90d": 13, + "nloc": 958 }, - "reason": "65% of file duplicated; worst clone shares 42 lines with crates/sc-compose/tests/json_cli.rs (co-changed 27x)" + "reason": "90-day churn rewrote 1.4x the file's size (1333 lines over 958 NLOC, top 1.7% among repository files eligible for churn ranking)" }, { "biomarker_type": "change_entropy", - "severity": "critical", - "file_path": "crates/sc-compose/tests/cli.rs", + "severity": "high", + "file_path": "crates/sc-composer/src/include.rs", "function_name": null, - "health_impact": 1.472, + "health_impact": 1.002, "details": { - "change_entropy": 19.0702, - "change_entropy_pct": 0.987, - "commit_count_90d": 52 + "change_entropy": 5.1873, + "change_entropy_pct": 94.2, + "commit_count_90d": 13 }, - "reason": "changes are scattered across noisy commits (top 1% change entropy); a strong history-based fault predictor" + "reason": "changes are scattered across noisy commits (top 5.8% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "co_change_scatter", "severity": "high", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/include.rs", "function_name": null, - "health_impact": 1.053, + "health_impact": 1.194, "details": { - "scatter": 45, - "commit_count_90d": 52 + "scatter": 25, + "commit_count_90d": 13 }, - "reason": "co-changes with 45 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/include.rs", "function_name": null, - "health_impact": 0.975, + "health_impact": 1.105, "details": { - "prior_defect_count": 50, + "prior_defect_count": 10, "window_days": 180 }, - "reason": "50 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "10 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "deep_include_chain_above_safe_ceiling_returns_include_depth_error", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 163, - 164 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include.rs::tests::deep_include_chain_above_safe_ceiling_returns_include_depth_error", + "crates/sc-composer/src/include.rs::tests::write_file" ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_126172ddde97425b3555" }, - "reason": "assertion block at lines 163-164 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a filesystem call is reached once per loop iteration through deep_include_chain_above_safe_ceiling_returns_include_depth_error -> write_file (cross-function N+1)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_linear_chain", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 3275, - 3276 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include.rs::tests::write_linear_chain", + "crates/sc-composer/src/include.rs::tests::write_file" ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_5882c11a7ecfc4dcd8bc" }, - "reason": "assertion block at lines 3275-3276 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a filesystem call is reached once per loop iteration through write_linear_chain -> write_file (cross-function N+1)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "new", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 249, - 253 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_72360cfac187ff781f0c" }, - "reason": "assertion block at lines 249-253 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 276, - 280 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_a106216d3c719bfbbb6d" }, - "reason": "assertion block at lines 276-280 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_linear_chain", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 333, - 335 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_90891e3aec792b40b9bc" }, - "reason": "assertion block at lines 333-335 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.847, "details": { - "assertion_lines": [ - 305, - 306 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "ccn": 13, + "cognitive": 19, + "nloc": 88 }, - "reason": "assertion block at lines 305-306 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "init_workspace has cyclomatic complexity 13" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.375, "details": { - "assertion_lines": [ - 512, - 513 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "nloc": 88, + "ccn": 13 }, - "reason": "assertion block at lines 512-513 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "init_workspace is 88 lines long" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/init_workspace.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 363, - 364 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 15.95, + "clone_pair_count": 27, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 5 }, - "reason": "assertion block at lines 363-364 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "16% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/composer.rs (co-changed 5x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 1.265, "details": { - "assertion_lines": [ - 388, - 389 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "modification_count": 4, + "repo_p80": 2, + "ccn": 13, + "max_nesting": 3 }, - "reason": "assertion block at lines 388-389 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "init_workspace has been modified across 4 commits (repo p80=2) and carries CCN=13 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/init_workspace.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.963, "details": { - "assertion_lines": [ - 486, - 487 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 25, + "commit_count_90d": 3 }, - "reason": "assertion block at lines 486-487 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.273, "details": { - "assertion_lines": [ - 539, - 542 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 539-542 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "scan_templates_recursive", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 759, - 763 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive", + "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive" ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_3f2b4a22414dfef50e78" }, - "reason": "assertion block at lines 759-763 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a filesystem call is reached once per loop iteration through scan_templates_recursive -> scan_templates_recursive (cross-function N+1)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 796, - 800 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_8597d29f5b652eee2000" }, - "reason": "assertion block at lines 796-800 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 967, - 971 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_3bef71ee91011ab2bf38" }, - "reason": "assertion block at lines 967-971 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 847, - 851 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_6f09d7a88ef6a7b4a6ab" }, - "reason": "assertion block at lines 847-851 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/lib.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 875, - 879 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 21.26, + "clone_pair_count": 14, + "worst_clone_lines": 8, + "worst_clone_partner": "bindings/python/src/types/results.rs", + "worst_clone_co_change": 5 }, - "reason": "assertion block at lines 875-879 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "21% of file duplicated; worst clone shares 8 lines with bindings/python/src/types/results.rs (co-changed 5x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/lib.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.062, "details": { - "assertion_lines": [ - 932, - 940 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "change_entropy": 10.7201, + "change_entropy_pct": 98.5, + "commit_count_90d": 16 }, - "reason": "assertion block at lines 932-940 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "changes are scattered across noisy commits (top 1.5% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/lib.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.266, "details": { - "assertion_lines": [ - 1064, - 1068 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 25, + "commit_count_90d": 16 }, - "reason": "assertion block at lines 1064-1068 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/lib.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.172, "details": { - "assertion_lines": [ - 1033, - 1037 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 12, + "window_days": 180 }, - "reason": "assertion block at lines 1033-1037 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/observer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 1092, - 1096 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 48.35, + "clone_pair_count": 6, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-composer/src/observer.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 1092-1096 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "48% of file duplicated; worst clone shares 22 lines with crates/sc-composer/src/observer.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/observer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.2, "details": { - "assertion_lines": [ - 1117, - 1121 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "assertion block at lines 1117-1121 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/path_utils.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 1135, - 1136 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 1135-1136 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/render_check.rs", + "function_name": "RenderCheckMeta", + "health_impact": 0.6, "details": { - "assertion_lines": [ - 1242, - 1243 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "class_name": "RenderCheckMeta", + "lcom4": 5, + "method_count": 6, + "field_count": 0 }, - "reason": "assertion block at lines 1242-1243 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "RenderCheckMeta has low cohesion (LCOM4=5): its 6 methods split into 5 groups that share no fields or calls" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/render_check.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 1149, - 1150 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 16.35, + "clone_pair_count": 3, + "worst_clone_lines": 30, + "worst_clone_partner": "crates/sc-composer/src/render_check.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 1149-1150 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "16% of file duplicated; worst clone shares 30 lines with crates/sc-composer/src/render_check.rs" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "churn_risk", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/render_check.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.84, "details": { - "assertion_lines": [ - 2839, - 2840 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "relative_churn": 1.6, + "churn_percentile": 94.8, + "lines_added_90d": 620, + "lines_deleted_90d": 66, + "commit_count_90d": 6, + "nloc": 428 }, - "reason": "assertion block at lines 2839-2840 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "90-day churn rewrote 1.6x the file's size (686 lines over 428 NLOC, top 5.2% among repository files eligible for churn ranking)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/render_check.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 1191, - 1192 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 1191-1192 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": "Renderer", + "health_impact": 0.6, "details": { - "assertion_lines": [ - 1216, - 1223 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "class_name": "Renderer", + "lcom4": 9, + "method_count": 10, + "field_count": 1 }, - "reason": "assertion block at lines 1216-1223 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "Renderer has low cohesion (LCOM4=9): its 10 methods split into 9 groups that share no fields or calls" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 1615, - 1616 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 16.38, + "clone_pair_count": 10, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/tests/cli/render.rs", + "worst_clone_co_change": 6 }, - "reason": "assertion block at lines 1615-1616 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "16% of file duplicated; worst clone shares 8 lines with crates/sc-compose/tests/cli/render.rs (co-changed 6x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": "auto_escape_callback", + "health_impact": 0.545, "details": { - "assertion_lines": [ - 1277, - 1280 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "modification_count": 5, + "repo_p80": 2, + "ccn": 7, + "max_nesting": 3 }, - "reason": "assertion block at lines 1277-1280 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "auto_escape_callback has been modified across 5 commits (repo p80=2) and carries CCN=7 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.141, "details": { - "assertion_lines": [ - 2762, - 2766 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "relative_churn": 1.23, + "churn_percentile": 98.8, + "lines_added_90d": 1168, + "lines_deleted_90d": 160, + "commit_count_90d": 24, + "nloc": 1079 }, - "reason": "assertion block at lines 2762-2766 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "90-day churn rewrote 1.2x the file's size (1328 lines over 1079 NLOC, top 1.2% among repository files eligible for churn ranking)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.183, "details": { - "assertion_lines": [ - 1453, - 1461 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "change_entropy": 10.4197, + "change_entropy_pct": 98.2, + "commit_count_90d": 24 }, - "reason": "assertion block at lines 1453-1461 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "changes are scattered across noisy commits (top 1.8% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.846, "details": { - "assertion_lines": [ - 1338, - 1341 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 25, + "commit_count_90d": 24 }, - "reason": "assertion block at lines 1338-1341 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.784, "details": { - "assertion_lines": [ - 1421, - 1427 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 20, + "window_days": 180 }, - "reason": "assertion block at lines 1421-1427 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { - "assertion_lines": [ - 1524, - 1526 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 1524-1526 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { - "assertion_lines": [ - 1568, - 1569 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 1568-1569 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { - "assertion_lines": [ - 1588, - 1589 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 1588-1589 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { - "assertion_lines": [ - 1836, - 1837 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 1836-1837 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { - "assertion_lines": [ - 2139, - 2140 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 2139-2140 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.938, "details": { - "assertion_lines": [ - 2280, - 2281 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "max_nesting": 4, + "ccn": 7, + "cognitive": 14 }, - "reason": "assertion block at lines 2280-2281 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "resolve_profile_impl nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "canonicalize_with_roots", + "health_impact": 0.375, "details": { - "assertion_lines": [ - 2869, - 2870 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "nloc": 60, + "ccn": 5 }, - "reason": "assertion block at lines 2869-2870 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "canonicalize_with_roots is 60 lines long" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.15, "details": { - "assertion_lines": [ - 2915, - 2916 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "param_count": 5 }, - "reason": "assertion block at lines 2915-2916 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "resolve_profile_impl takes 5 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 2933, - 2934 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 30.27, + "clone_pair_count": 111, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-composer/src/include.rs", + "worst_clone_co_change": 8 }, - "reason": "assertion block at lines 2933-2934 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "30% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/include.rs (co-changed 8x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "canonicalize_with_roots", + "health_impact": 0.609, "details": { - "assertion_lines": [ - 2954, - 2955 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "modification_count": 4, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 }, - "reason": "assertion block at lines 2954-2955 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "canonicalize_with_roots has been modified across 4 commits (repo p80=2) and carries CCN=5 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_with_observer", + "health_impact": 0.609, "details": { - "assertion_lines": [ - 1779, - 1780 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "modification_count": 5, + "repo_p80": 2, + "ccn": 4, + "max_nesting": 3 }, - "reason": "assertion block at lines 1779-1780 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "resolve_profile_with_observer has been modified across 5 commits (repo p80=2) and carries CCN=4 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/resolver.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.462, "details": { - "assertion_lines": [ - 1640, - 1644 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "change_entropy": 2.9056, + "change_entropy_pct": 86.9, + "commit_count_90d": 6 }, - "reason": "assertion block at lines 1640-1644 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "changes are scattered across noisy commits (top 13% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.945, "details": { - "assertion_lines": [ - 1660, - 1664 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 21, + "commit_count_90d": 6 }, - "reason": "assertion block at lines 1660-1664 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 21 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/resolver.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.875, "details": { - "assertion_lines": [ - 2805, - 2810 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "assertion block at lines 2805-2810 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 1695, - 1696 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_4d709c7f7153cec39c05" }, - "reason": "assertion block at lines 1695-1696 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_loop_with_io", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 1727, - 1728 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_03350ba930565d388c46" }, - "reason": "assertion block at lines 1727-1728 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a filesystem call runs inside a nested loop (O(n\u00b7m) round-trips); batch the inner query or restructure the loops" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 1938, - 1959 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_52450692765354f97a8c" }, - "reason": "assertion block at lines 1938-1959 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 1797, - 1799 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e20ddc3eea384fff34b4" }, - "reason": "assertion block at lines 1797-1799 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/template_ext.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 3179, - 3180 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 3179-3180 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/template_scanner.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1970, - 1971 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1970-1971 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "input_value_from_yaml", + "health_impact": 0.847, "details": { - "assertion_lines": [ - 2109, - 2111 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "ccn": 9, + "cognitive": 18, + "nloc": 44 }, - "reason": "assertion block at lines 2109-2111 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "input_value_from_yaml has cyclomatic complexity 9" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/types.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 2191, - 2195 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 21.36, + "clone_pair_count": 6, + "worst_clone_lines": 36, + "worst_clone_partner": "crates/sc-composer/src/types.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 2191-2195 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "21% of file duplicated; worst clone shares 36 lines with crates/sc-composer/src/types.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "input_value_from_yaml", + "health_impact": 0.662, "details": { - "assertion_lines": [ - 2411, - 2413 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "modification_count": 4, + "repo_p80": 2, + "ccn": 9, + "max_nesting": 3 }, - "reason": "assertion block at lines 2411-2413 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "input_value_from_yaml has been modified across 4 commits (repo p80=2) and carries CCN=9 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.861, "details": { - "assertion_lines": [ - 2686, - 2691 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "change_entropy": 4.1447, + "change_entropy_pct": 91.6, + "commit_count_90d": 5 }, - "reason": "assertion block at lines 2686-2691 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "changes are scattered across noisy commits (top 8.4% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.027, "details": { - "assertion_lines": [ - 2447, - 2448 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 25, + "commit_count_90d": 5 }, - "reason": "assertion block at lines 2447-2448 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/types.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.951, "details": { - "assertion_lines": [ - 2789, - 2796 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 7, + "window_days": 180 }, - "reason": "assertion block at lines 2789-2796 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "7 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "new", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 2888, - 2895 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_db578f40ec5604ae9ef7" }, - "reason": "assertion block at lines 2888-2895 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validate.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 2984, - 2988 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 51.27, + "clone_pair_count": 41, + "worst_clone_lines": 31, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 10 }, - "reason": "assertion block at lines 2984-2988 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "51% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/composer.rs (co-changed 10x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/validate.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.2, "details": { - "assertion_lines": [ - 3221, - 3222 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "assertion block at lines 3221-3222 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/verify.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 3248, - 3249 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 41.58, + "clone_pair_count": 139, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-compose/src/commands/template_init.rs", + "worst_clone_co_change": 3 }, - "reason": "assertion block at lines 3248-3249 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "42% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/commands/template_init.rs (co-changed 3x)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "co_change_scatter", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/verify.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.26, "details": { - "assertion_lines": [ - 3418, - 3423 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "scatter": 10, + "commit_count_90d": 4 }, - "reason": "assertion block at lines 3418-3423 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/verify.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 3357, - 3375 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 3357-3375 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 3485, - 3490 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_5475b85aa0f1aa8b383d" }, - "reason": "assertion block at lines 3485-3490 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": "write_file", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 3434, - 3442 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c7975890aaf0d79ea2d5" }, - "reason": "assertion block at lines 3434-3442 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/diagnostics/filesystem.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 3521, - 3545 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 28.16, + "clone_pair_count": 1, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-composer/src/diagnostics/filesystem.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 3521-3545 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "28% of file duplicated; worst clone shares 22 lines with crates/sc-composer/src/diagnostics/filesystem.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 3335, - 3342 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 35.86, + "clone_pair_count": 7, + "worst_clone_lines": 170, + "worst_clone_partner": "crates/sc-composer/src/lib.rs", + "worst_clone_co_change": 3 }, - "reason": "assertion block at lines 3335-3342 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "36% of file duplicated; worst clone shares 170 lines with crates/sc-composer/src/lib.rs (co-changed 3x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.36, "details": { - "assertion_lines": [ - 3636, - 3640 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "relative_churn": 1.3, + "churn_percentile": 85.0, + "lines_added_90d": 490, + "lines_deleted_90d": 6, + "commit_count_90d": 8, + "nloc": 381 }, - "reason": "assertion block at lines 3636-3640 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "90-day churn rewrote 1.3x the file's size (496 lines over 381 NLOC, top 15% among repository files eligible for churn ranking)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 2.16, "details": { - "assertion_lines": [ - 3683, - 3686 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "scatter": 22, + "commit_count_90d": 8 }, - "reason": "assertion block at lines 3683-3686 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "co-changes with 22 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 3081, - 3085 - ], - "partner_file": "crates/sc-composer/src/composer.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 3081-3085 is duplicated in crates/sc-composer/src/composer.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.056, + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "function_name": "mask_filter_names", + "health_impact": 0.75, "details": { - "kind": "unsafe_unwrap" + "ccn": 9, + "cognitive": 12, + "nloc": 25 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "mask_filter_names has cyclomatic complexity 9" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.056, + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "function_name": "collect_identifiers", + "health_impact": 0.75, "details": { - "kind": "unsafe_unwrap" + "ccn": 9, + "cognitive": 11, + "nloc": 27 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "collect_identifiers has cyclomatic complexity 9" }, { - "biomarker_type": "error_handling", + "biomarker_type": "dry_violation", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", "function_name": null, - "health_impact": 0.056, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 15.27, + "clone_pair_count": 1, + "worst_clone_lines": 20, + "worst_clone_partner": "prototype/multipass/discover.py", + "worst_clone_co_change": 0 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "15% of file duplicated; worst clone shares 20 lines with prototype/multipass/discover.py" }, { - "biomarker_type": "error_handling", + "biomarker_type": "dry_violation", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", + "file_path": "crates/sc-composer/src/discovery/scope.rs", "function_name": null, - "health_impact": 0.056, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 10.14, + "clone_pair_count": 1, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-composer-beads/src/execute.rs", + "worst_clone_co_change": 0 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "10% of file duplicated; worst clone shares 8 lines with crates/sc-composer-beads/src/execute.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.056, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/config.rs", + "function_name": "ConfigError", + "health_impact": 0.6, "details": { - "kind": "unsafe_unwrap" + "class_name": "ConfigError", + "lcom4": 6, + "method_count": 7, + "field_count": 1 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "ConfigError has low cohesion (LCOM4=6): its 7 methods split into 6 groups that share no fields or calls" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/config.rs", "function_name": null, - "health_impact": 0.056, + "health_impact": 0.35, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 100.0, + "clone_pair_count": 6, + "worst_clone_lines": 57, + "worst_clone_partner": "crates/sc-composer/src/error/include.rs", + "worst_clone_co_change": 0 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "100% of file duplicated; worst clone shares 57 lines with crates/sc-composer/src/error/include.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.056, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/include.rs", + "function_name": "IncludeError", + "health_impact": 0.6, "details": { - "kind": "unsafe_unwrap" + "class_name": "IncludeError", + "lcom4": 6, + "method_count": 6, + "field_count": 1 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "IncludeError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/include.rs", "function_name": null, - "health_impact": 0.056, + "health_impact": 0.35, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 100.0, + "clone_pair_count": 4, + "worst_clone_lines": 79, + "worst_clone_partner": "crates/sc-composer/src/error/resolve.rs", + "worst_clone_co_change": 0 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "100% of file duplicated; worst clone shares 79 lines with crates/sc-composer/src/error/resolve.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": null, - "health_impact": 0.056, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/resolve.rs", + "function_name": "ResolveError", + "health_impact": 0.6, "details": { - "kind": "unsafe_unwrap" + "class_name": "ResolveError", + "lcom4": 6, + "method_count": 6, + "field_count": 1 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "ResolveError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "copy_dir_all", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/error/resolve.rs", + "function_name": null, + "health_impact": 0.35, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "duplication_pct": 100.0, + "clone_pair_count": 4, + "worst_clone_lines": 79, + "worst_clone_partner": "crates/sc-composer/src/error/include.rs", + "worst_clone_co_change": 0 }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "100% of file duplicated; worst clone shares 79 lines with crates/sc-composer/src/error/include.rs" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "copy_dir_all", - "health_impact": 0.0, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/validation.rs", + "function_name": "ValidationError", + "health_impact": 0.6, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "class_name": "ValidationError", + "lcom4": 9, + "method_count": 10, + "field_count": 0 }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "ValidationError has low cohesion (LCOM4=9): its 10 methods split into 9 groups that share no fields or calls" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "copy_dir_all", - "health_impact": 0.0, + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/validation.rs", + "function_name": null, + "health_impact": 0.35, "details": { - "boundary_kind": "filesystem" + "duplication_pct": 56.3, + "clone_pair_count": 4, + "worst_clone_lines": 52, + "worst_clone_partner": "crates/sc-composer/src/error/config.rs", + "worst_clone_co_change": 0 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "56% of file duplicated; worst clone shares 52 lines with crates/sc-composer/src/error/config.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "render_report_summary", - "health_impact": 0.0, + "biomarker_type": "low_cohesion", + "severity": "critical", + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": "ExtractError", + "health_impact": 1.0, "details": { - "boundary_kind": "filesystem" + "class_name": "ExtractError", + "lcom4": 15, + "method_count": 16, + "field_count": 0 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "ExtractError has low cohesion (LCOM4=15): its 16 methods split into 15 groups that share no fields or calls" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "verify_treats_crlf_deployed_file_as_clean", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": "format_error_with_source", + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "param_count": 5 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "format_error_with_source takes 5 parameters" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_smoke_writes_latest_smoke_artifact_set", - "health_impact": 0.0, + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": null, + "health_impact": 0.35, "details": { - "boundary_kind": "filesystem" + "duplication_pct": 33.94, + "clone_pair_count": 2, + "worst_clone_lines": 33, + "worst_clone_partner": "crates/sc-composer/src/extract/error.rs", + "worst_clone_co_change": 0 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "34% of file duplicated; worst clone shares 33 lines with crates/sc-composer/src/extract/error.rs" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_smoke_archive_writes_timestamped_archive_copy", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/extract/input_limits.rs", + "function_name": null, + "health_impact": 0.3, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_publish_manifest_writes_machine_readable_handoff", - "health_impact": 0.0, + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.938, "details": { - "boundary_kind": "filesystem" + "max_nesting": 4, + "ccn": 15, + "cognitive": 37 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "match_json nests 4 levels deep" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_finalize_writes_shared_sidecar_for_generic_producer_outputs", - "health_impact": 0.0, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.879, "details": { - "boundary_kind": "filesystem" + "ccn": 15, + "cognitive": 37, + "nloc": 102 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "match_json has cyclomatic complexity 15" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_render_spec_writes_mermaid_latest_artifact_set", - "health_impact": 0.0, + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.53, "details": { - "boundary_kind": "filesystem" + "nloc": 102, + "ccn": 15 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "match_json is 102 lines long" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "reports_render_spec_participates_in_publish_manifest_pipeline", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.091, "details": { - "boundary_kind": "filesystem" + "param_count": 5 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "match_json takes 5 parameters" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "report_render_many_accepts_semantic_spec_inputs_for_diagram_family", - "health_impact": 0.0, + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": null, + "health_impact": 0.6, "details": { - "boundary_kind": "filesystem" + "duplication_pct": 60.36, + "clone_pair_count": 42, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer/src/extract/xml.rs", + "worst_clone_co_change": 4 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "60% of file duplicated; worst clone shares 11 lines with crates/sc-composer/src/extract/xml.rs (co-changed 4x)" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "phase_b_reference_fixtures_produce_publish_manifest_for_distinct_report_families", - "health_impact": 0.0, + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": null, + "health_impact": 0.7, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "report_evidence_summary_renders_large_variable_payload", - "health_impact": 0.0, + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.938, "details": { - "boundary_kind": "filesystem" + "max_nesting": 4, + "ccn": 11, + "cognitive": 26 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "validate_parse_depth nests 4 levels deep" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "report_render_many_renders_one_output_per_source_in_sorted_order", - "health_impact": 0.0, + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.847, "details": { - "boundary_kind": "filesystem" + "ccn": 11, + "cognitive": 26, + "nloc": 31 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "validate_parse_depth has cyclomatic complexity 11" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "report_render_many_supports_shared_diagram_template_selector", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": null, + "health_impact": 0.3, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/cli.rs", - "function_name": "report_render_many_uses_repo_local_template_family_override", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": "new", + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "param_count": 5 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "new takes 5 parameters" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.6, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": "new_with_ambiguity_code", + "health_impact": 0.15, "details": { - "duplication_pct": 75.79, - "clone_pair_count": 540, - "worst_clone_lines": 42, - "worst_clone_partner": "crates/sc-compose/tests/cli.rs", - "worst_clone_co_change": 27 + "param_count": 5 }, - "reason": "76% of file duplicated; worst clone shares 42 lines with crates/sc-compose/tests/cli.rs (co-changed 27x)" + "reason": "new_with_ambiguity_code takes 5 parameters" }, { - "biomarker_type": "change_entropy", - "severity": "critical", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/mod.rs", "function_name": null, - "health_impact": 1.472, + "health_impact": 0.35, "details": { - "change_entropy": 12.7037, - "change_entropy_pct": 0.973, - "commit_count_90d": 37 + "duplication_pct": 40.43, + "clone_pair_count": 7, + "worst_clone_lines": 99, + "worst_clone_partner": "crates/sc-composer/src/extract/mod.rs", + "worst_clone_co_change": 0 }, - "reason": "changes are scattered across noisy commits (top 3% change entropy); a strong history-based fault predictor" + "reason": "40% of file duplicated; worst clone shares 99 lines with crates/sc-composer/src/extract/mod.rs" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/mod.rs", "function_name": null, - "health_impact": 1.053, + "health_impact": 0.3, "details": { - "scatter": 39, - "commit_count_90d": 37 + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "co-changes with 39 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/raw.rs", "function_name": null, - "health_impact": 0.975, + "health_impact": 0.3, "details": { - "prior_defect_count": 36, + "prior_defect_count": 1, "window_days": 180 }, - "reason": "36 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 1.608, "details": { - "assertion_lines": [ - 403, - 407 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "max_nesting": 5, + "ccn": 13, + "cognitive": 33 }, - "reason": "assertion block at lines 403-407 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "match_raw_text nests 5 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 0.495, "details": { - "assertion_lines": [ - 961, - 966 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "ccn": 13, + "cognitive": 33, + "nloc": 95 }, - "reason": "assertion block at lines 961-966 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "match_raw_text has cyclomatic complexity 13" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "parse_raw_text_segments", + "health_impact": 0.495, "details": { - "assertion_lines": [ - 1019, - 1029 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "ccn": 9, + "cognitive": 12, + "nloc": 58 }, - "reason": "assertion block at lines 1019-1029 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "parse_raw_text_segments has cyclomatic complexity 9" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "large_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 0.511, "details": { - "assertion_lines": [ - 557, - 558 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "nloc": 95, + "ccn": 13 }, - "reason": "assertion block at lines 557-558 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "match_raw_text is 95 lines long" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 643, - 644 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "duplication_pct": 10.88, + "clone_pair_count": 6, + "worst_clone_lines": 23, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 3 }, - "reason": "assertion block at lines 643-644 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "11% of file duplicated; worst clone shares 23 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 3x)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.2, "details": { - "assertion_lines": [ - 647, - 652 - ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "prior_defect_count": 3, + "window_days": 180 }, - "reason": "assertion block at lines 647-652 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { "assertion_lines": [ - 1764, - 1771 + 91, + 114 ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "assertion block at lines 1764-1771 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "assertion block at lines 91-114 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { "assertion_lines": [ - 1819, - 1826 + 312, + 320 ], - "partner_file": "crates/sc-compose/tests/cli.rs" + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "assertion block at lines 1819-1826 is duplicated in crates/sc-compose/tests/cli.rs" + "reason": "assertion block at lines 312-320 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { "assertion_lines": [ - 57, - 58 + 331, + 332 ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "assertion block at lines 57-58 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "assertion block at lines 331-332 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { "assertion_lines": [ - 1194, - 1198 + 361, + 362 ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "assertion block at lines 1194-1198 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "assertion block at lines 361-362 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.1, "details": { "assertion_lines": [ - 1250, - 1251 + 384, + 396 ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "assertion block at lines 1250-1251 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "assertion block at lines 384-396 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/tests.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 1315, - 1316 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 1315-1316 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.938, "details": { - "assertion_lines": [ - 1361, - 1362 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 4, + "ccn": 18, + "cognitive": 41 }, - "reason": "assertion block at lines 1361-1362 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "validate_parse_depth nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.938, "details": { - "assertion_lines": [ - 1424, - 1425 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 4, + "ccn": 12, + "cognitive": 29 }, - "reason": "assertion block at lines 1424-1425 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_toml nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.815, "details": { - "assertion_lines": [ - 1479, - 1480 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 18, + "cognitive": 41, + "nloc": 57 }, - "reason": "assertion block at lines 1479-1480 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "validate_parse_depth has cyclomatic complexity 18" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.475, "details": { - "assertion_lines": [ - 1514, - 1515 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 12, + "cognitive": 29, + "nloc": 65 }, - "reason": "assertion block at lines 1514-1515 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_toml has cyclomatic complexity 12" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.21, "details": { - "assertion_lines": [ - 1574, - 1575 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 65, + "ccn": 12 }, - "reason": "assertion block at lines 1574-1575 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_toml is 65 lines long" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/toml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 1610, - 1611 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 49.9, + "clone_pair_count": 35, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 3 }, - "reason": "assertion block at lines 1610-1611 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "50% of file duplicated; worst clone shares 9 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 3x)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/toml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 1714, - 1715 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 1714-1715 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": "extract_xml", + "health_impact": 0.375, "details": { - "assertion_lines": [ - 1718, - 1733 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 82, + "ccn": 6 }, - "reason": "assertion block at lines 1718-1733 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "extract_xml is 82 lines long" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/xml.rs", "function_name": null, - "health_impact": 0.007, - "details": { - "assertion_lines": [ - 85, - 89 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "health_impact": 0.35, + "details": { + "duplication_pct": 9.62, + "clone_pair_count": 10, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer/src/extract/json.rs", + "worst_clone_co_change": 4 }, - "reason": "assertion block at lines 85-89 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "10% of file duplicated; worst clone shares 11 lines with crates/sc-composer/src/extract/json.rs (co-changed 4x)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/xml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.709, "details": { - "assertion_lines": [ - 92, - 97 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "change_entropy": 2.6, + "change_entropy_pct": 84.0, + "commit_count_90d": 3 }, - "reason": "assertion block at lines 92-97 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "changes are scattered across noisy commits (top 16% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.449, "details": { - "assertion_lines": [ - 121, - 125 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "scatter": 25, + "commit_count_90d": 3 }, - "reason": "assertion block at lines 121-125 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/extract/xml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.342, "details": { - "assertion_lines": [ - 130, - 134 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "assertion block at lines 130-134 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "path_exists", + "health_impact": 1.25, "details": { - "assertion_lines": [ - 167, - 171 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 5, + "ccn": 8, + "cognitive": 25 }, - "reason": "assertion block at lines 167-171 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "path_exists nests 5 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "collect_template_occurrences", + "health_impact": 1.25, "details": { - "assertion_lines": [ - 213, - 217 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 5, + "ccn": 9, + "cognitive": 24 }, - "reason": "assertion block at lines 213-217 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "collect_template_occurrences nests 5 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "collect_template_occurrences", + "health_impact": 0.847, "details": { - "assertion_lines": [ - 371, - 375 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 9, + "cognitive": 24, + "nloc": 45 }, - "reason": "assertion block at lines 371-375 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "collect_template_occurrences has cyclomatic complexity 9" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 480, - 484 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 8.0, + "clone_pair_count": 1, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_match.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 480-484 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "8% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/xml_match.rs" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.938, "details": { - "assertion_lines": [ - 585, - 589 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 4, + "ccn": 10, + "cognitive": 15 }, - "reason": "assertion block at lines 585-589 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_children nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.504, "details": { - "assertion_lines": [ - 715, - 719 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 10, + "cognitive": 15, + "nloc": 63 }, - "reason": "assertion block at lines 715-719 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_children has cyclomatic complexity 10" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.223, "details": { - "assertion_lines": [ - 750, - 754 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 63, + "ccn": 10 }, - "reason": "assertion block at lines 750-754 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_children is 63 lines long" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_value", + "health_impact": 0.089, "details": { - "assertion_lines": [ - 787, - 791 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 6 }, - "reason": "assertion block at lines 787-791 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_value takes 6 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_full_content", + "health_impact": 0.089, "details": { - "assertion_lines": [ - 247, - 251 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 6 }, - "reason": "assertion block at lines 247-251 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_full_content takes 6 parameters" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "primitive_obsession", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_child_sequence", + "health_impact": 0.208, "details": { - "assertion_lines": [ - 340, - 344 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 7 }, - "reason": "assertion block at lines 340-344 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_child_sequence takes 7 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.089, "details": { - "assertion_lines": [ - 431, - 435 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 6 }, - "reason": "assertion block at lines 431-435 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_children takes 6 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_attributes", + "health_impact": 0.089, "details": { - "assertion_lines": [ - 277, - 278 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 5 }, - "reason": "assertion block at lines 277-278 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_attributes takes 5 parameters" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "primitive_obsession", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_element", + "health_impact": 0.208, "details": { - "assertion_lines": [ - 281, - 282 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 7 }, - "reason": "assertion block at lines 281-282 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_element takes 7 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 312, - 313 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 14.55, + "clone_pair_count": 3, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_evidence.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 312-313 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "15% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/xml_evidence.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 347, - 353 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 347-353 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.15, "details": { - "assertion_lines": [ - 847, - 851 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "kind": "unsafe_unwrap" }, - "reason": "assertion block at lines 847-851 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.938, "details": { - "assertion_lines": [ - 378, - 382 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 4, + "ccn": 13, + "cognitive": 35 }, - "reason": "assertion block at lines 378-382 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "parse_xml nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.738, "details": { - "assertion_lines": [ - 457, - 458 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 13, + "cognitive": 35, + "nloc": 93 }, - "reason": "assertion block at lines 457-458 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "parse_xml has cyclomatic complexity 13" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "large_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.762, "details": { - "assertion_lines": [ - 871, - 875 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 93, + "ccn": 13 }, - "reason": "assertion block at lines 871-875 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "parse_xml is 93 lines long" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.56, "details": { - "assertion_lines": [ - 1216, - 1220 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 4, + "commit_count_90d": 4, + "has_test_file": false, + "reached_by_tests": false }, - "reason": "assertion block at lines 1216-1220 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "co_change_scatter", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.26, "details": { - "assertion_lines": [ - 539, - 540 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "scatter": 8, + "commit_count_90d": 4 }, - "reason": "assertion block at lines 539-540 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 561, - 570 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 561-570 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": "normalize_rendered", + "health_impact": 0.847, "details": { - "assertion_lines": [ - 981, - 982 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 12, + "cognitive": 18, + "nloc": 69 }, - "reason": "assertion block at lines 981-982 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "normalize_rendered has cyclomatic complexity 12" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": "normalize_rendered", + "health_impact": 0.375, "details": { - "assertion_lines": [ - 985, - 995 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 69, + "ccn": 12 }, - "reason": "assertion block at lines 985-995 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "normalize_rendered is 69 lines long" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "co_change_scatter", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.26, "details": { - "assertion_lines": [ - 1015, - 1016 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "scatter": 8, + "commit_count_90d": 3 }, - "reason": "assertion block at lines 1015-1016 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1049, - 1050 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1049-1050 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 1053, - 1066 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 41.38, + "clone_pair_count": 2, + "worst_clone_lines": 12, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_reject.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 1053-1066 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "41% of file duplicated; worst clone shares 12 lines with crates/sc-composer/src/extract/xml_reject.rs" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1083, - 1084 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1083-1084 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_serialize.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1106, - 1107 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1106-1107 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "contains_yaml_features", + "health_impact": 1.579, "details": { - "assertion_lines": [ - 1110, - 1119 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 6, + "ccn": 21, + "cognitive": 74 }, - "reason": "assertion block at lines 1110-1119 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "contains_yaml_features nests 6 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "nested_complexity", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.921, "details": { - "assertion_lines": [ - 1254, - 1259 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 4, + "ccn": 16, + "cognitive": 39 }, - "reason": "assertion block at lines 1254-1259 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_yaml nests 4 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "contains_yaml_features", + "health_impact": 0.576, "details": { - "assertion_lines": [ - 1319, - 1332 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 21, + "cognitive": 74, + "nloc": 54 }, - "reason": "assertion block at lines 1319-1332 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "contains_yaml_features has cyclomatic complexity 21" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.576, "details": { - "assertion_lines": [ - 1365, - 1375 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 16, + "cognitive": 39, + "nloc": 103 }, - "reason": "assertion block at lines 1365-1375 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_yaml has cyclomatic complexity 16" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "large_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.347, "details": { - "assertion_lines": [ - 1428, - 1430 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 103, + "ccn": 16 }, - "reason": "assertion block at lines 1428-1430 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "match_yaml is 103 lines long" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.6, "details": { - "assertion_lines": [ - 1483, - 1484 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 48.81, + "clone_pair_count": 34, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 5 }, - "reason": "assertion block at lines 1483-1484 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "49% of file duplicated; worst clone shares 9 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 5x)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/extract/yaml.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 1578, - 1590 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 1578-1590 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 1.608, "details": { - "assertion_lines": [ - 1614, - 1626 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "max_nesting": 5, + "ccn": 20, + "cognitive": 51 }, - "reason": "assertion block at lines 1614-1626 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "validate_parse_depth nests 5 levels deep" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 1.452, "details": { - "assertion_lines": [ - 592, - 596 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 20, + "cognitive": 51, + "nloc": 54 }, - "reason": "assertion block at lines 592-596 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "validate_parse_depth has cyclomatic complexity 20" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 630, - 631 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 630-631 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.35, "details": { - "assertion_lines": [ - 678, - 682 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "duplication_pct": 30.69, + "clone_pair_count": 3, + "worst_clone_lines": 18, + "worst_clone_partner": "crates/sc-composer/tests/integration.rs", + "worst_clone_co_change": 0 }, - "reason": "assertion block at lines 678-682 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "31% of file duplicated; worst clone shares 18 lines with crates/sc-composer/tests/integration.rs" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.7, "details": { - "assertion_lines": [ - 686, - 688 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "assertion block at lines 686-688 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "function_name": "ParsedTemplate", + "health_impact": 0.6, "details": { - "assertion_lines": [ - 1287, - 1291 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "class_name": "ParsedTemplate", + "lcom4": 4, + "method_count": 5, + "field_count": 0 }, - "reason": "assertion block at lines 1287-1291 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "ParsedTemplate has low cohesion (LCOM4=4): its 5 methods split into 4 groups that share no fields or calls" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "function_name": "Frontmatter", + "health_impact": 0.6, "details": { - "assertion_lines": [ - 936, - 940 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "class_name": "Frontmatter", + "lcom4": 8, + "method_count": 8, + "field_count": 0 }, - "reason": "assertion block at lines 936-940 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "Frontmatter has low cohesion (LCOM4=8): its 8 methods split into 8 groups that share no fields or calls" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "function_name": "normalize_frontmatter", + "health_impact": 0.738, "details": { - "assertion_lines": [ - 820, - 824 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "ccn": 10, + "cognitive": 10, + "nloc": 93 }, - "reason": "assertion block at lines 820-824 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "normalize_frontmatter has cyclomatic complexity 10" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "large_method", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "function_name": "normalize_frontmatter", + "health_impact": 0.762, "details": { - "assertion_lines": [ - 905, - 909 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "nloc": 93, + "ccn": 10 }, - "reason": "assertion block at lines 905-909 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "normalize_frontmatter is 93 lines long" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "function_hotspot", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "function_name": "split_frontmatter", + "health_impact": 0.735, "details": { - "assertion_lines": [ - 956, - 957 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "modification_count": 3, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 }, - "reason": "assertion block at lines 956-957 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "split_frontmatter has been modified across 3 commits (repo p80=2) and carries CCN=8 / nesting=3" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.956, "details": { - "assertion_lines": [ - 1148, - 1149 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "change_entropy": 2.6335, + "change_entropy_pct": 85.1, + "commit_count_90d": 7 }, - "reason": "assertion block at lines 1148-1149 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "changes are scattered across noisy commits (top 15% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 1.809, "details": { - "assertion_lines": [ - 1170, - 1171 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 5, + "window_days": 180 }, - "reason": "assertion block at lines 1170-1171 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/include/directive.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1670, - 1671 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1670-1671 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "read_and_hash_source", + "health_impact": 0.15, "details": { - "assertion_lines": [ - 1760, - 1761 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 6 }, - "reason": "assertion block at lines 1760-1761 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "read_and_hash_source takes 6 parameters" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "primitive_obsession", "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": null, - "health_impact": 0.007, + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "expand_file", + "health_impact": 0.35, "details": { - "assertion_lines": [ - 1674, - 1686 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "param_count": 7 }, - "reason": "assertion block at lines 1674-1686 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "expand_file takes 7 parameters" }, { - "biomarker_type": "duplicated_assertion_block", - "severity": "medium", - "file_path": "crates/sc-compose/tests/json_cli.rs", + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", "function_name": null, - "health_impact": 0.007, + "health_impact": 0.3, "details": { - "assertion_lines": [ - 1815, - 1816 - ], - "partner_file": "crates/sc-compose/tests/json_cli.rs" + "prior_defect_count": 1, + "window_days": 180 }, - "reason": "assertion block at lines 1815-1816 is duplicated in crates/sc-compose/tests/json_cli.rs" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": "init_failure_json_uses_diagnostic_envelope", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": "render_write_failure_json_reports_render_write_code", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": "report_render_many_json_supports_shared_template_family", + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "expand_body", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include/expansion.rs::ExpansionContext::expand_body", + "crates/sc-composer/src/include/expansion.rs::ExpansionContext::expand_candidate", + "crates/sc-composer/src/include/expansion.rs::expand_file", + "crates/sc-composer/src/include/expansion.rs::read_and_hash_source" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_c2b04290476e0f6e69f7" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "a filesystem call is reached once per loop iteration through expand_body -> expand_candidate -> expand_file -> read_and_hash_source (cross-function N+1)" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/json_cli.rs", - "function_name": "report_render_many_json_supports_template_family_overrides", - "health_impact": 0.0, + "file_path": "crates/sc-composer/src/include/path.rs", + "function_name": "resolve_include_path", + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "param_count": 5 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "resolve_include_path takes 5 parameters" }, { "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "file_path": "crates/sc-composer/src/include/path.rs", "function_name": null, "health_impact": 0.3, "details": { @@ -5885,806 +15719,803 @@ repowise health — "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "error_handling", + "biomarker_type": "large_method", "severity": "low", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "function_name": null, - "health_impact": 0.125, + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "json_mode_diagnostics", + "health_impact": 0.375, "details": { - "kind": "unsafe_unwrap" + "nloc": 69, + "ccn": 8 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "json_mode_diagnostics is 69 lines long" }, { - "biomarker_type": "error_handling", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "function_name": null, - "health_impact": 0.125, + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "push_extra_input_diagnostics", + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "param_count": 5 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "push_extra_input_diagnostics takes 5 parameters" }, { - "biomarker_type": "error_handling", + "biomarker_type": "primitive_obsession", "severity": "low", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "function_name": null, - "health_impact": 0.125, + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "push_unbound_variable_diagnostics", + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "param_count": 5 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "push_unbound_variable_diagnostics takes 5 parameters" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 0.125, + "health_impact": 0.6, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 29.22, + "clone_pair_count": 34, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 6 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "29% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/composer.rs (co-changed 6x)" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "function_name": "repo_keeps_standalone_boundary_rules", - "health_impact": 0.0, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "quoted_json_placeholder_expressions", + "health_impact": 0.556, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "modification_count": 5, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "quoted_json_placeholder_expressions has been modified across 5 commits (repo p80=2) and carries CCN=5 / nesting=3" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "function_name": "repo_keeps_standalone_boundary_rules", - "health_impact": 0.0, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "json_mode_diagnostics", + "health_impact": 0.556, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "modification_count": 4, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "json_mode_diagnostics has been modified across 4 commits (repo p80=2) and carries CCN=8 / nesting=3" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.724, "details": { - "duplication_pct": 11.11, - "clone_pair_count": 19, - "worst_clone_lines": 9, - "worst_clone_partner": "crates/sc-compose/src/commands/template_init.rs", - "worst_clone_co_change": 0 + "change_entropy": 4.9744, + "change_entropy_pct": 93.5, + "commit_count_90d": 14 + }, + "reason": "changes are scattered across noisy commits (top 6.5% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.863, + "details": { + "scatter": 25, + "commit_count_90d": 14 }, - "reason": "11% of file duplicated; worst clone shares 9 lines with crates/sc-compose/src/commands/template_init.rs" + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 2.0, + "health_impact": 0.799, "details": { - "prior_defect_count": 6, + "prior_defect_count": 8, "window_days": 180 }, - "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 0.062, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "kind": "panic_macro" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 0.062, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "kind": "panic_macro" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "function_name": null, - "health_impact": 0.062, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "kind": "panic_macro" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", - "function_name": null, - "health_impact": 0.062, + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "fuzz_001_validation_matches_checked_format_detection_for_json_path_variants", + "health_impact": 0.0, "details": { - "kind": "unsafe_unwrap" + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/diagnostics.rs::tests::fuzz_001_validation_matches_checked_format_detection_for_json_path_variants", + "crates/sc-composer/src/validation/diagnostics.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_466e74fdbae4adacc883" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "a filesystem call is reached once per loop iteration through fuzz_001_validation_matches_checked_format_detection_for_json_path_variants -> write_file (cross-function N+1)" }, { - "biomarker_type": "error_handling", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", - "function_name": null, - "health_impact": 0.062, + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "kind": "unsafe_unwrap" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fce4bd0166ec727ab195" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "error_handling", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fd96e7bf424931900fdb" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/mod.rs", "function_name": null, - "health_impact": 0.062, + "health_impact": 0.6, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 37.48, + "clone_pair_count": 43, + "worst_clone_lines": 37, + "worst_clone_partner": "crates/sc-composer/src/validation/diagnostics.rs", + "worst_clone_co_change": 3 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "37% of file duplicated; worst clone shares 37 lines with crates/sc-composer/src/validation/diagnostics.rs (co-changed 3x)" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/mod.rs", "function_name": null, - "health_impact": 0.062, + "health_impact": 0.7, "details": { - "kind": "unsafe_unwrap" + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "error_handling", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", - "function_name": null, - "health_impact": 0.062, + "file_path": "crates/sc-composer/src/validation/mod.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "kind": "unsafe_unwrap" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_84b46e65b28b9ffc9e38" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-compose/tests/support/mod.rs", + "file_path": "crates/sc-composer/src/validation/mod.rs", "function_name": "write_file", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e5d01ba2230c57885e86" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/composer.rs", - "function_name": "CapturingObserver", - "health_impact": 0.6, + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "validate_required_value", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 6, + "cognitive": 14 + }, + "reason": "validate_required_value nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_variable_location", + "health_impact": 0.847, "details": { - "class_name": "CapturingObserver", - "lcom4": 5, - "method_count": 5, - "field_count": 5 + "ccn": 11, + "cognitive": 16, + "nloc": 36 }, - "reason": "CapturingObserver has low cohesion (LCOM4=5): its 5 methods split into 5 groups that share no fields or calls" + "reason": "required_variable_location has cyclomatic complexity 11" }, { "biomarker_type": "large_method", "severity": "low", - "file_path": "crates/sc-composer/src/composer.rs", - "function_name": "compose_with_observer", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_path_diagnostics", "health_impact": 0.375, "details": { - "nloc": 89, - "ccn": 4 + "nloc": 71, + "ccn": 8 + }, + "reason": "required_path_diagnostics is 71 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_path_diagnostic", + "health_impact": 0.15, + "details": { + "param_count": 6 }, - "reason": "compose_with_observer is 89 lines long" + "reason": "required_path_diagnostic takes 6 parameters" }, { "biomarker_type": "dry_violation", "severity": "high", - "file_path": "crates/sc-composer/src/composer.rs", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", "function_name": null, "health_impact": 0.6, "details": { - "duplication_pct": 49.18, - "clone_pair_count": 103, + "duplication_pct": 43.67, + "clone_pair_count": 49, "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-composer/src/validation.rs", - "worst_clone_co_change": 6 + "worst_clone_partner": "crates/sc-composer/src/validation/diagnostics.rs", + "worst_clone_co_change": 4 }, - "reason": "49% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/validation.rs (co-changed 6x)" + "reason": "44% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/validation/diagnostics.rs (co-changed 4x)" }, { - "biomarker_type": "hidden_coupling", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-composer/src/composer.rs", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", "function_name": null, - "health_impact": 0.414, + "health_impact": 0.7, "details": { - "partner": "crates/sc-composer/src/validate.rs", - "correlation": 0.556, - "co_change_count": 5, - "self_commits": 19, - "partner_commits": 9 + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "crates/sc-composer/src/validate.rs co-changes with this file 5 times (56% of shared commits) but no static dependency exists" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "change_entropy", - "severity": "medium", - "file_path": "crates/sc-composer/src/composer.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", "function_name": null, - "health_impact": 0.625, + "health_impact": 0.15, "details": { - "change_entropy": 5.1444, - "change_entropy_pct": 0.88, - "commit_count_90d": 10 + "kind": "unsafe_unwrap" }, - "reason": "changes are scattered across noisy commits (top 12% change entropy); a strong history-based fault predictor" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/composer.rs", - "function_name": null, - "health_impact": 1.278, + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "non_bare_for_iterables_do_not_trigger_array_shape_check", + "health_impact": 0.0, "details": { - "scatter": 22, - "commit_count_90d": 10 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/required_paths.rs::tests::non_bare_for_iterables_do_not_trigger_array_shape_check", + "crates/sc-composer/src/validation/required_paths.rs::tests::temp_root" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_477aebf609385525a85f" }, - "reason": "co-changes with 22 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "a filesystem call is reached once per loop iteration through non_bare_for_iterables_do_not_trigger_array_shape_check -> temp_root (cross-function N+1)" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-composer/src/composer.rs", - "function_name": null, - "health_impact": 1.183, + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "non_bare_for_iterables_do_not_trigger_array_shape_check", + "health_impact": 0.0, "details": { - "prior_defect_count": 8, - "window_days": 180 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/required_paths.rs::tests::non_bare_for_iterables_do_not_trigger_array_shape_check", + "crates/sc-composer/src/validation/required_paths.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_2d0e0599a281e4a729bc" }, - "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "a filesystem call is reached once per loop iteration through non_bare_for_iterables_do_not_trigger_array_shape_check -> write_file (cross-function N+1)" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/composer.rs", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", "function_name": "temp_root", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_bb572775f4d719cca08f" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/composer.rs", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", "function_name": "write_file", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_9d4b0aa084e7a3d4be1e" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-composer/src/diagnostics.rs", - "function_name": null, - "health_impact": 0.6, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": "populate_pass_validation_maps", + "health_impact": 0.375, "details": { - "duplication_pct": 29.76, - "clone_pair_count": 3, - "worst_clone_lines": 61, - "worst_clone_partner": "crates/sc-composer/src/lib.rs", - "worst_clone_co_change": 5 + "nloc": 62, + "ccn": 4 }, - "reason": "30% of file duplicated; worst clone shares 61 lines with crates/sc-composer/src/lib.rs (co-changed 5x)" + "reason": "populate_pass_validation_maps is 62 lines long" }, { - "biomarker_type": "untested_hotspot", - "severity": "critical", - "file_path": "crates/sc-composer/src/diagnostics.rs", - "function_name": null, - "health_impact": 2.0, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": "merge_frontmatter", + "health_impact": 0.15, "details": { - "line_coverage_pct": null, - "branch_coverage_pct": null, - "dependents_count": 15, - "commit_count_90d": 3, - "has_test_file": false + "param_count": 5 }, - "reason": "Hotspot with no paired test file and no coverage data \u2014 15 dependents" + "reason": "merge_frontmatter takes 5 parameters" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/diagnostics.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", "function_name": null, - "health_impact": 2.16, + "health_impact": 0.15, "details": { - "scatter": 18, - "commit_count_90d": 3 + "duplication_pct": 12.32, + "clone_pair_count": 4, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-compose/src/commands/compose_render.rs", + "worst_clone_co_change": 0 }, - "reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "12% of file duplicated; worst clone shares 15 lines with crates/sc-compose/src/commands/compose_render.rs" }, { "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-composer/src/diagnostics.rs", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 0.3, "details": { - "prior_defect_count": 3, + "prior_defect_count": 1, "window_days": 180 }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" - }, - { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/error.rs", - "function_name": "ConfigError", - "health_impact": 0.6, - "details": { - "class_name": "ConfigError", - "lcom4": 6, - "method_count": 7, - "field_count": 1 - }, - "reason": "ConfigError has low cohesion (LCOM4=6): its 7 methods split into 6 groups that share no fields or calls" - }, - { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/error.rs", - "function_name": "ValidationError", - "health_impact": 0.6, - "details": { - "class_name": "ValidationError", - "lcom4": 9, - "method_count": 10, - "field_count": 0 - }, - "reason": "ValidationError has low cohesion (LCOM4=9): its 10 methods split into 9 groups that share no fields or calls" - }, - { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/error.rs", - "function_name": "IncludeError", - "health_impact": 0.6, - "details": { - "class_name": "IncludeError", - "lcom4": 6, - "method_count": 6, - "field_count": 1 - }, - "reason": "IncludeError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/error.rs", - "function_name": "ResolveError", - "health_impact": 0.6, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": "cross_format_corpus_preserves_equivalent_contracts", + "health_impact": 0.375, "details": { - "class_name": "ResolveError", - "lcom4": 6, - "method_count": 6, - "field_count": 1 + "nloc": 65, + "ccn": 7 }, - "reason": "ResolveError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" + "reason": "cross_format_corpus_preserves_equivalent_contracts is 65 lines long" }, { "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-composer/src/error.rs", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, "health_impact": 0.35, "details": { - "duplication_pct": 56.41, - "clone_pair_count": 11, - "worst_clone_lines": 67, - "worst_clone_partner": "crates/sc-composer/src/error.rs", - "worst_clone_co_change": 0 + "duplication_pct": 15.4, + "clone_pair_count": 15, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/src/extract/yaml.rs", + "worst_clone_co_change": 5 }, - "reason": "56% of file duplicated; worst clone shares 67 lines with crates/sc-composer/src/error.rs" + "reason": "15% of file duplicated; worst clone shares 9 lines with crates/sc-composer/src/extract/yaml.rs (co-changed 5x)" }, { "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-composer/src/error.rs", + "severity": "critical", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 2.0, "details": { - "prior_defect_count": 4, + "prior_defect_count": 6, "window_days": 180 }, - "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" - }, - { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/frontmatter.rs", - "function_name": "ParsedTemplate", - "health_impact": 0.6, - "details": { - "class_name": "ParsedTemplate", - "lcom4": 4, - "method_count": 5, - "field_count": 0 - }, - "reason": "ParsedTemplate has low cohesion (LCOM4=4): its 5 methods split into 4 groups that share no fields or calls" - }, - { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/frontmatter.rs", - "function_name": "Frontmatter", - "health_impact": 0.6, - "details": { - "class_name": "Frontmatter", - "lcom4": 7, - "method_count": 7, - "field_count": 0 - }, - "reason": "Frontmatter has low cohesion (LCOM4=7): its 7 methods split into 7 groups that share no fields or calls" - }, - { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter.rs", - "function_name": "normalize_frontmatter", - "health_impact": 0.375, - "details": { - "nloc": 80, - "ccn": 8 - }, - "reason": "normalize_frontmatter is 80 lines long" + "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.062, "details": { - "duplication_pct": 9.7, - "clone_pair_count": 2, - "worst_clone_lines": 21, - "worst_clone_partner": "crates/sc-composer/tests/integration.rs", - "worst_clone_co_change": 0 + "assertion_lines": [ + 57, + 66 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" }, - "reason": "10% of file duplicated; worst clone shares 21 lines with crates/sc-composer/tests/integration.rs" + "reason": "assertion block at lines 57-66 is duplicated in crates/sc-composer/src/extract/tests.rs" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-composer/src/frontmatter.rs", - "function_name": "split_frontmatter", - "health_impact": 0.533, - "details": { - "modification_count": 3, - "repo_p80": 2, - "ccn": 5, - "max_nesting": 3 - }, - "reason": "split_frontmatter has been modified across 3 commits (repo p80=2) and carries CCN=5 / nesting=3" - }, - { - "biomarker_type": "churn_risk", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter.rs", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 0.236, + "health_impact": 0.062, "details": { - "relative_churn": 1.14, - "churn_percentile": 0.846, - "lines_added_90d": 336, - "lines_deleted_90d": 89, - "commit_count_90d": 6, - "nloc": 372 + "assertion_lines": [ + 134, + 135 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" }, - "reason": "90-day churn rewrote 1.1x the file's size (425 lines over 372 NLOC, top 15% of repo churn)" + "reason": "assertion block at lines 134-135 is duplicated in crates/sc-composer/src/extract/tests.rs" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/frontmatter.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 1.418, + "health_impact": 0.062, "details": { - "scatter": 16, - "commit_count_90d": 6 + "assertion_lines": [ + 146, + 154 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" }, - "reason": "co-changes with 16 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "assertion block at lines 146-154 is duplicated in crates/sc-composer/src/extract/tests.rs" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-composer/src/frontmatter.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 1.313, + "health_impact": 0.062, "details": { - "prior_defect_count": 4, - "window_days": 180 + "assertion_lines": [ + 165, + 166 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" }, - "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 165-166 is duplicated in crates/sc-composer/src/extract/tests.rs" }, { - "biomarker_type": "dry_violation", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.062, "details": { - "duplication_pct": 15.56, - "clone_pair_count": 11, - "worst_clone_lines": 21, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 2 + "assertion_lines": [ + 402, + 408 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" }, - "reason": "16% of file duplicated; worst clone shares 21 lines with crates/sc-composer/src/composer.rs (co-changed 2x)" + "reason": "assertion block at lines 402-408 is duplicated in crates/sc-composer/src/extract/tests.rs" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", "function_name": null, - "health_impact": 1.2, + "health_impact": 0.062, "details": { - "prior_defect_count": 3, - "window_days": 180 + "assertion_lines": [ + 669, + 674 + ], + "partner_file": "crates/sc-composer/src/extract/toml.rs" }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 669-674 is duplicated in crates/sc-composer/src/extract/toml.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter_init.rs", - "function_name": "frontmatter_init", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 342, + 346 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 342-346 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter_init.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, "details": { - "boundary_kind": "filesystem" + "assertion_lines": [ + 357, + 361 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "assertion block at lines 357-361 is duplicated in crates/sc-composer/tests/extract_integration.rs" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/frontmatter_init.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "large_method", - "severity": "low", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "expand_file", - "health_impact": 0.375, + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "CapturingObserver", + "health_impact": 0.6, "details": { - "nloc": 66, - "ccn": 8 + "class_name": "CapturingObserver", + "lcom4": 7, + "method_count": 7, + "field_count": 6 }, - "reason": "expand_file is 66 lines long" + "reason": "CapturingObserver has low cohesion (LCOM4=7): its 7 methods split into 7 groups that share no fields or calls" }, { - "biomarker_type": "primitive_obsession", - "severity": "low", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "resolve_include_path", - "health_impact": 0.15, + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.6, "details": { - "param_count": 5 + "duplication_pct": 48.61, + "clone_pair_count": 103, + "worst_clone_lines": 24, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 5 }, - "reason": "resolve_include_path takes 5 parameters" + "reason": "49% of file duplicated; worst clone shares 24 lines with crates/sc-composer/src/composer.rs (co-changed 5x)" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "expand_file", - "health_impact": 0.35, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 1.057, "details": { - "param_count": 7 + "change_entropy": 2.1424, + "change_entropy_pct": 80.0, + "commit_count_90d": 5 }, - "reason": "expand_file takes 7 parameters" + "reason": "changes are scattered across noisy commits (top 20% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "prior_defect", "severity": "high", - "file_path": "crates/sc-composer/src/include.rs", + "file_path": "crates/sc-composer/tests/integration.rs", "function_name": null, - "health_impact": 0.6, + "health_impact": 1.2, "details": { - "duplication_pct": 34.51, - "clone_pair_count": 40, - "worst_clone_lines": 21, - "worst_clone_partner": "crates/sc-composer/src/validation.rs", - "worst_clone_co_change": 4 + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "35% of file duplicated; worst clone shares 21 lines with crates/sc-composer/src/validation.rs (co-changed 4x)" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "canonicalize_include", - "health_impact": 0.812, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.167, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 5, - "max_nesting": 3 + "assertion_lines": [ + 550, + 552 + ], + "partner_file": "crates/sc-compose/src/commands/template_init.rs" }, - "reason": "canonicalize_include has been modified across 2 commits (repo p80=2) and carries CCN=5 / nesting=3" + "reason": "assertion block at lines 550-552 is duplicated in crates/sc-compose/src/commands/template_init.rs" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-composer/src/include.rs", + "file_path": "crates/sc-composer/tests/integration.rs", "function_name": null, - "health_impact": 0.7, + "health_impact": 0.167, "details": { - "prior_defect_count": 2, - "window_days": 180 + "assertion_lines": [ + 290, + 306 + ], + "partner_file": "crates/sc-composer/src/composer.rs" }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "assertion block at lines 290-306 is duplicated in crates/sc-composer/src/composer.rs" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "duplicated_assertion_block", "severity": "medium", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "expand_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.167, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-composer/src/include.rs::expand_file", - "crates/sc-composer/src/include.rs::resolve_include_path", - "crates/sc-composer/src/include.rs::canonicalize_include" - ] + "assertion_lines": [ + 240, + 243 + ], + "partner_file": "crates/sc-composer/src/frontmatter/mod.rs" }, - "reason": "a filesystem call is reached once per loop iteration through expand_file -> resolve_include_path -> canonicalize_include (cross-function N+1)" + "reason": "assertion block at lines 240-243 is duplicated in crates/sc-composer/src/frontmatter/mod.rs" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/include.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "complex_method", - "severity": "medium", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "init_workspace", - "health_impact": 0.847, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, "details": { - "ccn": 13, - "cognitive": 19, - "nloc": 88 + "kind": "unsafe_unwrap" }, - "reason": "init_workspace has cyclomatic complexity 13" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "large_method", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "init_workspace", - "health_impact": 0.375, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, "details": { - "nloc": 88, - "ccn": 13 + "kind": "unsafe_unwrap" }, - "reason": "init_workspace is 88 lines long" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": null, - "health_impact": 0.15, + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "temp_root", + "health_impact": 0.0, "details": { - "duplication_pct": 15.95, - "clone_pair_count": 18, - "worst_clone_lines": 23, - "worst_clone_partner": "crates/sc-composer/src/include.rs", - "worst_clone_co_change": 2 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_804b28de6db6229f351e" }, - "reason": "16% of file duplicated; worst clone shares 23 lines with crates/sc-composer/src/include.rs (co-changed 2x)" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "init_workspace", - "health_impact": 1.265, - "details": { - "modification_count": 4, - "repo_p80": 2, - "ccn": 13, - "max_nesting": 3 + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c42de5273f552d677576" }, - "reason": "init_workspace has been modified across 4 commits (repo p80=2) and carries CCN=13 / nesting=3" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/init_workspace.rs", + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/contract.rs", "function_name": null, - "health_impact": 1.963, + "health_impact": 0.15, "details": { - "scatter": 16, - "commit_count_90d": 3 + "duplication_pct": 12.63, + "clone_pair_count": 2, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/mod.rs", + "worst_clone_co_change": 0 }, - "reason": "co-changes with 16 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "13% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/mod.rs" }, { "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", + "file_path": "crates/sc-composer-beads/src/contract.rs", "function_name": null, - "health_impact": 0.273, + "health_impact": 0.3, "details": { "prior_defect_count": 1, "window_days": 180 @@ -6692,248 +16523,268 @@ repowise health — "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 4, + "commit_count_90d": 5, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + }, + { + "biomarker_type": "co_change_scatter", "severity": "medium", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "scan_templates_recursive", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.26, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive", - "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive" - ] + "scatter": 11, + "commit_count_90d": 5 }, - "reason": "a filesystem call is reached once per loop iteration through scan_templates_recursive -> scan_templates_recursive (cross-function N+1)" + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "init_workspace", - "health_impact": 0.0, + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.2, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 3, + "window_days": 180 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", - "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.487, "details": { - "boundary_kind": "filesystem" + "ccn": 16, + "cognitive": 17, + "nloc": 75 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "validate_request has cyclomatic complexity 16" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.284, + "details": { + "ccn": 10, + "cognitive": 9, + "nloc": 143 + }, + "reason": "execute_bead_request_with_runner has cyclomatic complexity 10" + }, + { + "biomarker_type": "large_method", "severity": "low", - "file_path": "crates/sc-composer/src/init_workspace.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.126, "details": { - "boundary_kind": "filesystem" + "nloc": 75, + "ccn": 16 }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "validate_request is 75 lines long" }, { - "biomarker_type": "change_entropy", + "biomarker_type": "large_method", "severity": "high", - "file_path": "crates/sc-composer/src/lib.rs", - "function_name": null, - "health_impact": 1.062, + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.503, "details": { - "change_entropy": 5.345, - "change_entropy_pct": 0.92, - "commit_count_90d": 12 + "nloc": 143, + "ccn": 10 }, - "reason": "changes are scattered across noisy commits (top 8% change entropy); a strong history-based fault predictor" + "reason": "execute_bead_request_with_runner is 143 lines long" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/lib.rs", - "function_name": null, - "health_impact": 1.266, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "run_stage_with_output", + "health_impact": 0.05, "details": { - "scatter": 28, - "commit_count_90d": 12 + "param_count": 5 }, - "reason": "co-changes with 28 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "run_stage_with_output takes 5 parameters" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-composer/src/lib.rs", - "function_name": null, - "health_impact": 1.172, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "run_stage", + "health_impact": 0.05, "details": { - "prior_defect_count": 6, - "window_days": 180 + "param_count": 5 }, - "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "run_stage takes 5 parameters" }, { "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-composer/src/observer.rs", + "file_path": "crates/sc-composer-beads/src/execute.rs", "function_name": null, "health_impact": 0.35, "details": { - "duplication_pct": 48.35, - "clone_pair_count": 7, - "worst_clone_lines": 22, - "worst_clone_partner": "crates/sc-composer/src/observer.rs", - "worst_clone_co_change": 0 + "duplication_pct": 20.69, + "clone_pair_count": 15, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-composer-beads/tests/bd_integration.rs", + "worst_clone_co_change": 3 }, - "reason": "48% of file duplicated; worst clone shares 22 lines with crates/sc-composer/src/observer.rs" + "reason": "21% of file duplicated; worst clone shares 10 lines with crates/sc-composer-beads/tests/bd_integration.rs (co-changed 3x)" }, { - "biomarker_type": "co_change_scatter", - "severity": "medium", - "file_path": "crates/sc-composer/src/observer.rs", - "function_name": null, - "health_impact": 1.26, + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.708, "details": { - "scatter": 12, - "commit_count_90d": 3 + "modification_count": 4, + "repo_p80": 2, + "ccn": 16, + "max_nesting": 2 }, - "reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "validate_request has been modified across 4 commits (repo p80=2) and carries CCN=16 / nesting=2" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-composer/src/observer.rs", - "function_name": null, - "health_impact": 1.2, + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.413, "details": { - "prior_defect_count": 4, - "window_days": 180 + "modification_count": 2, + "repo_p80": 2, + "ccn": 10, + "max_nesting": 1 }, - "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "execute_bead_request_with_runner has been modified across 2 commits (repo p80=2) and carries CCN=10 / nesting=1" }, { - "biomarker_type": "prior_defect", - "severity": "medium", - "file_path": "crates/sc-composer/src/path_utils.rs", + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", "function_name": null, - "health_impact": 0.7, + "health_impact": 0.183, "details": { - "prior_defect_count": 2, - "window_days": 180 + "relative_churn": 1.21, + "churn_percentile": 97.1, + "lines_added_90d": 1084, + "lines_deleted_90d": 46, + "commit_count_90d": 7, + "nloc": 936 }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "90-day churn rewrote 1.2x the file's size (1130 lines over 936 NLOC, top 2.9% among repository files eligible for churn ranking)" }, { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/src/renderer.rs", - "function_name": "Renderer", - "health_impact": 0.6, + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 0.538, "details": { - "class_name": "Renderer", - "lcom4": 5, - "method_count": 6, - "field_count": 1 + "change_entropy": 2.5025, + "change_entropy_pct": 83.6, + "commit_count_90d": 7 }, - "reason": "Renderer has low cohesion (LCOM4=5): its 6 methods split into 5 groups that share no fields or calls" + "reason": "changes are scattered across noisy commits (top 16% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/renderer.rs", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", "function_name": null, - "health_impact": 1.817, + "health_impact": 0.641, "details": { - "scatter": 17, - "commit_count_90d": 8 + "scatter": 14, + "commit_count_90d": 7 }, - "reason": "co-changes with 17 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "co-changes with 14 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-composer/src/renderer.rs", + "file_path": "crates/sc-composer-beads/src/execute.rs", "function_name": null, - "health_impact": 1.683, + "health_impact": 1.017, "details": { - "prior_defect_count": 5, + "prior_defect_count": 3, "window_days": 180 }, - "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "error_handling", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/renderer.rs", - "function_name": null, - "health_impact": 0.15, + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.0, "details": { - "kind": "unsafe_unwrap" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fe62ccde46cdec6e8a66" }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "nested_complexity", - "severity": "medium", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "resolve_profile_impl", - "health_impact": 0.938, + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "workspace", + "health_impact": 0.0, "details": { - "max_nesting": 4, - "ccn": 7, - "cognitive": 14 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_f9632dc21355fbbc725c" }, - "reason": "resolve_profile_impl nests 4 levels deep" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "resolve_profile_impl", - "health_impact": 0.15, + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "request", + "health_impact": 0.0, "details": { - "param_count": 5 + "boundary_kind": "filesystem", + "opportunity_id": "perf2_832eb71a296f9b30a640" }, - "reason": "resolve_profile_impl takes 5 parameters" + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-composer/src/resolver.rs", + "file_path": "crates/sc-composer-beads/src/lib.rs", "function_name": null, "health_impact": 0.35, "details": { - "duplication_pct": 22.15, - "clone_pair_count": 71, - "worst_clone_lines": 29, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 3 - }, - "reason": "22% of file duplicated; worst clone shares 29 lines with crates/sc-composer/src/composer.rs (co-changed 3x)" - }, - { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "resolve_profile_with_observer", - "health_impact": 1.392, - "details": { - "modification_count": 5, - "repo_p80": 2, - "ccn": 4, - "max_nesting": 3 + "duplication_pct": 26.92, + "clone_pair_count": 1, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/src/lib.rs", + "worst_clone_co_change": 0 }, - "reason": "resolve_profile_with_observer has been modified across 5 commits (repo p80=2) and carries CCN=4 / nesting=3" + "reason": "27% of file duplicated; worst clone shares 9 lines with crates/sc-composer/src/lib.rs" }, { "biomarker_type": "prior_defect", "severity": "low", - "file_path": "crates/sc-composer/src/resolver.rs", + "file_path": "crates/sc-composer-beads/src/lib.rs", "function_name": null, "health_impact": 0.3, "details": { @@ -6943,150 +16794,156 @@ repowise health — "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "io_in_loop", + "biomarker_type": "churn_risk", "severity": "medium", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "resolve_profile_impl", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.57, + "details": { + "relative_churn": 1.91, + "churn_percentile": 89.3, + "lines_added_90d": 335, + "lines_deleted_90d": 68, + "commit_count_90d": 7, + "nloc": 211 + }, + "reason": "90-day churn rewrote 1.9x the file's size (403 lines over 211 NLOC, top 11% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.717, + "details": { + "change_entropy": 2.7661, + "change_entropy_pct": 85.8, + "commit_count_90d": 7 + }, + "reason": "changes are scattered across noisy commits (top 14% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.855, "details": { - "boundary_kind": "filesystem", - "cross_function": false + "scatter": 11, + "commit_count_90d": 7 }, - "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "nested_loop_with_io", - "severity": "medium", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "resolve_profile_impl", - "health_impact": 0.0, + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 1.357, "details": { - "boundary_kind": "filesystem" + "prior_defect_count": 4, + "window_days": 180 }, - "reason": "a filesystem call runs inside a nested loop (O(n\u00b7m) round-trips); batch the inner query or restructure the loops" + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "temp_root", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": "render_formula", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_10167865afc24e4eaa06" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { "biomarker_type": "hot_path_sync_io", "severity": "low", - "file_path": "crates/sc-composer/src/resolver.rs", - "function_name": "write_file", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": "temporary_directory", "health_impact": 0.0, "details": { - "boundary_kind": "filesystem" + "boundary_kind": "filesystem", + "opportunity_id": "perf2_aa487b4645fc756cca51" }, "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" }, { - "biomarker_type": "nested_complexity", + "biomarker_type": "low_cohesion", "severity": "high", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "validate_input_value_at", - "health_impact": 1.608, + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": "CaptureTracker", + "health_impact": 0.6, "details": { - "max_nesting": 6, - "ccn": 11, - "cognitive": 44 + "class_name": "CaptureTracker", + "lcom4": 3, + "method_count": 5, + "field_count": 3 }, - "reason": "validate_input_value_at nests 6 levels deep" + "reason": "CaptureTracker has low cohesion (LCOM4=3): its 5 methods split into 3 groups that share no fields or calls" }, { "biomarker_type": "complex_method", "severity": "medium", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "input_value_from_yaml", - "health_impact": 0.75, + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": "observe", + "health_impact": 0.847, "details": { "ccn": 9, - "cognitive": 18, - "nloc": 44 - }, - "reason": "input_value_from_yaml has cyclomatic complexity 9" - }, - { - "biomarker_type": "complex_method", - "severity": "medium", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "validate_input_value_at", - "health_impact": 0.75, - "details": { - "ccn": 11, - "cognitive": 44, - "nloc": 42 + "cognitive": 15, + "nloc": 20 }, - "reason": "validate_input_value_at has cyclomatic complexity 11" + "reason": "observe has cyclomatic complexity 9" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-composer/src/types.rs", + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/runner.rs", "function_name": null, - "health_impact": 0.35, - "details": { - "duplication_pct": 26.9, - "clone_pair_count": 7, - "worst_clone_lines": 36, - "worst_clone_partner": "crates/sc-composer/src/types.rs", - "worst_clone_co_change": 0 - }, - "reason": "27% of file duplicated; worst clone shares 36 lines with crates/sc-composer/src/types.rs" - }, - { - "biomarker_type": "function_hotspot", - "severity": "medium", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "input_value_from_yaml", - "health_impact": 0.491, + "health_impact": 0.875, "details": { - "modification_count": 3, - "repo_p80": 2, - "ccn": 9, - "max_nesting": 3 + "relative_churn": 3.11, + "churn_percentile": 98.6, + "lines_added_90d": 881, + "lines_deleted_90d": 381, + "commit_count_90d": 11, + "nloc": 406 }, - "reason": "input_value_from_yaml has been modified across 3 commits (repo p80=2) and carries CCN=9 / nesting=3" + "reason": "90-day churn rewrote 3.1x the file's size (1262 lines over 406 NLOC, top 1.4% among repository files eligible for churn ranking)" }, { - "biomarker_type": "function_hotspot", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "validate_input_value_at", - "health_impact": 0.491, + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.643, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 11, - "max_nesting": 6 + "change_entropy": 3.1731, + "change_entropy_pct": 88.0, + "commit_count_90d": 11 }, - "reason": "validate_input_value_at has been modified across 2 commits (repo p80=2) and carries CCN=11 / nesting=6" + "reason": "changes are scattered across noisy commits (top 12% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/types.rs", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/runner.rs", "function_name": null, - "health_impact": 1.307, + "health_impact": 0.766, "details": { - "scatter": 21, - "commit_count_90d": 7 + "scatter": 11, + "commit_count_90d": 11 }, - "reason": "co-changes with 21 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { "biomarker_type": "prior_defect", "severity": "critical", - "file_path": "crates/sc-composer/src/types.rs", + "file_path": "crates/sc-composer-beads/src/runner.rs", "function_name": null, - "health_impact": 1.21, + "health_impact": 1.216, "details": { "prior_defect_count": 5, "window_days": 180 @@ -7094,552 +16951,527 @@ repowise health — "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/types.rs", - "function_name": "new", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-composer/src/validate.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/runner.rs", "function_name": null, - "health_impact": 0.6, + "health_impact": 0.15, "details": { - "duplication_pct": 67.7, - "clone_pair_count": 37, - "worst_clone_lines": 31, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 5 + "kind": "unsafe_unwrap" }, - "reason": "68% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/composer.rs (co-changed 5x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hidden_coupling", - "severity": "medium", - "file_path": "crates/sc-composer/src/validate.rs", - "function_name": null, - "health_impact": 0.7, + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.375, "details": { - "partner": "crates/sc-composer/src/composer.rs", - "correlation": 0.556, - "co_change_count": 5, - "self_commits": 9, - "partner_commits": 19 + "nloc": 63, + "ccn": 3 }, - "reason": "crates/sc-composer/src/composer.rs co-changes with this file 5 times (56% of shared commits) but no static dependency exists" + "reason": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas is 63 lines long" }, { - "biomarker_type": "prior_defect", - "severity": "high", - "file_path": "crates/sc-composer/src/validate.rs", - "function_name": null, - "health_impact": 1.2, + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "request", + "health_impact": 0.15, "details": { - "prior_defect_count": 3, - "window_days": 180 + "param_count": 5 }, - "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "request takes 5 parameters" }, { - "biomarker_type": "nested_complexity", + "biomarker_type": "dry_violation", "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "discover_tokens_with_brace_count", - "health_impact": 0.938, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.35, "details": { - "max_nesting": 4, - "ccn": 10, - "cognitive": 21 + "duplication_pct": 10.42, + "clone_pair_count": 4, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-composer-beads/src/execute.rs", + "worst_clone_co_change": 3 }, - "reason": "discover_tokens_with_brace_count nests 4 levels deep" + "reason": "10% of file duplicated; worst clone shares 10 lines with crates/sc-composer-beads/src/execute.rs (co-changed 3x)" }, { - "biomarker_type": "nested_complexity", - "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "validate_required_value", - "health_impact": 0.938, + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.36, "details": { - "max_nesting": 4, - "ccn": 6, - "cognitive": 14 + "relative_churn": 1.28, + "churn_percentile": 93.9, + "lines_added_90d": 526, + "lines_deleted_90d": 39, + "commit_count_90d": 11, + "nloc": 442 }, - "reason": "validate_required_value nests 4 levels deep" + "reason": "90-day churn rewrote 1.3x the file's size (565 lines over 442 NLOC, top 6.1% among repository files eligible for churn ranking)" }, { - "biomarker_type": "complex_method", + "biomarker_type": "change_entropy", "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "discover_tokens_with_brace_count", - "health_impact": 0.504, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 1.057, "details": { - "ccn": 10, - "cognitive": 21, - "nloc": 40 + "change_entropy": 2.3954, + "change_entropy_pct": 82.5, + "commit_count_90d": 11 }, - "reason": "discover_tokens_with_brace_count has cyclomatic complexity 10" + "reason": "changes are scattered across noisy commits (top 17% among files eligible for change-entropy ranking); a strong history-based fault predictor" }, { - "biomarker_type": "complex_method", + "biomarker_type": "prior_defect", "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "required_variable_location", - "health_impact": 0.504, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.7, "details": { - "ccn": 11, - "cognitive": 16, - "nloc": 33 + "prior_defect_count": 2, + "window_days": 180 }, - "reason": "required_variable_location has cyclomatic complexity 11" + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "large_method", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "populate_pass_validation_maps", - "health_impact": 0.223, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "nloc": 62, - "ccn": 4 + "kind": "panic_macro" }, - "reason": "populate_pass_validation_maps is 62 lines long" + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "merge_frontmatter", - "health_impact": 0.089, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "param_count": 5 + "kind": "unsafe_unwrap" }, - "reason": "merge_frontmatter takes 5 parameters" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "required_path_diagnostic", - "health_impact": 0.089, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "param_count": 5 + "kind": "unsafe_unwrap" }, - "reason": "required_path_diagnostic takes 5 parameters" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "primitive_obsession", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "push_extra_input_diagnostics", - "health_impact": 0.089, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "param_count": 5 + "kind": "unsafe_unwrap" }, - "reason": "push_extra_input_diagnostics takes 5 parameters" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "high", - "file_path": "crates/sc-composer/src/validation.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.6, + "health_impact": 0.019, "details": { - "duplication_pct": 25.2, - "clone_pair_count": 37, - "worst_clone_lines": 20, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 6 + "kind": "unsafe_unwrap" }, - "reason": "25% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/composer.rs (co-changed 6x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "discover_tokens_with_brace_count", - "health_impact": 0.477, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "modification_count": 4, - "repo_p80": 2, - "ccn": 10, - "max_nesting": 4 + "kind": "unsafe_unwrap" }, - "reason": "discover_tokens_with_brace_count has been modified across 4 commits (repo p80=2) and carries CCN=10 / nesting=4" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "collect_validation_state", - "health_impact": 0.477, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "modification_count": 8, - "repo_p80": 2, - "ccn": 7, - "max_nesting": 3 + "kind": "unsafe_unwrap" }, - "reason": "collect_validation_state has been modified across 8 commits (repo p80=2) and carries CCN=7 / nesting=3" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "function_hotspot", - "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "required_variable_location", - "health_impact": 0.278, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "modification_count": 2, - "repo_p80": 2, - "ccn": 11, - "max_nesting": 2 + "kind": "unsafe_unwrap" }, - "reason": "required_variable_location has been modified across 2 commits (repo p80=2) and carries CCN=11 / nesting=2" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "function_hotspot", - "severity": "high", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "default_usage_diagnostics", - "health_impact": 0.477, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "modification_count": 4, - "repo_p80": 2, - "ccn": 8, - "max_nesting": 3 + "kind": "unsafe_unwrap" }, - "reason": "default_usage_diagnostics has been modified across 4 commits (repo p80=2) and carries CCN=8 / nesting=3" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "change_entropy", - "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.363, + "health_impact": 0.019, "details": { - "change_entropy": 5.2122, - "change_entropy_pct": 0.893, - "commit_count_90d": 10 + "kind": "unsafe_unwrap" }, - "reason": "changes are scattered across noisy commits (top 11% change entropy); a strong history-based fault predictor" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "co_change_scatter", - "severity": "high", - "file_path": "crates/sc-composer/src/validation.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.741, + "health_impact": 0.019, "details": { - "scatter": 25, - "commit_count_90d": 10 + "kind": "unsafe_unwrap" }, - "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", - "severity": "critical", - "file_path": "crates/sc-composer/src/validation.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.686, + "health_impact": 0.019, "details": { - "prior_defect_count": 8, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.15, + "health_impact": 0.019, "details": { - "kind": "panic_macro" + "kind": "unsafe_unwrap" }, - "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "missing_required_path_diagnostics", - "health_impact": 0.0, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-composer/src/validation.rs::missing_required_path_diagnostics", - "crates/sc-composer/src/validation.rs::missing_required_diagnostic", - "crates/sc-composer/src/validation.rs::required_variable_location" - ] + "kind": "unsafe_unwrap" }, - "reason": "a filesystem call is reached once per loop iteration through missing_required_path_diagnostics -> missing_required_diagnostic -> required_variable_location (cross-function N+1)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "io_in_loop", - "severity": "medium", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "missing_required_path_diagnostics", - "health_impact": 0.0, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem", - "cross_function": true, - "path": [ - "crates/sc-composer/src/validation.rs::missing_required_path_diagnostics", - "crates/sc-composer/src/validation.rs::required_path_diagnostic", - "crates/sc-composer/src/validation.rs::required_variable_location" - ] + "kind": "unsafe_unwrap" }, - "reason": "a filesystem call is reached once per loop iteration through missing_required_path_diagnostics -> required_path_diagnostic -> required_variable_location (cross-function N+1)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "file_references_variables", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "required_variable_location", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/validation.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-composer/src/verify.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.019, "details": { - "duplication_pct": 39.54, - "clone_pair_count": 127, - "worst_clone_lines": 10, - "worst_clone_partner": "crates/sc-compose/src/commands/template_init.rs", - "worst_clone_co_change": 2 + "kind": "unsafe_unwrap" }, - "reason": "40% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/commands/template_init.rs (co-changed 2x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", - "severity": "medium", - "file_path": "crates/sc-composer/src/verify.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.7, + "health_impact": 0.019, "details": { - "prior_defect_count": 2, - "window_days": 180 + "kind": "unsafe_unwrap" }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/verify.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/src/verify.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "low_cohesion", - "severity": "high", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": "CapturingObserver", - "health_impact": 0.6, + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, "details": { - "class_name": "CapturingObserver", - "lcom4": 7, - "method_count": 7, - "field_count": 6 + "kind": "unsafe_unwrap" }, - "reason": "CapturingObserver has low cohesion (LCOM4=7): its 7 methods split into 7 groups that share no fields or calls" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "dry_violation", - "severity": "medium", - "file_path": "crates/sc-composer/tests/integration.rs", + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "function_name": null, - "health_impact": 0.35, + "health_impact": 0.019, "details": { - "duplication_pct": 58.13, - "clone_pair_count": 92, - "worst_clone_lines": 24, - "worst_clone_partner": "crates/sc-composer/src/composer.rs", - "worst_clone_co_change": 2 + "kind": "unsafe_unwrap" }, - "reason": "58% of file duplicated; worst clone shares 24 lines with crates/sc-composer/src/composer.rs (co-changed 2x)" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "prior_defect", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": null, - "health_impact": 0.7, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, "details": { - "prior_defect_count": 2, - "window_days": 180 + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_ca7d13a946ca60665b6a" }, - "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": null, - "health_impact": 0.167, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 360, - 362 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer-beads/tests/bd_integration.rs::pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "crates/sc-composer-beads/tests/bd_integration.rs::copy_fixture" ], - "partner_file": "crates/sc-compose/src/commands/template_init.rs" + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_c10a91cc481cca776173" }, - "reason": "assertion block at lines 360-362 is duplicated in crates/sc-compose/src/commands/template_init.rs" + "reason": "a filesystem call is reached once per loop iteration through pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas -> copy_fixture (cross-function N+1)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "io_in_loop", "severity": "medium", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": null, - "health_impact": 0.167, + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, "details": { - "assertion_lines": [ - 272, - 288 + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer-beads/tests/bd_integration.rs::pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "crates/sc-composer-beads/src/execute.rs::execute_bead_request", + "crates/sc-composer-beads/src/execute.rs::execute_bead_request_with_runner" ], - "partner_file": "crates/sc-composer/src/composer.rs" + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_3e62115e0afb7882392a" }, - "reason": "assertion block at lines 272-288 is duplicated in crates/sc-composer/src/composer.rs" + "reason": "a filesystem call is reached once per loop iteration through pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas -> execute_bead_request -> execute_bead_request_with_runner (cross-function N+1)" }, { - "biomarker_type": "duplicated_assertion_block", + "biomarker_type": "co_change_scatter", "severity": "medium", - "file_path": "crates/sc-composer/tests/integration.rs", + "file_path": "crates/sc-composer-beads/tests/contract.rs", "function_name": null, - "health_impact": 0.167, + "health_impact": 1.26, "details": { - "assertion_lines": [ - 222, - 225 - ], - "partner_file": "crates/sc-composer/src/frontmatter.rs" + "scatter": 8, + "commit_count_90d": 4 }, - "reason": "assertion block at lines 222-225 is duplicated in crates/sc-composer/src/frontmatter.rs" + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/tests/contract.rs", "function_name": null, - "health_impact": 0.125, + "health_impact": 1.2, "details": { - "kind": "unsafe_unwrap" + "prior_defect_count": 3, + "window_days": 180 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { - "biomarker_type": "error_handling", + "biomarker_type": "dry_violation", "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", "function_name": null, - "health_impact": 0.125, + "health_impact": 0.15, "details": { - "kind": "unsafe_unwrap" + "duplication_pct": 15.49, + "clone_pair_count": 2, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer-beads/tests/bd_integration.rs", + "worst_clone_co_change": 0 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "15% of file duplicated; worst clone shares 11 lines with crates/sc-composer-beads/tests/bd_integration.rs" }, { - "biomarker_type": "error_handling", - "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", "function_name": null, - "health_impact": 0.125, + "health_impact": 1.2, "details": { - "kind": "unsafe_unwrap" + "prior_defect_count": 3, + "window_days": 180 }, - "reason": "unwrap/expect turns a recoverable error into a crash" + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" }, { "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", "function_name": null, - "health_impact": 0.125, + "health_impact": 0.15, "details": { "kind": "unsafe_unwrap" }, "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": "temp_root", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" }, { - "biomarker_type": "hot_path_sync_io", + "biomarker_type": "error_handling", "severity": "low", - "file_path": "crates/sc-composer/tests/integration.rs", - "function_name": "write_file", - "health_impact": 0.0, + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, "details": { - "boundary_kind": "filesystem" + "kind": "unsafe_unwrap" }, - "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + "reason": "unwrap/expect turns a recoverable error into a crash" } ] } diff --git a/.sc/repowise/data/repowise-health-composer.json b/.sc/repowise/data/repowise-health-composer.json new file mode 100644 index 00000000..7419ba7c --- /dev/null +++ b/.sc/repowise/data/repowise-health-composer.json @@ -0,0 +1,5525 @@ +2026-09-06 19:30:57 [debug ] duplication_token_cache hits=1003 misses=0 +{ + "kpis": { + "hotspot_health": 5.21, + "average_health": 8.32, + "worst_performer_path": ".github/scripts/release_artifacts.py", + "worst_performer_score": 1.9, + "file_count": 1017, + "maintainability_average": 9.09, + "maintainability_hotspot": 7.45, + "performance_average": 9.77, + "performance_hotspot": 9.24 + }, + "metrics": [ + { + "file_path": "crates/sc-composer/src/resolver.rs", + "score": 4.44, + "max_ccn": 7, + "max_nesting": 4, + "nloc": 714, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 30.27 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "score": 4.44, + "max_ccn": 13, + "max_nesting": 4, + "nloc": 227, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/diagnostics.rs", + "score": 4.5, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 9, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/src/execute.rs", + "score": 4.65, + "max_ccn": 16, + "max_nesting": 2, + "nloc": 936, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 20.69 + }, + { + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "score": 4.7, + "max_ccn": 21, + "max_nesting": 6, + "nloc": 706, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 48.81 + }, + { + "file_path": "crates/sc-composer/src/discovery.rs", + "score": 4.71, + "max_ccn": 9, + "max_nesting": 4, + "nloc": 271, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 3.91 + }, + { + "file_path": "crates/sc-composer-beads/src/runner.rs", + "score": 4.75, + "max_ccn": 9, + "max_nesting": 3, + "nloc": 406, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 3.67 + }, + { + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "score": 4.77, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 1102, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 29.22 + }, + { + "file_path": "crates/sc-composer/src/composer.rs", + "score": 4.78, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 690, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 39.29 + }, + { + "file_path": "crates/sc-composer/src/init_workspace.rs", + "score": 4.93, + "max_ccn": 13, + "max_nesting": 3, + "nloc": 221, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.95 + }, + { + "file_path": "crates/sc-composer/src/renderer.rs", + "score": 5.05, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 1079, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 16.38 + }, + { + "file_path": "crates/sc-composer/src/extract/toml.rs", + "score": 5.32, + "max_ccn": 18, + "max_nesting": 4, + "nloc": 509, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 49.9 + }, + { + "file_path": "crates/sc-composer/src/types.rs", + "score": 5.5, + "max_ccn": 9, + "max_nesting": 3, + "nloc": 575, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 21.36 + }, + { + "file_path": "crates/sc-composer/tests/integration.rs", + "score": 5.54, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 502, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 48.61 + }, + { + "file_path": "crates/sc-composer/src/extract/xml.rs", + "score": 5.78, + "max_ccn": 6, + "max_nesting": 3, + "nloc": 296, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 9.62 + }, + { + "file_path": "crates/sc-composer/src/include.rs", + "score": 5.9, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 958, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 70.91 + }, + { + "file_path": "crates/sc-composer-beads/src/error.rs", + "score": 5.98, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 135, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error.rs", + "score": 6.15, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 260, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 30.97 + }, + { + "file_path": "crates/sc-composer/src/lib.rs", + "score": 6.15, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 230, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 21.26 + }, + { + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "score": 6.24, + "max_ccn": 11, + "max_nesting": 4, + "nloc": 529, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 43.67 + }, + { + "file_path": "crates/sc-composer/src/extract/json.rs", + "score": 6.26, + "max_ccn": 15, + "max_nesting": 4, + "nloc": 541, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 60.36 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "score": 6.5, + "max_ccn": 9, + "max_nesting": 5, + "nloc": 149, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 8.0 + }, + { + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "score": 6.5, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 166, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/src/render.rs", + "score": 6.5, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 211, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "score": 6.51, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 442, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 10.42 + }, + { + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "score": 6.58, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 381, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 35.86 + }, + { + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "score": 6.59, + "max_ccn": 10, + "max_nesting": 5, + "nloc": 238, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "score": 6.62, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 1370, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.4 + }, + { + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "score": 6.64, + "max_ccn": 20, + "max_nesting": 5, + "nloc": 87, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "score": 6.89, + "max_ccn": 13, + "max_nesting": 5, + "nloc": 228, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 2.28 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "score": 6.96, + "max_ccn": 10, + "max_nesting": 4, + "nloc": 317, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 14.55 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "score": 7.22, + "max_ccn": 12, + "max_nesting": 3, + "nloc": 79, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/verify.rs", + "score": 7.44, + "max_ccn": 5, + "max_nesting": 2, + "nloc": 378, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.58 + }, + { + "file_path": "crates/sc-composer-beads/tests/contract.rs", + "score": 7.54, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 202, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/render_check.rs", + "score": 7.71, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 428, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 16.35 + }, + { + "file_path": "crates/sc-composer/src/extract/tests.rs", + "score": 7.8, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 432, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 10.88 + }, + { + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "score": 7.92, + "max_ccn": 11, + "max_nesting": 4, + "nloc": 68, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/validate.rs", + "score": 8.2, + "max_ccn": 4, + "max_nesting": 1, + "nloc": 170, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 51.27 + }, + { + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "score": 8.2, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 70, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.49 + }, + { + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "score": 8.35, + "max_ccn": 9, + "max_nesting": 3, + "nloc": 131, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 15.27 + }, + { + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "score": 8.45, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 175, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 21.43 + }, + { + "file_path": "crates/sc-composer/src/observer.rs", + "score": 8.45, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 191, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 48.35 + }, + { + "file_path": "crates/sc-composer/src/extract/error.rs", + "score": 8.5, + "max_ccn": 4, + "max_nesting": 3, + "nloc": 243, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 33.94 + }, + { + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "score": 8.5, + "max_ccn": 10, + "max_nesting": 2, + "nloc": 118, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/validation/mod.rs", + "score": 8.7, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 621, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 37.48 + }, + { + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "score": 8.8, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 113, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 6.67 + }, + { + "file_path": "crates/sc-composer/src/include/expansion.rs", + "score": 8.9, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 282, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", + "score": 8.95, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 188, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 30.69 + }, + { + "file_path": "crates/sc-composer/src/validation/state.rs", + "score": 9.03, + "max_ccn": 7, + "max_nesting": 3, + "nloc": 479, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.32 + }, + { + "file_path": "crates/sc-composer/src/error/config.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 63, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/include.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 62, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/resolve.rs", + "score": 9.05, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 62, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 100.0 + }, + { + "file_path": "crates/sc-composer/src/error/validation.rs", + "score": 9.05, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 108, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 56.3 + }, + { + "file_path": "crates/sc-composer/src/extract/mod.rs", + "score": 9.05, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 378, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 40.43 + }, + { + "file_path": "crates/sc-composer/src/path_utils.rs", + "score": 9.3, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 8, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", + "score": 9.35, + "max_ccn": 5, + "max_nesting": 1, + "nloc": 86, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 41.38 + }, + { + "file_path": "crates/sc-composer-beads/src/lib.rs", + "score": 9.35, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 17, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 26.92 + }, + { + "file_path": "crates/sc-composer/src/include/path.rs", + "score": 9.55, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 77, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/src/contract.rs", + "score": 9.55, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 129, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 12.63 + }, + { + "file_path": "crates/sc-composer/src/diagnostics/filesystem.rs", + "score": 9.65, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 103, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 28.16 + }, + { + "file_path": "crates/sc-composer/src/template_ext.rs", + "score": 9.7, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 50, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/template_scanner.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 3, + "nloc": 52, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/input_limits.rs", + "score": 9.7, + "max_ccn": 2, + "max_nesting": 1, + "nloc": 16, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/extract/raw.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 2, + "nloc": 242, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 3.57 + }, + { + "file_path": "crates/sc-composer/src/extract/xml_serialize.rs", + "score": 9.7, + "max_ccn": 5, + "max_nesting": 3, + "nloc": 40, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/include/directive.rs", + "score": 9.7, + "max_ccn": 8, + "max_nesting": 1, + "nloc": 77, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/discovery/scope.rs", + "score": 9.85, + "max_ccn": 4, + "max_nesting": 1, + "nloc": 69, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": 10.14 + }, + { + "file_path": "crates/sc-composer/Cargo.toml", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 26, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/path_containment.rs", + "score": 10.0, + "max_ccn": 6, + "max_nesting": 3, + "nloc": 96, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/diagnostics/envelope.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 72, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/diagnostics/record.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 75, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/discovery/scanner.rs", + "score": 10.0, + "max_ccn": 6, + "max_nesting": 2, + "nloc": 88, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/display.rs", + "score": 10.0, + "max_ccn": 4, + "max_nesting": 2, + "nloc": 49, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/recovery.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 36, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/error/render.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 45, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer/src/include/fingerprint.rs", + "score": 10.0, + "max_ccn": 3, + "max_nesting": 1, + "nloc": 105, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/Cargo.toml", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 31, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/README.md", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 8, + "has_test_file": false, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + }, + { + "file_path": "crates/sc-composer-beads/tests/runner.rs", + "score": 10.0, + "max_ccn": 1, + "max_nesting": 0, + "nloc": 24, + "has_test_file": true, + "line_coverage_pct": null, + "branch_coverage_pct": null, + "duplication_pct": null + } + ], + "findings": [ + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "CapturingObserver", + "health_impact": 0.6, + "details": { + "class_name": "CapturingObserver", + "lcom4": 5, + "method_count": 5, + "field_count": 5 + }, + "reason": "CapturingObserver has low cohesion (LCOM4=5): its 5 methods split into 5 groups that share no fields or calls" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "render_all_with_observer", + "health_impact": 0.375, + "details": { + "nloc": 61, + "ccn": 8 + }, + "reason": "render_all_with_observer is 61 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "render_all_with_observer", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "render_all_with_observer takes 6 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 39.29, + "clone_pair_count": 122, + "worst_clone_lines": 31, + "worst_clone_partner": "crates/sc-composer/src/validate.rs", + "worst_clone_co_change": 10 + }, + "reason": "39% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/validate.rs (co-changed 10x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": null, + "health_impact": 1.062, + "details": { + "change_entropy": 5.9939, + "change_entropy_pct": 96.0, + "commit_count_90d": 8 + }, + "reason": "changes are scattered across noisy commits (top 4% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 25, + "commit_count_90d": 8 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": null, + "health_impact": 1.172, + "details": { + "prior_defect_count": 13, + "window_days": 180 + }, + "reason": "13 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_9f25629ff66207426d8b" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/composer.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_1f27102639d2a811db29" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 37, + "commit_count_90d": 6, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 37 dependents" + }, + { + "biomarker_type": "churn_risk", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 1.003, + "details": { + "relative_churn": 56.33, + "churn_percentile": 85.8, + "lines_added_90d": 94, + "lines_deleted_90d": 413, + "commit_count_90d": 6, + "nloc": 9 + }, + "reason": "90-day churn rewrote 56.3x the file's size (507 lines over 9 NLOC, top 14% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 0.758, + "details": { + "change_entropy": 5.0281, + "change_entropy_pct": 93.8, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 6.2% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 0.903, + "details": { + "scatter": 25, + "commit_count_90d": 6 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/diagnostics.rs", + "function_name": null, + "health_impact": 0.836, + "details": { + "prior_defect_count": 8, + "window_days": 180 + }, + "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "scan_directives", + "health_impact": 1.608, + "details": { + "max_nesting": 5, + "ccn": 10, + "cognitive": 28 + }, + "reason": "scan_directives nests 5 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "block_tag", + "health_impact": 0.75, + "details": { + "ccn": 10, + "cognitive": 12, + "nloc": 22 + }, + "reason": "block_tag has cyclomatic complexity 10" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": "scan_directives", + "health_impact": 0.75, + "details": { + "ccn": 10, + "cognitive": 28, + "nloc": 47 + }, + "reason": "scan_directives has cyclomatic complexity 10" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/directive_inspection.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 9, + "cognitive": 16 + }, + "reason": "discover_tokens_with_delimiters nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.847, + "details": { + "ccn": 9, + "cognitive": 16, + "nloc": 29 + }, + "reason": "discover_tokens_with_delimiters has cyclomatic complexity 9" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": "discover_tokens_with_delimiters", + "health_impact": 0.827, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 9, + "max_nesting": 4 + }, + "reason": "discover_tokens_with_delimiters has been modified across 4 commits (repo p80=2) and carries CCN=9 / nesting=4" + }, + { + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": null, + "health_impact": 0.856, + "details": { + "relative_churn": 2.93, + "churn_percentile": 95.1, + "lines_added_90d": 422, + "lines_deleted_90d": 371, + "commit_count_90d": 6, + "nloc": 271 + }, + "reason": "90-day churn rewrote 2.9x the file's size (793 lines over 271 NLOC, top 4.9% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": null, + "health_impact": 0.628, + "details": { + "change_entropy": 2.3346, + "change_entropy_pct": 82.2, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 18% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/discovery.rs", + "function_name": null, + "health_impact": 1.189, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 30.97, + "clone_pair_count": 8, + "worst_clone_lines": 26, + "worst_clone_partner": "crates/sc-composer/src/error.rs", + "worst_clone_co_change": 0 + }, + "reason": "31% of file duplicated; worst clone shares 26 lines with crates/sc-composer/src/error.rs" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/error.rs", + "function_name": null, + "health_impact": 0.709, + "details": { + "change_entropy": 2.4285, + "change_entropy_pct": 83.3, + "commit_count_90d": 3 + }, + "reason": "changes are scattered across noisy commits (top 17% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/error.rs", + "function_name": null, + "health_impact": 1.449, + "details": { + "scatter": 24, + "commit_count_90d": 3 + }, + "reason": "co-changes with 24 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/error.rs", + "function_name": null, + "health_impact": 1.342, + "details": { + "prior_defect_count": 5, + "window_days": 180 + }, + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 21.43, + "clone_pair_count": 16, + "worst_clone_lines": 24, + "worst_clone_partner": "crates/sc-composer/src/init_workspace.rs", + "worst_clone_co_change": 4 + }, + "reason": "21% of file duplicated; worst clone shares 24 lines with crates/sc-composer/src/init_workspace.rs (co-changed 4x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "frontmatter_init", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_1f6209f76dc8e2010f6e" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_2926bb8db4173e0529e5" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/frontmatter_init.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_735c80e6245e13bd0f5d" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 70.91, + "clone_pair_count": 149, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-composer/src/resolver.rs", + "worst_clone_co_change": 8 + }, + "reason": "71% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/resolver.rs (co-changed 8x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 0.199, + "details": { + "relative_churn": 1.39, + "churn_percentile": 98.3, + "lines_added_90d": 961, + "lines_deleted_90d": 372, + "commit_count_90d": 13, + "nloc": 958 + }, + "reason": "90-day churn rewrote 1.4x the file's size (1333 lines over 958 NLOC, top 1.7% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 1.002, + "details": { + "change_entropy": 5.1873, + "change_entropy_pct": 94.2, + "commit_count_90d": 13 + }, + "reason": "changes are scattered across noisy commits (top 5.8% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 1.194, + "details": { + "scatter": 25, + "commit_count_90d": 13 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": null, + "health_impact": 1.105, + "details": { + "prior_defect_count": 10, + "window_days": 180 + }, + "reason": "10 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "deep_include_chain_above_safe_ceiling_returns_include_depth_error", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include.rs::tests::deep_include_chain_above_safe_ceiling_returns_include_depth_error", + "crates/sc-composer/src/include.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_126172ddde97425b3555" + }, + "reason": "a filesystem call is reached once per loop iteration through deep_include_chain_above_safe_ceiling_returns_include_depth_error -> write_file (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_linear_chain", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include.rs::tests::write_linear_chain", + "crates/sc-composer/src/include.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_5882c11a7ecfc4dcd8bc" + }, + "reason": "a filesystem call is reached once per loop iteration through write_linear_chain -> write_file (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "new", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_72360cfac187ff781f0c" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_a106216d3c719bfbbb6d" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/include.rs", + "function_name": "write_linear_chain", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_90891e3aec792b40b9bc" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.847, + "details": { + "ccn": 13, + "cognitive": 19, + "nloc": 88 + }, + "reason": "init_workspace has cyclomatic complexity 13" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.375, + "details": { + "nloc": 88, + "ccn": 13 + }, + "reason": "init_workspace is 88 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 15.95, + "clone_pair_count": 27, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 5 + }, + "reason": "16% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/composer.rs (co-changed 5x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 1.265, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 13, + "max_nesting": 3 + }, + "reason": "init_workspace has been modified across 4 commits (repo p80=2) and carries CCN=13 / nesting=3" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": null, + "health_impact": 1.963, + "details": { + "scatter": 25, + "commit_count_90d": 3 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": null, + "health_impact": 0.273, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "scan_templates_recursive", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive", + "crates/sc-composer/src/init_workspace.rs::scan_templates_recursive" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_3f2b4a22414dfef50e78" + }, + "reason": "a filesystem call is reached once per loop iteration through scan_templates_recursive -> scan_templates_recursive (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "init_workspace", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_8597d29f5b652eee2000" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_3bef71ee91011ab2bf38" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/init_workspace.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_6f09d7a88ef6a7b4a6ab" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/lib.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 21.26, + "clone_pair_count": 14, + "worst_clone_lines": 8, + "worst_clone_partner": "bindings/python/src/types/results.rs", + "worst_clone_co_change": 5 + }, + "reason": "21% of file duplicated; worst clone shares 8 lines with bindings/python/src/types/results.rs (co-changed 5x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/lib.rs", + "function_name": null, + "health_impact": 1.062, + "details": { + "change_entropy": 10.7201, + "change_entropy_pct": 98.5, + "commit_count_90d": 16 + }, + "reason": "changes are scattered across noisy commits (top 1.5% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/lib.rs", + "function_name": null, + "health_impact": 1.266, + "details": { + "scatter": 25, + "commit_count_90d": 16 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/lib.rs", + "function_name": null, + "health_impact": 1.172, + "details": { + "prior_defect_count": 12, + "window_days": 180 + }, + "reason": "12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/observer.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 48.35, + "clone_pair_count": 6, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-composer/src/observer.rs", + "worst_clone_co_change": 0 + }, + "reason": "48% of file duplicated; worst clone shares 22 lines with crates/sc-composer/src/observer.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/observer.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/path_utils.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/render_check.rs", + "function_name": "RenderCheckMeta", + "health_impact": 0.6, + "details": { + "class_name": "RenderCheckMeta", + "lcom4": 5, + "method_count": 6, + "field_count": 0 + }, + "reason": "RenderCheckMeta has low cohesion (LCOM4=5): its 6 methods split into 5 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/render_check.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 16.35, + "clone_pair_count": 3, + "worst_clone_lines": 30, + "worst_clone_partner": "crates/sc-composer/src/render_check.rs", + "worst_clone_co_change": 0 + }, + "reason": "16% of file duplicated; worst clone shares 30 lines with crates/sc-composer/src/render_check.rs" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-composer/src/render_check.rs", + "function_name": null, + "health_impact": 0.84, + "details": { + "relative_churn": 1.6, + "churn_percentile": 94.8, + "lines_added_90d": 620, + "lines_deleted_90d": 66, + "commit_count_90d": 6, + "nloc": 428 + }, + "reason": "90-day churn rewrote 1.6x the file's size (686 lines over 428 NLOC, top 5.2% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/render_check.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": "Renderer", + "health_impact": 0.6, + "details": { + "class_name": "Renderer", + "lcom4": 9, + "method_count": 10, + "field_count": 1 + }, + "reason": "Renderer has low cohesion (LCOM4=9): its 10 methods split into 9 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 16.38, + "clone_pair_count": 10, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-compose/tests/cli/render.rs", + "worst_clone_co_change": 6 + }, + "reason": "16% of file duplicated; worst clone shares 8 lines with crates/sc-compose/tests/cli/render.rs (co-changed 6x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": "auto_escape_callback", + "health_impact": 0.545, + "details": { + "modification_count": 5, + "repo_p80": 2, + "ccn": 7, + "max_nesting": 3 + }, + "reason": "auto_escape_callback has been modified across 5 commits (repo p80=2) and carries CCN=7 / nesting=3" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.141, + "details": { + "relative_churn": 1.23, + "churn_percentile": 98.8, + "lines_added_90d": 1168, + "lines_deleted_90d": 160, + "commit_count_90d": 24, + "nloc": 1079 + }, + "reason": "90-day churn rewrote 1.2x the file's size (1328 lines over 1079 NLOC, top 1.2% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "critical", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 1.183, + "details": { + "change_entropy": 10.4197, + "change_entropy_pct": 98.2, + "commit_count_90d": 24 + }, + "reason": "changes are scattered across noisy commits (top 1.8% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.846, + "details": { + "scatter": 25, + "commit_count_90d": 24 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.784, + "details": { + "prior_defect_count": 20, + "window_days": 180 + }, + "reason": "20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/renderer.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 7, + "cognitive": 14 + }, + "reason": "resolve_profile_impl nests 4 levels deep" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "canonicalize_with_roots", + "health_impact": 0.375, + "details": { + "nloc": 60, + "ccn": 5 + }, + "reason": "canonicalize_with_roots is 60 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "resolve_profile_impl takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 30.27, + "clone_pair_count": 111, + "worst_clone_lines": 16, + "worst_clone_partner": "crates/sc-composer/src/include.rs", + "worst_clone_co_change": 8 + }, + "reason": "30% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/include.rs (co-changed 8x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "canonicalize_with_roots", + "health_impact": 0.609, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 + }, + "reason": "canonicalize_with_roots has been modified across 4 commits (repo p80=2) and carries CCN=5 / nesting=3" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_with_observer", + "health_impact": 0.609, + "details": { + "modification_count": 5, + "repo_p80": 2, + "ccn": 4, + "max_nesting": 3 + }, + "reason": "resolve_profile_with_observer has been modified across 5 commits (repo p80=2) and carries CCN=4 / nesting=3" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": null, + "health_impact": 0.462, + "details": { + "change_entropy": 2.9055, + "change_entropy_pct": 86.9, + "commit_count_90d": 6 + }, + "reason": "changes are scattered across noisy commits (top 13% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": null, + "health_impact": 0.945, + "details": { + "scatter": 21, + "commit_count_90d": 6 + }, + "reason": "co-changes with 21 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": null, + "health_impact": 0.875, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_4d709c7f7153cec39c05" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "nested_loop_with_io", + "severity": "medium", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "resolve_profile_impl", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_03350ba930565d388c46" + }, + "reason": "a filesystem call runs inside a nested loop (O(n\u00b7m) round-trips); batch the inner query or restructure the loops" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_52450692765354f97a8c" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/resolver.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e20ddc3eea384fff34b4" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/template_ext.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/template_scanner.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "input_value_from_yaml", + "health_impact": 0.847, + "details": { + "ccn": 9, + "cognitive": 18, + "nloc": 44 + }, + "reason": "input_value_from_yaml has cyclomatic complexity 9" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 21.36, + "clone_pair_count": 6, + "worst_clone_lines": 36, + "worst_clone_partner": "crates/sc-composer/src/types.rs", + "worst_clone_co_change": 0 + }, + "reason": "21% of file duplicated; worst clone shares 36 lines with crates/sc-composer/src/types.rs" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "input_value_from_yaml", + "health_impact": 0.662, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 9, + "max_nesting": 3 + }, + "reason": "input_value_from_yaml has been modified across 4 commits (repo p80=2) and carries CCN=9 / nesting=3" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": null, + "health_impact": 0.861, + "details": { + "change_entropy": 4.1447, + "change_entropy_pct": 91.6, + "commit_count_90d": 5 + }, + "reason": "changes are scattered across noisy commits (top 8.4% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": null, + "health_impact": 1.027, + "details": { + "scatter": 25, + "commit_count_90d": 5 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": null, + "health_impact": 0.951, + "details": { + "prior_defect_count": 7, + "window_days": 180 + }, + "reason": "7 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/types.rs", + "function_name": "new", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_db578f40ec5604ae9ef7" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validate.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 51.27, + "clone_pair_count": 41, + "worst_clone_lines": 31, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 10 + }, + "reason": "51% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/composer.rs (co-changed 10x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/validate.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 41.58, + "clone_pair_count": 139, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-compose/src/commands/template_init.rs", + "worst_clone_co_change": 3 + }, + "reason": "42% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/commands/template_init.rs (co-changed 3x)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 10, + "commit_count_90d": 4 + }, + "reason": "co-changes with 10 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_5475b85aa0f1aa8b383d" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/verify.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c7975890aaf0d79ea2d5" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/diagnostics/filesystem.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 28.16, + "clone_pair_count": 1, + "worst_clone_lines": 22, + "worst_clone_partner": "crates/sc-composer/src/diagnostics/filesystem.rs", + "worst_clone_co_change": 0 + }, + "reason": "28% of file duplicated; worst clone shares 22 lines with crates/sc-composer/src/diagnostics/filesystem.rs" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 35.86, + "clone_pair_count": 7, + "worst_clone_lines": 170, + "worst_clone_partner": "crates/sc-composer/src/lib.rs", + "worst_clone_co_change": 3 + }, + "reason": "36% of file duplicated; worst clone shares 170 lines with crates/sc-composer/src/lib.rs (co-changed 3x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.3, + "churn_percentile": 85.0, + "lines_added_90d": 490, + "lines_deleted_90d": 6, + "commit_count_90d": 8, + "nloc": 381 + }, + "reason": "90-day churn rewrote 1.3x the file's size (496 lines over 381 NLOC, top 15% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "function_name": null, + "health_impact": 2.16, + "details": { + "scatter": 22, + "commit_count_90d": 8 + }, + "reason": "co-changes with 22 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/diagnostics/schema.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "function_name": "mask_filter_names", + "health_impact": 0.75, + "details": { + "ccn": 9, + "cognitive": 12, + "nloc": 25 + }, + "reason": "mask_filter_names has cyclomatic complexity 9" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "function_name": "collect_identifiers", + "health_impact": 0.75, + "details": { + "ccn": 9, + "cognitive": 11, + "nloc": 27 + }, + "reason": "collect_identifiers has cyclomatic complexity 9" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/discovery/identifiers.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 15.27, + "clone_pair_count": 1, + "worst_clone_lines": 20, + "worst_clone_partner": "prototype/multipass/discover.py", + "worst_clone_co_change": 0 + }, + "reason": "15% of file duplicated; worst clone shares 20 lines with prototype/multipass/discover.py" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/discovery/scope.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 10.14, + "clone_pair_count": 1, + "worst_clone_lines": 8, + "worst_clone_partner": "crates/sc-composer-beads/src/execute.rs", + "worst_clone_co_change": 0 + }, + "reason": "10% of file duplicated; worst clone shares 8 lines with crates/sc-composer-beads/src/execute.rs" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/config.rs", + "function_name": "ConfigError", + "health_impact": 0.6, + "details": { + "class_name": "ConfigError", + "lcom4": 6, + "method_count": 7, + "field_count": 1 + }, + "reason": "ConfigError has low cohesion (LCOM4=6): its 7 methods split into 6 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/config.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 100.0, + "clone_pair_count": 6, + "worst_clone_lines": 57, + "worst_clone_partner": "crates/sc-composer/src/error/include.rs", + "worst_clone_co_change": 0 + }, + "reason": "100% of file duplicated; worst clone shares 57 lines with crates/sc-composer/src/error/include.rs" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/include.rs", + "function_name": "IncludeError", + "health_impact": 0.6, + "details": { + "class_name": "IncludeError", + "lcom4": 6, + "method_count": 6, + "field_count": 1 + }, + "reason": "IncludeError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/include.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 100.0, + "clone_pair_count": 4, + "worst_clone_lines": 79, + "worst_clone_partner": "crates/sc-composer/src/error/resolve.rs", + "worst_clone_co_change": 0 + }, + "reason": "100% of file duplicated; worst clone shares 79 lines with crates/sc-composer/src/error/resolve.rs" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/resolve.rs", + "function_name": "ResolveError", + "health_impact": 0.6, + "details": { + "class_name": "ResolveError", + "lcom4": 6, + "method_count": 6, + "field_count": 1 + }, + "reason": "ResolveError has low cohesion (LCOM4=6): its 6 methods split into 6 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/resolve.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 100.0, + "clone_pair_count": 4, + "worst_clone_lines": 79, + "worst_clone_partner": "crates/sc-composer/src/error/include.rs", + "worst_clone_co_change": 0 + }, + "reason": "100% of file duplicated; worst clone shares 79 lines with crates/sc-composer/src/error/include.rs" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/error/validation.rs", + "function_name": "ValidationError", + "health_impact": 0.6, + "details": { + "class_name": "ValidationError", + "lcom4": 9, + "method_count": 10, + "field_count": 0 + }, + "reason": "ValidationError has low cohesion (LCOM4=9): its 10 methods split into 9 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/error/validation.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 56.3, + "clone_pair_count": 4, + "worst_clone_lines": 52, + "worst_clone_partner": "crates/sc-composer/src/error/config.rs", + "worst_clone_co_change": 0 + }, + "reason": "56% of file duplicated; worst clone shares 52 lines with crates/sc-composer/src/error/config.rs" + }, + { + "biomarker_type": "low_cohesion", + "severity": "critical", + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": "ExtractError", + "health_impact": 1.0, + "details": { + "class_name": "ExtractError", + "lcom4": 15, + "method_count": 16, + "field_count": 0 + }, + "reason": "ExtractError has low cohesion (LCOM4=15): its 16 methods split into 15 groups that share no fields or calls" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": "format_error_with_source", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "format_error_with_source takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/error.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 33.94, + "clone_pair_count": 2, + "worst_clone_lines": 33, + "worst_clone_partner": "crates/sc-composer/src/extract/error.rs", + "worst_clone_co_change": 0 + }, + "reason": "34% of file duplicated; worst clone shares 33 lines with crates/sc-composer/src/extract/error.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/input_limits.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 15, + "cognitive": 37 + }, + "reason": "match_json nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.879, + "details": { + "ccn": 15, + "cognitive": 37, + "nloc": 102 + }, + "reason": "match_json has cyclomatic complexity 15" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.53, + "details": { + "nloc": 102, + "ccn": 15 + }, + "reason": "match_json is 102 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": "match_json", + "health_impact": 0.091, + "details": { + "param_count": 5 + }, + "reason": "match_json takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 60.36, + "clone_pair_count": 42, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer/src/extract/xml.rs", + "worst_clone_co_change": 4 + }, + "reason": "60% of file duplicated; worst clone shares 11 lines with crates/sc-composer/src/extract/xml.rs (co-changed 4x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 11, + "cognitive": 26 + }, + "reason": "validate_parse_depth nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.847, + "details": { + "ccn": 11, + "cognitive": 26, + "nloc": 31 + }, + "reason": "validate_parse_depth has cyclomatic complexity 11" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/json_limits.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": "new", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "new takes 5 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": "new_with_ambiguity_code", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "new_with_ambiguity_code takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 40.43, + "clone_pair_count": 7, + "worst_clone_lines": 99, + "worst_clone_partner": "crates/sc-composer/src/extract/mod.rs", + "worst_clone_co_change": 0 + }, + "reason": "40% of file duplicated; worst clone shares 99 lines with crates/sc-composer/src/extract/mod.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/mod.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/raw.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 1.608, + "details": { + "max_nesting": 5, + "ccn": 13, + "cognitive": 33 + }, + "reason": "match_raw_text nests 5 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 0.495, + "details": { + "ccn": 13, + "cognitive": 33, + "nloc": 95 + }, + "reason": "match_raw_text has cyclomatic complexity 13" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "parse_raw_text_segments", + "health_impact": 0.495, + "details": { + "ccn": 9, + "cognitive": 12, + "nloc": 58 + }, + "reason": "parse_raw_text_segments has cyclomatic complexity 9" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/raw_text.rs", + "function_name": "match_raw_text", + "health_impact": 0.511, + "details": { + "nloc": 95, + "ccn": 13 + }, + "reason": "match_raw_text is 95 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 10.88, + "clone_pair_count": 6, + "worst_clone_lines": 23, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 3 + }, + "reason": "11% of file duplicated; worst clone shares 23 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 91, + 114 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 91-114 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 312, + 320 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 312-320 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 331, + 332 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 331-332 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 361, + 362 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 361-362 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.1, + "details": { + "assertion_lines": [ + 384, + 396 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 384-396 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/tests.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 18, + "cognitive": 41 + }, + "reason": "validate_parse_depth nests 4 levels deep" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 12, + "cognitive": 29 + }, + "reason": "match_toml nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "validate_parse_depth", + "health_impact": 0.815, + "details": { + "ccn": 18, + "cognitive": 41, + "nloc": 57 + }, + "reason": "validate_parse_depth has cyclomatic complexity 18" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.475, + "details": { + "ccn": 12, + "cognitive": 29, + "nloc": 65 + }, + "reason": "match_toml has cyclomatic complexity 12" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": "match_toml", + "health_impact": 0.21, + "details": { + "nloc": 65, + "ccn": 12 + }, + "reason": "match_toml is 65 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 49.9, + "clone_pair_count": 35, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 3 + }, + "reason": "50% of file duplicated; worst clone shares 9 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/toml.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": "extract_xml", + "health_impact": 0.375, + "details": { + "nloc": 82, + "ccn": 6 + }, + "reason": "extract_xml is 82 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 9.62, + "clone_pair_count": 10, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer/src/extract/json.rs", + "worst_clone_co_change": 4 + }, + "reason": "10% of file duplicated; worst clone shares 11 lines with crates/sc-composer/src/extract/json.rs (co-changed 4x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": null, + "health_impact": 0.709, + "details": { + "change_entropy": 2.6, + "change_entropy_pct": 84.0, + "commit_count_90d": 3 + }, + "reason": "changes are scattered across noisy commits (top 16% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": null, + "health_impact": 1.449, + "details": { + "scatter": 25, + "commit_count_90d": 3 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/extract/xml.rs", + "function_name": null, + "health_impact": 1.342, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "path_exists", + "health_impact": 1.25, + "details": { + "max_nesting": 5, + "ccn": 8, + "cognitive": 25 + }, + "reason": "path_exists nests 5 levels deep" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "collect_template_occurrences", + "health_impact": 1.25, + "details": { + "max_nesting": 5, + "ccn": 9, + "cognitive": 24 + }, + "reason": "collect_template_occurrences nests 5 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": "collect_template_occurrences", + "health_impact": 0.847, + "details": { + "ccn": 9, + "cognitive": 24, + "nloc": 45 + }, + "reason": "collect_template_occurrences has cyclomatic complexity 9" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 8.0, + "clone_pair_count": 1, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_match.rs", + "worst_clone_co_change": 0 + }, + "reason": "8% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/xml_match.rs" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 10, + "cognitive": 15 + }, + "reason": "match_children nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.504, + "details": { + "ccn": 10, + "cognitive": 15, + "nloc": 63 + }, + "reason": "match_children has cyclomatic complexity 10" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.223, + "details": { + "nloc": 63, + "ccn": 10 + }, + "reason": "match_children is 63 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_value", + "health_impact": 0.089, + "details": { + "param_count": 6 + }, + "reason": "match_value takes 6 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_full_content", + "health_impact": 0.089, + "details": { + "param_count": 6 + }, + "reason": "match_full_content takes 6 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_child_sequence", + "health_impact": 0.208, + "details": { + "param_count": 7 + }, + "reason": "match_child_sequence takes 7 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_children", + "health_impact": 0.089, + "details": { + "param_count": 6 + }, + "reason": "match_children takes 6 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_attributes", + "health_impact": 0.089, + "details": { + "param_count": 5 + }, + "reason": "match_attributes takes 5 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": "match_element", + "health_impact": 0.208, + "details": { + "param_count": 7 + }, + "reason": "match_element takes 7 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 14.55, + "clone_pair_count": 3, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_evidence.rs", + "worst_clone_co_change": 0 + }, + "reason": "15% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/xml_evidence.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_match.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 13, + "cognitive": 35 + }, + "reason": "parse_xml nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.738, + "details": { + "ccn": 13, + "cognitive": 35, + "nloc": 93 + }, + "reason": "parse_xml has cyclomatic complexity 13" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": "parse_xml", + "health_impact": 0.762, + "details": { + "nloc": 93, + "ccn": 13 + }, + "reason": "parse_xml is 93 lines long" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 4, + "commit_count_90d": 4, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 4 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_model.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": "normalize_rendered", + "health_impact": 0.847, + "details": { + "ccn": 12, + "cognitive": 18, + "nloc": 69 + }, + "reason": "normalize_rendered has cyclomatic complexity 12" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": "normalize_rendered", + "health_impact": 0.375, + "details": { + "nloc": 69, + "ccn": 12 + }, + "reason": "normalize_rendered is 69 lines long" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 3 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_prefix.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 41.38, + "clone_pair_count": 2, + "worst_clone_lines": 12, + "worst_clone_partner": "crates/sc-composer/src/extract/xml_reject.rs", + "worst_clone_co_change": 0 + }, + "reason": "41% of file duplicated; worst clone shares 12 lines with crates/sc-composer/src/extract/xml_reject.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_reject.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/xml_serialize.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "contains_yaml_features", + "health_impact": 1.579, + "details": { + "max_nesting": 6, + "ccn": 21, + "cognitive": 74 + }, + "reason": "contains_yaml_features nests 6 levels deep" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.921, + "details": { + "max_nesting": 4, + "ccn": 16, + "cognitive": 39 + }, + "reason": "match_yaml nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "contains_yaml_features", + "health_impact": 0.576, + "details": { + "ccn": 21, + "cognitive": 74, + "nloc": 54 + }, + "reason": "contains_yaml_features has cyclomatic complexity 21" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.576, + "details": { + "ccn": 16, + "cognitive": 39, + "nloc": 103 + }, + "reason": "match_yaml has cyclomatic complexity 16" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": "match_yaml", + "health_impact": 0.347, + "details": { + "nloc": 103, + "ccn": 16 + }, + "reason": "match_yaml is 103 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 48.81, + "clone_pair_count": 34, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/tests/extract_integration.rs", + "worst_clone_co_change": 5 + }, + "reason": "49% of file duplicated; worst clone shares 9 lines with crates/sc-composer/tests/extract_integration.rs (co-changed 5x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/extract/yaml.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "nested_complexity", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 1.608, + "details": { + "max_nesting": 5, + "ccn": 20, + "cognitive": 51 + }, + "reason": "validate_parse_depth nests 5 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "function_name": "validate_parse_depth", + "health_impact": 1.452, + "details": { + "ccn": 20, + "cognitive": 51, + "nloc": 54 + }, + "reason": "validate_parse_depth has cyclomatic complexity 20" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 30.69, + "clone_pair_count": 3, + "worst_clone_lines": 18, + "worst_clone_partner": "crates/sc-composer/tests/integration.rs", + "worst_clone_co_change": 0 + }, + "reason": "31% of file duplicated; worst clone shares 18 lines with crates/sc-composer/tests/integration.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/mod.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "function_name": "ParsedTemplate", + "health_impact": 0.6, + "details": { + "class_name": "ParsedTemplate", + "lcom4": 4, + "method_count": 5, + "field_count": 0 + }, + "reason": "ParsedTemplate has low cohesion (LCOM4=4): its 5 methods split into 4 groups that share no fields or calls" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/src/frontmatter/model.rs", + "function_name": "Frontmatter", + "health_impact": 0.6, + "details": { + "class_name": "Frontmatter", + "lcom4": 8, + "method_count": 8, + "field_count": 0 + }, + "reason": "Frontmatter has low cohesion (LCOM4=8): its 8 methods split into 8 groups that share no fields or calls" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "function_name": "normalize_frontmatter", + "health_impact": 0.738, + "details": { + "ccn": 10, + "cognitive": 10, + "nloc": 93 + }, + "reason": "normalize_frontmatter has cyclomatic complexity 10" + }, + { + "biomarker_type": "large_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", + "function_name": "normalize_frontmatter", + "health_impact": 0.762, + "details": { + "nloc": 93, + "ccn": 10 + }, + "reason": "normalize_frontmatter is 93 lines long" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "function_name": "split_frontmatter", + "health_impact": 0.735, + "details": { + "modification_count": 3, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 + }, + "reason": "split_frontmatter has been modified across 3 commits (repo p80=2) and carries CCN=8 / nesting=3" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "function_name": null, + "health_impact": 0.956, + "details": { + "change_entropy": 2.6335, + "change_entropy_pct": 85.1, + "commit_count_90d": 7 + }, + "reason": "changes are scattered across noisy commits (top 15% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/frontmatter/parser.rs", + "function_name": null, + "health_impact": 1.809, + "details": { + "prior_defect_count": 5, + "window_days": 180 + }, + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/include/directive.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "read_and_hash_source", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "read_and_hash_source takes 6 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "medium", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "expand_file", + "health_impact": 0.35, + "details": { + "param_count": 7 + }, + "reason": "expand_file takes 7 parameters" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/include/expansion.rs", + "function_name": "expand_body", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/include/expansion.rs::ExpansionContext::expand_body", + "crates/sc-composer/src/include/expansion.rs::ExpansionContext::expand_candidate", + "crates/sc-composer/src/include/expansion.rs::expand_file", + "crates/sc-composer/src/include/expansion.rs::read_and_hash_source" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_c2b04290476e0f6e69f7" + }, + "reason": "a filesystem call is reached once per loop iteration through expand_body -> expand_candidate -> expand_file -> read_and_hash_source (cross-function N+1)" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/include/path.rs", + "function_name": "resolve_include_path", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "resolve_include_path takes 5 parameters" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/include/path.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "json_mode_diagnostics", + "health_impact": 0.375, + "details": { + "nloc": 69, + "ccn": 8 + }, + "reason": "json_mode_diagnostics is 69 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "push_extra_input_diagnostics", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "push_extra_input_diagnostics takes 5 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "push_unbound_variable_diagnostics", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "push_unbound_variable_diagnostics takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 29.22, + "clone_pair_count": 34, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 6 + }, + "reason": "29% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/composer.rs (co-changed 6x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "quoted_json_placeholder_expressions", + "health_impact": 0.556, + "details": { + "modification_count": 5, + "repo_p80": 2, + "ccn": 5, + "max_nesting": 3 + }, + "reason": "quoted_json_placeholder_expressions has been modified across 5 commits (repo p80=2) and carries CCN=5 / nesting=3" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "json_mode_diagnostics", + "health_impact": 0.556, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 8, + "max_nesting": 3 + }, + "reason": "json_mode_diagnostics has been modified across 4 commits (repo p80=2) and carries CCN=8 / nesting=3" + }, + { + "biomarker_type": "change_entropy", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.724, + "details": { + "change_entropy": 4.9744, + "change_entropy_pct": 93.5, + "commit_count_90d": 14 + }, + "reason": "changes are scattered across noisy commits (top 6.5% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.863, + "details": { + "scatter": 25, + "commit_count_90d": 14 + }, + "reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.799, + "details": { + "prior_defect_count": 8, + "window_days": 180 + }, + "reason": "8 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "fuzz_001_validation_matches_checked_format_detection_for_json_path_variants", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/diagnostics.rs::tests::fuzz_001_validation_matches_checked_format_detection_for_json_path_variants", + "crates/sc-composer/src/validation/diagnostics.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_466e74fdbae4adacc883" + }, + "reason": "a filesystem call is reached once per loop iteration through fuzz_001_validation_matches_checked_format_detection_for_json_path_variants -> write_file (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fce4bd0166ec727ab195" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/diagnostics.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fd96e7bf424931900fdb" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/mod.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 37.48, + "clone_pair_count": 43, + "worst_clone_lines": 37, + "worst_clone_partner": "crates/sc-composer/src/validation/diagnostics.rs", + "worst_clone_co_change": 3 + }, + "reason": "37% of file duplicated; worst clone shares 37 lines with crates/sc-composer/src/validation/diagnostics.rs (co-changed 3x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/mod.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/mod.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_84b46e65b28b9ffc9e38" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/mod.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_e5d01ba2230c57885e86" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "nested_complexity", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "validate_required_value", + "health_impact": 0.938, + "details": { + "max_nesting": 4, + "ccn": 6, + "cognitive": 14 + }, + "reason": "validate_required_value nests 4 levels deep" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_variable_location", + "health_impact": 0.847, + "details": { + "ccn": 11, + "cognitive": 16, + "nloc": 36 + }, + "reason": "required_variable_location has cyclomatic complexity 11" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_path_diagnostics", + "health_impact": 0.375, + "details": { + "nloc": 71, + "ccn": 8 + }, + "reason": "required_path_diagnostics is 71 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "required_path_diagnostic", + "health_impact": 0.15, + "details": { + "param_count": 6 + }, + "reason": "required_path_diagnostic takes 6 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 43.67, + "clone_pair_count": 49, + "worst_clone_lines": 20, + "worst_clone_partner": "crates/sc-composer/src/validation/diagnostics.rs", + "worst_clone_co_change": 4 + }, + "reason": "44% of file duplicated; worst clone shares 20 lines with crates/sc-composer/src/validation/diagnostics.rs (co-changed 4x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "non_bare_for_iterables_do_not_trigger_array_shape_check", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/required_paths.rs::tests::non_bare_for_iterables_do_not_trigger_array_shape_check", + "crates/sc-composer/src/validation/required_paths.rs::tests::temp_root" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_477aebf609385525a85f" + }, + "reason": "a filesystem call is reached once per loop iteration through non_bare_for_iterables_do_not_trigger_array_shape_check -> temp_root (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "non_bare_for_iterables_do_not_trigger_array_shape_check", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer/src/validation/required_paths.rs::tests::non_bare_for_iterables_do_not_trigger_array_shape_check", + "crates/sc-composer/src/validation/required_paths.rs::tests::write_file" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_2d0e0599a281e4a729bc" + }, + "reason": "a filesystem call is reached once per loop iteration through non_bare_for_iterables_do_not_trigger_array_shape_check -> write_file (cross-function N+1)" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_bb572775f4d719cca08f" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/required_paths.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_9d4b0aa084e7a3d4be1e" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": "populate_pass_validation_maps", + "health_impact": 0.375, + "details": { + "nloc": 62, + "ccn": 4 + }, + "reason": "populate_pass_validation_maps is 62 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": "merge_frontmatter", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "merge_frontmatter takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 12.32, + "clone_pair_count": 4, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-compose/src/commands/compose_render.rs", + "worst_clone_co_change": 0 + }, + "reason": "12% of file duplicated; worst clone shares 15 lines with crates/sc-compose/src/commands/compose_render.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer/src/validation/state.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": "cross_format_corpus_preserves_equivalent_contracts", + "health_impact": 0.375, + "details": { + "nloc": 65, + "ccn": 7 + }, + "reason": "cross_format_corpus_preserves_equivalent_contracts is 65 lines long" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 15.4, + "clone_pair_count": 15, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/src/extract/yaml.rs", + "worst_clone_co_change": 5 + }, + "reason": "15% of file duplicated; worst clone shares 9 lines with crates/sc-composer/src/extract/yaml.rs (co-changed 5x)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 2.0, + "details": { + "prior_defect_count": 6, + "window_days": 180 + }, + "reason": "6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 57, + 66 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" + }, + "reason": "assertion block at lines 57-66 is duplicated in crates/sc-composer/src/extract/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 134, + 135 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" + }, + "reason": "assertion block at lines 134-135 is duplicated in crates/sc-composer/src/extract/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 146, + 154 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" + }, + "reason": "assertion block at lines 146-154 is duplicated in crates/sc-composer/src/extract/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 165, + 166 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" + }, + "reason": "assertion block at lines 165-166 is duplicated in crates/sc-composer/src/extract/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 402, + 408 + ], + "partner_file": "crates/sc-composer/src/extract/tests.rs" + }, + "reason": "assertion block at lines 402-408 is duplicated in crates/sc-composer/src/extract/tests.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 669, + 674 + ], + "partner_file": "crates/sc-composer/src/extract/toml.rs" + }, + "reason": "assertion block at lines 669-674 is duplicated in crates/sc-composer/src/extract/toml.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 342, + 346 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 342-346 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.062, + "details": { + "assertion_lines": [ + 357, + 361 + ], + "partner_file": "crates/sc-composer/tests/extract_integration.rs" + }, + "reason": "assertion block at lines 357-361 is duplicated in crates/sc-composer/tests/extract_integration.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/extract_integration.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "CapturingObserver", + "health_impact": 0.6, + "details": { + "class_name": "CapturingObserver", + "lcom4": 7, + "method_count": 7, + "field_count": 6 + }, + "reason": "CapturingObserver has low cohesion (LCOM4=7): its 7 methods split into 7 groups that share no fields or calls" + }, + { + "biomarker_type": "dry_violation", + "severity": "high", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.6, + "details": { + "duplication_pct": 48.61, + "clone_pair_count": 103, + "worst_clone_lines": 24, + "worst_clone_partner": "crates/sc-composer/src/composer.rs", + "worst_clone_co_change": 5 + }, + "reason": "49% of file duplicated; worst clone shares 24 lines with crates/sc-composer/src/composer.rs (co-changed 5x)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.1424, + "change_entropy_pct": 80.0, + "commit_count_90d": 5 + }, + "reason": "changes are scattered across noisy commits (top 20% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 550, + 552 + ], + "partner_file": "crates/sc-compose/src/commands/template_init.rs" + }, + "reason": "assertion block at lines 550-552 is duplicated in crates/sc-compose/src/commands/template_init.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 290, + 306 + ], + "partner_file": "crates/sc-composer/src/composer.rs" + }, + "reason": "assertion block at lines 290-306 is duplicated in crates/sc-composer/src/composer.rs" + }, + { + "biomarker_type": "duplicated_assertion_block", + "severity": "medium", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.167, + "details": { + "assertion_lines": [ + 240, + 243 + ], + "partner_file": "crates/sc-composer/src/frontmatter/mod.rs" + }, + "reason": "assertion block at lines 240-243 is duplicated in crates/sc-composer/src/frontmatter/mod.rs" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": null, + "health_impact": 0.125, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "temp_root", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_804b28de6db6229f351e" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer/tests/integration.rs", + "function_name": "write_file", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_c42de5273f552d677576" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/contract.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 12.63, + "clone_pair_count": 2, + "worst_clone_lines": 15, + "worst_clone_partner": "crates/sc-composer/src/extract/mod.rs", + "worst_clone_co_change": 0 + }, + "reason": "13% of file duplicated; worst clone shares 15 lines with crates/sc-composer/src/extract/mod.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/contract.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "untested_hotspot", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.56, + "details": { + "line_coverage_pct": null, + "branch_coverage_pct": null, + "dependents_count": 4, + "commit_count_90d": 5, + "has_test_file": false, + "reached_by_tests": false + }, + "reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 11, + "commit_count_90d": 5 + }, + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/error.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "complex_method", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.487, + "details": { + "ccn": 16, + "cognitive": 17, + "nloc": 75 + }, + "reason": "validate_request has cyclomatic complexity 16" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.284, + "details": { + "ccn": 10, + "cognitive": 9, + "nloc": 143 + }, + "reason": "execute_bead_request_with_runner has cyclomatic complexity 10" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.126, + "details": { + "nloc": 75, + "ccn": 16 + }, + "reason": "validate_request is 75 lines long" + }, + { + "biomarker_type": "large_method", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.503, + "details": { + "nloc": 143, + "ccn": 10 + }, + "reason": "execute_bead_request_with_runner is 143 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "run_stage_with_output", + "health_impact": 0.05, + "details": { + "param_count": 5 + }, + "reason": "run_stage_with_output takes 5 parameters" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "run_stage", + "health_impact": 0.05, + "details": { + "param_count": 5 + }, + "reason": "run_stage takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 20.69, + "clone_pair_count": 15, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-composer-beads/tests/bd_integration.rs", + "worst_clone_co_change": 3 + }, + "reason": "21% of file duplicated; worst clone shares 10 lines with crates/sc-composer-beads/tests/bd_integration.rs (co-changed 3x)" + }, + { + "biomarker_type": "function_hotspot", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "validate_request", + "health_impact": 0.708, + "details": { + "modification_count": 4, + "repo_p80": 2, + "ccn": 16, + "max_nesting": 2 + }, + "reason": "validate_request has been modified across 4 commits (repo p80=2) and carries CCN=16 / nesting=2" + }, + { + "biomarker_type": "function_hotspot", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.413, + "details": { + "modification_count": 2, + "repo_p80": 2, + "ccn": 10, + "max_nesting": 1 + }, + "reason": "execute_bead_request_with_runner has been modified across 2 commits (repo p80=2) and carries CCN=10 / nesting=1" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 0.183, + "details": { + "relative_churn": 1.21, + "churn_percentile": 97.1, + "lines_added_90d": 1084, + "lines_deleted_90d": 46, + "commit_count_90d": 7, + "nloc": 936 + }, + "reason": "90-day churn rewrote 1.2x the file's size (1130 lines over 936 NLOC, top 2.9% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 0.538, + "details": { + "change_entropy": 2.5025, + "change_entropy_pct": 83.6, + "commit_count_90d": 7 + }, + "reason": "changes are scattered across noisy commits (top 16% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 0.641, + "details": { + "scatter": 14, + "commit_count_90d": 7 + }, + "reason": "co-changes with 14 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": null, + "health_impact": 1.017, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "execute_bead_request_with_runner", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_fe62ccde46cdec6e8a66" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "workspace", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_f9632dc21355fbbc725c" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/execute.rs", + "function_name": "request", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_832eb71a296f9b30a640" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/lib.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 26.92, + "clone_pair_count": 1, + "worst_clone_lines": 9, + "worst_clone_partner": "crates/sc-composer/src/lib.rs", + "worst_clone_co_change": 0 + }, + "reason": "27% of file duplicated; worst clone shares 9 lines with crates/sc-composer/src/lib.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/lib.rs", + "function_name": null, + "health_impact": 0.3, + "details": { + "prior_defect_count": 1, + "window_days": 180 + }, + "reason": "1 bug-fix touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "churn_risk", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.57, + "details": { + "relative_churn": 1.91, + "churn_percentile": 89.3, + "lines_added_90d": 335, + "lines_deleted_90d": 68, + "commit_count_90d": 7, + "nloc": 211 + }, + "reason": "90-day churn rewrote 1.9x the file's size (403 lines over 211 NLOC, top 11% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.717, + "details": { + "change_entropy": 2.7661, + "change_entropy_pct": 85.8, + "commit_count_90d": 7 + }, + "reason": "changes are scattered across noisy commits (top 14% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 0.855, + "details": { + "scatter": 11, + "commit_count_90d": 7 + }, + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": null, + "health_impact": 1.357, + "details": { + "prior_defect_count": 4, + "window_days": 180 + }, + "reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": "render_formula", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_10167865afc24e4eaa06" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "hot_path_sync_io", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/render.rs", + "function_name": "temporary_directory", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "opportunity_id": "perf2_aa487b4645fc756cca51" + }, + "reason": "a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function" + }, + { + "biomarker_type": "low_cohesion", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": "CaptureTracker", + "health_impact": 0.6, + "details": { + "class_name": "CaptureTracker", + "lcom4": 3, + "method_count": 5, + "field_count": 3 + }, + "reason": "CaptureTracker has low cohesion (LCOM4=3): its 5 methods split into 3 groups that share no fields or calls" + }, + { + "biomarker_type": "complex_method", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": "observe", + "health_impact": 0.847, + "details": { + "ccn": 9, + "cognitive": 15, + "nloc": 20 + }, + "reason": "observe has cyclomatic complexity 9" + }, + { + "biomarker_type": "churn_risk", + "severity": "high", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.875, + "details": { + "relative_churn": 3.11, + "churn_percentile": 98.6, + "lines_added_90d": 881, + "lines_deleted_90d": 381, + "commit_count_90d": 11, + "nloc": 406 + }, + "reason": "90-day churn rewrote 3.1x the file's size (1262 lines over 406 NLOC, top 1.4% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.643, + "details": { + "change_entropy": 3.1731, + "change_entropy_pct": 88.0, + "commit_count_90d": 11 + }, + "reason": "changes are scattered across noisy commits (top 12% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.766, + "details": { + "scatter": 11, + "commit_count_90d": 11 + }, + "reason": "co-changes with 11 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "critical", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 1.216, + "details": { + "prior_defect_count": 5, + "window_days": 180 + }, + "reason": "5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/src/runner.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "large_method", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.375, + "details": { + "nloc": 63, + "ccn": 3 + }, + "reason": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas is 63 lines long" + }, + { + "biomarker_type": "primitive_obsession", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "request", + "health_impact": 0.15, + "details": { + "param_count": 5 + }, + "reason": "request takes 5 parameters" + }, + { + "biomarker_type": "dry_violation", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.35, + "details": { + "duplication_pct": 10.42, + "clone_pair_count": 4, + "worst_clone_lines": 10, + "worst_clone_partner": "crates/sc-composer-beads/src/execute.rs", + "worst_clone_co_change": 3 + }, + "reason": "10% of file duplicated; worst clone shares 10 lines with crates/sc-composer-beads/src/execute.rs (co-changed 3x)" + }, + { + "biomarker_type": "churn_risk", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.36, + "details": { + "relative_churn": 1.28, + "churn_percentile": 93.9, + "lines_added_90d": 526, + "lines_deleted_90d": 39, + "commit_count_90d": 11, + "nloc": 442 + }, + "reason": "90-day churn rewrote 1.3x the file's size (565 lines over 442 NLOC, top 6.1% among repository files eligible for churn ranking)" + }, + { + "biomarker_type": "change_entropy", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 1.057, + "details": { + "change_entropy": 2.3954, + "change_entropy_pct": 82.5, + "commit_count_90d": 11 + }, + "reason": "changes are scattered across noisy commits (top 17% among files eligible for change-entropy ranking); a strong history-based fault predictor" + }, + { + "biomarker_type": "prior_defect", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.7, + "details": { + "prior_defect_count": 2, + "window_days": 180 + }, + "reason": "2 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "panic_macro" + }, + "reason": "panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": null, + "health_impact": 0.019, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": false, + "opportunity_id": "perf2_ca7d13a946ca60665b6a" + }, + "reason": "a filesystem call runs once per loop iteration (N+1 / IO-in-loop)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer-beads/tests/bd_integration.rs::pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "crates/sc-composer-beads/tests/bd_integration.rs::copy_fixture" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_c10a91cc481cca776173" + }, + "reason": "a filesystem call is reached once per loop iteration through pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas -> copy_fixture (cross-function N+1)" + }, + { + "biomarker_type": "io_in_loop", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", + "function_name": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "health_impact": 0.0, + "details": { + "boundary_kind": "filesystem", + "cross_function": true, + "path": [ + "crates/sc-composer-beads/tests/bd_integration.rs::pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", + "crates/sc-composer-beads/src/execute.rs::execute_bead_request", + "crates/sc-composer-beads/src/execute.rs::execute_bead_request_with_runner" + ], + "resolution_basis": "call-site", + "reliable_entry_reachability": false, + "opportunity_id": "perf2_3e62115e0afb7882392a" + }, + "reason": "a filesystem call is reached once per loop iteration through pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas -> execute_bead_request -> execute_bead_request_with_runner (cross-function N+1)" + }, + { + "biomarker_type": "co_change_scatter", + "severity": "medium", + "file_path": "crates/sc-composer-beads/tests/contract.rs", + "function_name": null, + "health_impact": 1.26, + "details": { + "scatter": 8, + "commit_count_90d": 4 + }, + "reason": "co-changes with 8 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/tests/contract.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "dry_violation", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "duplication_pct": 15.49, + "clone_pair_count": 2, + "worst_clone_lines": 11, + "worst_clone_partner": "crates/sc-composer-beads/tests/bd_integration.rs", + "worst_clone_co_change": 0 + }, + "reason": "15% of file duplicated; worst clone shares 11 lines with crates/sc-composer-beads/tests/bd_integration.rs" + }, + { + "biomarker_type": "prior_defect", + "severity": "high", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 1.2, + "details": { + "prior_defect_count": 3, + "window_days": 180 + }, + "reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + }, + { + "biomarker_type": "error_handling", + "severity": "low", + "file_path": "crates/sc-composer-beads/tests/runner_process_tree.rs", + "function_name": null, + "health_impact": 0.15, + "details": { + "kind": "unsafe_unwrap" + }, + "reason": "unwrap/expect turns a recoverable error into a crash" + } + ] +} diff --git a/.sc/repowise/data/repowise-refactoring-targets.json b/.sc/repowise/data/repowise-refactoring-targets.json index be537f61..6b7a5df0 100644 --- a/.sc/repowise/data/repowise-refactoring-targets.json +++ b/.sc/repowise/data/repowise-refactoring-targets.json @@ -1,3036 +1 @@ -repowise health — /Users/randlee/Documents/github/sc-compose-worktrees/sc/repowise-update2 -{ - "targets": [ - { - "file_path": "crates/sc-composer/src/diagnostics.rs", - "score": 4.5, - "nloc": 9, - "primary_biomarker": "untested_hotspot", - "primary_severity": "critical", - "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 37 dependents", - "total_impact": 5.5, - "effort_bucket": "S", - "impact_per_effort": 5.5, - "finding_count": 5, - "plans": [] - }, - { - "file_path": "crates/sc-compose/tests/cli.rs", - "score": 6.5, - "nloc": 15, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.5, - "effort_bucket": "S", - "impact_per_effort": 3.5, - "finding_count": 3, - "plans": [] - }, - { - "file_path": "crates/sc-compose/tests/json_cli.rs", - "score": 6.5, - "nloc": 15, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.5, - "effort_bucket": "S", - "impact_per_effort": 3.5, - "finding_count": 3, - "plans": [] - }, - { - "file_path": "crates/sc-compose/src/cli/capability.rs", - "score": 5.25, - "nloc": 46, - "primary_biomarker": "complex_method", - "primary_severity": "high", - "primary_reason": "command_wants_json has cyclomatic complexity 22", - "total_impact": 4.754, - "effort_bucket": "M", - "impact_per_effort": 2.377, - "finding_count": 5, - "plans": [] - }, - { - "file_path": "crates/sc-compose/src/commands/compose.rs", - "score": 3.44, - "nloc": 314, - "primary_biomarker": "untested_hotspot", - "primary_severity": "high", - "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents", - "total_impact": 6.56, - "effort_bucket": "L", - "impact_per_effort": 2.187, - "finding_count": 12, - "plans": [ - { - "id": "", - "refactoring_type": "extract_method", - "file_path": "crates/sc-compose/src/commands/compose.rs", - "target_symbol": "run_checked_validate", - "line_start": 182, - "line_end": 254, - "plan": { - "span": { - "start": 189, - "end": 236 - }, - "params": [ - "diagnostics", - "observer", - "request", - "resolved_path" - ], - "returns": [ - "report" - ], - "suggested_name": "compute_report" - }, - "evidence": { - "slice_nloc": 48, - "ccn_removed": 5 - }, - "impact_delta": 0.322, - "effort_bucket": "M", - "blast_radius": { - "scope": "local" - }, - "confidence": "high", - "source_biomarker": "large_method", - "benefit": 0.322, - "leverage": 5.2432, - "cost": 2.0, - "risk": 1.5, - "rank_score": 1.8341, - "dependents": 4, - "file_nloc": 314, - "file_weighted_deficit": 1432, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-compose/src/commands/compose.rs" - ], - "affected_symbols": [ - "run_checked_validate" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-compose/src/commands/compose.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "score": 3.56, - "nloc": 256, - "primary_biomarker": "complex_method", - "primary_severity": "high", - "primary_reason": "repo_keeps_standalone_boundary_rules has cyclomatic complexity 18", - "total_impact": 6.436, - "effort_bucket": "L", - "impact_per_effort": 2.145, - "finding_count": 20, - "plans": [ - { - "id": "", - "refactoring_type": "extract_method", - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "target_symbol": "repo_keeps_standalone_boundary_rules", - "line_start": 185, - "line_end": 279, - "plan": { - "span": { - "start": 187, - "end": 278 - }, - "params": [ - "root" - ], - "returns": [], - "suggested_name": "repo_keeps_standalone_boundary_rules_helper" - }, - "evidence": { - "slice_nloc": 88, - "ccn_removed": 15 - }, - "impact_delta": 1.192, - "effort_bucket": "M", - "blast_radius": { - "scope": "local" - }, - "confidence": "high", - "source_biomarker": "complex_method", - "benefit": 1.192, - "leverage": 4.2117, - "cost": 2.0, - "risk": 0.75, - "rank_score": 3.0464, - "dependents": 1, - "file_nloc": 256, - "file_weighted_deficit": 1137, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-compose/tests/repo_boundaries.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-compose/tests/repo_boundaries.rs" - ], - "affected_symbols": [ - "repo_keeps_standalone_boundary_rules" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-compose/tests/repo_boundaries.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-compose/tests/repo_boundaries.rs" - ], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "crates/sc-composer/src/extract/xml.rs", - "score": 3.79, - "nloc": 324, - "primary_biomarker": "nested_complexity", - "primary_severity": "high", - "primary_reason": "map_raw_text_error nests 5 levels deep", - "total_impact": 6.208, - "effort_bucket": "L", - "impact_per_effort": 2.069, - "finding_count": 9, - "plans": [ - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/extract/xml.rs", - "target_symbol": "xml.rs:253-268", - "line_start": 253, - "line_end": 268, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/extract/xml.rs", - "line_start": 253, - "line_end": 268 - }, - { - "file": "crates/sc-composer/src/extract/xml.rs", - "line_start": 279, - "line_end": 294 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src/extract" - }, - "duplicated_lines": 16, - "snippet": " raw_text::RawTextErrorScope::Request => match error {\n raw_text::RawTextMatchError::InvalidTemplate { span, message } => {\n ExtractError::format_error(\n DiagnosticCode::ErrExtractTemplateUnsupported,\n ExtractionDiagnosticKind::Unsupported,\n with_span(&message, span),\n RecoveryHintKind::UnsupportedConstruct {\n description: \"use supported scalar XML placeholders\".to_owned(),\n },\n )\n }\n raw_text::RawTextMatchError::StaticMismatch { span, message } => {\n ExtractError::format_error(\n DiagnosticCode::ErrExtractXmlStaticMismatch,\n ExtractionDiagnosticKind::Unsupported,\n with_span(&message, span),", - "snippet_start_line": 253, - "snippet_truncated": false, - "suggested_name": "extract_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 16, - "token_count": 1750, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 4.3026, - "cost": 1.0, - "risk": 2.0, - "rank_score": 2.6513, - "dependents": 1, - "file_nloc": 324, - "file_weighted_deficit": 1364, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/extract/xml.rs" - ], - "affected_symbols": [ - "xml.rs:253-268" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/extract/xml.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "split_file", - "file_path": "crates/sc-composer/src/extract/xml.rs", - "target_symbol": "xml.rs -> 4 files", - "line_start": null, - "line_end": null, - "plan": { - "groups": [ - { - "name": "malformed", - "symbols": [ - "evidence_confidence", - "is_single_variable", - "malformed", - "malformed_with_source", - "selected_variable" - ], - "suggested_file": "crates/sc-composer/src/extract/malformed.rs" - }, - { - "name": "error", - "symbols": [ - "format_path", - "map_raw_text_error", - "parse_value_segments", - "with_span" - ], - "suggested_file": "crates/sc-composer/src/extract/error.rs" - }, - { - "name": "mod", - "symbols": [ - "dirty_prefix_diagnostic", - "extract_xml", - "missing_occurrence_report" - ], - "suggested_file": "crates/sc-composer/src/extract/mod.rs" - }, - { - "name": "input", - "symbols": [ - "input_limit_error", - "validate_input_size" - ], - "suggested_file": "crates/sc-composer/src/extract/input.rs" - } - ], - "residual": null, - "shim_required": true - }, - "evidence": { - "file_nloc": 324, - "symbol_count": 14, - "group_count": 4, - "modularity": 0.313, - "intra_edges": 17, - "cut_edges": 22, - "cochange_edges": 24, - "import_edges": 1 - }, - "impact_delta": 0.0, - "effort_bucket": "L", - "blast_radius": { - "dependent_files": [ - "crates/sc-composer/src/extract/mod.rs" - ], - "dependent_count": 1, - "import_rewrites": 1 - }, - "confidence": "medium", - "source_biomarker": "", - "benefit": 2.3863, - "leverage": 4.3026, - "cost": 4.6094, - "risk": 2.6094, - "rank_score": 2.1847, - "dependents": 1, - "file_nloc": 324, - "file_weighted_deficit": 1364, - "validation": { - "basis": "mixed", - "via": "call-graph", - "total": 2, - "tests": [ - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/extract/error.rs", - "crates/sc-composer/src/extract/input.rs", - "crates/sc-composer/src/extract/malformed.rs", - "crates/sc-composer/src/extract/mod.rs", - "crates/sc-composer/src/extract/xml.rs" - ], - "affected_symbols": [ - "xml.rs -> 4 files" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/extract/error.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/extract/input.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/extract/malformed.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/extract/mod.rs", - "basis": "inferred", - "via": "call-graph", - "total": 2, - "tests": [ - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/extract/xml.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_method", - "file_path": "crates/sc-composer/src/extract/xml.rs", - "target_symbol": "extract_xml", - "line_start": 76, - "line_end": 166, - "plan": { - "span": { - "start": 137, - "end": 163 - }, - "params": [ - "diagnostics", - "evidence", - "occurrences", - "selected", - "values" - ], - "returns": [ - "confidence" - ], - "suggested_name": "compute_confidence" - }, - "evidence": { - "slice_nloc": 26, - "ccn_removed": 3 - }, - "impact_delta": 0.375, - "effort_bucket": "S", - "blast_radius": { - "scope": "local" - }, - "confidence": "medium", - "source_biomarker": "large_method", - "benefit": 0.375, - "leverage": 4.3026, - "cost": 1.0, - "risk": 2.0, - "rank_score": 1.8228, - "dependents": 1, - "file_nloc": 324, - "file_weighted_deficit": 1364, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/extract/xml.rs" - ], - "affected_symbols": [ - "extract_xml" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/extract/xml.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "crates/sc-composer-beads/src/error.rs", - "score": 5.98, - "nloc": 135, - "primary_biomarker": "untested_hotspot", - "primary_severity": "high", - "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 8 dependents", - "total_impact": 4.02, - "effort_bucket": "M", - "impact_per_effort": 2.01, - "finding_count": 3, - "plans": [] - }, - { - "file_path": "crates/sc-compose/src/path_utils.rs", - "score": 6.0, - "nloc": 69, - "primary_biomarker": "untested_hotspot", - "primary_severity": "critical", - "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 22 dependents", - "total_impact": 4.0, - "effort_bucket": "M", - "impact_per_effort": 2.0, - "finding_count": 2, - "plans": [] - }, - { - "file_path": "crates/sc-composer-beads/src/runner.rs", - "score": 4.42, - "nloc": 254, - "primary_biomarker": "prior_defect", - "primary_severity": "critical", - "primary_reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", - "total_impact": 5.585, - "effort_bucket": "L", - "impact_per_effort": 1.862, - "finding_count": 8, - "plans": [] - }, - { - "file_path": "crates/sc-composer/src/extract/xml_model.rs", - "score": 4.44, - "nloc": 227, - "primary_biomarker": "untested_hotspot", - "primary_severity": "high", - "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents", - "total_impact": 5.558, - "effort_bucket": "L", - "impact_per_effort": 1.853, - "finding_count": 6, - "plans": [] - }, - { - "file_path": "crates/sc-compose/tests/sc_lint_runner.rs", - "score": 6.33, - "nloc": 139, - "primary_biomarker": "co_change_scatter", - "primary_severity": "medium", - "primary_reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.665, - "effort_bucket": "M", - "impact_per_effort": 1.833, - "finding_count": 11, - "plans": [] - }, - { - "file_path": "crates/sc-compose/src/commands/mod.rs", - "score": 6.35, - "nloc": 86, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 23 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.65, - "effort_bucket": "M", - "impact_per_effort": 1.825, - "finding_count": 5, - "plans": [ - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-compose/src/commands/mod.rs", - "target_symbol": "mod.rs:1-13", - "line_start": 1, - "line_end": 13, - "plan": { - "occurrences": [ - { - "file": "crates/sc-compose/src/commands/mod.rs", - "line_start": 1, - "line_end": 13 - }, - { - "file": "crates/sc-compose/src/reporting/mod.rs", - "line_start": 1, - "line_end": 13 - } - ], - "suggested_site": { - "directory": "crates/sc-compose/src" - }, - "duplicated_lines": 13, - "snippet": "pub(crate) mod bead;\npub(crate) mod compose;\npub(crate) mod dispatch;\npub(crate) mod examples;\npub(crate) mod extract;\npub(crate) mod help;\npub(crate) mod reports;\npub(crate) mod sc_lint;\npub(crate) mod template_init;\npub(crate) mod template_lint;\npub(crate) mod templates;\npub(crate) mod verify;\npub(crate) mod workspace;", - "snippet_start_line": 1, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 13, - "token_count": 12600, - "co_change_count": 0, - "is_intra_file": false - }, - "impact_delta": 0.15, - "effort_bucket": "S", - "blast_radius": { - "files": [ - "crates/sc-compose/src/reporting/mod.rs" - ], - "file_count": 1, - "co_change_count": 0, - "callers": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 0.15, - "leverage": 3.8677, - "cost": 1.6931, - "risk": 2.6931, - "rank_score": 1.0393, - "dependents": 3, - "file_nloc": 86, - "file_weighted_deficit": 142, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-compose/src/commands/mod.rs", - "crates/sc-compose/src/reporting/mod.rs" - ], - "affected_symbols": [ - "mod.rs:1-13" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-compose/src/commands/mod.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-compose/src/reporting/mod.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "crates/sc-compose/src/commands/examples.rs", - "score": 8.2, - "nloc": 38, - "primary_biomarker": "prior_defect", - "primary_severity": "high", - "primary_reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", - "total_impact": 1.8, - "effort_bucket": "S", - "impact_per_effort": 1.8, - "finding_count": 2, - "plans": [ - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-compose/src/commands/examples.rs", - "target_symbol": "examples.rs:16-28", - "line_start": 16, - "line_end": 28, - "plan": { - "occurrences": [ - { - "file": "crates/sc-compose/src/commands/examples.rs", - "line_start": 16, - "line_end": 28 - }, - { - "file": "crates/sc-compose/src/commands/templates.rs", - "line_start": 20, - "line_end": 32 - } - ], - "suggested_site": { - "directory": "crates/sc-compose/src/commands" - }, - "duplicated_lines": 13, - "snippet": " let packs = store.list().map_err(pack_not_renderable_error)?;\n print_pack_list(&packs, args.json).map_err(CommandError::usage)?;\n Ok(crate::exit_codes::SUCCESS)\n}\n\npub(crate) fn run_examples_render(\n args: &ExamplesArgs,\n observer: &mut dyn CompositionObserver,\n) -> Result {\n let name = args\n .name\n .as_deref()\n .ok_or_else(|| CommandError::usage(anyhow!(\"missing example pack name\")))?;", - "snippet_start_line": 16, - "snippet_truncated": false, - "suggested_name": "commands_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 13, - "token_count": 1600, - "co_change_count": 3, - "is_intra_file": false - }, - "impact_delta": 0.6, - "effort_bucket": "S", - "blast_radius": { - "files": [ - "crates/sc-compose/src/commands/templates.rs" - ], - "file_count": 1, - "co_change_count": 3, - "callers": 0 - }, - "confidence": "high", - "source_biomarker": "dry_violation", - "benefit": 0.6, - "leverage": 1.0986, - "cost": 1.6931, - "risk": 2.1931, - "rank_score": 0.6872, - "dependents": 2, - "file_nloc": 38, - "file_weighted_deficit": 0, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-compose/src/commands/examples.rs", - "crates/sc-compose/src/commands/templates.rs" - ], - "affected_symbols": [ - "examples.rs:16-28" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-compose/src/commands/examples.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-compose/src/commands/templates.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": ".github/scripts/tests/test_publish_kit_assets.py", - "score": 6.44, - "nloc": 82, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.558, - "effort_bucket": "M", - "impact_per_effort": 1.779, - "finding_count": 10, - "plans": [] - }, - { - "file_path": "plugins/sc-publish/.github/scripts/tests/test_publish_kit_assets.py", - "score": 6.44, - "nloc": 82, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.558, - "effort_bucket": "M", - "impact_per_effort": 1.779, - "finding_count": 10, - "plans": [] - }, - { - "file_path": "crates/sc-composer/src/discovery.rs", - "score": 4.71, - "nloc": 271, - "primary_biomarker": "prior_defect", - "primary_severity": "critical", - "primary_reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", - "total_impact": 5.285, - "effort_bucket": "L", - "impact_per_effort": 1.762, - "finding_count": 6, - "plans": [ - { - "id": "", - "refactoring_type": "break_cycle", - "file_path": "crates/sc-composer/src/discovery.rs", - "target_symbol": "cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs", - "line_start": null, - "line_end": null, - "plan": { - "cycle": [ - "crates/sc-composer/src/discovery.rs", - "crates/sc-composer/src/error.rs", - "crates/sc-composer/src/frontmatter/mod.rs", - "crates/sc-composer/src/frontmatter/model.rs", - "crates/sc-composer/src/frontmatter/normalizer.rs", - "crates/sc-composer/src/frontmatter/parser.rs", - "crates/sc-composer/src/include.rs", - "crates/sc-composer/src/validation/diagnostics.rs", - "crates/sc-composer/src/validation/mod.rs", - "crates/sc-composer/src/validation/required_paths.rs", - "crates/sc-composer/src/validation/state.rs" - ], - "cut_edges": [ - { - "from": "crates/sc-composer/src/error.rs", - "to": "crates/sc-composer/src/validation/mod.rs" - }, - { - "from": "crates/sc-composer/src/include.rs", - "to": "crates/sc-composer/src/error.rs" - }, - { - "from": "crates/sc-composer/src/include.rs", - "to": "crates/sc-composer/src/frontmatter/mod.rs" - }, - { - "from": "crates/sc-composer/src/validation/state.rs", - "to": "crates/sc-composer/src/validation/mod.rs" - } - ] - }, - "evidence": { - "cycle_size": 11, - "edge_count": 26, - "cut_count": 4 - }, - "impact_delta": 0.0, - "effort_bucket": "XL", - "blast_radius": { - "files": [ - "crates/sc-composer/src/discovery.rs", - "crates/sc-composer/src/error.rs", - "crates/sc-composer/src/frontmatter/mod.rs", - "crates/sc-composer/src/frontmatter/model.rs", - "crates/sc-composer/src/frontmatter/normalizer.rs", - "crates/sc-composer/src/frontmatter/parser.rs", - "crates/sc-composer/src/include.rs", - "crates/sc-composer/src/validation/diagnostics.rs", - "crates/sc-composer/src/validation/mod.rs", - "crates/sc-composer/src/validation/required_paths.rs", - "crates/sc-composer/src/validation/state.rs" - ], - "file_count": 11, - "callers": 54 - }, - "confidence": "medium", - "source_biomarker": "", - "benefit": 3.4849, - "leverage": 5.3432, - "cost": 9.0073, - "risk": 5.0073, - "rank_score": 1.8947, - "dependents": 6, - "file_nloc": 271, - "file_weighted_deficit": 892, - "validation": { - "basis": "mixed", - "via": "mixed", - "total": 2, - "tests": [ - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/discovery.rs", - "crates/sc-composer/src/error.rs", - "crates/sc-composer/src/frontmatter/mod.rs", - "crates/sc-composer/src/frontmatter/model.rs", - "crates/sc-composer/src/frontmatter/normalizer.rs", - "crates/sc-composer/src/frontmatter/parser.rs", - "crates/sc-composer/src/include.rs", - "crates/sc-composer/src/validation/diagnostics.rs", - "crates/sc-composer/src/validation/mod.rs", - "crates/sc-composer/src/validation/required_paths.rs", - "crates/sc-composer/src/validation/state.rs" - ], - "affected_symbols": [ - "cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/discovery.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/error.rs", - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/frontmatter/mod.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/frontmatter/model.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/frontmatter/parser.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/validation/diagnostics.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/validation/mod.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/validation/required_paths.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/validation/state.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/discovery.rs", - "target_symbol": "discovery.rs:320-330", - "line_start": 320, - "line_end": 330, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/discovery.rs", - "line_start": 320, - "line_end": 330 - }, - { - "file": "crates/sc-composer/src/validation/mod.rs", - "line_start": 587, - "line_end": 597 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 11, - "snippet": " let tokens = discover_all_pass_tokens(&parsed);\n\n assert_eq!(\n tokens.get(&1).cloned().unwrap_or_default(),\n [crate::VariableName::new(\"inner\").unwrap()].into()\n );\n assert_eq!(\n tokens.get(&2).cloned().unwrap_or_default(),\n [crate::VariableName::new(\"outer\").unwrap()].into()\n );\n }", - "snippet_start_line": 320, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 11, - "token_count": 2000, - "co_change_count": 2, - "is_intra_file": false - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [ - "crates/sc-composer/src/validation/mod.rs" - ], - "file_count": 1, - "co_change_count": 2, - "callers": 4 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 5.3432, - "cost": 2.6094, - "risk": 3.6094, - "rank_score": 1.7574, - "dependents": 6, - "file_nloc": 271, - "file_weighted_deficit": 892, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/discovery.rs", - "crates/sc-composer/src/validation/mod.rs" - ], - "affected_symbols": [ - "discovery.rs:320-330" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/discovery.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/validation/mod.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "crates/sc-compose/src/main.rs", - "score": 6.5, - "nloc": 138, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.5, - "effort_bucket": "M", - "impact_per_effort": 1.75, - "finding_count": 3, - "plans": [] - }, - { - "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", - "score": 6.5, - "nloc": 149, - "primary_biomarker": "nested_complexity", - "primary_severity": "high", - "primary_reason": "path_exists nests 5 levels deep", - "total_impact": 3.497, - "effort_bucket": "M", - "impact_per_effort": 1.748, - "finding_count": 4, - "plans": [ - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", - "target_symbol": "xml_evidence.rs:100-111", - "line_start": 100, - "line_end": 111, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/extract/xml_evidence.rs", - "line_start": 100, - "line_end": 111 - }, - { - "file": "crates/sc-composer/src/extract/xml_match.rs", - "line_start": 199, - "line_end": 213 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src/extract" - }, - "duplicated_lines": 15, - "snippet": " let element = document.element(*element_id);\n let ordinal = element_ordinals.entry(element.name.clone()).or_default();\n let child_path = path\n .iter()\n .cloned()\n .chain([XmlPathSegment::Element {\n name: element.name.clone(),\n ordinal: *ordinal,\n }])\n .collect::>();\n *ordinal += 1;\n collect_template_occurrences(document, *element_id, &child_path, occurrences)?;", - "snippet_start_line": 100, - "snippet_truncated": false, - "suggested_name": "extract_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 15, - "token_count": 1850, - "co_change_count": 0, - "is_intra_file": false - }, - "impact_delta": 0.15, - "effort_bucket": "S", - "blast_radius": { - "files": [ - "crates/sc-composer/src/extract/xml_match.rs" - ], - "file_count": 1, - "co_change_count": 0, - "callers": 1 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 0.15, - "leverage": 3.4012, - "cost": 1.6931, - "risk": 2.6931, - "rank_score": 0.9397, - "dependents": 1, - "file_nloc": 149, - "file_weighted_deficit": 224, - "validation": { - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/extract/xml_evidence.rs", - "crates/sc-composer/src/extract/xml_match.rs" - ], - "affected_symbols": [ - "xml_evidence.rs:100-111" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - }, - { - "file_path": "crates/sc-composer/src/extract/xml_match.rs", - "basis": "unknown", - "via": null, - "total": 0, - "tests": [], - "truncated": false - } - ] - } - } - ] - }, - { - "file_path": "plugins/sc-publish/.github/scripts/release_gate.sh", - "score": 6.54, - "nloc": 50, - "primary_biomarker": "co_change_scatter", - "primary_severity": "high", - "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", - "total_impact": 3.46, - "effort_bucket": "M", - "impact_per_effort": 1.73, - "finding_count": 3, - "plans": [] - } - ], - "refactoring_plans": [ - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/types.rs", - "target_symbol": "types.rs:132-144", - "line_start": 132, - "line_end": 144, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 132, - "line_end": 144 - }, - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 208, - "line_end": 218 - }, - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 270, - "line_end": 282 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 13, - "snippet": "#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]\n#[serde(transparent)]\npub struct VariableName(String);\n\nimpl VariableName {\n /// Create a validated variable name.\n ///\n /// # Errors\n ///\n /// Returns [`InvalidVariableNameError`] when the name is empty or contains\n /// characters outside the supported identifier set.\n pub fn new(name: impl Into) -> Result {\n let name = name.into();", - "snippet_start_line": 132, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 3, - "duplicated_lines": 13, - "token_count": 800, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 7.3735, - "cost": 1.0, - "risk": 1.25, - "rank_score": 5.1529, - "dependents": 41, - "file_nloc": 575, - "file_weighted_deficit": 1438, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/types.rs" - ], - "affected_symbols": [ - "types.rs:132-144" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/types.rs", - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/types.rs", - "target_symbol": "types.rs:205-218", - "line_start": 205, - "line_end": 218, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 205, - "line_end": 218 - }, - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 267, - "line_end": 281 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 15, - "snippet": "}\n\n/// Canonicalized root path used for confinement checks.\n#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]\n#[serde(transparent)]\npub struct ConfiningRoot(PathBuf);\n\nimpl ConfiningRoot {\n /// Canonicalize and validate a confinement root.\n ///\n /// # Errors\n ///\n /// Returns [`std::io::Error`] when the path cannot be canonicalized.\n pub fn new(path: impl AsRef) -> Result {", - "snippet_start_line": 205, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 15, - "token_count": 500, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 7.3735, - "cost": 1.0, - "risk": 1.25, - "rank_score": 5.1529, - "dependents": 41, - "file_nloc": 575, - "file_weighted_deficit": 1438, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/types.rs" - ], - "affected_symbols": [ - "types.rs:205-218" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/types.rs", - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/types.rs", - "target_symbol": "types.rs:655-666", - "line_start": 655, - "line_end": 666, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 655, - "line_end": 666 - }, - { - "file": "crates/sc-composer/src/types.rs", - "line_start": 799, - "line_end": 810 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 12, - "snippet": " assert_eq!(variable.to_string(), \"profile.name_1\");\n }\n\n #[test]\n fn variable_name_rejects_empty_string() {\n let error = VariableName::new(\"\").unwrap_err();\n assert_eq!(error.name(), \"\");\n }\n\n #[test]\n fn variable_name_rejects_invalid_characters() {\n let error = VariableName::new(\"bad name!\").unwrap_err();", - "snippet_start_line": 655, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 12, - "token_count": 500, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 7.3735, - "cost": 1.0, - "risk": 1.25, - "rank_score": 5.1529, - "dependents": 41, - "file_nloc": 575, - "file_weighted_deficit": 1438, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/types.rs" - ], - "affected_symbols": [ - "types.rs:655-666" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/types.rs", - "basis": "inferred", - "via": "call-graph", - "total": 5, - "tests": [ - "bindings/python/src/convert/tests.rs", - "crates/sc-compose/src/render_request/tests.rs", - "crates/sc-composer/src/extract/tests.rs", - "crates/sc-composer/tests/extract_integration.rs", - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/lib.rs", - "target_symbol": "lib.rs:113-120", - "line_start": 113, - "line_end": 120, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/lib.rs", - "line_start": 113, - "line_end": 120 - }, - { - "file": "crates/sc-composer/src/lib.rs", - "line_start": 126, - "line_end": 133 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 8, - "snippet": " CanonicalSource, CanonicalSourceError, CanonicalSourceUrl, CanonicalTemplatePath,\n CompositionError, CompositionSha256, HashInput, HashResult, ManifestSchemaVersion,\n ResolvedIncludeEdge, ResolvedTemplateManifest, ResolvedTemplateNode, ShaError, TemplateSha256,\n calculate_composition_hash, calculate_hash,\n};\n#[doc(inline)]\npub use template_ext::{\n is_json_template_path, strip_all_template_suffixes, template_content_extension,", - "snippet_start_line": 113, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 8, - "token_count": 150, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.6648, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.7168, - "dependents": 37, - "file_nloc": 230, - "file_weighted_deficit": 425, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/extract_integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/lib.rs" - ], - "affected_symbols": [ - "lib.rs:113-120" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/lib.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/extract_integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/error.rs", - "target_symbol": "error.rs:123-130", - "line_start": 123, - "line_end": 130, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 123, - "line_end": 130 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 135, - "line_end": 142 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 8, - "snippet": " let error = ComposeError::from(Renderer::with_delimiters(\"\", \"\").unwrap_err());\n let mut formatted = error.to_string();\n if let Some(source) = error.source() {\n formatted.push_str(\": \");\n formatted.push_str(&source.to_string());\n }\n\n assert_eq!(formatted.matches(\"invalid custom delimiters\").count(), 1);", - "snippet_start_line": 123, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 8, - "token_count": 100, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.267, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.472, - "dependents": 23, - "file_nloc": 260, - "file_weighted_deficit": 481, - "validation": { - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/error.rs" - ], - "affected_symbols": [ - "error.rs:123-130" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/error.rs", - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/error.rs", - "target_symbol": "error.rs:159-168", - "line_start": 159, - "line_end": 168, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 159, - "line_end": 168 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 177, - "line_end": 184 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 189, - "line_end": 196 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 217, - "line_end": 224 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " assert!(error.to_string().contains(\"missing\"));\n assert!(error.to_string().contains(\"backtrace\"));\n assert!(error.source().is_some());\n }\n\n #[test]\n fn include_error_constructor_roundtrip_and_display() {\n let error = IncludeError::new(\n DiagnosticCode::ErrIncludeEscape,\n \"include escaped root\",", - "snippet_start_line": 159, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 4, - "duplicated_lines": 10, - "token_count": 500, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.267, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.472, - "dependents": 23, - "file_nloc": 260, - "file_weighted_deficit": 481, - "validation": { - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/error.rs" - ], - "affected_symbols": [ - "error.rs:159-168" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/error.rs", - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/error.rs", - "target_symbol": "error.rs:177-184", - "line_start": 177, - "line_end": 184, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 177, - "line_end": 184 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 189, - "line_end": 196 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 217, - "line_end": 224 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 8, - "snippet": " assert!(error.to_string().contains(\"escape\"));\n assert!(error.to_string().contains(\"backtrace\"));\n assert!(error.source().is_some());\n }\n\n #[test]\n fn validation_error_constructor_roundtrip_and_display() {\n let variable = VariableName::new(\"name\").unwrap();", - "snippet_start_line": 177, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 3, - "duplicated_lines": 8, - "token_count": 150, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.267, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.472, - "dependents": 23, - "file_nloc": 260, - "file_weighted_deficit": 481, - "validation": { - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/error.rs" - ], - "affected_symbols": [ - "error.rs:177-184" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/error.rs", - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/error.rs", - "target_symbol": "error.rs:189-197", - "line_start": 189, - "line_end": 197, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 189, - "line_end": 197 - }, - { - "file": "crates/sc-composer/src/error.rs", - "line_start": 217, - "line_end": 224 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 9, - "snippet": " assert!(error.to_string().contains(\"duplicate frontmatter variable\"));\n assert!(error.to_string().contains(\"backtrace\"));\n assert!(error.source().is_none());\n }\n\n #[test]\n fn render_error_constructor_roundtrip_and_display() {\n let error = RenderError::render(std::io::Error::other(\"render failed\"));\n assert_eq!(error.code(), None);", - "snippet_start_line": 189, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 9, - "token_count": 900, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.267, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.472, - "dependents": 23, - "file_nloc": 260, - "file_weighted_deficit": 481, - "validation": { - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/error.rs" - ], - "affected_symbols": [ - "error.rs:189-197" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/error.rs", - "basis": "inferred", - "via": "import-graph", - "total": 1, - "tests": [ - "crates/sc-composer/src/extract/tests.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/renderer.rs", - "target_symbol": "renderer.rs:1080-1088", - "line_start": 1080, - "line_end": 1088, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 1080, - "line_end": 1088 - }, - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 1094, - "line_end": 1102 - }, - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 1105, - "line_end": 1114 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " assert_eq!(output, r#\"\"backslash \\\\ and \\\"quote\\\"\"\"#);\n let parsed: String = serde_yaml::from_str(&output).unwrap();\n assert_eq!(parsed, original);\n }\n\n #[test]\n fn yaml_safe_uses_literal_control_character_escapes() {\n let renderer = Renderer::new();\n let original = \"line\\nnext\\tcolumn\\r\";", - "snippet_start_line": 1080, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 3, - "duplicated_lines": 10, - "token_count": 50, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.2302, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.4493, - "dependents": 8, - "file_nloc": 1079, - "file_weighted_deficit": 3183, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/renderer.rs" - ], - "affected_symbols": [ - "renderer.rs:1080-1088" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/renderer.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/renderer.rs", - "target_symbol": "renderer.rs:765-782", - "line_start": 765, - "line_end": 782, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 765, - "line_end": 782 - }, - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 798, - "line_end": 805 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 18, - "snippet": " assert_eq!(parsed[\"sprint_id\"], json!(injected));\n assert!(parsed.get(\"injected\").is_none());\n }\n\n #[test]\n fn renderer_json_legacy_mode_round_trips_manually_quoted_strings() {\n let renderer = Renderer::with_json_escape_mode(JsonEscapeMode::Legacy);\n let original = \"quote \\\" slash \\\\\\nline \\u{0001} \u2603\";\n let output = renderer\n .render_named(\n \"payload.json.j2\",\n r#\"{\"value\": \"{{ value }}\"}\"#,\n json!({\"value\": original}),\n )\n .unwrap();\n\n let parsed: serde_json::Value = serde_json::from_str(&output).unwrap();\n assert_eq!(parsed[\"value\"], json!(original));", - "snippet_start_line": 765, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 18, - "token_count": 1100, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.2302, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.4493, - "dependents": 8, - "file_nloc": 1079, - "file_weighted_deficit": 3183, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/renderer.rs" - ], - "affected_symbols": [ - "renderer.rs:765-782" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/renderer.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/renderer.rs", - "target_symbol": "renderer.rs:959-968", - "line_start": 959, - "line_end": 968, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 959, - "line_end": 968 - }, - { - "file": "crates/sc-composer/src/renderer.rs", - "line_start": 1015, - "line_end": 1024 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " json!({\"value\": original}),\n )\n .unwrap();\n\n let mut reader = Reader::from_str(&output);\n reader.config_mut().trim_text(false);\n let mut content = String::new();\n loop {\n match reader.read_event().unwrap() {\n Event::CData(value) => content.push_str(str::from_utf8(value.as_ref()).unwrap()),", - "snippet_start_line": 959, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 10, - "token_count": 650, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.2302, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.4493, - "dependents": 8, - "file_nloc": 1079, - "file_weighted_deficit": 3183, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/renderer.rs" - ], - "affected_symbols": [ - "renderer.rs:959-968" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/renderer.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:146-155", - "line_start": 146, - "line_end": 155, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 146, - "line_end": 155 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 454, - "line_end": 462 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 474, - "line_end": 483 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 641, - "line_end": 650 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 773, - "line_end": 782 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " write_file(&root.join(\"child.md\"), \"child\\n\");\n\n let expanded = expand_includes(\n root.join(\"root.md.j2\"),\n &ConfiningRoot::new(&root).unwrap(),\n &ComposePolicy::default(),\n )\n .unwrap();\n\n assert_eq!(expanded.text, \"child\\nchild\\n\");", - "snippet_start_line": 146, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 5, - "duplicated_lines": 10, - "token_count": 150, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:146-155" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:187-197", - "line_start": 187, - "line_end": 197, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 187, - "line_end": 197 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 199, - "line_end": 209 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 11, - "snippet": " write_file(&root.join(\"unrelated.md\"), \"outside v2\\n\");\n let unrelated = expand_includes(\n root.join(\"root.md.j2\"),\n &ConfiningRoot::new(&root).unwrap(),\n &policy,\n )\n .unwrap()\n .composition_fingerprint\n .unwrap()\n .source_sha;\n assert_eq!(first, unrelated);", - "snippet_start_line": 187, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 11, - "token_count": 350, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:187-197" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:201-214", - "line_start": 201, - "line_end": 214, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 201, - "line_end": 214 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 403, - "line_end": 416 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 14, - "snippet": " root.join(\"root.md.j2\"),\n &ConfiningRoot::new(&root).unwrap(),\n &policy,\n )\n .unwrap()\n .composition_fingerprint\n .unwrap()\n .source_sha;\n assert_ne!(first, nested);\n }\n\n #[test]\n fn diamond_dependency_deduplicates_nodes_and_keeps_edges() {\n let root = temp_root(\"include_fingerprint_diamond\");", - "snippet_start_line": 201, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 14, - "token_count": 300, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:201-214" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:221-232", - "line_start": 221, - "line_end": 232, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 221, - "line_end": 232 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 281, - "line_end": 290 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 12, - "snippet": " root.join(\"root.md.j2\"),\n &ConfiningRoot::new(&root).unwrap(),\n &ComposePolicy::default(),\n )\n .unwrap();\n let fingerprint = expanded.composition_fingerprint.unwrap();\n assert_eq!(fingerprint.manifest.nodes.len(), 4);\n assert_eq!(fingerprint.manifest.edges.len(), 4);\n assert_eq!(\n fingerprint\n .manifest\n .nodes", - "snippet_start_line": 221, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 12, - "token_count": 1550, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:221-232" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:248-259", - "line_start": 248, - "line_end": 259, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 248, - "line_end": 259 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 294, - "line_end": 303 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 342, - "line_end": 354 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 13, - "snippet": " write_file(&root.join(\"b.md\"), \"same\\n\");\n\n let fingerprint = expand_includes(\n root.join(\"root.md\"),\n &ConfiningRoot::new(&root).unwrap(),\n &ComposePolicy::default(),\n )\n .unwrap()\n .composition_fingerprint\n .unwrap();\n\n assert_eq!(fingerprint.manifest.nodes.len(), 3);", - "snippet_start_line": 248, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 3, - "duplicated_lines": 13, - "token_count": 600, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:248-259" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:294-303", - "line_start": 294, - "line_end": 303, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 294, - "line_end": 303 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 342, - "line_end": 354 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 13, - "snippet": " write_file(&root.join(\"root.md\"), \"@\\n\");\n let single_candidate = expand_includes(\n root.join(\"root.md\"),\n &ConfiningRoot::new(&root).unwrap(),\n &ComposePolicy::default(),\n )\n .unwrap()\n .composition_fingerprint\n .unwrap();\n assert_ne!(fingerprint.source_sha, single_candidate.source_sha);", - "snippet_start_line": 294, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 13, - "token_count": 350, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:294-303" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:312-321", - "line_start": 312, - "line_end": 321, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 312, - "line_end": 321 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 365, - "line_end": 374 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " write_file(&root.join(\"b.md\"), \"b\\n\");\n let policy = ComposePolicy::default();\n let first = expand_includes(\n root.join(\"root.md\"),\n &ConfiningRoot::new(&root).unwrap(),\n &policy,\n )\n .unwrap()\n .composition_fingerprint\n .unwrap();", - "snippet_start_line": 312, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 10, - "token_count": 250, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:312-321" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:377-399", - "line_start": 377, - "line_end": 399, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 377, - "line_end": 399 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 401, - "line_end": 411 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 23, - "snippet": " write_bytes(&root.join(\"child.md\"), b\"line\\n\");\n let lf = expand_includes(\n root.join(\"root.md\"),\n &ConfiningRoot::new(&root).unwrap(),\n &policy,\n )\n .unwrap()\n .composition_fingerprint\n .unwrap()\n .source_sha;\n assert_eq!(crlf, lf);\n\n write_bytes(&root.join(\"child.md\"), b\"\\xef\\xbb\\xbfline\\n\");\n let bom = expand_includes(\n root.join(\"root.md\"),\n &ConfiningRoot::new(&root).unwrap(),\n &policy,\n )\n .unwrap()\n .composition_fingerprint\n .unwrap()\n .source_sha;\n assert_ne!(lf, bom);", - "snippet_start_line": 377, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 2, - "duplicated_lines": 23, - "token_count": 1400, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:377-399" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - }, - { - "id": "", - "refactoring_type": "extract_helper", - "file_path": "crates/sc-composer/src/include.rs", - "target_symbol": "include.rs:454-462", - "line_start": 454, - "line_end": 462, - "plan": { - "occurrences": [ - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 454, - "line_end": 462 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 474, - "line_end": 483 - }, - { - "file": "crates/sc-composer/src/include.rs", - "line_start": 641, - "line_end": 650 - } - ], - "suggested_site": { - "directory": "crates/sc-composer/src" - }, - "duplicated_lines": 10, - "snippet": " write_file(&root.join(\"root.md.j2\"), \"@<{{ name }}.md>\\n\");\n let error = expand_includes(\n root.join(\"root.md.j2\"),\n &ConfiningRoot::new(&root).unwrap(),\n &ComposePolicy::default(),\n )\n .unwrap_err();\n assert_eq!(\n error.code(),", - "snippet_start_line": 454, - "snippet_truncated": false, - "suggested_name": "src_helper" - }, - "evidence": { - "occurrence_count": 3, - "duplicated_lines": 10, - "token_count": 50, - "co_change_count": 0, - "is_intra_file": true - }, - "impact_delta": 0.0, - "effort_bucket": "S", - "blast_radius": { - "files": [], - "file_count": 0, - "co_change_count": 0 - }, - "confidence": "medium", - "source_biomarker": "dry_violation", - "benefit": 1.0, - "leverage": 6.0009, - "cost": 1.0, - "risk": 1.25, - "rank_score": 4.3083, - "dependents": 8, - "file_nloc": 958, - "file_weighted_deficit": 2012, - "validation": { - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false, - "affected_files": [ - "crates/sc-composer/src/include.rs" - ], - "affected_symbols": [ - "include.rs:454-462" - ], - "commands": [ - "npm run test" - ], - "targets": [ - { - "file_path": "crates/sc-composer/src/include.rs", - "basis": "inferred", - "via": "call-graph", - "total": 1, - "tests": [ - "crates/sc-composer/tests/integration.rs" - ], - "truncated": false - } - ] - } - } - ] -} +{"targets": [{"file_path": "crates/sc-composer/src/diagnostics.rs", "score": 4.5, "nloc": 9, "primary_biomarker": "untested_hotspot", "primary_severity": "critical", "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 37 dependents", "total_impact": 5.5, "effort_bucket": "S", "impact_per_effort": 5.5, "finding_count": 5, "plans": []}, {"file_path": "crates/sc-compose/tests/cli.rs", "score": 6.5, "nloc": 15, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 3.5, "effort_bucket": "S", "impact_per_effort": 3.5, "finding_count": 3, "plans": []}, {"file_path": "crates/sc-compose/tests/sc_lint_runner.rs", "score": 5.49, "nloc": 139, "primary_biomarker": "co_change_scatter", "primary_severity": "medium", "primary_reason": "co-changes with 12 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 4.505, "effort_bucket": "M", "impact_per_effort": 2.252, "finding_count": 11, "plans": []}, {"file_path": "crates/sc-composer-beads/src/error.rs", "score": 5.98, "nloc": 135, "primary_biomarker": "untested_hotspot", "primary_severity": "high", "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents", "total_impact": 4.02, "effort_bucket": "M", "impact_per_effort": 2.01, "finding_count": 3, "plans": []}, {"file_path": "crates/sc-compose/tests/json_cli.rs", "score": 8.0, "nloc": 15, "primary_biomarker": "prior_defect", "primary_severity": "critical", "primary_reason": "27 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", "total_impact": 2.0, "effort_bucket": "S", "impact_per_effort": 2.0, "finding_count": 1, "plans": []}, {"file_path": "crates/sc-compose/tests/repo_boundaries.rs", "score": 4.21, "nloc": 393, "primary_biomarker": "nested_complexity", "primary_severity": "medium", "primary_reason": "assert_manifest_dependency_rules nests 4 levels deep", "total_impact": 5.78, "effort_bucket": "L", "impact_per_effort": 1.927, "finding_count": 22, "plans": [{"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/tests/repo_boundaries.rs", "target_symbol": "assert_manifest_dependency_rules", "line_start": 234, "line_end": 274, "plan": {"span": {"start": 238, "end": 246}, "params": ["forbidden_manifest_deps", "path", "violations"], "returns": ["contents"], "suggested_name": "compute_contents"}, "evidence": {"slice_nloc": 9, "ccn_removed": 2}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 4.3464, "cost": 1.0, "risk": 0.75, "rank_score": 1.6467, "dependents": 1, "file_nloc": 393, "file_weighted_deficit": 1489, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-compose/tests/repo_boundaries.rs"], "truncated": false, "affected_files": ["crates/sc-compose/tests/repo_boundaries.rs"], "affected_symbols": ["assert_manifest_dependency_rules"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/tests/repo_boundaries.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-compose/tests/repo_boundaries.rs"], "truncated": false}]}}]}, {"file_path": "crates/sc-composer/src/extract/xml_model.rs", "score": 4.44, "nloc": 227, "primary_biomarker": "untested_hotspot", "primary_severity": "high", "primary_reason": "Hotspot with no paired test file and no coverage data \u2014 4 dependents", "total_impact": 5.558, "effort_bucket": "L", "impact_per_effort": 1.853, "finding_count": 6, "plans": []}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "score": 6.35, "nloc": 86, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 23 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 3.65, "effort_bucket": "M", "impact_per_effort": 1.825, "finding_count": 4, "plans": [{"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/mod.rs", "target_symbol": "mod.rs:1-13", "line_start": 1, "line_end": 13, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/mod.rs", "line_start": 1, "line_end": 13}, {"file": "crates/sc-compose/src/reporting/mod.rs", "line_start": 1, "line_end": 13}], "suggested_site": {"directory": null}, "duplicated_lines": 13, "snippet": "pub(crate) mod bead;\npub(crate) mod compose;\npub(crate) mod dispatch;\npub(crate) mod examples;\npub(crate) mod extract;\npub(crate) mod help;\npub(crate) mod reports;\npub(crate) mod sc_lint;\npub(crate) mod template_init;\npub(crate) mod template_lint;\npub(crate) mod templates;\npub(crate) mod verify;\npub(crate) mod workspace;", "snippet_start_line": 1, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 13, "token_count": 12600, "co_change_count": 0, "is_intra_file": false}, "impact_delta": 0.15, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-compose/src/reporting/mod.rs"], "file_count": 1, "co_change_count": 0, "callers": 0}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.15, "leverage": 3.8677, "cost": 1.0, "risk": 2.6931, "rank_score": 0.1556, "dependents": 3, "file_nloc": 86, "file_weighted_deficit": 142, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/reporting/mod.rs"], "affected_symbols": ["mod.rs:1-13"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/reporting/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-compose/src/commands/examples.rs", "score": 8.2, "nloc": 38, "primary_biomarker": "prior_defect", "primary_severity": "high", "primary_reason": "3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", "total_impact": 1.8, "effort_bucket": "S", "impact_per_effort": 1.8, "finding_count": 2, "plans": []}, {"file_path": "crates/sc-composer/src/discovery.rs", "score": 4.71, "nloc": 271, "primary_biomarker": "prior_defect", "primary_severity": "critical", "primary_reason": "4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", "total_impact": 5.285, "effort_bucket": "L", "impact_per_effort": 1.762, "finding_count": 6, "plans": [{"id": "", "refactoring_type": "break_cycle", "file_path": "crates/sc-composer/src/discovery.rs", "target_symbol": "cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs", "line_start": null, "line_end": null, "plan": {"cycle": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "cut_edges": [{"from": "crates/sc-composer/src/error.rs", "to": "crates/sc-composer/src/validation/mod.rs"}, {"from": "crates/sc-composer/src/include.rs", "to": "crates/sc-composer/src/error.rs"}, {"from": "crates/sc-composer/src/include.rs", "to": "crates/sc-composer/src/frontmatter/mod.rs"}, {"from": "crates/sc-composer/src/validation/state.rs", "to": "crates/sc-composer/src/validation/mod.rs"}]}, "evidence": {"cycle_size": 11, "edge_count": 26, "cut_count": 4}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"files": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "file_count": 11, "callers": 41}, "confidence": "medium", "source_biomarker": "", "benefit": 3.4849, "leverage": 5.3432, "cost": 5.0, "risk": 4.7377, "rank_score": 2.0587, "dependents": 6, "file_nloc": 271, "file_weighted_deficit": 892, "validation": {"basis": "mixed", "via": "mixed", "total": 2, "tests": ["crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "affected_symbols": ["cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/discovery.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/error.rs", "basis": "inferred", "via": "import-graph", "total": 1, "tests": ["crates/sc-composer/src/extract/tests.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/model.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/parser.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/include.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/diagnostics.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/required_paths.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/state.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-composer/src/discovery.rs", "target_symbol": "discovery.rs:320-330", "line_start": 320, "line_end": 330, "plan": {"occurrences": [{"file": "crates/sc-composer/src/discovery.rs", "line_start": 320, "line_end": 330}, {"file": "crates/sc-composer/src/validation/mod.rs", "line_start": 587, "line_end": 597}], "suggested_site": {"directory": "crates/sc-composer/src"}, "duplicated_lines": 11, "snippet": " let tokens = discover_all_pass_tokens(&parsed);\n\n assert_eq!(\n tokens.get(&1).cloned().unwrap_or_default(),\n [crate::VariableName::new(\"inner\").unwrap()].into()\n );\n assert_eq!(\n tokens.get(&2).cloned().unwrap_or_default(),\n [crate::VariableName::new(\"outer\").unwrap()].into()\n );\n }", "snippet_start_line": 320, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 11, "token_count": 2000, "co_change_count": 2, "is_intra_file": false}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer/src/validation/mod.rs"], "file_count": 1, "co_change_count": 2, "callers": 4}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.0, "leverage": 5.3432, "cost": 1.0, "risk": 3.6094, "rank_score": 0.0, "dependents": 6, "file_nloc": 271, "file_weighted_deficit": 892, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/validation/mod.rs"], "affected_symbols": ["discovery.rs:320-330"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/discovery.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-compose/src/main.rs", "score": 6.5, "nloc": 138, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 3.5, "effort_bucket": "M", "impact_per_effort": 1.75, "finding_count": 3, "plans": []}, {"file_path": "crates/sc-composer/src/extract/xml_evidence.rs", "score": 6.5, "nloc": 149, "primary_biomarker": "nested_complexity", "primary_severity": "high", "primary_reason": "path_exists nests 5 levels deep", "total_impact": 3.497, "effort_bucket": "M", "impact_per_effort": 1.748, "finding_count": 4, "plans": [{"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-composer/src/extract/xml_evidence.rs", "target_symbol": "xml_evidence.rs:100-111", "line_start": 100, "line_end": 111, "plan": {"occurrences": [{"file": "crates/sc-composer/src/extract/xml_evidence.rs", "line_start": 100, "line_end": 111}, {"file": "crates/sc-composer/src/extract/xml_match.rs", "line_start": 199, "line_end": 213}], "suggested_site": {"directory": "crates/sc-composer/src/extract"}, "duplicated_lines": 15, "snippet": " let element = document.element(*element_id);\n let ordinal = element_ordinals.entry(element.name.clone()).or_default();\n let child_path = path\n .iter()\n .cloned()\n .chain([XmlPathSegment::Element {\n name: element.name.clone(),\n ordinal: *ordinal,\n }])\n .collect::>();\n *ordinal += 1;\n collect_template_occurrences(document, *element_id, &child_path, occurrences)?;", "snippet_start_line": 100, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 15, "token_count": 1850, "co_change_count": 0, "is_intra_file": false}, "impact_delta": 0.15, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer/src/extract/xml_match.rs"], "file_count": 1, "co_change_count": 0, "callers": 1}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.15, "leverage": 3.4012, "cost": 1.0, "risk": 2.6931, "rank_score": 0.1407, "dependents": 1, "file_nloc": 149, "file_weighted_deficit": 224, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/extract/xml_evidence.rs", "crates/sc-composer/src/extract/xml_match.rs"], "affected_symbols": ["xml_evidence.rs:100-111"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/extract/xml_evidence.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/extract/xml_match.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-composer/src/init_workspace.rs", "score": 4.93, "nloc": 221, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 25 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 5.073, "effort_bucket": "L", "impact_per_effort": 1.691, "finding_count": 10, "plans": [{"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-composer/src/init_workspace.rs", "target_symbol": "init_workspace", "line_start": 14, "line_end": 107, "plan": {"span": {"start": 66, "end": 98}, "params": ["canonical_root", "recommendations", "templates"], "returns": ["validation_passed"], "suggested_name": "compute_validation_passed"}, "evidence": {"slice_nloc": 33, "ccn_removed": 3}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 4.3589, "cost": 1.0, "risk": 1.5, "rank_score": 1.2969, "dependents": 2, "file_nloc": 221, "file_weighted_deficit": 678, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/init_workspace.rs"], "affected_symbols": ["init_workspace"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/init_workspace.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "score": 6.64, "nloc": 87, "primary_biomarker": "nested_complexity", "primary_severity": "high", "primary_reason": "validate_parse_depth nests 5 levels deep", "total_impact": 3.36, "effort_bucket": "M", "impact_per_effort": 1.68, "finding_count": 3, "plans": [{"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "target_symbol": "validate_parse_depth", "line_start": 17, "line_end": 72, "plan": {"span": {"start": 28, "end": 38}, "params": ["block_indents", "line", "trimmed"], "returns": [], "suggested_name": null}, "evidence": {"slice_nloc": 11, "ccn_removed": 3}, "impact_delta": 1.452, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 1.452, "leverage": 3.0827, "cost": 1.0, "risk": 1.5, "rank_score": 1.6937, "dependents": 1, "file_nloc": 87, "file_weighted_deficit": 118, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/extract/yaml_limits.rs"], "affected_symbols": ["validate_parse_depth"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-compose/tests/sc_lint_clippy_native.rs", "score": 6.75, "nloc": 133, "primary_biomarker": "co_change_scatter", "primary_severity": "medium", "primary_reason": "co-changes with 9 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 3.248, "effort_bucket": "M", "impact_per_effort": 1.624, "finding_count": 11, "plans": []}, {"file_path": "crates/sc-compose/tests/cli/extract.rs", "score": 5.4, "nloc": 396, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 22 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 4.604, "effort_bucket": "L", "impact_per_effort": 1.535, "finding_count": 19, "plans": []}, {"file_path": "crates/sc-compose/src/commands/compose_render.rs", "score": 5.47, "nloc": 345, "primary_biomarker": "co_change_scatter", "primary_severity": "high", "primary_reason": "co-changes with 18 distinct files \u2014 editing this file tends to ripple across the codebase (shotgun surgery)", "total_impact": 4.526, "effort_bucket": "L", "impact_per_effort": 1.509, "finding_count": 9, "plans": [{"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "target_symbol": "compose_render.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "execute", "symbols": ["checked_render_output", "custom_variable_sources", "execute_custom_delimiter_render", "execute_render_with_expanded", "execute_render_with_extra_warnings"], "suggested_file": "crates/sc-compose/src/commands/execute.rs"}, {"name": "path_utils", "symbols": ["build_custom_render_context", "current_username", "environment_value"], "suggested_file": "crates/sc-compose/src/commands/path_utils.rs"}, {"name": "command_error", "symbols": ["custom_variable_delimiters", "execute_render", "validation_report_error"], "suggested_file": "crates/sc-compose/src/commands/command_error.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 345, "symbol_count": 11, "group_count": 3, "modularity": 0.302, "intra_edges": 13, "cut_edges": 8, "cochange_edges": 14}, "impact_delta": 0.0, "effort_bucket": "L", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/templates.rs"], "dependent_count": 3, "import_rewrites": 3}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.0797, "cost": 3.0, "risk": 3.9459, "rank_score": 1.3416, "dependents": 1, "file_nloc": 345, "file_weighted_deficit": 873, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/command_error.rs", "crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/compose_render.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/execute.rs", "crates/sc-compose/src/commands/path_utils.rs", "crates/sc-compose/src/commands/templates.rs"], "affected_symbols": ["compose_render.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/command_error.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/compose.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/examples.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/execute.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/path_utils.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/templates.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "target_symbol": "compose_render.rs:327-333", "line_start": 327, "line_end": 333, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/compose_render.rs", "line_start": 327, "line_end": 333}, {"file": "crates/sc-composer/src/composer.rs", "line_start": 330, "line_end": 340}], "suggested_site": {"directory": null}, "duplicated_lines": 11, "snippet": " );\n for (name, value) in &request.vars_env {\n context.insert(name.to_string(), value.clone());\n }\n for (name, value) in &request.vars_input {\n context.insert(name.to_string(), value.clone());\n }", "snippet_start_line": 327, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 11, "token_count": 650, "co_change_count": 4, "is_intra_file": false}, "impact_delta": 0.35, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer/src/composer.rs"], "file_count": 1, "co_change_count": 4, "callers": 1}, "confidence": "high", "source_biomarker": "dry_violation", "benefit": 0.35, "leverage": 4.0797, "cost": 1.0, "risk": 1.1931, "rank_score": 0.5568, "dependents": 1, "file_nloc": 345, "file_weighted_deficit": 873, "validation": {"basis": "mixed", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/compose_render.rs", "crates/sc-composer/src/composer.rs"], "affected_symbols": ["compose_render.rs:327-333"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/composer.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "target_symbol": "build_custom_render_context", "line_start": 266, "line_end": 335, "plan": {"span": {"start": 271, "end": 333}, "params": ["request", "resolved_path", "root_passes"], "returns": ["context"], "suggested_name": "compute_context"}, "evidence": {"slice_nloc": 63, "ccn_removed": 5}, "impact_delta": 0.375, "effort_bucket": "M", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "large_method", "benefit": 0.375, "leverage": 4.0797, "cost": 2.0, "risk": 1.5, "rank_score": 0.4233, "dependents": 1, "file_nloc": 345, "file_weighted_deficit": 873, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/compose_render.rs"], "affected_symbols": ["build_custom_render_context"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "target_symbol": "compose_render.rs:315-325", "line_start": 315, "line_end": 325, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/compose_render.rs", "line_start": 315, "line_end": 325}, {"file": "crates/sc-composer/src/validation/state.rs", "line_start": 201, "line_end": 211}], "suggested_site": {"directory": null}, "duplicated_lines": 11, "snippet": " .unwrap_or_else(|_| {\n format!(\n \"{:04}-{:02}-{:02}T{:02}:{:02}:{:02}Z\",\n now.year(),\n u8::from(now.month()),\n now.day(),\n now.hour(),\n now.minute(),\n now.second()\n )\n }),", "snippet_start_line": 315, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 11, "token_count": 50, "co_change_count": 0, "is_intra_file": false}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer/src/validation/state.rs"], "file_count": 1, "co_change_count": 0, "callers": 1}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.0, "leverage": 4.0797, "cost": 1.0, "risk": 2.6931, "rank_score": 0.0, "dependents": 1, "file_nloc": 345, "file_weighted_deficit": 873, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/compose_render.rs", "crates/sc-composer/src/validation/state.rs"], "affected_symbols": ["compose_render.rs:315-325"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/state.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-compose/src/commands/template_lint.rs", "score": 2.58, "nloc": 576, "primary_biomarker": "nested_complexity", "primary_severity": "medium", "primary_reason": "analyze_template_source nests 4 levels deep", "total_impact": 7.417, "effort_bucket": "XL", "impact_per_effort": 1.483, "finding_count": 15, "plans": [{"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "template_lint.rs -> 4 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "repository", "symbols": ["discover_repository_json_templates", "is_non_production_fixture_directory", "lint_repository_templates", "template_contracts_scope", "visit_template_dir"], "suggested_file": "crates/sc-compose/src/commands/repository.rs"}, {"name": "identifier", "symbols": ["is_identifier_boundary", "is_identifier_character", "line_and_column", "redundant_chain_offset", "skip_whitespace"], "suggested_file": "crates/sc-compose/src/commands/identifier.rs"}, {"name": "lint", "symbols": ["analyze_template_source", "lint_repository_template", "lint_request", "lint_source"], "suggested_file": "crates/sc-compose/src/commands/lint.rs"}, {"name": "scalar", "symbols": ["is_identifier", "is_literal_quoted_scalar", "is_scalar_expression"], "suggested_file": "crates/sc-compose/src/commands/scalar.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 576, "symbol_count": 17, "group_count": 4, "modularity": 0.448, "intra_edges": 24, "cut_edges": 14, "cochange_edges": 30}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/mod.rs"], "dependent_count": 2, "import_rewrites": 2}, "confidence": "medium", "source_biomarker": "", "benefit": 2.3863, "leverage": 5.4096, "cost": 5.0, "risk": 3.9459, "rank_score": 1.5378, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/identifier.rs", "crates/sc-compose/src/commands/lint.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/repository.rs", "crates/sc-compose/src/commands/scalar.rs", "crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["template_lint.rs -> 4 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/compose.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/identifier.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/repository.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/scalar.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "analyze_template_source", "line_start": 56, "line_end": 128, "plan": {"span": {"start": 63, "end": 125}, "params": ["include_chain", "json_context", "mode", "path", "source"], "returns": ["diagnostics"], "suggested_name": "compute_diagnostics"}, "evidence": {"slice_nloc": 62, "ccn_removed": 6}, "impact_delta": 0.727, "effort_bucket": "M", "blast_radius": {"scope": "local"}, "confidence": "medium", "source_biomarker": "complex_method", "benefit": 0.727, "leverage": 5.4096, "cost": 2.0, "risk": 2.0, "rank_score": 0.932, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["analyze_template_source"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "lint_repository_template", "line_start": 244, "line_end": 330, "plan": {"span": {"start": 274, "end": 302}, "params": ["diagnostics", "expanded", "findings", "mode", "mode_name"], "returns": ["error_count"], "suggested_name": "compute_error_count"}, "evidence": {"slice_nloc": 28, "ccn_removed": 3}, "impact_delta": 0.322, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "medium", "source_biomarker": "large_method", "benefit": 0.322, "leverage": 5.4096, "cost": 1.0, "risk": 2.0, "rank_score": 0.516, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["lint_repository_template"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "template_lint.rs:539-550", "line_start": 539, "line_end": 550, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 539, "line_end": 550}, {"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 579, "line_end": 590}, {"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 610, "line_end": 621}], "suggested_site": {"directory": "crates/sc-compose/src/commands"}, "duplicated_lines": 12, "snippet": " \"{\\\"value\\\": \\\"{{ value }}\\\"}\\n\",\n sc_composer::JsonEscapeMode::Auto,\n true,\n &[],\n );\n\n assert_eq!(diagnostics.len(), 1);\n assert_eq!(\n diagnostics[0].severity,\n sc_composer::DiagnosticSeverity::Error\n );\n assert_eq!(diagnostics[0].code, DiagnosticCode::ErrJsonModeContract);", "snippet_start_line": 539, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 3, "duplicated_lines": 12, "token_count": 850, "co_change_count": 0, "is_intra_file": true}, "impact_delta": 0.15, "effort_bucket": "S", "blast_radius": {"files": [], "file_count": 0, "co_change_count": 0}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.15, "leverage": 5.4096, "cost": 1.0, "risk": 2.0, "rank_score": 0.2404, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["template_lint.rs:539-550"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "template_lint.rs:286-293", "line_start": 286, "line_end": 293, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 286, "line_end": 293}, {"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 311, "line_end": 317}], "suggested_site": {"directory": "crates/sc-compose/src/commands"}, "duplicated_lines": 8, "snippet": " let diagnostic_code = diagnostic.code.as_str();\n let diagnostic_json = json!(diagnostic);\n diagnostics.push(diagnostic_json.clone());\n findings.push(json!({\n \"template\": path.to_string_lossy().replace('\\\\', \"/\"),\n \"mode\": mode_name,\n \"location\": {\n \"line\": diagnostic.line,", "snippet_start_line": 286, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 8, "token_count": 1250, "co_change_count": 0, "is_intra_file": true}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": [], "file_count": 0, "co_change_count": 0}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.0, "leverage": 5.4096, "cost": 1.0, "risk": 2.0, "rank_score": 0.0, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["template_lint.rs:286-293"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_helper", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "template_lint.rs:579-590", "line_start": 579, "line_end": 590, "plan": {"occurrences": [{"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 579, "line_end": 590}, {"file": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 610, "line_end": 621}], "suggested_site": {"directory": "crates/sc-compose/src/commands"}, "duplicated_lines": 12, "snippet": " include_str!(\"../../../../tests/fixtures/json-scanner-parity.j2\"),\n sc_composer::JsonEscapeMode::Legacy,\n true,\n &[],\n );\n\n assert_eq!(diagnostics.len(), 1);\n assert_eq!(\n diagnostics[0].severity,\n sc_composer::DiagnosticSeverity::Warning\n );\n assert_eq!(diagnostics[0].message, sc_composer::JSON_LEGACY_WARNING);", "snippet_start_line": 579, "snippet_truncated": false, "suggested_name": null}, "evidence": {"occurrence_count": 2, "duplicated_lines": 12, "token_count": 200, "co_change_count": 0, "is_intra_file": true}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": [], "file_count": 0, "co_change_count": 0}, "confidence": "medium", "source_biomarker": "dry_violation", "benefit": 0.0, "leverage": 5.4096, "cost": 1.0, "risk": 2.0, "rank_score": 0.0, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["template_lint.rs:579-590"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}]}, {"file_path": "crates/sc-compose/tests/sc_lint_lint_full.rs", "score": 5.7, "nloc": 231, "primary_biomarker": "churn_risk", "primary_severity": "high", "primary_reason": "90-day churn rewrote 2.7x the file's size (625 lines over 231 NLOC, top 6.4% among repository files eligible for churn ranking)", "total_impact": 4.305, "effort_bucket": "L", "impact_per_effort": 1.435, "finding_count": 20, "plans": []}, {"file_path": "crates/sc-compose/tests/fuzz_regressions.rs", "score": 5.73, "nloc": 246, "primary_biomarker": "prior_defect", "primary_severity": "critical", "primary_reason": "7 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects", "total_impact": 4.267, "effort_bucket": "L", "impact_per_effort": 1.422, "finding_count": 10, "plans": []}], "refactoring_opportunities": [{"opportunity_id": "refop2_f14ada15c9b2dc37f11c", "file_path": "crates/sc-compose/src/reporting/mermaid.rs", "lead_biomarker": "complex_method", "lead_refactoring_type": "extract_method", "addresses_primary_problem": true, "effort_bucket": "S", "confidence": "high", "step_count": 2, "mechanical_steps": 1, "recoverable_health": 0.847, "rank_score": 1.3958, "steps": [{"plan_id": "refac2_1e95f40c0a1e0a142318", "refactoring_type": "break_cycle", "target_symbol": "cycle[2]: spec.rs->mermaid.rs", "file_path": "crates/sc-compose/src/reporting/mermaid.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_620595bf0ffec877eff5", "refactoring_type": "extract_method", "target_symbol": "render_state_machine", "file_path": "crates/sc-compose/src/reporting/mermaid.rs", "line_start": 25, "line_end": 73, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_e8901120bf12a49b0939", "file_path": "crates/sc-composer/src/diagnostics/record.rs", "lead_biomarker": null, "lead_refactoring_type": "move_method", "addresses_primary_problem": null, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 1.1931, "steps": [{"plan_id": "refac2_03abc75ffc18dc9e6748", "refactoring_type": "move_method", "target_symbol": "tests.constructors_preserve_defaults_and_chain_order", "file_path": "crates/sc-composer/src/diagnostics/record.rs", "line_start": 75, "line_end": 97, "classification": "judgment", "reasons": ["changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_28035572684b49fe0b84", "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 1.452, "rank_score": 1.089, "steps": [{"plan_id": "refac2_6ca516253e32491cba02", "refactoring_type": "extract_method", "target_symbol": "validate_parse_depth", "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "line_start": 17, "line_end": 72, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_6f17f2bc79c895ef53f8", "file_path": "crates/sc-composer/src/render_check.rs", "lead_biomarker": "churn_risk", "lead_refactoring_type": "break_cycle", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "medium", "step_count": 2, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 1.001, "steps": [{"plan_id": "refac2_1ae74c5f59a1c826aa15", "refactoring_type": "break_cycle", "target_symbol": "cycle[2]: renderer.rs->render_check.rs", "file_path": "crates/sc-composer/src/render_check.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_e0d13c188e2982b29bd2", "refactoring_type": "move_method", "target_symbol": "tests.checked_output_keeps_metadata_immutable_after_validation", "file_path": "crates/sc-composer/src/render_check.rs", "line_start": 447, "line_end": 460, "classification": "judgment", "reasons": ["changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_ddd30e9ed8f482b5592e", "file_path": "crates/sc-compose/src/observability/logger.rs", "lead_biomarker": null, "lead_refactoring_type": "break_cycle", "addresses_primary_problem": null, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.7793, "steps": [{"plan_id": "refac2_39b3b8413fa8091df39b", "refactoring_type": "break_cycle", "target_symbol": "cycle[2]: mod.rs->logger.rs", "file_path": "crates/sc-compose/src/observability/logger.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_a93671065afa353344cc", "file_path": "crates/sc-composer-beads/src/contract.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "break_cycle", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.7793, "steps": [{"plan_id": "refac2_b6bf4424eaa466a1d4ac", "refactoring_type": "break_cycle", "target_symbol": "cycle[2]: error.rs->contract.rs", "file_path": "crates/sc-composer-beads/src/contract.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_7c1e04b61ca90e127112", "file_path": "crates/sc-compose/tests/repo_boundaries.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.847, "rank_score": 0.6352, "steps": [{"plan_id": "refac2_32824604cd2f75b46ec7", "refactoring_type": "extract_method", "target_symbol": "assert_manifest_dependency_rules", "file_path": "crates/sc-compose/tests/repo_boundaries.rs", "line_start": 234, "line_end": 274, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_30666e6a3add23e57448", "file_path": "crates/sc-composer-beads/src/runner.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.847, "rank_score": 0.6352, "steps": [{"plan_id": "refac2_7e06c4ae40d3f74b973d", "refactoring_type": "extract_method", "target_symbol": "observe", "file_path": "crates/sc-composer-beads/src/runner.rs", "line_start": 272, "line_end": 291, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_1c74aa799d86e36bdeba", "file_path": "crates/sc-composer/src/init_workspace.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.847, "rank_score": 0.6352, "steps": [{"plan_id": "refac2_3272762fbd6754ce81e5", "refactoring_type": "extract_method", "target_symbol": "init_workspace", "file_path": "crates/sc-composer/src/init_workspace.rs", "line_start": 14, "line_end": 107, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_fba9c18d0c164137789c", "file_path": "crates/sc-compose/src/commands/dispatch.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "break_cycle", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.534, "steps": [{"plan_id": "refac2_1ac6ac7ac322626b3746", "refactoring_type": "break_cycle", "target_symbol": "cycle[4]: mod.rs->dispatch.rs, mod.rs->examples.rs, templates.rs->mod.rs", "file_path": "crates/sc-compose/src/commands/dispatch.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_393d6434a6a2305c41f3", "file_path": "crates/sc-compose/src/commands/reports/mod.rs", "lead_biomarker": "untested_hotspot", "lead_refactoring_type": "break_cycle", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.534, "steps": [{"plan_id": "refac2_ff2f1086991fb1807ac0", "refactoring_type": "break_cycle", "target_symbol": "cycle[4]: publish.rs->mod.rs, render.rs->mod.rs, scaffold.rs->mod.rs", "file_path": "crates/sc-compose/src/commands/reports/mod.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_2b1d5c09d0fd965474c9", "file_path": "crates/sc-composer/src/validation/state.rs", "lead_biomarker": "large_method", "lead_refactoring_type": "extract_method", "addresses_primary_problem": true, "effort_bucket": "XL", "confidence": "high", "step_count": 2, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.5251, "steps": [{"plan_id": "refac2_41ea43acd7d4dafd4f5c", "refactoring_type": "split_file", "target_symbol": "state.rs -> 5 files", "file_path": "crates/sc-composer/src/validation/state.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_8f8ec02d8f878d2cc797", "refactoring_type": "extract_method", "target_symbol": "populate_pass_validation_maps", "file_path": "crates/sc-composer/src/validation/state.rs", "line_start": 64, "line_end": 129, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": "refac2_41ea43acd7d4dafd4f5c"}], "evidence": [{"plan_id": "refac2_1c4b9ac3f11e7609b253", "refactoring_type": "extract_helper", "target_symbol": "state.rs:293-300"}]}, {"opportunity_id": "refop2_f39e6a83233f8f277b6c", "file_path": "crates/sc-compose/src/commands/template_init.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 2, "mechanical_steps": 2, "recoverable_health": 0.902, "rank_score": 0.451, "steps": [{"plan_id": "refac2_9f85de3fd9bacdb81d0d", "refactoring_type": "extract_method", "target_symbol": "apply_replacements", "file_path": "crates/sc-compose/src/commands/template_init.rs", "line_start": 281, "line_end": 351, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_12ed4b45d6a15c55a723", "refactoring_type": "extract_method", "target_symbol": "find_available_spans", "file_path": "crates/sc-compose/src/commands/template_init.rs", "line_start": 353, "line_end": 388, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": [{"plan_id": "refac2_e91b8b69027bb081148e", "refactoring_type": "extract_helper", "target_symbol": "template_init.rs:55-66"}, {"plan_id": "refac2_a6dda5be6c506ea85a4a", "refactoring_type": "extract_helper", "target_symbol": "template_init.rs:483-491"}, {"plan_id": "refac2_716fcb59047b74409a83", "refactoring_type": "extract_helper", "target_symbol": "template_init.rs:511-525"}]}, {"opportunity_id": "refop2_890b8c00562e62667f4e", "file_path": "crates/sc-compose/src/commands/sc_lint.rs", "lead_biomarker": "complex_conditional", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 2, "mechanical_steps": 1, "recoverable_health": 0.847, "rank_score": 0.3963, "steps": [{"plan_id": "refac2_c42ee14c9c5db2d0380e", "refactoring_type": "split_file", "target_symbol": "sc_lint.rs -> 3 files", "file_path": "crates/sc-compose/src/commands/sc_lint.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_f7c97368e45732a23b88", "refactoring_type": "extract_method", "target_symbol": "classify_outcome", "file_path": "crates/sc-compose/src/commands/sc_lint.rs", "line_start": 371, "line_end": 412, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": "refac2_c42ee14c9c5db2d0380e"}], "evidence": []}, {"opportunity_id": "refop2_797febfb95dc1fc9d067", "file_path": "crates/sc-composer/src/discovery.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "break_cycle", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.3917, "steps": [{"plan_id": "refac2_4b9d8eee5be3da4487c3", "refactoring_type": "break_cycle", "target_symbol": "cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs", "file_path": "crates/sc-composer/src/discovery.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["inverts_imports_across_files"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": [{"plan_id": "refac2_0181ffddcfc7f4d82bc3", "refactoring_type": "extract_helper", "target_symbol": "discovery.rs:320-330"}]}, {"opportunity_id": "refop2_cd6ed1f1f7676514ddb2", "file_path": "crates/sc-composer/src/extract/raw_text.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.495, "rank_score": 0.3712, "steps": [{"plan_id": "refac2_10944f9609f20d791b14", "refactoring_type": "extract_method", "target_symbol": "parse_raw_text_segments", "file_path": "crates/sc-composer/src/extract/raw_text.rs", "line_start": 106, "line_end": 165, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_bc58b80cc5ba6b4bdf3f", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "L", "confidence": "medium", "step_count": 3, "mechanical_steps": 1, "recoverable_health": 0.725, "rank_score": 0.3439, "steps": [{"plan_id": "refac2_7ba2c6f3eca10e0fb445", "refactoring_type": "split_file", "target_symbol": "compose_render.rs -> 3 files", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_a177ce869fb557ffc65e", "refactoring_type": "extract_method", "target_symbol": "build_custom_render_context", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "line_start": 266, "line_end": 335, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": "refac2_7ba2c6f3eca10e0fb445"}, {"plan_id": "refac2_25aa7623f576ca261785", "refactoring_type": "extract_helper", "target_symbol": "compose_render.rs:327-333", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "line_start": 327, "line_end": 333, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": "refac2_7ba2c6f3eca10e0fb445"}], "evidence": [{"plan_id": "refac2_d1ae177bf97d9a8fd51c", "refactoring_type": "extract_helper", "target_symbol": "compose_render.rs:315-325"}]}, {"opportunity_id": "refop2_67386240ad3010e33305", "file_path": "crates/sc-compose/src/commands/extract.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "L", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.3335, "steps": [{"plan_id": "refac2_a2953db634a2b1eda76d", "refactoring_type": "split_file", "target_symbol": "extract.rs -> 3 files", "file_path": "crates/sc-compose/src/commands/extract.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_5aab9ec1d32854370b10", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 3, "mechanical_steps": 0, "recoverable_health": 1.049, "rank_score": 0.3001, "steps": [{"plan_id": "refac2_fb6287d7c2646b888dc7", "refactoring_type": "split_file", "target_symbol": "template_lint.rs -> 4 files", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_b616d2ff42b7fc852541", "refactoring_type": "extract_method", "target_symbol": "analyze_template_source", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 56, "line_end": 128, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": "refac2_fb6287d7c2646b888dc7"}, {"plan_id": "refac2_025e28b3866bf72f7a3f", "refactoring_type": "extract_method", "target_symbol": "lint_repository_template", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "line_start": 244, "line_end": 330, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": "refac2_fb6287d7c2646b888dc7"}], "evidence": [{"plan_id": "refac2_4fa46314922b9037a3f1", "refactoring_type": "extract_helper", "target_symbol": "template_lint.rs:286-293"}, {"plan_id": "refac2_2b57fa8b39feff2ff1a2", "refactoring_type": "extract_helper", "target_symbol": "template_lint.rs:539-550"}, {"plan_id": "refac2_8f3824ef785dfd6cffc9", "refactoring_type": "extract_helper", "target_symbol": "template_lint.rs:579-590"}]}, {"opportunity_id": "refop2_2a65c885f79b06cc73f4", "file_path": "crates/sc-composer/tests/integration.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "extract_class", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.6, "rank_score": 0.3, "steps": [{"plan_id": "refac2_f666cb4f9db84dd0412f", "refactoring_type": "extract_class", "target_symbol": "CapturingObserver", "file_path": "crates/sc-composer/tests/integration.rs", "line_start": 29, "line_end": 55, "classification": "judgment", "reasons": ["reshapes_class_surface", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_4e8e2af6497bf07ae314", "file_path": "crates/sc-composer/src/renderer.rs", "lead_biomarker": "change_entropy", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.2684, "steps": [{"plan_id": "refac2_aa820a13043831cd98d0", "refactoring_type": "split_file", "target_symbol": "renderer.rs -> 4 files", "file_path": "crates/sc-composer/src/renderer.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": [{"plan_id": "refac2_da7e0fae0a0e3e8b44a5", "refactoring_type": "extract_helper", "target_symbol": "renderer.rs:959-968"}]}, {"opportunity_id": "refop2_37ed65a3f64c0a99abaf", "file_path": "crates/sc-composer/src/composer.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 4, "mechanical_steps": 0, "recoverable_health": 0.975, "rank_score": 0.2628, "steps": [{"plan_id": "refac2_bcf827dd9b45bce41740", "refactoring_type": "split_file", "target_symbol": "composer.rs -> 3 files", "file_path": "crates/sc-composer/src/composer.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}, {"plan_id": "refac2_f15b9d7ea1fb289b77ad", "refactoring_type": "extract_class", "target_symbol": "CapturingObserver", "file_path": "crates/sc-composer/src/composer.rs", "line_start": 482, "line_end": 502, "classification": "judgment", "reasons": ["reshapes_class_surface", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": "refac2_bcf827dd9b45bce41740"}, {"plan_id": "refac2_7717dd3efd075ae2f5d4", "refactoring_type": "extract_method", "target_symbol": "render_all_with_observer", "file_path": "crates/sc-composer/src/composer.rs", "line_start": 360, "line_end": 431, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": "refac2_f15b9d7ea1fb289b77ad"}, {"plan_id": "refac2_a677a808c7c474039d74", "refactoring_type": "extract_helper", "target_symbol": "composer.rs:647-659", "file_path": "crates/sc-composer/src/composer.rs", "line_start": 647, "line_end": 659, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": "refac2_f15b9d7ea1fb289b77ad"}], "evidence": []}, {"opportunity_id": "refop2_a141b6c133c1cac781a3", "file_path": "crates/sc-composer/src/extract/toml.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.2588, "steps": [{"plan_id": "refac2_1f09fcfd3f0c7447b975", "refactoring_type": "split_file", "target_symbol": "toml.rs -> 3 files", "file_path": "crates/sc-composer/src/extract/toml.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_3b41fb913a613de578f0", "file_path": "crates/sc-compose/src/reporting/render_many.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.2531, "steps": [{"plan_id": "refac2_0e02e072457fe16bfbb5", "refactoring_type": "split_file", "target_symbol": "render_many.rs -> 3 files", "file_path": "crates/sc-compose/src/reporting/render_many.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": [{"plan_id": "refac2_64e9c1a9770d6d378155", "refactoring_type": "extract_helper", "target_symbol": "render_many.rs:289-297"}]}, {"opportunity_id": "refop2_225ebf1ad6160688c193", "file_path": "crates/sc-compose/src/template_store.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "split_file", "addresses_primary_problem": false, "effort_bucket": "XL", "confidence": "high", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.2528, "steps": [{"plan_id": "refac2_a687c066ef27ac9adf97", "refactoring_type": "split_file", "target_symbol": "template_store.rs -> 3 files", "file_path": "crates/sc-compose/src/template_store.rs", "line_start": null, "line_end": null, "classification": "judgment", "reasons": ["rewrites_dependent_imports", "changes_symbol_home"], "unknowns": ["framework_registration"], "relocated_by": null}], "evidence": [{"plan_id": "refac2_382b61138191b7435561", "refactoring_type": "extract_helper", "target_symbol": "template_store.rs:270-277"}]}, {"opportunity_id": "refop2_e126bcea1561221720b4", "file_path": "crates/sc-compose/src/commands/compose_output.rs", "lead_biomarker": "large_method", "lead_refactoring_type": "extract_method", "addresses_primary_problem": true, "effort_bucket": "S", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.375, "rank_score": 0.225, "steps": [{"plan_id": "refac2_d39b9689afc0e8f1dbaa", "refactoring_type": "extract_method", "target_symbol": "emit_render_output", "file_path": "crates/sc-compose/src/commands/compose_output.rs", "line_start": 14, "line_end": 112, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_33930dc3f199bdc6a63a", "file_path": "crates/sc-compose/src/observer_impl.rs", "lead_biomarker": "change_entropy", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.1875, "steps": [{"plan_id": "refac2_ad4cb894a7ce112c6143", "refactoring_type": "extract_method", "target_symbol": "cli_observer_emits_command_and_pipeline_events_to_logger", "file_path": "crates/sc-compose/src/observer_impl.rs", "line_start": 603, "line_end": 669, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": [{"plan_id": "refac2_07d8f8d27eaddcc55c13", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:215-224"}, {"plan_id": "refac2_a6db2f02180df6eafef8", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:604-611"}, {"plan_id": "refac2_86f2c5ca170ac6e8f72c", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:647-654"}, {"plan_id": "refac2_469cc7d929d1b3af732f", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:673-681"}, {"plan_id": "refac2_a86819d72b0d01679fd7", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:699-709"}, {"plan_id": "refac2_2655e0216eabde4eda6b", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:743-749"}, {"plan_id": "refac2_9577109b91036a2e24c3", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:759-769"}, {"plan_id": "refac2_a5457ffc6d5159e0de8d", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:773-780"}, {"plan_id": "refac2_81d3a89ca3d2d2c53271", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:797-805"}, {"plan_id": "refac2_54d9e5775302318c2747", "refactoring_type": "extract_helper", "target_symbol": "observer_impl.rs:943-951"}]}, {"opportunity_id": "refop2_16c2f6e131c208d6f308", "file_path": "crates/sc-compose/tests/support/mod.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.1875, "steps": [{"plan_id": "refac2_2dd14b90d5b1a5289465", "refactoring_type": "extract_method", "target_symbol": "write_fake_cargo", "file_path": "crates/sc-compose/tests/support/mod.rs", "line_start": 247, "line_end": 312, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_bdfe1bba8dfb8e804ba1", "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "lead_biomarker": "change_entropy", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.1875, "steps": [{"plan_id": "refac2_af87363050ff139ba99f", "refactoring_type": "extract_method", "target_symbol": "pinned_bd_cooks_and_previews_rendered_toml_and_json_formulas", "file_path": "crates/sc-composer-beads/tests/bd_integration.rs", "line_start": 29, "line_end": 94, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_108b46623edf059c4f70", "file_path": "crates/sc-composer/src/validation/required_paths.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.1875, "steps": [{"plan_id": "refac2_5481109163f6647abb85", "refactoring_type": "extract_method", "target_symbol": "required_path_diagnostics", "file_path": "crates/sc-composer/src/validation/required_paths.rs", "line_start": 24, "line_end": 98, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_31ecd9b5e09a49f25bbc", "file_path": "crates/sc-composer/tests/extract_integration.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "M", "confidence": "high", "step_count": 1, "mechanical_steps": 1, "recoverable_health": 0.375, "rank_score": 0.1875, "steps": [{"plan_id": "refac2_f8c54bf23a6addd23911", "refactoring_type": "extract_method", "target_symbol": "cross_format_corpus_preserves_equivalent_contracts", "file_path": "crates/sc-composer/tests/extract_integration.rs", "line_start": 1430, "line_end": 1495, "classification": "mechanical", "reasons": ["dataflow_proved_local_extraction"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_e100f45b49b6c3a54cac", "file_path": "crates/sc-composer/src/extract/xml.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "medium", "step_count": 1, "mechanical_steps": 0, "recoverable_health": 0.375, "rank_score": 0.15, "steps": [{"plan_id": "refac2_bf96464263ef6a504652", "refactoring_type": "extract_method", "target_symbol": "extract_xml", "file_path": "crates/sc-composer/src/extract/xml.rs", "line_start": 76, "line_end": 166, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_f2b659e40adf3c5be26a", "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_method", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "medium", "step_count": 2, "mechanical_steps": 0, "recoverable_health": 0.375, "rank_score": 0.0815, "steps": [{"plan_id": "refac2_9da4dd4db98d4e73f059", "refactoring_type": "extract_method", "target_symbol": "json_mode_diagnostics", "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "line_start": 71, "line_end": 149, "classification": "judgment", "reasons": ["detector_confidence_below_high"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_7615270737e075a3c991", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:1063-1080", "file_path": "crates/sc-composer/src/validation/diagnostics.rs", "line_start": 1063, "line_end": 1080, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}], "evidence": [{"plan_id": "refac2_4d5d2fdf27629b138f96", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:14-21"}, {"plan_id": "refac2_a61dd8be9ff50c5c3019", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:575-585"}, {"plan_id": "refac2_bc2e8f8612cf8b963c43", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:663-673"}, {"plan_id": "refac2_be0ff793e4e71bd98b67", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:794-805"}, {"plan_id": "refac2_6d956a0d3d202ed7382b", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:820-828"}, {"plan_id": "refac2_204cc3e92e4b711a99b5", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:838-849"}, {"plan_id": "refac2_fdc666094c6ef95f33f3", "refactoring_type": "extract_helper", "target_symbol": "diagnostics.rs:1010-1016"}]}, {"opportunity_id": "refop2_850a6aed8a4ff1de48ca", "file_path": "crates/sc-compose/src/reporting/init.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "extract_helper", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 3, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.0, "steps": [{"plan_id": "refac2_c5d205be0222dbdcf8bc", "refactoring_type": "extract_helper", "target_symbol": "init.rs:47-58", "file_path": "crates/sc-compose/src/reporting/init.rs", "line_start": 47, "line_end": 58, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_0e94a2bce59a6fe0a164", "refactoring_type": "extract_helper", "target_symbol": "init.rs:72-82", "file_path": "crates/sc-compose/src/reporting/init.rs", "line_start": 72, "line_end": 82, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_fb0f953df77a3aaae5c2", "refactoring_type": "extract_helper", "target_symbol": "init.rs:127-138", "file_path": "crates/sc-compose/src/reporting/init.rs", "line_start": 127, "line_end": 138, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_7a6dc29d0473978bf7b4", "file_path": "crates/sc-composer/src/extract/json.rs", "lead_biomarker": "nested_complexity", "lead_refactoring_type": "extract_helper", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 7, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.0, "steps": [{"plan_id": "refac2_09ee8421ecdb82bd8ba7", "refactoring_type": "extract_helper", "target_symbol": "json.rs:7-19", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 7, "line_end": 19, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_70f9568b0fedd771f313", "refactoring_type": "extract_helper", "target_symbol": "json.rs:75-83", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 75, "line_end": 83, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_701435398926084bfd8f", "refactoring_type": "extract_helper", "target_symbol": "json.rs:85-103", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 85, "line_end": 103, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_588288cce3ef73dc39cc", "refactoring_type": "extract_helper", "target_symbol": "json.rs:161-176", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 161, "line_end": 176, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_386ee4fc817a3ed26d22", "refactoring_type": "extract_helper", "target_symbol": "json.rs:180-211", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 180, "line_end": 211, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_36d6a073b9c68e739f6c", "refactoring_type": "extract_helper", "target_symbol": "json.rs:544-556", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 544, "line_end": 556, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_d3ebabd8055987604f35", "refactoring_type": "extract_helper", "target_symbol": "json.rs:562-571", "file_path": "crates/sc-composer/src/extract/json.rs", "line_start": 562, "line_end": 571, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}], "evidence": []}, {"opportunity_id": "refop2_2dbd15d243d8fc37ce42", "file_path": "crates/sc-composer/src/include.rs", "lead_biomarker": "co_change_scatter", "lead_refactoring_type": "extract_helper", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 2, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.0, "steps": [{"plan_id": "refac2_b36067c533a2a3262fb8", "refactoring_type": "extract_helper", "target_symbol": "include.rs:566-593", "file_path": "crates/sc-composer/src/include.rs", "line_start": 566, "line_end": 593, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_b4c7270e78d850cdca25", "refactoring_type": "extract_helper", "target_symbol": "include.rs:619-628", "file_path": "crates/sc-composer/src/include.rs", "line_start": 619, "line_end": 628, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}], "evidence": [{"plan_id": "refac2_32396f773ef2e0b14420", "refactoring_type": "extract_helper", "target_symbol": "include.rs:77-86"}, {"plan_id": "refac2_b5a2ffc850fd518f1f04", "refactoring_type": "extract_helper", "target_symbol": "include.rs:99-110"}, {"plan_id": "refac2_c99e5bf87e0d8ae72a19", "refactoring_type": "extract_helper", "target_symbol": "include.rs:146-155"}, {"plan_id": "refac2_e7e54d2c107974186995", "refactoring_type": "extract_helper", "target_symbol": "include.rs:187-197"}, {"plan_id": "refac2_84dfba9552dd3c43d287", "refactoring_type": "extract_helper", "target_symbol": "include.rs:221-232"}, {"plan_id": "refac2_5f7a9b5a6df66c3175be", "refactoring_type": "extract_helper", "target_symbol": "include.rs:248-259"}, {"plan_id": "refac2_12b5d717e8789c001b8a", "refactoring_type": "extract_helper", "target_symbol": "include.rs:294-303"}, {"plan_id": "refac2_781682b56ff5973c67f2", "refactoring_type": "extract_helper", "target_symbol": "include.rs:312-321"}, {"plan_id": "refac2_249207cc59510ade0ce1", "refactoring_type": "extract_helper", "target_symbol": "include.rs:377-399"}, {"plan_id": "refac2_a8d5033b617a13dbc862", "refactoring_type": "extract_helper", "target_symbol": "include.rs:454-462"}, {"plan_id": "refac2_057b51a39f27cc337978", "refactoring_type": "extract_helper", "target_symbol": "include.rs:474-483"}, {"plan_id": "refac2_aac3460608bd32d40f54", "refactoring_type": "extract_helper", "target_symbol": "include.rs:512-522"}, {"plan_id": "refac2_69163cfa950443e10ee4", "refactoring_type": "extract_helper", "target_symbol": "include.rs:641-650"}, {"plan_id": "refac2_38ad149bb7fc01042409", "refactoring_type": "extract_helper", "target_symbol": "include.rs:661-671"}, {"plan_id": "refac2_2f6da3e167681ffbec0d", "refactoring_type": "extract_helper", "target_symbol": "include.rs:682-692"}, {"plan_id": "refac2_2c3de94c6a415640f6e7", "refactoring_type": "extract_helper", "target_symbol": "include.rs:732-742"}, {"plan_id": "refac2_c4764b439932fd83ad93", "refactoring_type": "extract_helper", "target_symbol": "include.rs:793-803"}, {"plan_id": "refac2_f1849a23332c3ce07c7c", "refactoring_type": "extract_helper", "target_symbol": "include.rs:819-829"}, {"plan_id": "refac2_1a4fc1ca82e2d6c34578", "refactoring_type": "extract_helper", "target_symbol": "include.rs:886-896"}, {"plan_id": "refac2_7ff9aa0c4b2387fc4a29", "refactoring_type": "extract_helper", "target_symbol": "include.rs:903-915"}, {"plan_id": "refac2_3253c1f540e58c91316d", "refactoring_type": "extract_helper", "target_symbol": "include.rs:940-955"}, {"plan_id": "refac2_a83e3c6a669e53ad4181", "refactoring_type": "extract_helper", "target_symbol": "include.rs:941-950"}, {"plan_id": "refac2_75b28a6b2ba3a218ecd2", "refactoring_type": "extract_helper", "target_symbol": "include.rs:943-953"}]}, {"opportunity_id": "refop2_a909be33750034c58c0b", "file_path": "crates/sc-composer/src/validation/mod.rs", "lead_biomarker": "prior_defect", "lead_refactoring_type": "extract_helper", "addresses_primary_problem": false, "effort_bucket": "S", "confidence": "high", "step_count": 2, "mechanical_steps": 0, "recoverable_health": 0.0, "rank_score": 0.0, "steps": [{"plan_id": "refac2_85b65351cb6fa1256c4e", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:174-181", "file_path": "crates/sc-composer/src/validation/mod.rs", "line_start": 174, "line_end": 181, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}, {"plan_id": "refac2_70c8c98104c8fbafa3b0", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:649-656", "file_path": "crates/sc-composer/src/validation/mod.rs", "line_start": 649, "line_end": 656, "classification": "judgment", "reasons": ["call_site_bindings_unproven"], "unknowns": [], "relocated_by": null}], "evidence": [{"plan_id": "refac2_2fdac974df85e0754631", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:102-115"}, {"plan_id": "refac2_d76546b17028770adca2", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:256-271"}, {"plan_id": "refac2_359df0cafbd97c63fbbb", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:300-315"}, {"plan_id": "refac2_cdeda528229d8116941b", "refactoring_type": "extract_helper", "target_symbol": "mod.rs:341-356"}]}], "refactoring_plans": [{"id": "", "refactoring_type": "move_method", "file_path": "crates/sc-composer/src/render_check.rs", "target_symbol": "tests.checked_output_keeps_metadata_immutable_after_validation", "line_start": 447, "line_end": 460, "plan": {"method": "checked_output_keeps_metadata_immutable_after_validation", "from_class": "tests", "to_class": "RenderCheckMeta", "to_file": "crates/sc-composer/src/render_check.rs"}, "evidence": {"foreign_calls": 2, "own_calls": 0, "own_distance": 1.0, "target_distance": 0.667}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"callers": 0, "files": ["crates/sc-composer/src/render_check.rs"]}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.0236, "cost": 1.0, "risk": 1.9431, "rank_score": 2.6736, "dependents": 4, "file_nloc": 428, "file_weighted_deficit": 124, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/render_check.rs"], "affected_symbols": ["RenderCheckMeta", "checked_output_keeps_metadata_immutable_after_validation", "tests", "tests.checked_output_keeps_metadata_immutable_after_validation"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/render_check.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "break_cycle", "file_path": "crates/sc-composer/src/discovery.rs", "target_symbol": "cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs", "line_start": null, "line_end": null, "plan": {"cycle": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "cut_edges": [{"from": "crates/sc-composer/src/error.rs", "to": "crates/sc-composer/src/validation/mod.rs"}, {"from": "crates/sc-composer/src/include.rs", "to": "crates/sc-composer/src/error.rs"}, {"from": "crates/sc-composer/src/include.rs", "to": "crates/sc-composer/src/frontmatter/mod.rs"}, {"from": "crates/sc-composer/src/validation/state.rs", "to": "crates/sc-composer/src/validation/mod.rs"}]}, "evidence": {"cycle_size": 11, "edge_count": 26, "cut_count": 4}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"files": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "file_count": 11, "callers": 41}, "confidence": "medium", "source_biomarker": "", "benefit": 3.4849, "leverage": 5.3432, "cost": 5.0, "risk": 4.7377, "rank_score": 2.0587, "dependents": 6, "file_nloc": 271, "file_weighted_deficit": 892, "validation": {"basis": "mixed", "via": "mixed", "total": 2, "tests": ["crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/discovery.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/mod.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/frontmatter/normalizer.rs", "crates/sc-composer/src/frontmatter/parser.rs", "crates/sc-composer/src/include.rs", "crates/sc-composer/src/validation/diagnostics.rs", "crates/sc-composer/src/validation/mod.rs", "crates/sc-composer/src/validation/required_paths.rs", "crates/sc-composer/src/validation/state.rs"], "affected_symbols": ["cycle[11]: error.rs->mod.rs, include.rs->error.rs, include.rs->mod.rs, state.rs->mod.rs"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/discovery.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/error.rs", "basis": "inferred", "via": "import-graph", "total": 1, "tests": ["crates/sc-composer/src/extract/tests.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/model.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/normalizer.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/parser.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/include.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/diagnostics.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/required_paths.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/state.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "break_cycle", "file_path": "crates/sc-composer/src/render_check.rs", "target_symbol": "cycle[2]: renderer.rs->render_check.rs", "line_start": null, "line_end": null, "plan": {"cycle": ["crates/sc-composer/src/render_check.rs", "crates/sc-composer/src/renderer.rs"], "cut_edges": [{"from": "crates/sc-composer/src/renderer.rs", "to": "crates/sc-composer/src/render_check.rs"}]}, "evidence": {"cycle_size": 2, "edge_count": 2, "cut_count": 1}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer/src/render_check.rs", "crates/sc-composer/src/renderer.rs"], "file_count": 2, "callers": 10}, "confidence": "high", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.0236, "cost": 1.0, "risk": 3.1479, "rank_score": 2.0479, "dependents": 4, "file_nloc": 428, "file_weighted_deficit": 124, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/render_check.rs", "crates/sc-composer/src/renderer.rs"], "affected_symbols": ["cycle[2]: renderer.rs->render_check.rs"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/render_check.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/renderer.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-composer-beads/src/runner.rs", "target_symbol": "observe", "line_start": 272, "line_end": 291, "plan": {"span": {"start": 276, "end": 288}, "params": ["self"], "returns": [], "suggested_name": null}, "evidence": {"slice_nloc": 13, "ccn_removed": 5}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 5.3848, "cost": 1.0, "risk": 0.75, "rank_score": 1.9665, "dependents": 5, "file_nloc": 406, "file_weighted_deficit": 1320, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer-beads/tests/runner_process_tree.rs"], "truncated": false, "affected_files": ["crates/sc-composer-beads/src/runner.rs"], "affected_symbols": ["observe"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer-beads/src/runner.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer-beads/tests/runner_process_tree.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "move_method", "file_path": "crates/sc-composer/src/diagnostics/record.rs", "target_symbol": "tests.constructors_preserve_defaults_and_chain_order", "line_start": 75, "line_end": 97, "plan": {"method": "constructors_preserve_defaults_and_chain_order", "from_class": "tests", "to_class": "Diagnostic", "to_file": "crates/sc-composer/src/diagnostics/record.rs"}, "evidence": {"foreign_calls": 3, "own_calls": 0, "own_distance": 1.0, "target_distance": 0.25}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"callers": 0, "files": ["crates/sc-composer/src/diagnostics/record.rs"]}, "confidence": "high", "source_biomarker": "", "benefit": 2.3863, "leverage": 1.7918, "cost": 1.0, "risk": 1.4431, "rank_score": 1.9348, "dependents": 5, "file_nloc": 75, "file_weighted_deficit": 0, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/diagnostics/record.rs"], "affected_symbols": ["Diagnostic", "constructors_preserve_defaults_and_chain_order", "tests", "tests.constructors_preserve_defaults_and_chain_order"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/diagnostics/record.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-composer/src/renderer.rs", "target_symbol": "renderer.rs -> 4 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "escape", "symbols": ["auto_escape_callback", "configure_environment", "render_loaded_template", "render_loaded_template_with_json_escape_mode"], "suggested_file": "crates/sc-composer/src/escape.rs"}, {"name": "char", "symbols": ["encode_xml_illegal_controls", "escape_markup", "xml_char_safe_filter", "xml_char_safe_string"], "suggested_file": "crates/sc-composer/src/char.rs"}, {"name": "contents", "symbols": ["format_sc_compose_markup", "json_string_contents", "toml_string_contents"], "suggested_file": "crates/sc-composer/src/contents.rs"}, {"name": "escape", "symbols": ["cdata_escape_filter", "turtle_escape_filter"], "suggested_file": "crates/sc-composer/src/escape_2.rs"}], "residual": {"symbols": ["frontmatter_safe_filter", "map_get_unknown_method_callback", "md_table_safe_filter", "render_template", "resolve_json_escape_mode", "yaml_safe_filter"]}, "shim_required": true}, "evidence": {"file_nloc": 1079, "symbol_count": 19, "group_count": 4, "modularity": 0.5, "intra_edges": 12, "cut_edges": 2, "cochange_edges": 7}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["bindings/python/src/types/results.rs", "crates/sc-compose/src/commands/compose_render.rs", "crates/sc-compose/src/commands/template_init.rs", "crates/sc-compose/src/commands/template_lint.rs", "crates/sc-compose/src/reporting/render_many.rs", "crates/sc-compose/src/reporting/templates.rs", "crates/sc-composer/src/composer.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/lib.rs", "crates/sc-composer/src/render_check.rs", "crates/sc-composer/src/types.rs", "crates/sc-composer/src/validation/diagnostics.rs"], "dependent_count": 13, "import_rewrites": 13}, "confidence": "high", "source_biomarker": "", "benefit": 2.3863, "leverage": 6.2302, "cost": 5.0, "risk": 3.3904, "rank_score": 1.8373, "dependents": 8, "file_nloc": 1079, "file_weighted_deficit": 3183, "validation": {"basis": "mixed", "via": "mixed", "total": 5, "tests": ["bindings/python/src/convert/tests.rs", "crates/sc-compose/src/render_request/tests.rs", "crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/extract_integration.rs", "crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["bindings/python/src/types/results.rs", "crates/sc-compose/src/commands/compose_render.rs", "crates/sc-compose/src/commands/template_init.rs", "crates/sc-compose/src/commands/template_lint.rs", "crates/sc-compose/src/reporting/render_many.rs", "crates/sc-compose/src/reporting/templates.rs", "crates/sc-composer/src/char.rs", "crates/sc-composer/src/composer.rs", "crates/sc-composer/src/contents.rs", "crates/sc-composer/src/error.rs", "crates/sc-composer/src/escape.rs", "crates/sc-composer/src/escape_2.rs", "crates/sc-composer/src/frontmatter/model.rs", "crates/sc-composer/src/lib.rs", "crates/sc-composer/src/render_check.rs", "crates/sc-composer/src/renderer.rs", "crates/sc-composer/src/types.rs", "crates/sc-composer/src/validation/diagnostics.rs"], "affected_symbols": ["renderer.rs -> 4 files"], "commands": ["npm run test"], "targets": [{"file_path": "bindings/python/src/types/results.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/template_init.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/reporting/render_many.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/reporting/templates.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/char.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/composer.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/contents.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/error.rs", "basis": "inferred", "via": "import-graph", "total": 1, "tests": ["crates/sc-composer/src/extract/tests.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/escape.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/escape_2.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/frontmatter/model.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/lib.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/extract_integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/render_check.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/renderer.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/types.rs", "basis": "inferred", "via": "call-graph", "total": 5, "tests": ["bindings/python/src/convert/tests.rs", "crates/sc-compose/src/render_request/tests.rs", "crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/extract_integration.rs", "crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/validation/diagnostics.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "break_cycle", "file_path": "crates/sc-compose/src/commands/dispatch.rs", "target_symbol": "cycle[4]: mod.rs->dispatch.rs, mod.rs->examples.rs, templates.rs->mod.rs", "line_start": null, "line_end": null, "plan": {"cycle": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/templates.rs"], "cut_edges": [{"from": "crates/sc-compose/src/commands/mod.rs", "to": "crates/sc-compose/src/commands/dispatch.rs"}, {"from": "crates/sc-compose/src/commands/mod.rs", "to": "crates/sc-compose/src/commands/examples.rs"}, {"from": "crates/sc-compose/src/commands/templates.rs", "to": "crates/sc-compose/src/commands/mod.rs"}]}, "evidence": {"cycle_size": 4, "edge_count": 7, "cut_count": 3}, "impact_delta": 0.0, "effort_bucket": "M", "blast_radius": {"files": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/templates.rs"], "file_count": 4, "callers": 5}, "confidence": "medium", "source_biomarker": "", "benefit": 2.6094, "leverage": 3.6138, "cost": 2.0, "risk": 3.7918, "rank_score": 1.7727, "dependents": 2, "file_nloc": 197, "file_weighted_deficit": 152, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/templates.rs"], "affected_symbols": ["cycle[4]: mod.rs->dispatch.rs, mod.rs->examples.rs, templates.rs->mod.rs"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/dispatch.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/examples.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/templates.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "target_symbol": "validate_parse_depth", "line_start": 17, "line_end": 72, "plan": {"span": {"start": 28, "end": 38}, "params": ["block_indents", "line", "trimmed"], "returns": [], "suggested_name": null}, "evidence": {"slice_nloc": 11, "ccn_removed": 3}, "impact_delta": 1.452, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 1.452, "leverage": 3.0827, "cost": 1.0, "risk": 1.5, "rank_score": 1.6937, "dependents": 1, "file_nloc": 87, "file_weighted_deficit": 118, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/extract/yaml_limits.rs"], "affected_symbols": ["validate_parse_depth"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/extract/yaml_limits.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/tests/repo_boundaries.rs", "target_symbol": "assert_manifest_dependency_rules", "line_start": 234, "line_end": 274, "plan": {"span": {"start": 238, "end": 246}, "params": ["forbidden_manifest_deps", "path", "violations"], "returns": ["contents"], "suggested_name": "compute_contents"}, "evidence": {"slice_nloc": 9, "ccn_removed": 2}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 4.3464, "cost": 1.0, "risk": 0.75, "rank_score": 1.6467, "dependents": 1, "file_nloc": 393, "file_weighted_deficit": 1489, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-compose/tests/repo_boundaries.rs"], "truncated": false, "affected_files": ["crates/sc-compose/tests/repo_boundaries.rs"], "affected_symbols": ["assert_manifest_dependency_rules"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/tests/repo_boundaries.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-compose/tests/repo_boundaries.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/template_lint.rs", "target_symbol": "template_lint.rs -> 4 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "repository", "symbols": ["discover_repository_json_templates", "is_non_production_fixture_directory", "lint_repository_templates", "template_contracts_scope", "visit_template_dir"], "suggested_file": "crates/sc-compose/src/commands/repository.rs"}, {"name": "identifier", "symbols": ["is_identifier_boundary", "is_identifier_character", "line_and_column", "redundant_chain_offset", "skip_whitespace"], "suggested_file": "crates/sc-compose/src/commands/identifier.rs"}, {"name": "lint", "symbols": ["analyze_template_source", "lint_repository_template", "lint_request", "lint_source"], "suggested_file": "crates/sc-compose/src/commands/lint.rs"}, {"name": "scalar", "symbols": ["is_identifier", "is_literal_quoted_scalar", "is_scalar_expression"], "suggested_file": "crates/sc-compose/src/commands/scalar.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 576, "symbol_count": 17, "group_count": 4, "modularity": 0.448, "intra_edges": 24, "cut_edges": 14, "cochange_edges": 30}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/mod.rs"], "dependent_count": 2, "import_rewrites": 2}, "confidence": "medium", "source_biomarker": "", "benefit": 2.3863, "leverage": 5.4096, "cost": 5.0, "risk": 3.9459, "rank_score": 1.5378, "dependents": 3, "file_nloc": 576, "file_weighted_deficit": 3122, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/identifier.rs", "crates/sc-compose/src/commands/lint.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/repository.rs", "crates/sc-compose/src/commands/scalar.rs", "crates/sc-compose/src/commands/template_lint.rs"], "affected_symbols": ["template_lint.rs -> 4 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/compose.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/identifier.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/repository.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/scalar.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/template_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/template_store.rs", "target_symbol": "template_store.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "data", "symbols": ["absolute_path", "data_dir", "environment_path", "platform_user_data_dir", "user_templates_dir"], "suggested_file": "crates/sc-compose/src/data.rs"}, {"name": "name", "symbols": ["default_pack_name", "example_name_for_path", "is_j2_template", "resolve_template_entrypoint"], "suggested_file": "crates/sc-compose/src/name.rs"}, {"name": "manifest", "symbols": ["load_manifest", "load_template_pack", "validate_manifest_defaults"], "suggested_file": "crates/sc-compose/src/manifest.rs"}], "residual": {"symbols": ["copy_directory_recursive", "example_name_collision_error"]}, "shim_required": true}, "evidence": {"file_nloc": 482, "symbol_count": 14, "group_count": 3, "modularity": 0.558, "intra_edges": 11, "cut_edges": 1}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/templates.rs", "crates/sc-compose/src/main.rs", "crates/sc-compose/src/render_request/request.rs", "crates/sc-compose/src/render_request/tests.rs"], "dependent_count": 6, "import_rewrites": 6}, "confidence": "high", "source_biomarker": "", "benefit": 2.0986, "leverage": 5.4087, "cost": 5.0, "risk": 2.8026, "rank_score": 1.5279, "dependents": 6, "file_nloc": 482, "file_weighted_deficit": 1017, "validation": {"basis": "mixed", "via": "mixed", "total": 1, "tests": ["crates/sc-compose/src/render_request/tests.rs"], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/templates.rs", "crates/sc-compose/src/data.rs", "crates/sc-compose/src/main.rs", "crates/sc-compose/src/manifest.rs", "crates/sc-compose/src/name.rs", "crates/sc-compose/src/render_request/request.rs", "crates/sc-compose/src/render_request/tests.rs", "crates/sc-compose/src/template_store.rs"], "affected_symbols": ["template_store.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/examples.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/templates.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/data.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/main.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/manifest.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/name.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/render_request/request.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/render_request/tests.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-compose/src/render_request/tests.rs"], "truncated": false}, {"file_path": "crates/sc-compose/src/template_store.rs", "basis": "inferred", "via": "import-graph", "total": 1, "tests": ["crates/sc-compose/src/render_request/tests.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-compose/src/commands/sc_lint.rs", "target_symbol": "classify_outcome", "line_start": 371, "line_end": 412, "plan": {"span": {"start": 398, "end": 411}, "params": ["exit_status", "payload"], "returns": [], "suggested_name": null}, "evidence": {"slice_nloc": 14, "ccn_removed": 2}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 4.9946, "cost": 1.0, "risk": 1.5, "rank_score": 1.4507, "dependents": 3, "file_nloc": 506, "file_weighted_deficit": 1361, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/sc_lint.rs"], "affected_symbols": ["classify_outcome"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/sc_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/extract.rs", "target_symbol": "extract.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "diagnostic", "symbols": ["bounded_text", "diagnostic_kind", "extraction_diagnostic", "extraction_diagnostic_json", "json_output_error", "parse_filter", "read_input"], "suggested_file": "crates/sc-compose/src/commands/diagnostic.rs"}, {"name": "lib", "symbols": ["emit_json", "emit_text", "extract_error", "extract_error_message", "extraction_occurrence_json", "run_extract"], "suggested_file": "crates/sc-compose/src/commands/lib.rs"}, {"name": "format", "symbols": ["format_path", "format_source", "path_segment_json", "source_json"], "suggested_file": "crates/sc-compose/src/commands/format.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 331, "symbol_count": 17, "group_count": 3, "modularity": 0.397, "intra_edges": 36, "cut_edges": 14, "cochange_edges": 46}, "impact_delta": 0.0, "effort_bucket": "L", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/mod.rs"], "dependent_count": 2, "import_rewrites": 2}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.2736, "cost": 3.0, "risk": 3.7918, "rank_score": 1.4204, "dependents": 3, "file_nloc": 331, "file_weighted_deficit": 321, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/diagnostic.rs", "crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/extract.rs", "crates/sc-compose/src/commands/format.rs", "crates/sc-compose/src/commands/lib.rs", "crates/sc-compose/src/commands/mod.rs"], "affected_symbols": ["extract.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/diagnostic.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/dispatch.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/extract.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/format.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/lib.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-composer/src/composer.rs", "target_symbol": "composer.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "validation", "symbols": ["assemble_output", "build_pass_contexts", "build_render_context", "compose_expanded", "fail_if_invalid", "resolved_template_name"], "suggested_file": "crates/sc-composer/src/validation.rs"}, {"name": "compose", "symbols": ["compose", "compose_with_observer", "compose_with_observer_and_expanded", "notify_include_error", "notify_resolve_error", "resolve_attempt_label"], "suggested_file": "crates/sc-composer/src/compose.rs"}, {"name": "config", "symbols": ["protect_higher_braces", "render_all", "render_all_with_observer"], "suggested_file": "crates/sc-composer/src/config.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 690, "symbol_count": 15, "group_count": 3, "modularity": 0.393, "intra_edges": 14, "cut_edges": 4, "cochange_edges": 2, "import_edges": 1}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-compose/src/reporting/init.rs", "crates/sc-composer/src/lib.rs", "crates/sc-composer/tests/integration.rs"], "dependent_count": 3, "import_rewrites": 3}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.9519, "cost": 5.0, "risk": 2.9459, "rank_score": 1.3963, "dependents": 2, "file_nloc": 690, "file_weighted_deficit": 2222, "validation": {"basis": "mixed", "via": "call-graph", "total": 2, "tests": ["crates/sc-composer/tests/extract_integration.rs", "crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-compose/src/reporting/init.rs", "crates/sc-composer/src/compose.rs", "crates/sc-composer/src/composer.rs", "crates/sc-composer/src/config.rs", "crates/sc-composer/src/lib.rs", "crates/sc-composer/src/validation.rs", "crates/sc-composer/tests/integration.rs"], "affected_symbols": ["composer.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/reporting/init.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/compose.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/composer.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/config.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/lib.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/extract_integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/validation.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/tests/integration.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-composer/src/extract/toml.rs", "target_symbol": "toml.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "error", "symbols": ["ambiguity_error", "duplicate_error_with_source", "malformed_error_with_source", "missing_path_error", "parse_document", "template_error", "template_error_with_source", "value_error", "value_error_with_source"], "suggested_file": "crates/sc-composer/src/extract/error.rs"}, {"name": "validate", "symbols": ["extract_toml", "input_limit_error", "selected_variable", "validate_input_size", "validate_parse_depth", "validate_value_limits"], "suggested_file": "crates/sc-composer/src/extract/validate.rs"}, {"name": "error", "symbols": ["map_raw_text_error", "match_toml", "match_toml_array", "reject_dynamic_key", "shape_error", "with_span"], "suggested_file": "crates/sc-composer/src/extract/error_2.rs"}], "residual": {"symbols": ["format_path"]}, "shim_required": true}, "evidence": {"file_nloc": 509, "symbol_count": 22, "group_count": 3, "modularity": 0.327, "intra_edges": 52, "cut_edges": 31}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-composer/src/extract/mod.rs"], "dependent_count": 1, "import_rewrites": 1}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.7081, "cost": 5.0, "risk": 2.6094, "rank_score": 1.3914, "dependents": 2, "file_nloc": 509, "file_weighted_deficit": 1364, "validation": {"basis": "mixed", "via": "call-graph", "total": 2, "tests": ["crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/extract_integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/src/extract/error.rs", "crates/sc-composer/src/extract/error_2.rs", "crates/sc-composer/src/extract/mod.rs", "crates/sc-composer/src/extract/toml.rs", "crates/sc-composer/src/extract/validate.rs"], "affected_symbols": ["toml.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/extract/error.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/src/extract/tests.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/extract/error_2.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/extract/mod.rs", "basis": "inferred", "via": "call-graph", "total": 2, "tests": ["crates/sc-composer/src/extract/tests.rs", "crates/sc-composer/tests/extract_integration.rs"], "truncated": false}, {"file_path": "crates/sc-composer/src/extract/toml.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-composer/src/extract/validate.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "break_cycle", "file_path": "crates/sc-composer-beads/src/contract.rs", "target_symbol": "cycle[2]: error.rs->contract.rs", "line_start": null, "line_end": null, "plan": {"cycle": ["crates/sc-composer-beads/src/contract.rs", "crates/sc-composer-beads/src/error.rs"], "cut_edges": [{"from": "crates/sc-composer-beads/src/error.rs", "to": "crates/sc-composer-beads/src/contract.rs"}]}, "evidence": {"cycle_size": 2, "edge_count": 2, "cut_count": 1}, "impact_delta": 0.0, "effort_bucket": "S", "blast_radius": {"files": ["crates/sc-composer-beads/src/contract.rs", "crates/sc-composer-beads/src/error.rs"], "file_count": 2, "callers": 6}, "confidence": "high", "source_biomarker": "", "benefit": 2.0986, "leverage": 1.9459, "cost": 1.0, "risk": 2.4459, "rank_score": 1.3906, "dependents": 6, "file_nloc": 129, "file_weighted_deficit": 0, "validation": {"basis": "mixed", "via": "call-graph", "total": 2, "tests": ["crates/sc-compose/tests/cli/bead.rs", "crates/sc-composer-beads/tests/contract.rs"], "truncated": false, "affected_files": ["crates/sc-composer-beads/src/contract.rs", "crates/sc-composer-beads/src/error.rs"], "affected_symbols": ["cycle[2]: error.rs->contract.rs"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer-beads/src/contract.rs", "basis": "inferred", "via": "call-graph", "total": 2, "tests": ["crates/sc-compose/tests/cli/bead.rs", "crates/sc-composer-beads/tests/contract.rs"], "truncated": false}, {"file_path": "crates/sc-composer-beads/src/error.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/compose_render.rs", "target_symbol": "compose_render.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "execute", "symbols": ["checked_render_output", "custom_variable_sources", "execute_custom_delimiter_render", "execute_render_with_expanded", "execute_render_with_extra_warnings"], "suggested_file": "crates/sc-compose/src/commands/execute.rs"}, {"name": "path_utils", "symbols": ["build_custom_render_context", "current_username", "environment_value"], "suggested_file": "crates/sc-compose/src/commands/path_utils.rs"}, {"name": "command_error", "symbols": ["custom_variable_delimiters", "execute_render", "validation_report_error"], "suggested_file": "crates/sc-compose/src/commands/command_error.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 345, "symbol_count": 11, "group_count": 3, "modularity": 0.302, "intra_edges": 13, "cut_edges": 8, "cochange_edges": 14}, "impact_delta": 0.0, "effort_bucket": "L", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/templates.rs"], "dependent_count": 3, "import_rewrites": 3}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.0797, "cost": 3.0, "risk": 3.9459, "rank_score": 1.3416, "dependents": 1, "file_nloc": 345, "file_weighted_deficit": 873, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/command_error.rs", "crates/sc-compose/src/commands/compose.rs", "crates/sc-compose/src/commands/compose_render.rs", "crates/sc-compose/src/commands/examples.rs", "crates/sc-compose/src/commands/execute.rs", "crates/sc-compose/src/commands/path_utils.rs", "crates/sc-compose/src/commands/templates.rs"], "affected_symbols": ["compose_render.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/command_error.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/compose.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/compose_render.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/examples.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/execute.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/path_utils.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/templates.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_method", "file_path": "crates/sc-composer/src/init_workspace.rs", "target_symbol": "init_workspace", "line_start": 14, "line_end": 107, "plan": {"span": {"start": 66, "end": 98}, "params": ["canonical_root", "recommendations", "templates"], "returns": ["validation_passed"], "suggested_name": "compute_validation_passed"}, "evidence": {"slice_nloc": 33, "ccn_removed": 3}, "impact_delta": 0.847, "effort_bucket": "S", "blast_radius": {"scope": "local"}, "confidence": "high", "source_biomarker": "complex_method", "benefit": 0.847, "leverage": 4.3589, "cost": 1.0, "risk": 1.5, "rank_score": 1.2969, "dependents": 2, "file_nloc": 221, "file_weighted_deficit": 678, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-composer/src/init_workspace.rs"], "affected_symbols": ["init_workspace"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/src/init_workspace.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "split_file", "file_path": "crates/sc-compose/src/commands/sc_lint.rs", "target_symbol": "sc_lint.rs -> 3 files", "line_start": null, "line_end": null, "plan": {"groups": [{"name": "html", "symbols": ["command_args", "descriptor_target", "html_escape", "parse_raw_payload", "pretty_json", "relative_path", "render_html_report"], "suggested_file": "crates/sc-compose/src/commands/html.rs"}, {"name": "lint", "symbols": ["classify_outcome", "lint_exit_code", "normalize_diagnostics", "run_local_template_contracts", "run_sc_lint", "run_sc_lint_command"], "suggested_file": "crates/sc-compose/src/commands/lint.rs"}, {"name": "lint", "symbols": ["find_sc_lint_executable", "run_external_sc_lint", "sc_lint_process"], "suggested_file": "crates/sc-compose/src/commands/lint_2.rs"}], "residual": null, "shim_required": true}, "evidence": {"file_nloc": 506, "symbol_count": 16, "group_count": 3, "modularity": 0.327, "intra_edges": 29, "cut_edges": 13, "cochange_edges": 33, "import_edges": 1}, "impact_delta": 0.0, "effort_bucket": "XL", "blast_radius": {"dependent_files": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/mod.rs"], "dependent_count": 2, "import_rewrites": 2}, "confidence": "medium", "source_biomarker": "", "benefit": 2.0986, "leverage": 4.9946, "cost": 5.0, "risk": 3.7918, "rank_score": 1.2848, "dependents": 3, "file_nloc": 506, "file_weighted_deficit": 1361, "validation": {"basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false, "affected_files": ["crates/sc-compose/src/commands/dispatch.rs", "crates/sc-compose/src/commands/html.rs", "crates/sc-compose/src/commands/lint.rs", "crates/sc-compose/src/commands/lint_2.rs", "crates/sc-compose/src/commands/mod.rs", "crates/sc-compose/src/commands/sc_lint.rs"], "affected_symbols": ["sc_lint.rs -> 3 files"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-compose/src/commands/dispatch.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/html.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/lint_2.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/mod.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}, {"file_path": "crates/sc-compose/src/commands/sc_lint.rs", "basis": "unknown", "via": null, "total": 0, "tests": [], "truncated": false}]}}, {"id": "", "refactoring_type": "extract_class", "file_path": "crates/sc-composer/tests/integration.rs", "target_symbol": "CapturingObserver", "line_start": 29, "line_end": 55, "plan": {"groups": [{"name": null, "methods": ["on_pass_start"], "fields": ["pass_start"]}, {"name": null, "methods": ["on_pass_end"], "fields": ["pass_end"]}, {"name": null, "methods": ["on_resolve_outcome"], "fields": ["resolve"]}, {"name": null, "methods": ["on_include_outcome"], "fields": ["include"]}, {"name": null, "methods": ["on_validation_outcome"], "fields": ["validation"]}, {"name": null, "methods": ["on_render_outcome"], "fields": ["render"]}]}, "evidence": {"lcom4": 7, "method_count": 7, "field_count": 6, "wmc": 7, "tcc": 0.0}, "impact_delta": 0.6, "effort_bucket": "S", "blast_radius": {"dependents_count": 0}, "confidence": "high", "source_biomarker": "low_cohesion", "benefit": 0.6, "leverage": 4.253, "cost": 1.0, "risk": 0.75, "rank_score": 1.1461, "dependents": 1, "file_nloc": 502, "file_weighted_deficit": 1235, "validation": {"basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false, "affected_files": ["crates/sc-composer/tests/integration.rs"], "affected_symbols": ["CapturingObserver"], "commands": ["npm run test"], "targets": [{"file_path": "crates/sc-composer/tests/integration.rs", "basis": "inferred", "via": "call-graph", "total": 1, "tests": ["crates/sc-composer/tests/integration.rs"], "truncated": false}]}}]} \ No newline at end of file diff --git a/.sc/repowise/generate-report.py b/.sc/repowise/generate-report.py index fbd46bdb..40158a9f 100644 --- a/.sc/repowise/generate-report.py +++ b/.sc/repowise/generate-report.py @@ -1,246 +1,364 @@ #!/usr/bin/env python3 """Generate the final comprehensive repowise report for sc-compose. -Reads raw JSON from .sc/repowise/data/ and writes the compiled health report -to docs/repowise/health.md. The version, commit, and date are resolved from -git at run time so the report is always self-describing. +DATA-DRIVEN: reads raw scoped JSON from .sc/repowise/data/ and writes +docs/repowise/health.md + per-module reports. Version, commit, date resolved +from git at run time. NO hardcoded prose — every number and observation is +computed from the current run, so the report always matches its own data. + +Inputs (per .sc/repowise.yaml modules + global artifacts): + repowise-health-compose.json repowise health --module crates/sc-compose + repowise-health-composer.json repowise health --module crates/sc-composer + repowise-refactoring-targets.json repowise health --refactoring-targets + repowise-dead-code.json repowise dead-code + +Outputs: + docs/repowise/health.md comprehensive (both modules, merged) + docs/repowise/health-sc-compose.md per-module (crates/sc-compose) + docs/repowise/health-sc-composer.md per-module (crates/sc-composer) """ -import json, os, subprocess, sys +import json, subprocess, sys from pathlib import Path -# ── Git metadata ────────────────────────────────────────────────────────────── -REPO = Path(__file__).resolve().parent.parent.parent +# ── Git metadata ─────────────────────────────────────────────────────────────── +REPO = Path(__file__).resolve().parents[2] def _git(*args): return subprocess.check_output(["git", "-C", str(REPO), *args], text=True).strip() -VERSION = _git("describe", "--tags", "--always") -COMMIT = _git("rev-parse", "--short", "HEAD") -GENERATED = _git("log", "-1", "--format=%cs") +VERSION = _git("describe", "--tags", "--always") +COMMIT = _git("rev-parse", "--short", "HEAD") +GENERATED = _git("log", "-1", "--format=%cs") + +DATA_DIR = Path(__file__).resolve().parent / "data" +OUT_DIR = REPO / "docs" / "repowise" +OUT_DIR.mkdir(parents=True, exist_ok=True) -# ── Helpers ─────────────────────────────────────────────────────────────────── -DATA_DIR = Path(__file__).resolve().parent / "data" -OUT_DIR = REPO / "docs" / "repowise" -OUT_PATH = OUT_DIR / "health.md" +BIOMARKER_MEANING = { + "duplicated_assertion_block": "Repeated assertion patterns — test helper opportunity", + "hot_path_sync_io": "Sync I/O on hot paths — should be async", + "prior_defect": "Files with bug-fix history — strong defect predictor", + "untested_hotspot": "Depended-upon files with no paired test coverage", + "dry_violation": "DRY violations — opportunities to extract shared code", + "error_handling": "Error handling gaps or inconsistencies", + "hidden_coupling": "Implicit dependencies between modules", + "co_change_scatter": "Files that change together — high coupling", + "churn_risk": "High recent change frequency — churn-driven risk", +} def load_json(path): - with open(path) as f: - content = f.read() + """Tolerant JSON loader: repowise CLI output may carry [debug] log lines + before/after the JSON body. Scan every '{'/'[' start position and use + the first that decodes.""" + content = path.read_text() + dec = json.JSONDecoder() for i, c in enumerate(content): if c in '{[': - return json.loads(content[i:]) + try: + obj, _ = dec.raw_decode(content[i:]) + return obj + except json.JSONDecodeError: + continue raise ValueError(f"No JSON in {path}") def safe(v, fmt=".1f", default="—"): - if v is None: return default - return f"{v:{fmt}}" - -h1 = load_json(DATA_DIR / "repowise-health-compose.json") -rt = load_json(DATA_DIR / "repowise-refactoring-targets.json") -dc = load_json(DATA_DIR / "repowise-dead-code.json") -k = h1['kpis'] -metrics = sorted(h1['metrics'], key=lambda m: m['score']) -findings = h1['findings'] - -out = [] -def w(*args): out.append(" ".join(str(a) for a in args)) -def blank(): out.append("") - -w("# sc-compose — Repowise Code Health Analysis") -blank() -w(f"**Version:** {VERSION} | **Commit:** {COMMIT} | **Generated:** {GENERATED}") -w("**Analyzed by:** repowise health + dead-code + refactoring-targets") -blank() - -# ── Summary ── -w("## Quick Summary") -blank() -w("| Metric | Value |") -w("|---|---|") -w(f"| Overall Health | **{k['average_health']:.1f}/10** |") -w(f"| Hotspot Health | {k['hotspot_health']:.1f}/10 |") -w(f"| Worst File | `{k['worst_performer_path']}` ({k['worst_performer_score']:.1f}/10) |") -w(f"| Files Indexed | {k['file_count']} |") -w(f"| Biomarker Findings | {len(findings)} |") -w(f"| Dead Code Items | {len(dc)} |") -w(f"| Refactoring Targets | {len(rt.get('targets',[]))} |") -blank() - -w("### Health Dimensions") -blank() -w("| Dimension | Average | Hotspot |") -w("|---|---|---|") -w(f"| Maintainability | {k['maintainability_average']:.1f}/10 | {k['maintainability_hotspot']:.1f}/10 |") -w(f"| Performance | {k['performance_average']:.1f}/10 | {k['performance_hotspot']:.1f}/10 |") -w(f"| Overall | {k['average_health']:.1f}/10 | {k['hotspot_health']:.1f}/10 |") -blank() - -w("*Interpretation:* 8.2/10 average with 5.2 hotspot health means most files are healthy but a concentrated few drag the score down. Maintainability (9.1) and performance (9.8) average are excellent, but the hotspot maintainability (7.3) reveals files needing modularization. The worst file (`validation.rs`) at 2.6/10 accounts for most of the hotspot drag.") -blank() - -# ── Worst files ── -w("## Worst 20 Files by Health Score") -blank() -w("| Score | File | NLOC | CCN | Nest | Dup% |") -w("|---|---|---|---|---|---|") -for m in metrics[:20]: - w(f"| {m['score']:.1f} | `{m['file_path']}` | {m['nloc']} | {m['max_ccn']} | {safe(m['max_nesting'],'d')} | {safe(m['duplication_pct'])} |") -blank() - -w("**Key observations:**") -w(f"- `validation.rs` (2.6/10, 1388 NLOC, CCN=11): the single biggest problem — large, complex, and duplicated (28% dup). This is a prime candidate for decomposition.") -w(f"- Test files dominate the worst list: `cli.rs` (2586 NLOC, 61% dup), `json_cli.rs` (1640 NLOC, 76% dup) — these are expected for thorough testing but the duplication indicates test helper opportunities.") -w(f"- `types.rs` (4.8/10, CCN=11, nest=6): deeply nested validation logic — the 6-deep nesting in `validate_input_value_at` is flagged separately.") -blank() - -# ── Best files ── -w("## Best 10 Files (for contrast)") -blank() -w("| Score | File | NLOC |") -w("|---|---|---|") -for m in metrics[-10:][::-1]: - w(f"| {m['score']:.1f} | `{m['file_path']}` | {m['nloc']} |") -blank() - -# ── Biomarkers ── -by_type = {} -for f in findings: - t = f['biomarker_type'] - by_type.setdefault(t, []).append(f) - -w("## Biomarker Findings") -blank() -w("| Type | Count | What It Means |") -w("|---|---|---|") -w("| duplicated_assertion_block | 130 | Repeated assertion patterns — test helper opportunity |") -w("| hot_path_sync_io | 52 | Sync I/O on hot paths — should be async |") -w("| prior_defect | 46 | Files with bug-fix history — strong defect predictor |") -w("| dry_violation | 38 | DRY violations — opportunities to extract shared code |") -w("| error_handling | 30 | Error handling gaps or inconsistencies |") -w("| hidden_coupling | 21 | Implicit dependencies between modules |") -w("| co_change_scatter | 21 | Files that change together → high coupling |") -for btype in sorted(by_type, key=lambda t: -len(by_type[t])): - if btype in ('duplicated_assertion_block','hot_path_sync_io','prior_defect','dry_violation','error_handling','hidden_coupling','co_change_scatter'): - continue - w(f"| {btype} | {len(by_type[btype])} | |") -blank() - -# Top biomarker categories in detail -priority_types = ['prior_defect', 'untested_hotspot', 'co_change_scatter', - 'churn_risk', 'hidden_coupling', 'error_handling'] -for btype in priority_types: - items = by_type.get(btype, []) - if not items: continue - w(f"### {btype} ({len(items)} findings)") - blank() - top = sorted(items, key=lambda i: i.get('health_impact',0), reverse=True)[:6] - for item in top: - fn = item.get('function_name') or '(top-level)' - w(f"- **{item['severity']}** `{item['file_path']}` `{fn}`: {item.get('reason','')[:140]}") - if len(items) > 6: - w(f"- *... and {len(items)-6} more*") - blank() - -# ── Refactoring Targets ── -w("## Refactoring Targets") -blank() -w("Prioritized by impact-per-effort ratio (highest ROI first).") -blank() -for i, t in enumerate(rt.get('targets',[])[:10]): - rank = i + 1 - w(f"### #{rank}: `{t['file_path']}` ({t['score']:.1f}/10, {t['nloc']} NLOC)") - blank() - w(f"| Metric | Value |") - w(f"|---|---|") - w(f"| Biomarker | **{t['primary_biomarker']}** ({t['primary_severity']}) |") - w(f"| Impact Score | {t['total_impact']:.1f} |") - w(f"| Effort | {t['effort_bucket']} |") - w(f"| ROI | {t['impact_per_effort']:.1f} |") - w(f"| Finding Count | {t['finding_count']} |") - w(f"| Reason | {t['primary_reason']} |") - blank() - plans = t.get('plans', []) - for plan in plans[:2]: - ptype = plan.get('refactoring_type', '?') - pdesc = plan.get('plan', {}) - if isinstance(pdesc, dict): - desc = pdesc.get('suggestion', pdesc.get('summary', str(pdesc)[:150])) + return default if v is None else f"{v:{fmt}}" + +def badge_md(score): + color = "brightgreen" if score >= 7 else ("yellow" if score >= 4 else "red") + return f"![health {score}/10](https://img.shields.io/badge/health-{int(score*10)}%2F100-{color})" + +class Report: + def __init__(self, name, h, rt, dc, is_combined=False): + self.name, self.h, self.rt, self.dc, self.combined = name, h, rt, dc, is_combined + self.k = h["kpis"] + self.metrics = sorted(h["metrics"], key=lambda m: (m["score"], m["nloc"])) + self.findings = h.get("findings", []) + + def history_section(self): + """Render the cross-run trend from docs/repowise/history.md. + This is what makes the report track health BETWEEN runs, not just one + point in time. Latest run first.""" + hist = OUT_DIR / "history.md" + if not hist.exists(): + return [] + rows = [] + for l in hist.read_text().splitlines(): + if not l.startswith("|") or l.startswith("|---"): + continue + cells = [c.strip() for c in l.strip("|").split("|")] + if not cells or not cells[0][:4].isdigit(): # skip header/data rows + continue + rows.append((cells[0], l)) + if not rows: + return [] + # File is chronological (oldest first, this run last). Keep that order. + latest = rows[-1][1] + prev = rows[-2][1] if len(rows) >= 2 else None + out = [] + def w(s=""): out.append(s) + w("## Trend Between Runs") + w() + if prev: + import re + def overall_of(row): + # anchor to a full cell: "| /10 |" or "| **/10** |" + m = re.search(r"\|\s*\*{0,2}([0-9]+(?:\.[0-9]+)?)\s*/\s*10\*{0,2}\s*\|", row) + return float(m.group(1)) if m else None + a, b = overall_of(prev), overall_of(latest) + if a is not None and b is not None: + delta = b - a + sign = '+' if delta > 0 else ('' if delta == 0 else '') + word = 'improved' if delta > 0 else ('declined' if delta < 0 else 'unchanged') + w(f"**This run vs the previous recorded run: {sign}{delta:.2f}/10 overall health — {word}.** Full log below.") + w() + w("Latest run is last. Chronological; read with `health.md` for the current deep-dive.") + w() + w("| Generated | Version / Commit | Overall | Hotspot | Files | Worst file (score) | PR |") + w("|---|---|---|---|---|---|---|") + for _, row in rows: + w(row) + w() + w("*History seeded + appended by `.sc/repowise/generate-report.py`; hand-edit only to correct a wrong row.*") + return out + + # ── data-driven observations ───────────────────────────────────────────── + def observations(self): + rows = [] + def num(m, key): + v = m.get(key) + return v if isinstance(v, (int, float)) else 0 + def top(pred, label): + m = [x for x in self.metrics if pred(x)] + if not m: + return None + m = sorted(m, key=lambda x: x["score"]) + t = m[0] + extra = (", CCN=" + str(t["max_ccn"]) if num(t, "max_ccn") >= 15 else "") + extra += (", " + str(num(t, "duplication_pct")) + "% duplication" if num(t, "duplication_pct") >= 25 else "") + return f"`{t['file_path']}` ({t['score']:.1f}/10, {t['nloc']} NLOC) — {label}{extra}" + rows.append(top(lambda m: num(m, "max_ccn") >= 20, "high cyclomatic complexity")) + rows.append(top(lambda m: num(m, "duplication_pct") >= 50, "high duplication")) + rows.append(top(lambda m: num(m, "max_nesting") >= 6, "deep nesting")) + out = [r for r in rows if r] + return out if out else ["No structurally notable worst files beyond the score ranking above."] + + def biomarker_table(self): + by_type = {} + for f in self.findings: + by_type.setdefault(f["biomarker_type"], []).append(f) + rows = [] + for t, items in sorted(by_type.items(), key=lambda kv: -len(kv[1])): + rows.append(f"| {t} | {len(items)} | {BIOMARKER_MEANING.get(t, '')} |") + return rows + + def top_biomarkers(self, limit=6): + by_type = {} + for f in self.findings: + by_type.setdefault(f["biomarker_type"], []).append(f) + picks = [] + for t, items in sorted(by_type.items(), key=lambda kv: -len(kv[1]))[:limit]: + block = [f"### [{len(items)}] {t}"] + if t in BIOMARKER_MEANING: + block.append(BIOMARKER_MEANING[t]) + top = sorted(items, key=lambda i: i.get("health_impact", 0), reverse=True)[:6] + for item in top: + fn = item.get("function_name") or "(top-level)" + block.append(f"- **{item.get('severity','?')}** `{item['file_path']}` `{fn}`: {item.get('reason','')[:160]}") + picks.append("\n".join(block)) + return picks + + def dead_code(self): + by_kind = {} + for f in self.dc: + by_kind.setdefault(f.get("kind", "unknown"), []).append(f) + rows, detail = [], [] + for kind, items in sorted(by_kind.items(), key=lambda kv: -len(kv[1])): + rows.append(f"| {kind} | {len(items)} |") + act = sorted(items, key=lambda x: x.get("confidence", 0), reverse=True) + actionable = [f for f in act if f.get("confidence", 0) >= 0.5 and not f.get("safe_to_delete")] + detail.append(f"#### {kind}\n" + "\n".join( + f"- `{f['file_path']}` ({f.get('lines',0)} lines, conf {f.get('confidence','?')}): {f.get('reason','')[:140]}" + for f in actionable[:8])) + return rows, detail + + def render(self): + o = [] + def w(s=""): o.append(s) + k = self.k + w(f"# {self.name} — Repowise Code Health") + w() + w(f"**Version:** {VERSION} | **Commit:** {COMMIT} | **Generated:** {GENERATED}") + w(f"**Analyzed:** {len(self.metrics)} files | **Biomarker findings:** {len(self.findings)} | **Data:** repowise health + dead-code + refactoring-targets") + w() + w(badge_md(k["average_health"])) + w() + w("## Quick Summary") + w() + w("| Metric | Value |") + w("|---|---|") + w(f"| Overall Health | **{k['average_health']:.2f}/10** |") + w(f"| Hotspot Health | {k['hotspot_health']:.2f}/10 |") + w(f"| Worst In-Scope File | `{k['worst_performer_path']}` ({k['worst_performer_score']:.2f}/10) |") + w(f"| Files Scored (this scope) | {len(self.metrics)} |") + if self.combined: + w(f"| Files in Full Index | {k['file_count']} (repo-wide scan; scored table above = configured modules only) |") else: - desc = str(pdesc)[:150] - w(f"- **{ptype}**: {desc}") - if plans: - blank() - -# ── Dead Code ── -w("## Dead Code Analysis") -blank() -w("**Note:** 51 `unused_export` findings in `bindings/python/python/sc_compose/_native.pyi` are PyO3 auto-generated type stubs — not genuine dead code. They are excluded from the actionable count below.") -blank() - -by_kind = {} -for f in dc: - kk = f['kind'] - by_kind.setdefault(kk, []).append(f) - -w("| Kind | Total | Actionable | Action |") -w("|---|---|---|---|") -# unreachable files -unreach = by_kind.get('unreachable_file', []) -actionable_unreach = [f for f in unreach if not f['file_path'].startswith('bindings/python/')] -w(f"| unreachable_file | {len(unreach)} | {len(actionable_unreach)} | Review — may be dead or scripts/prototypes |") -# unused exports (exclude .pyi) -unused = by_kind.get('unused_export', []) -real_unused = [f for f in unused if '.pyi' not in f.get('file_path','')] -w(f"| unused_export | {len(unused)} | {len(real_unused)} | {len(real_unused)} clean-up candidates |") -# zombie packages -zombie = by_kind.get('zombie_package', []) -w(f"| zombie_package | {len(zombie)} | {len(zombie)} | Review prototype/ package |") -blank() - -# Actionable unreachable files -if actionable_unreach: - w("### Unreachable Files") - blank() - for f in actionable_unreach: - risks = ', '.join(f.get('risk_factors', [])[:3]) or 'none' - w(f"- `{f['file_path']}` ({f.get('lines',0)} lines) — {f.get('reason','')} [risks: {risks}]") - blank() - -# Real unused exports -if real_unused: - w("### Actionable Unused Exports (excl. PyO3 stubs)") - blank() - for f in real_unused[:10]: - w(f"- `{f['file_path']}`: `{f.get('symbol_name','?')}` — {f.get('reason','')}") - if len(real_unused) > 10: - w(f"- *... and {len(real_unused)-10} more*") - blank() - -# ── Recommendations ── -w("## Top Recommendations") -blank() -w("### 1. Decompose `validation.rs` (2.6/10, 1388 NLOC)") -w("The largest and worst-scoring file. It has 20 biomarker findings, CCN=11, 28% duplication, and co-changes with 24 other files. Split into per-category validators: `var_validation.rs`, `frontmatter_validation.rs`, `include_validation.rs`.") -blank() -w("### 2. Add tests for untested hotspots") -w("11 files flagged as untested hotspots — `path_utils.rs` (16 dependents), `diagnostics.rs` (13 dependents), `cli.rs` (7 dependents). These are heavily depended-upon files with no paired test coverage. Prioritize `path_utils.rs` first (critical severity, highest ROI refactoring target).") -blank() -w("### 3. Extract test helpers (`cli.rs` 61% dup, `json_cli.rs` 76% dup)") -w("130 duplicated assertion blocks in test files — extract shared assertion helpers. The high duplication percentage in test files is expected but the volume (130 findings) signals a real maintenance burden.") -blank() -w("### 4. Address sync I/O on hot paths (52 findings)") -w("52 hot path sync I/O findings — likely from file I/O in the rendering pipeline. Consider async or at minimum document the sync I/O is intentional for CLI tools.") -blank() -w("### 5. Review prototype/ package visibility") -w("The `prototype/` directory is flagged as a zombie package. If actively used for experimentation, add to the repowise config's `annotated` section. Otherwise, consider archiving.") -blank() - -# ── Footer ── -w("---") -w("*Generated by repowise v1.x — codebase intelligence for developers. Config: .sc/repowise.yaml with modules `crates/sc-compose`, `crates/sc-composer` and annotated paths `bindings/python`, `prototype`, `scripts`.*") + w(f"| Files in Full Index | {k['file_count']} (repo-wide scan; this table = module only) |") + w(f"| Maintainability | {k['maintainability_average']:.2f} avg / {k['maintainability_hotspot']:.2f} hotspot |") + w(f"| Performance | {k['performance_average']:.2f} avg / {k['performance_hotspot']:.2f} hotspot |") + w() + low = [m for m in self.metrics if m["score"] < 3] + w(f"**Read:** in-scope average {k['average_health']:.2f}/10 with hotspot {k['hotspot_health']:.2f}/10 — " + f"{len(low)} of {len(self.metrics)} scored file{'s' if len(low) != 1 else ''} sit below 3.0/10 and carry the hotspot drag.") + w() + if self.combined: + o.extend(self.history_section()) + w("## Worst 20 Files by Health Score") + w() + w("| Score | File | NLOC | CCN | Nest | Dup% |") + w("|---|---|---|---|---|---|") + for m in self.metrics[:20]: + w(f"| {m['score']:.2f} | `{m['file_path']}` | {m['nloc']} | {m.get('max_ccn','—')} | {safe(m.get('max_nesting'),'d')} | {safe(m.get('duplication_pct'))} |") + w() + w("**Observations**") + for obs in self.observations(): + w(f"- {obs}") + w() + if self.findings: + w("## Biomarker Findings") + w() + w("| Type | Count | What It Means |") + w("|---|---|---|") + o.extend(self.biomarker_table()) + w() + w("### Highest-Impact Findings (by type)") + w() + for block in self.top_biomarkers(): + o.extend(block.split("\n")) + w() + if self.dc: + w("## Dead Code / Unreachable") + w() + rows, detail = self.dead_code() + w("| Kind | Count |") + w("|---|---|") + o.extend(rows) + w() + for d in detail: + o.extend(d.split("\n")) + w() + targets = self.rt.get("targets", []) + if targets: + w("## Refactoring Targets (impact-per-effort ranked)") + w() + for i, t in enumerate(targets[:10], 1): + w(f"### #{i}: `{t['file_path']}` — {t['primary_biomarker']} ({t['primary_severity']})") + w() + w("| Impact | Effort | ROI | Findings |") + w(f"| {safe(t.get('total_impact'))} | {t.get('effort_bucket','—')} | {safe(t.get('impact_per_effort'))} | {t.get('finding_count','—')} |") + w() + w(f"Reason: {t.get('primary_reason','')[:200]}") + plans = t.get("plans", [])[:2] + for p in plans: + pd = p.get("plan", {}) + desc = pd.get("suggestion", pd.get("summary", "")) if isinstance(pd, dict) else str(pd) + w(f"- **{p.get('refactoring_type','?')}**: {desc[:220]}") + w() + # ── recommendations: derived, not copied ── + w("## Recommendations (derived from this run)") + w() + worst = self.metrics[0] + w(f"1. **Start with the worst file** — `{worst['file_path']}` ({worst['score']:.2f}/10, {worst['nloc']} NLOC){', CCN=' + str(worst['max_ccn']) if worst.get('max_ccn',0)>=15 else ''}. Decompose by responsibility before anything else.") + untested = [f for f in self.findings if f["biomarker_type"] == "untested_hotspot"] + if untested: + files = sorted({f["file_path"] for f in untested})[:5] + w(f"2. **Close test gaps on depended-upon files** — {len(files)} hotspot file(s) lack paired tests: {', '.join('`%s`' % f for f in files)}.") + dup = sorted([f for f in self.findings if f["biomarker_type"] == "duplicated_assertion_block"], key=lambda x: -x.get("health_impact", 0)) + if dup: + w(f"3. **Extract duplication** — {len(dup)} duplicated assertion blocks; shared test-helper modules would remove the bulk.") + sync = len([f for f in self.findings if f["biomarker_type"] == "hot_path_sync_io"]) + if sync: + w(f"4. **Audit sync I/O on hot paths** — {sync} findings; either make async or document the intentional sync boundary.") + if targets: + t1 = targets[0] + w(f"5. **Fastest win** — refactoring target #1: `{t1['file_path']}` ({t1.get('effort_bucket','?')} effort, ROI {safe(t1.get('impact_per_effort'))}).") + w() + w("---") + w(f"*Generated by `.sc/repowise/generate-report.py` from scoped repowise data ({GENERATED}, {COMMIT}). Scope per `.sc/repowise.yaml`: modules + annotated exclusions. No hardcoded prose — every figure is computed from the JSON in `.sc/repowise/data/`.*") + return "\n".join(o) + "\n" -OUT_DIR.mkdir(parents=True, exist_ok=True) -with open(OUT_PATH, "w") as f: - f.write("\n".join(out)) -print(f"Wrote {len(out)} lines to {OUT_PATH}") +def record_history(pr_url): + """Maintain docs/repowise/history.md — the between-run health log. + Idempotent: one row per commit; seeds itself with the develop baseline + so the very first regeneration already shows a trend.""" + hist = OUT_DIR / "history.md" + row = (f"| {GENERATED} | {VERSION} / {COMMIT} | **{hc_kpi['average_health']:.2f}/10** | " + f"{hc_kpi['hotspot_health']:.2f}/10 | {hc_kpi['file_count']} | " + f"`{hc_kpi['worst_performer_path']}` ({hc_kpi['worst_performer_score']:.2f}) | {pr_url} |") + header = ["# sc-compose — Repowise Health History", + "", + "One row per analysis run, chronological (this run is last).", + "Read alongside `health.md` — that file is the deep-dive for the latest run.", + "", + "| Generated | Version / Commit | Overall | Hotspot | Files | Worst file (score) | PR |", + "|---|---|---|---|---|---|---|", + "| 2026-08-02 | v1.2.0-219-gbb79a5f / bb79a5f (develop baseline) | **7.90/10** | 4.70/10 | 286 | `crates/sc-compose/src/cli.rs` (1.55) | n/a (pre-PR runs) |"] + lines = None + if hist.exists(): + lines = hist.read_text().splitlines() + else: + lines = header + if not any(COMMIT in l for l in lines if l.startswith("|")): + lines.append(row) + hist.write_text("\n".join(lines) + "\n") + return lines + + +def main(): + hc = load_json(DATA_DIR / "repowise-health-compose.json") + hp = load_json(DATA_DIR / "repowise-health-composer.json") + rt = load_json(DATA_DIR / "repowise-refactoring-targets.json") + dc = load_json(DATA_DIR / "repowise-dead-code.json") + + # combined = the two configured MODULES, union of their per-file metrics + # (a file scored in both keeps its LOWER score). NOT the repo-wide index. + seen, merged = {}, [] + for h in (hc, hp): + for m in h["metrics"]: + key = (m["file_path"], m.get("score")) + if key in seen: + continue + seen[key] = m + merged.append(m) + merged.sort(key=lambda m: (m["score"], m["nloc"])) + + # KPIs: taken from the sc-compose module run — this is repowise's repo-level + # scoring (its `kpis`), file_count = full index scan; the table below is + # in-scope files only. The Report renders that distinction. + combined_h = dict(hc) + combined_h["metrics"] = merged + combined_h["findings"] = hc.get("findings", []) + hp.get("findings", []) + combined_h["modules"] = ["crates/sc-compose", "crates/sc-composer"] + + global hc_kpi + hc_kpi = hc["kpis"] # repo-level KPIs (sc-compose module run) + + # ── seed/append the between-run history BEFORE rendering (so the report shows it) + import os + pr_url = os.environ.get("PR_URL", "[#571](https://github.com/randlee/sc-compose/pull/571)") + record_history(pr_url) + + (OUT_DIR / "health.md").write_text(Report("sc-compose", combined_h, rt, dc, True).render()) + (OUT_DIR / "health-sc-compose.md").write_text(Report("crates/sc-compose", hc, rt, dc).render()) + (OUT_DIR / "health-sc-composer.md").write_text(Report("crates/sc-composer", hp, rt, dc).render()) + + k = hc["kpis"] + worst_lt3 = sum(1 for m in merged if m["score"] < 3) + print(f"OK combined: {len(merged)} unique files, avg {k['average_health']}, files below 3.0: {worst_lt3}") + print(f"OK sc-compose module: {len(hc['metrics'])} files") + print(f"OK sc-composer module: {len(hp['metrics'])} files") + +if __name__ == "__main__": + main() diff --git a/docs/repowise/health-sc-compose.md b/docs/repowise/health-sc-compose.md index dd924dd3..87ecafef 100644 --- a/docs/repowise/health-sc-compose.md +++ b/docs/repowise/health-sc-compose.md @@ -1,51 +1,236 @@ -# sc-compose CLI — Module Health Report +# crates/sc-compose — Repowise Code Health -**Module:** `crates/sc-compose` | **Files:** 41 +**Version:** release-candidate-v1.6.1-10-gb763d2ff | **Commit:** b763d2ff | **Generated:** 2026-08-31 +**Analyzed:** 207 files | **Biomarker findings:** 1129 | **Data:** repowise health + dead-code + refactoring-targets -- Avg Score: 7.5/10 -- Worst: `crates/sc-compose/src/reporting/output.rs` (4.0/10) -- Best: `crates/sc-compose/Cargo.toml` (10.0/10) +![health 8.32/10](https://img.shields.io/badge/health-83%2F100-brightgreen) + +## Quick Summary + +| Metric | Value | +|---|---| +| Overall Health | **8.32/10** | +| Hotspot Health | 5.21/10 | +| Worst In-Scope File | `.github/scripts/release_artifacts.py` (1.90/10) | +| Files Scored (this scope) | 207 | +| Files in Full Index | 1017 (repo-wide scan; this table = module only) | +| Maintainability | 9.09 avg / 7.45 hotspot | +| Performance | 9.77 avg / 9.24 hotspot | + +**Read:** in-scope average 8.32/10 with hotspot 5.21/10 — 1 of 207 scored file sit below 3.0/10 and carry the hotspot drag. + +## Worst 20 Files by Health Score | Score | File | NLOC | CCN | Nest | Dup% | |---|---|---|---|---|---| -| 4.0 | `crates/sc-compose/src/reporting/output.rs` | 257 | 4 | 2 | 30.7 | -| 4.0 | `crates/sc-compose/src/render_request.rs` | 204 | 6 | 4 | 7.8 | -| 4.3 | `crates/sc-compose/src/reporting/catalog.rs` | 201 | 3 | 2 | 27.4 | -| 4.5 | `crates/sc-compose/src/path_utils.rs` | 69 | 6 | 2 | — | -| 4.8 | `crates/sc-compose/tests/cli.rs` | 2586 | 4 | 3 | 61.0 | -| 5.0 | `crates/sc-compose/src/observer_impl.rs` | 815 | 8 | 2 | 15.2 | -| 5.4 | `crates/sc-compose/tests/json_cli.rs` | 1640 | 2 | 1 | 76.4 | -| 5.8 | `crates/sc-compose/src/reporting/init.rs` | 153 | 1 | 0 | 38.6 | -| 5.8 | `crates/sc-compose/src/reporting/publish_manifest.rs` | 265 | 6 | 3 | 14.0 | -| 6.2 | `crates/sc-compose/src/reporting/index.rs` | 156 | 6 | 3 | 17.9 | -| 6.2 | `crates/sc-compose/src/reporting/render_many.rs` | 325 | 3 | 2 | 12.8 | -| 6.2 | `crates/sc-compose/src/reporting/templates.rs` | 328 | 4 | 2 | 17.7 | -| 6.5 | `crates/sc-compose/src/template_store.rs` | 488 | 5 | 2 | 8.2 | -| 6.5 | `crates/sc-compose/src/main.rs` | 72 | 5 | 2 | — | -| 6.5 | `crates/sc-compose/src/observability.rs` | 188 | 6 | 2 | — | -| 6.5 | `crates/sc-compose/src/var_file.rs` | 92 | 3 | 1 | — | -| 6.5 | `crates/sc-compose/src/commands/mod.rs` | 79 | 4 | 3 | — | -| 6.5 | `crates/sc-compose/src/reporting/spec.rs` | 316 | 3 | 1 | 29.1 | -| 6.6 | `crates/sc-compose/src/cli.rs` | 285 | 15 | 3 | 36.6 | -| 7.3 | `crates/sc-compose/tests/support/mod.rs` | 125 | 2 | 1 | 11.1 | -| 8.1 | `crates/sc-compose/src/commands/compose.rs` | 219 | 7 | 2 | 6.4 | -| 8.1 | `crates/sc-compose/src/commands/reports/mod.rs` | 127 | 1 | 0 | 70.9 | -| 8.1 | `crates/sc-compose/src/reporting/mod.rs` | 13 | 1 | 0 | 100.0 | -| 8.3 | `crates/sc-compose/src/commands/dispatch.rs` | 169 | 13 | 3 | 10.7 | -| 8.4 | `crates/sc-compose/src/commands/reports/scaffold.rs` | 106 | 5 | 4 | 37.7 | -| 8.4 | `crates/sc-compose/src/commands/examples.rs` | 38 | 1 | 0 | 34.2 | -| 8.7 | `crates/sc-compose/src/main_tests.rs` | 138 | 1 | 0 | 56.5 | -| 8.7 | `crates/sc-compose/src/commands/templates.rs` | 88 | 3 | 1 | 14.8 | -| 8.8 | `crates/sc-compose/src/reporting/mermaid.rs` | 182 | 11 | 2 | 7.7 | -| 8.9 | `crates/sc-compose/src/commands/reports/render.rs` | 89 | 4 | 2 | 29.2 | -| 9.2 | `crates/sc-compose/src/reporting/source_entry.rs` | 206 | 5 | 3 | 14.1 | -| 9.2 | `crates/sc-compose/tests/repo_boundaries.rs` | 82 | 6 | 3 | — | -| 9.3 | `crates/sc-compose/src/commands/reports/publish.rs` | 74 | 5 | 3 | 62.2 | -| 9.6 | `crates/sc-compose/src/reporting/report_context.rs` | 139 | 2 | 1 | 18.7 | -| 9.7 | `crates/sc-compose/src/reporting/scaffold.rs` | 134 | 3 | 1 | — | -| 9.8 | `crates/sc-compose/src/command_error.rs` | 149 | 3 | 1 | 10.1 | -| 9.8 | `crates/sc-compose/src/reporting/path.rs` | 56 | 2 | 1 | 16.1 | -| 10.0 | `crates/sc-compose/Cargo.toml` | 28 | 1 | 0 | — | -| 10.0 | `crates/sc-compose/src/exit_codes.rs` | 3 | 1 | 0 | — | -| 10.0 | `crates/sc-compose/src/json_output.rs` | 48 | 1 | 0 | — | -| 10.0 | `crates/sc-compose/src/commands/workspace.rs` | 136 | 6 | 2 | — | \ No newline at end of file +| 2.58 | `crates/sc-compose/src/commands/template_lint.rs` | 576 | 9 | 4 | 11.7 | +| 4.21 | `crates/sc-compose/tests/repo_boundaries.rs` | 393 | 10 | 4 | — | +| 4.44 | `crates/sc-composer/src/extract/xml_model.rs` | 227 | 13 | 4 | — | +| 4.44 | `crates/sc-composer/src/resolver.rs` | 714 | 7 | 4 | 30.3 | +| 4.50 | `crates/sc-composer/src/diagnostics.rs` | 9 | 1 | 0 | — | +| 4.65 | `crates/sc-compose/src/commands/template_init.rs` | 685 | 10 | 2 | 14.6 | +| 4.65 | `crates/sc-composer-beads/src/execute.rs` | 936 | 16 | 2 | 20.7 | +| 4.70 | `crates/sc-composer/src/extract/yaml.rs` | 706 | 21 | 6 | 48.8 | +| 4.71 | `crates/sc-composer/src/discovery.rs` | 271 | 9 | 4 | 3.9 | +| 4.75 | `crates/sc-composer-beads/src/runner.rs` | 406 | 9 | 3 | 3.7 | +| 4.77 | `crates/sc-composer/src/validation/diagnostics.rs` | 1102 | 8 | 3 | 29.2 | +| 4.78 | `crates/sc-composer/src/composer.rs` | 690 | 8 | 2 | 39.3 | +| 4.93 | `crates/sc-composer/src/init_workspace.rs` | 221 | 13 | 3 | 15.9 | +| 5.05 | `crates/sc-composer/src/renderer.rs` | 1079 | 7 | 3 | 16.4 | +| 5.12 | `crates/sc-compose/tests/support/mod.rs` | 534 | 5 | 3 | 7.0 | +| 5.13 | `crates/sc-compose/src/commands/compose.rs` | 427 | 11 | 3 | — | +| 5.31 | `crates/sc-compose/src/commands/sc_lint.rs` | 506 | 12 | 3 | — | +| 5.32 | `crates/sc-composer/src/extract/toml.rs` | 509 | 18 | 4 | 49.9 | +| 5.33 | `crates/sc-compose/src/observer_impl.rs` | 967 | 8 | 2 | 17.4 | +| 5.40 | `crates/sc-compose/tests/cli/extract.rs` | 396 | 3 | 1 | 64.7 | + +**Observations** +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — high cyclomatic complexity, CCN=21, 48.81% duplication +- `crates/sc-compose/tests/cli/extract.rs` (5.4/10, 396 NLOC) — high duplication, 64.65% duplication +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — deep nesting, CCN=21, 48.81% duplication + +## Biomarker Findings + +| Type | Count | What It Means | +|---|---|---| +| duplicated_assertion_block | 336 | Repeated assertion patterns — test helper opportunity | +| error_handling | 185 | Error handling gaps or inconsistencies | +| dry_violation | 114 | DRY violations — opportunities to extract shared code | +| prior_defect | 110 | Files with bug-fix history — strong defect predictor | +| co_change_scatter | 58 | Files that change together — high coupling | +| hot_path_sync_io | 50 | Sync I/O on hot paths — should be async | +| change_entropy | 40 | | +| io_in_loop | 37 | | +| complex_method | 36 | | +| large_method | 30 | | +| primitive_obsession | 30 | | +| churn_risk | 28 | High recent change frequency — churn-driven risk | +| nested_complexity | 22 | | +| function_hotspot | 21 | | +| low_cohesion | 15 | | +| untested_hotspot | 7 | Depended-upon files with no paired test coverage | +| large_assertion_block | 4 | | +| complex_conditional | 3 | | +| bumpy_road | 2 | | +| nested_loop_with_io | 1 | | + +### Highest-Impact Findings (by type) + +### [336] duplicated_assertion_block +Repeated assertion patterns — test helper opportunity +- **medium** `crates/sc-compose/tests/sc_lint_runner.rs` `(top-level)`: assertion block at lines 120-132 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs +- **medium** `crates/sc-compose/tests/cli/help.rs` `(top-level)`: assertion block at lines 124-129 is duplicated in crates/sc-compose/tests/cli/render.rs +- **medium** `crates/sc-compose/tests/sc_lint_identity_literals.rs` `(top-level)`: assertion block at lines 32-59 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs +- **medium** `crates/sc-compose/tests/sc_lint_identity_literals.rs` `(top-level)`: assertion block at lines 79-96 is duplicated in crates/sc-compose/tests/sc_lint_identity_literals.rs +- **medium** `crates/sc-compose/src/reporting/publish_manifest/tests.rs` `(top-level)`: assertion block at lines 29-33 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs +- **medium** `crates/sc-compose/src/reporting/publish_manifest/tests.rs` `(top-level)`: assertion block at lines 70-75 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs + +### [185] error_handling +Error handling gaps or inconsistencies +- **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-compose/src/var_file_yaml.rs` `(top-level)`: panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally +- **low** `crates/sc-compose/src/commands/sc_lint.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-compose/src/commands/sc_lint.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash + +### [114] dry_violation +DRY violations — opportunities to extract shared code +- **high** `crates/sc-compose/src/commands/examples.rs` `(top-level)`: 34% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/templates.rs (co-changed 3x) +- **high** `crates/sc-compose/src/reporting/catalog.rs` `(top-level)`: 27% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/templates.rs (co-changed 6x) +- **high** `crates/sc-compose/src/reporting/init.rs` `(top-level)`: 39% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/output.rs (co-changed 6x) +- **high** `crates/sc-compose/src/reporting/spec.rs` `(top-level)`: 29% of file duplicated; worst clone shares 12 lines with crates/sc-compose/src/reporting/init.rs (co-changed 4x) +- **high** `crates/sc-compose/tests/sc_lint_ci.rs` `(top-level)`: 56% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_lint_full.rs (co-changed 3x) +- **high** `crates/sc-compose/tests/sc_lint_lint_full.rs` `(top-level)`: 49% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_ci.rs (co-changed 3x) + +### [110] prior_defect +Files with bug-fix history — strong defect predictor +- **critical** `crates/sc-compose/src/path_utils.rs` `(top-level)`: 17 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/catalog.rs` `(top-level)`: 12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/index.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/init.rs` `(top-level)`: 20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/output.rs` `(top-level)`: 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/render_many.rs` `(top-level)`: 20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### [58] co_change_scatter +Files that change together — high coupling +- **high** `crates/sc-compose/src/template_store.rs` `(top-level)`: co-changes with 17 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-compose/src/commands/extract.rs` `(top-level)`: co-changes with 18 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-compose/tests/sc_lint_sc_boundary.rs` `(top-level)`: co-changes with 15 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-composer/src/diagnostics/schema.rs` `(top-level)`: co-changes with 22 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-composer/src/init_workspace.rs` `(top-level)`: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-compose/src/cli/schema.rs` `(top-level)`: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +### [50] hot_path_sync_io +Sync I/O on hot paths — should be async +- **low** `crates/sc-compose/src/main_tests.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/observer_impl.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/observer_impl.rs` `read_log_lines`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/var_file.rs` `load_var_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/commands/template_init.rs` `template_init_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/commands/template_init.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function + +## Dead Code / Unreachable + +| Kind | Count | +|---|---| +| unused_export | 143 | +| unreachable_file | 33 | +| zombie_package | 2 | + +#### unused_export + + +#### unreachable_file + + +#### zombie_package +- `plugins` (2830 lines, conf 0.5): Package 'plugins' has no importers from other packages +- `prototype` (1900 lines, conf 0.5): Package 'prototype' has no importers from other packages + +## Refactoring Targets (impact-per-effort ranked) + +### #1: `crates/sc-composer/src/diagnostics.rs` — untested_hotspot (critical) + +| Impact | Effort | ROI | Findings | +| 5.5 | S | 5.5 | 5 | + +Reason: Hotspot with no paired test file and no coverage data — 37 dependents + +### #2: `crates/sc-compose/tests/cli.rs` — co_change_scatter (high) + +| Impact | Effort | ROI | Findings | +| 3.5 | S | 3.5 | 3 | + +Reason: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +### #3: `crates/sc-compose/tests/sc_lint_runner.rs` — co_change_scatter (medium) + +| Impact | Effort | ROI | Findings | +| 4.5 | M | 2.3 | 11 | + +Reason: co-changes with 12 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +### #4: `crates/sc-composer-beads/src/error.rs` — untested_hotspot (high) + +| Impact | Effort | ROI | Findings | +| 4.0 | M | 2.0 | 3 | + +Reason: Hotspot with no paired test file and no coverage data — 4 dependents + +### #5: `crates/sc-compose/tests/json_cli.rs` — prior_defect (critical) + +| Impact | Effort | ROI | Findings | +| 2.0 | S | 2.0 | 1 | + +Reason: 27 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### #6: `crates/sc-compose/tests/repo_boundaries.rs` — nested_complexity (medium) + +| Impact | Effort | ROI | Findings | +| 5.8 | L | 1.9 | 22 | + +Reason: assert_manifest_dependency_rules nests 4 levels deep +- **extract_method**: + +### #7: `crates/sc-composer/src/extract/xml_model.rs` — untested_hotspot (high) + +| Impact | Effort | ROI | Findings | +| 5.6 | L | 1.9 | 6 | + +Reason: Hotspot with no paired test file and no coverage data — 4 dependents + +### #8: `crates/sc-compose/src/commands/mod.rs` — co_change_scatter (high) + +| Impact | Effort | ROI | Findings | +| 3.6 | M | 1.8 | 4 | + +Reason: co-changes with 23 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **extract_helper**: + +### #9: `crates/sc-compose/src/commands/examples.rs` — prior_defect (high) + +| Impact | Effort | ROI | Findings | +| 1.8 | S | 1.8 | 2 | + +Reason: 3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### #10: `crates/sc-composer/src/discovery.rs` — prior_defect (critical) + +| Impact | Effort | ROI | Findings | +| 5.3 | L | 1.8 | 6 | + +Reason: 4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **break_cycle**: +- **extract_helper**: + +## Recommendations (derived from this run) + +1. **Start with the worst file** — `crates/sc-compose/src/commands/template_lint.rs` (2.58/10, 576 NLOC). Decompose by responsibility before anything else. +2. **Close test gaps on depended-upon files** — 5 hotspot file(s) lack paired tests: `crates/sc-compose/src/commands/reports/mod.rs`, `crates/sc-compose/src/reporting/catalog.rs`, `crates/sc-compose/src/reporting/index.rs`, `crates/sc-compose/src/reporting/spec.rs`, `crates/sc-composer-beads/src/error.rs`. +3. **Extract duplication** — 336 duplicated assertion blocks; shared test-helper modules would remove the bulk. +4. **Audit sync I/O on hot paths** — 50 findings; either make async or document the intentional sync boundary. +5. **Fastest win** — refactoring target #1: `crates/sc-composer/src/diagnostics.rs` (S effort, ROI 5.5). + +--- +*Generated by `.sc/repowise/generate-report.py` from scoped repowise data (2026-08-31, b763d2ff). Scope per `.sc/repowise.yaml`: modules + annotated exclusions. No hardcoded prose — every figure is computed from the JSON in `.sc/repowise/data/`.* diff --git a/docs/repowise/health-sc-composer.md b/docs/repowise/health-sc-composer.md index 8f903cd9..ce6ea54b 100644 --- a/docs/repowise/health-sc-composer.md +++ b/docs/repowise/health-sc-composer.md @@ -1,26 +1,231 @@ -# sc-composer Engine — Module Health Report +# crates/sc-composer — Repowise Code Health -**Module:** `crates/sc-composer` | **Files:** 16 +**Version:** release-candidate-v1.6.1-10-gb763d2ff | **Commit:** b763d2ff | **Generated:** 2026-08-31 +**Analyzed:** 79 files | **Biomarker findings:** 359 | **Data:** repowise health + dead-code + refactoring-targets -- Avg Score: 7.0/10 -- Worst: `crates/sc-composer/src/validation.rs` (2.6/10) -- Best: `crates/sc-composer/Cargo.toml` (10.0/10) +![health 8.32/10](https://img.shields.io/badge/health-83%2F100-brightgreen) + +## Quick Summary + +| Metric | Value | +|---|---| +| Overall Health | **8.32/10** | +| Hotspot Health | 5.21/10 | +| Worst In-Scope File | `.github/scripts/release_artifacts.py` (1.90/10) | +| Files Scored (this scope) | 79 | +| Files in Full Index | 1017 (repo-wide scan; this table = module only) | +| Maintainability | 9.09 avg / 7.45 hotspot | +| Performance | 9.77 avg / 9.24 hotspot | + +**Read:** in-scope average 8.32/10 with hotspot 5.21/10 — 0 of 79 scored files sit below 3.0/10 and carry the hotspot drag. + +## Worst 20 Files by Health Score | Score | File | NLOC | CCN | Nest | Dup% | |---|---|---|---|---|---| -| 2.6 | `crates/sc-composer/src/validation.rs` | 1388 | 11 | 4 | 28.1 | -| 4.8 | `crates/sc-composer/src/types.rs` | 496 | 11 | 6 | 21.8 | -| 4.9 | `crates/sc-composer/src/composer.rs` | 430 | 3 | 2 | 55.2 | -| 6.0 | `crates/sc-composer/src/error.rs` | 560 | 4 | 2 | 56.4 | -| 6.1 | `crates/sc-composer/src/renderer.rs` | 152 | 2 | 1 | — | -| 6.5 | `crates/sc-composer/src/lib.rs` | 177 | 1 | 0 | — | -| 6.9 | `crates/sc-composer/src/resolver.rs` | 450 | 7 | 4 | 22.1 | -| 7.0 | `crates/sc-composer/src/diagnostics.rs` | 146 | 2 | 1 | 27.1 | -| 7.4 | `crates/sc-composer/src/include.rs` | 429 | 8 | 3 | 35.5 | -| 7.5 | `crates/sc-composer/src/validate.rs` | 150 | 4 | 1 | 67.7 | -| 7.5 | `crates/sc-composer/src/frontmatter.rs` | 170 | 7 | 2 | — | -| 7.8 | `crates/sc-composer/src/init_workspace.rs` | 195 | 13 | 3 | 13.9 | -| 8.4 | `crates/sc-composer/src/observer.rs` | 146 | 2 | 1 | 27.6 | -| 9.2 | `crates/sc-composer/src/frontmatter_init.rs` | 127 | 6 | 1 | 15.7 | -| 9.3 | `crates/sc-composer/src/path_utils.rs` | 7 | 1 | 0 | — | -| 10.0 | `crates/sc-composer/Cargo.toml` | 21 | 1 | 0 | — | \ No newline at end of file +| 4.44 | `crates/sc-composer/src/extract/xml_model.rs` | 227 | 13 | 4 | — | +| 4.44 | `crates/sc-composer/src/resolver.rs` | 714 | 7 | 4 | 30.3 | +| 4.50 | `crates/sc-composer/src/diagnostics.rs` | 9 | 1 | 0 | — | +| 4.65 | `crates/sc-composer-beads/src/execute.rs` | 936 | 16 | 2 | 20.7 | +| 4.70 | `crates/sc-composer/src/extract/yaml.rs` | 706 | 21 | 6 | 48.8 | +| 4.71 | `crates/sc-composer/src/discovery.rs` | 271 | 9 | 4 | 3.9 | +| 4.75 | `crates/sc-composer-beads/src/runner.rs` | 406 | 9 | 3 | 3.7 | +| 4.77 | `crates/sc-composer/src/validation/diagnostics.rs` | 1102 | 8 | 3 | 29.2 | +| 4.78 | `crates/sc-composer/src/composer.rs` | 690 | 8 | 2 | 39.3 | +| 4.93 | `crates/sc-composer/src/init_workspace.rs` | 221 | 13 | 3 | 15.9 | +| 5.05 | `crates/sc-composer/src/renderer.rs` | 1079 | 7 | 3 | 16.4 | +| 5.32 | `crates/sc-composer/src/extract/toml.rs` | 509 | 18 | 4 | 49.9 | +| 5.50 | `crates/sc-composer/src/types.rs` | 575 | 9 | 3 | 21.4 | +| 5.54 | `crates/sc-composer/tests/integration.rs` | 502 | 2 | 1 | 48.6 | +| 5.78 | `crates/sc-composer/src/extract/xml.rs` | 296 | 6 | 3 | 9.6 | +| 5.90 | `crates/sc-composer/src/include.rs` | 958 | 4 | 2 | 70.9 | +| 5.98 | `crates/sc-composer-beads/src/error.rs` | 135 | 2 | 1 | — | +| 6.15 | `crates/sc-composer/src/lib.rs` | 230 | 1 | 0 | 21.3 | +| 6.15 | `crates/sc-composer/src/error.rs` | 260 | 2 | 1 | 31.0 | +| 6.24 | `crates/sc-composer/src/validation/required_paths.rs` | 529 | 11 | 4 | 43.7 | + +**Observations** +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — high cyclomatic complexity, CCN=21, 48.81% duplication +- `crates/sc-composer/src/include.rs` (5.9/10, 958 NLOC) — high duplication, 70.91% duplication +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — deep nesting, CCN=21, 48.81% duplication + +## Biomarker Findings + +| Type | Count | What It Means | +|---|---|---| +| prior_defect | 55 | Files with bug-fix history — strong defect predictor | +| error_handling | 49 | Error handling gaps or inconsistencies | +| dry_violation | 43 | DRY violations — opportunities to extract shared code | +| hot_path_sync_io | 29 | Sync I/O on hot paths — should be async | +| complex_method | 25 | | +| primitive_obsession | 22 | | +| co_change_scatter | 20 | Files that change together — high coupling | +| large_method | 19 | | +| change_entropy | 17 | | +| nested_complexity | 16 | | +| duplicated_assertion_block | 16 | Repeated assertion patterns — test helper opportunity | +| low_cohesion | 12 | | +| function_hotspot | 11 | | +| io_in_loop | 11 | | +| churn_risk | 10 | High recent change frequency — churn-driven risk | +| untested_hotspot | 3 | Depended-upon files with no paired test coverage | +| nested_loop_with_io | 1 | | + +### Highest-Impact Findings (by type) + +### [55] prior_defect +Files with bug-fix history — strong defect predictor +- **critical** `crates/sc-composer/tests/extract_integration.rs` `(top-level)`: 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-composer/src/frontmatter/parser.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-composer-beads/src/render.rs` `(top-level)`: 4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-composer/src/error.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-composer/src/extract/xml.rs` `(top-level)`: 4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-composer-beads/src/runner.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### [49] error_handling +Error handling gaps or inconsistencies +- **low** `crates/sc-composer/src/extract/tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-composer/src/extract/xml_match.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-composer/src/include/expansion.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-composer/src/include/expansion.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-composer/src/validation/diagnostics.rs` `(top-level)`: panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally +- **low** `crates/sc-composer/src/validation/diagnostics.rs` `(top-level)`: panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally + +### [43] dry_violation +DRY violations — opportunities to extract shared code +- **high** `crates/sc-composer/src/composer.rs` `(top-level)`: 39% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/validate.rs (co-changed 10x) +- **high** `crates/sc-composer/src/include.rs` `(top-level)`: 71% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/resolver.rs (co-changed 8x) +- **high** `crates/sc-composer/src/resolver.rs` `(top-level)`: 30% of file duplicated; worst clone shares 16 lines with crates/sc-composer/src/include.rs (co-changed 8x) +- **high** `crates/sc-composer/src/validate.rs` `(top-level)`: 51% of file duplicated; worst clone shares 31 lines with crates/sc-composer/src/composer.rs (co-changed 10x) +- **high** `crates/sc-composer/src/verify.rs` `(top-level)`: 42% of file duplicated; worst clone shares 10 lines with crates/sc-compose/src/commands/template_init.rs (co-changed 3x) +- **high** `crates/sc-composer/src/diagnostics/schema.rs` `(top-level)`: 36% of file duplicated; worst clone shares 170 lines with crates/sc-composer/src/lib.rs (co-changed 3x) + +### [29] hot_path_sync_io +Sync I/O on hot paths — should be async +- **low** `crates/sc-composer/src/composer.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-composer/src/composer.rs` `write_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-composer/src/frontmatter_init.rs` `frontmatter_init`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-composer/src/frontmatter_init.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-composer/src/frontmatter_init.rs` `write_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-composer/src/include.rs` `new`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function + +### [25] complex_method +- **high** `crates/sc-composer/src/extract/yaml_limits.rs` `validate_parse_depth`: validate_parse_depth has cyclomatic complexity 20 +- **high** `crates/sc-composer/src/extract/json.rs` `match_json`: match_json has cyclomatic complexity 15 +- **medium** `crates/sc-composer/src/discovery.rs` `discover_tokens_with_delimiters`: discover_tokens_with_delimiters has cyclomatic complexity 9 +- **medium** `crates/sc-composer/src/init_workspace.rs` `init_workspace`: init_workspace has cyclomatic complexity 13 +- **medium** `crates/sc-composer/src/types.rs` `input_value_from_yaml`: input_value_from_yaml has cyclomatic complexity 9 +- **medium** `crates/sc-composer/src/extract/json_limits.rs` `validate_parse_depth`: validate_parse_depth has cyclomatic complexity 11 + +### [22] primitive_obsession +- **medium** `crates/sc-composer/src/include/expansion.rs` `expand_file`: expand_file takes 7 parameters +- **medium** `crates/sc-composer/src/extract/xml_match.rs` `match_child_sequence`: match_child_sequence takes 7 parameters +- **medium** `crates/sc-composer/src/extract/xml_match.rs` `match_element`: match_element takes 7 parameters +- **low** `crates/sc-composer/src/composer.rs` `render_all_with_observer`: render_all_with_observer takes 6 parameters +- **low** `crates/sc-composer/src/resolver.rs` `resolve_profile_impl`: resolve_profile_impl takes 5 parameters +- **low** `crates/sc-composer/src/extract/error.rs` `format_error_with_source`: format_error_with_source takes 5 parameters + +## Dead Code / Unreachable + +| Kind | Count | +|---|---| +| unused_export | 143 | +| unreachable_file | 33 | +| zombie_package | 2 | + +#### unused_export + + +#### unreachable_file + + +#### zombie_package +- `plugins` (2830 lines, conf 0.5): Package 'plugins' has no importers from other packages +- `prototype` (1900 lines, conf 0.5): Package 'prototype' has no importers from other packages + +## Refactoring Targets (impact-per-effort ranked) + +### #1: `crates/sc-composer/src/diagnostics.rs` — untested_hotspot (critical) + +| Impact | Effort | ROI | Findings | +| 5.5 | S | 5.5 | 5 | + +Reason: Hotspot with no paired test file and no coverage data — 37 dependents + +### #2: `crates/sc-compose/tests/cli.rs` — co_change_scatter (high) + +| Impact | Effort | ROI | Findings | +| 3.5 | S | 3.5 | 3 | + +Reason: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +### #3: `crates/sc-compose/tests/sc_lint_runner.rs` — co_change_scatter (medium) + +| Impact | Effort | ROI | Findings | +| 4.5 | M | 2.3 | 11 | + +Reason: co-changes with 12 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +### #4: `crates/sc-composer-beads/src/error.rs` — untested_hotspot (high) + +| Impact | Effort | ROI | Findings | +| 4.0 | M | 2.0 | 3 | + +Reason: Hotspot with no paired test file and no coverage data — 4 dependents + +### #5: `crates/sc-compose/tests/json_cli.rs` — prior_defect (critical) + +| Impact | Effort | ROI | Findings | +| 2.0 | S | 2.0 | 1 | + +Reason: 27 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### #6: `crates/sc-compose/tests/repo_boundaries.rs` — nested_complexity (medium) + +| Impact | Effort | ROI | Findings | +| 5.8 | L | 1.9 | 22 | + +Reason: assert_manifest_dependency_rules nests 4 levels deep +- **extract_method**: + +### #7: `crates/sc-composer/src/extract/xml_model.rs` — untested_hotspot (high) + +| Impact | Effort | ROI | Findings | +| 5.6 | L | 1.9 | 6 | + +Reason: Hotspot with no paired test file and no coverage data — 4 dependents + +### #8: `crates/sc-compose/src/commands/mod.rs` — co_change_scatter (high) + +| Impact | Effort | ROI | Findings | +| 3.6 | M | 1.8 | 4 | + +Reason: co-changes with 23 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **extract_helper**: + +### #9: `crates/sc-compose/src/commands/examples.rs` — prior_defect (high) + +| Impact | Effort | ROI | Findings | +| 1.8 | S | 1.8 | 2 | + +Reason: 3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### #10: `crates/sc-composer/src/discovery.rs` — prior_defect (critical) + +| Impact | Effort | ROI | Findings | +| 5.3 | L | 1.8 | 6 | + +Reason: 4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **break_cycle**: +- **extract_helper**: + +## Recommendations (derived from this run) + +1. **Start with the worst file** — `crates/sc-composer/src/extract/xml_model.rs` (4.44/10, 227 NLOC). Decompose by responsibility before anything else. +2. **Close test gaps on depended-upon files** — 3 hotspot file(s) lack paired tests: `crates/sc-composer-beads/src/error.rs`, `crates/sc-composer/src/diagnostics.rs`, `crates/sc-composer/src/extract/xml_model.rs`. +3. **Extract duplication** — 16 duplicated assertion blocks; shared test-helper modules would remove the bulk. +4. **Audit sync I/O on hot paths** — 29 findings; either make async or document the intentional sync boundary. +5. **Fastest win** — refactoring target #1: `crates/sc-composer/src/diagnostics.rs` (S effort, ROI 5.5). + +--- +*Generated by `.sc/repowise/generate-report.py` from scoped repowise data (2026-08-31, b763d2ff). Scope per `.sc/repowise.yaml`: modules + annotated exclusions. No hardcoded prose — every figure is computed from the JSON in `.sc/repowise/data/`.* diff --git a/docs/repowise/health.md b/docs/repowise/health.md index 4d2d95d8..998d805d 100644 --- a/docs/repowise/health.md +++ b/docs/repowise/health.md @@ -1,335 +1,250 @@ -# sc-compose — Repowise Code Health Analysis +# sc-compose — Repowise Code Health -**Version:** v1.2.0-219-gbb79a5f | **Commit:** bb79a5f | **Generated:** 2026-08-02 -**Analyzed by:** repowise health + dead-code + refactoring-targets +**Version:** release-candidate-v1.6.1-10-gb763d2ff | **Commit:** b763d2ff | **Generated:** 2026-08-31 +**Analyzed:** 207 files | **Biomarker findings:** 1488 | **Data:** repowise health + dead-code + refactoring-targets + +![health 8.32/10](https://img.shields.io/badge/health-83%2F100-brightgreen) ## Quick Summary | Metric | Value | |---|---| -| Overall Health | **7.9/10** | -| Hotspot Health | 4.7/10 | -| Worst File | `crates/sc-compose/src/cli.rs` (1.6/10) | -| Files Indexed | 286 | -| Biomarker Findings | 516 | -| Dead Code Items | 63 | -| Refactoring Targets | 20 | +| Overall Health | **8.32/10** | +| Hotspot Health | 5.21/10 | +| Worst In-Scope File | `.github/scripts/release_artifacts.py` (1.90/10) | +| Files Scored (this scope) | 207 | +| Files in Full Index | 1017 (repo-wide scan; scored table above = configured modules only) | +| Maintainability | 9.09 avg / 7.45 hotspot | +| Performance | 9.77 avg / 9.24 hotspot | -### Health Dimensions +**Read:** in-scope average 8.32/10 with hotspot 5.21/10 — 1 of 207 scored file sit below 3.0/10 and carry the hotspot drag. -| Dimension | Average | Hotspot | -|---|---|---| -| Maintainability | 9.0/10 | 7.4/10 | -| Performance | 9.8/10 | 9.4/10 | -| Overall | 7.9/10 | 4.7/10 | +## Trend Between Runs + +**This run vs the previous recorded run: +0.06/10 overall health — improved.** Full log below. -*Interpretation:* 8.2/10 average with 5.2 hotspot health means most files are healthy but a concentrated few drag the score down. Maintainability (9.1) and performance (9.8) average are excellent, but the hotspot maintainability (7.3) reveals files needing modularization. The worst file (`validation.rs`) at 2.6/10 accounts for most of the hotspot drag. +Latest run is last. Chronological; read with `health.md` for the current deep-dive. +| Generated | Version / Commit | Overall | Hotspot | Files | Worst file (score) | PR | +|---|---|---|---|---|---|---| +| 2026-08-02 | v1.2.0-219-gbb79a5f / bb79a5f (develop baseline) | **7.90/10** | 4.70/10 | 286 | `crates/sc-compose/src/cli.rs` (1.55) | n/a (pre-PR runs) | +| 2026-08-29 | release-candidate-v1.6.0-1-g0d70f0c3 / 0d70f0c3 | **8.23/10** | 5.20/10 | 988 | `crates/sc-composer/src/extract/yaml.rs` (2.54) | [#571](https://github.com/randlee/sc-compose/pull/571) | +| 2026-08-29 | v1.6.0-15-g54fff289 / 54fff289 | **8.26/10** | 5.15/10 | 999 | `crates/sc-composer/src/extract/yaml.rs` (2.54) | [#571](https://github.com/randlee/sc-compose/pull/571) | +| 2026-08-31 | release-candidate-v1.6.1-10-gb763d2ff / b763d2ff | **8.32/10** | 5.21/10 | 1017 | `.github/scripts/release_artifacts.py` (1.90) | [#571](https://github.com/randlee/sc-compose/pull/571) | + +*History seeded + appended by `.sc/repowise/generate-report.py`; hand-edit only to correct a wrong row.* ## Worst 20 Files by Health Score | Score | File | NLOC | CCN | Nest | Dup% | |---|---|---|---|---|---| -| 1.6 | `crates/sc-compose/src/cli.rs` | 489 | 17 | 4 | 27.7 | -| 2.4 | `crates/sc-composer/src/validation.rs` | 1655 | 11 | 4 | 25.2 | -| 3.0 | `crates/sc-composer/src/types.rs` | 561 | 11 | 6 | 26.9 | -| 4.0 | `crates/sc-compose/src/reporting/output.rs` | 257 | 4 | 2 | 30.7 | -| 4.0 | `crates/sc-compose/src/render_request.rs` | 323 | 6 | 4 | 5.0 | -| 4.0 | `crates/sc-composer/src/diagnostics.rs` | 150 | 2 | 1 | 29.8 | -| 4.3 | `crates/sc-compose/src/reporting/catalog.rs` | 201 | 3 | 2 | 27.4 | -| 4.4 | `crates/sc-compose/src/commands/compose.rs` | 536 | 8 | 2 | 19.6 | -| 4.5 | `crates/sc-compose/src/path_utils.rs` | 69 | 6 | 2 | — | -| 4.8 | `crates/sc-compose/tests/cli.rs` | 3339 | 4 | 3 | 64.9 | -| 4.8 | `crates/sc-composer/src/frontmatter.rs` | 372 | 8 | 3 | 9.7 | -| 4.9 | `crates/sc-composer/src/composer.rs` | 584 | 5 | 2 | 49.2 | -| 5.0 | `crates/sc-compose/src/observer_impl.rs` | 819 | 8 | 2 | 16.2 | -| 5.1 | `crates/sc-composer/src/init_workspace.rs` | 221 | 13 | 3 | 15.9 | -| 5.4 | `crates/sc-compose/tests/json_cli.rs` | 1671 | 2 | 1 | 75.8 | -| 5.8 | `crates/sc-compose/src/reporting/init.rs` | 153 | 1 | 0 | 38.6 | -| 5.8 | `crates/sc-composer/src/renderer.rs` | 169 | 2 | 1 | — | -| 5.8 | `crates/sc-compose/src/reporting/publish_manifest.rs` | 265 | 6 | 3 | 14.0 | -| 6.0 | `crates/sc-composer/src/error.rs` | 583 | 4 | 2 | 56.4 | -| 6.2 | `crates/sc-compose/src/reporting/index.rs` | 156 | 6 | 3 | 17.9 | - -**Key observations:** -- `validation.rs` (2.6/10, 1388 NLOC, CCN=11): the single biggest problem — large, complex, and duplicated (28% dup). This is a prime candidate for decomposition. -- Test files dominate the worst list: `cli.rs` (2586 NLOC, 61% dup), `json_cli.rs` (1640 NLOC, 76% dup) — these are expected for thorough testing but the duplication indicates test helper opportunities. -- `types.rs` (4.8/10, CCN=11, nest=6): deeply nested validation logic — the 6-deep nesting in `validate_input_value_at` is flagged separately. - -## Best 10 Files (for contrast) - -| Score | File | NLOC | -|---|---|---| -| 10.0 | `crates/sc-composer/Cargo.toml` | 22 | -| 10.0 | `crates/sc-compose/src/json_output.rs` | 48 | -| 10.0 | `crates/sc-compose/src/exit_codes.rs` | 3 | -| 10.0 | `crates/sc-compose/Cargo.toml` | 28 | -| 9.8 | `crates/sc-compose/src/reporting/path.rs` | 56 | -| 9.8 | `crates/sc-compose/src/commands/verify.rs` | 124 | -| 9.8 | `crates/sc-compose/src/command_error.rs` | 149 | -| 9.7 | `crates/sc-compose/src/reporting/scaffold.rs` | 134 | -| 9.7 | `crates/sc-compose/src/commands/workspace.rs` | 104 | -| 9.6 | `crates/sc-compose/src/reporting/report_context.rs` | 139 | +| 2.58 | `crates/sc-compose/src/commands/template_lint.rs` | 576 | 9 | 4 | 11.7 | +| 4.21 | `crates/sc-compose/tests/repo_boundaries.rs` | 393 | 10 | 4 | — | +| 4.44 | `crates/sc-composer/src/extract/xml_model.rs` | 227 | 13 | 4 | — | +| 4.44 | `crates/sc-composer/src/resolver.rs` | 714 | 7 | 4 | 30.3 | +| 4.50 | `crates/sc-composer/src/diagnostics.rs` | 9 | 1 | 0 | — | +| 4.65 | `crates/sc-compose/src/commands/template_init.rs` | 685 | 10 | 2 | 14.6 | +| 4.65 | `crates/sc-composer-beads/src/execute.rs` | 936 | 16 | 2 | 20.7 | +| 4.70 | `crates/sc-composer/src/extract/yaml.rs` | 706 | 21 | 6 | 48.8 | +| 4.71 | `crates/sc-composer/src/discovery.rs` | 271 | 9 | 4 | 3.9 | +| 4.75 | `crates/sc-composer-beads/src/runner.rs` | 406 | 9 | 3 | 3.7 | +| 4.77 | `crates/sc-composer/src/validation/diagnostics.rs` | 1102 | 8 | 3 | 29.2 | +| 4.78 | `crates/sc-composer/src/composer.rs` | 690 | 8 | 2 | 39.3 | +| 4.93 | `crates/sc-composer/src/init_workspace.rs` | 221 | 13 | 3 | 15.9 | +| 5.05 | `crates/sc-composer/src/renderer.rs` | 1079 | 7 | 3 | 16.4 | +| 5.12 | `crates/sc-compose/tests/support/mod.rs` | 534 | 5 | 3 | 7.0 | +| 5.13 | `crates/sc-compose/src/commands/compose.rs` | 427 | 11 | 3 | — | +| 5.31 | `crates/sc-compose/src/commands/sc_lint.rs` | 506 | 12 | 3 | — | +| 5.32 | `crates/sc-composer/src/extract/toml.rs` | 509 | 18 | 4 | 49.9 | +| 5.33 | `crates/sc-compose/src/observer_impl.rs` | 967 | 8 | 2 | 17.4 | +| 5.40 | `crates/sc-compose/tests/cli/extract.rs` | 396 | 3 | 1 | 64.7 | + +**Observations** +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — high cyclomatic complexity, CCN=21, 48.81% duplication +- `crates/sc-compose/tests/cli/extract.rs` (5.4/10, 396 NLOC) — high duplication, 64.65% duplication +- `crates/sc-composer/src/extract/yaml.rs` (4.7/10, 706 NLOC) — deep nesting, CCN=21, 48.81% duplication ## Biomarker Findings | Type | Count | What It Means | |---|---|---| -| duplicated_assertion_block | 130 | Repeated assertion patterns — test helper opportunity | -| hot_path_sync_io | 52 | Sync I/O on hot paths — should be async | -| prior_defect | 46 | Files with bug-fix history — strong defect predictor | -| dry_violation | 38 | DRY violations — opportunities to extract shared code | -| error_handling | 30 | Error handling gaps or inconsistencies | -| hidden_coupling | 21 | Implicit dependencies between modules | -| co_change_scatter | 21 | Files that change together → high coupling | -| io_in_loop | 22 | | -| large_method | 16 | | -| function_hotspot | 16 | | -| change_entropy | 13 | | -| complex_method | 11 | | -| low_cohesion | 11 | | -| untested_hotspot | 10 | | -| primitive_obsession | 10 | | -| churn_risk | 9 | | -| nested_complexity | 7 | | -| brain_method | 1 | | -| bumpy_road | 1 | | -| nested_loop_with_io | 1 | | - -### prior_defect (53 findings) - -- **critical** `crates/sc-compose/src/commands/compose.rs` `(top-level)`: 3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **critical** `crates/sc-compose/tests/support/mod.rs` `(top-level)`: 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **critical** `crates/sc-compose/src/reporting/output.rs` `(top-level)`: 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **critical** `crates/sc-composer/src/renderer.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **critical** `crates/sc-compose/src/observability.rs` `(top-level)`: 18 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **critical** `crates/sc-compose/src/reporting/catalog.rs` `(top-level)`: 12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- *... and 47 more* - -### untested_hotspot (10 findings) - -- **critical** `crates/sc-compose/src/path_utils.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 18 dependents -- **critical** `crates/sc-composer/src/diagnostics.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 15 dependents -- **high** `crates/sc-compose/src/cli.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 9 dependents -- **high** `crates/sc-compose/src/render_request.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 5 dependents -- **high** `crates/sc-compose/src/template_store.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 5 dependents -- **high** `crates/sc-compose/src/commands/compose.rs` `(top-level)`: Hotspot with no paired test file and no coverage data — 4 dependents -- *... and 4 more* - -### co_change_scatter (26 findings) - -- **high** `crates/sc-composer/src/diagnostics.rs` `(top-level)`: co-changes with 18 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **high** `crates/sc-composer/src/init_workspace.rs` `(top-level)`: co-changes with 16 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **high** `crates/sc-composer/src/renderer.rs` `(top-level)`: co-changes with 17 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **high** `crates/sc-composer/src/frontmatter.rs` `(top-level)`: co-changes with 16 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **high** `crates/sc-composer/src/types.rs` `(top-level)`: co-changes with 21 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **high** `crates/sc-composer/src/composer.rs` `(top-level)`: co-changes with 22 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- *... and 20 more* - -### churn_risk (9 findings) - -- **critical** `crates/sc-compose/src/var_file.rs` `(top-level)`: 90-day churn rewrote 6.4x the file's size (588 lines over 92 NLOC, top 24% of repo churn) -- **critical** `crates/sc-compose/src/reporting/init.rs` `(top-level)`: 90-day churn rewrote 8.6x the file's size (1311 lines over 153 NLOC, top 7% of repo churn) -- **critical** `crates/sc-compose/src/main.rs` `(top-level)`: 90-day churn rewrote 50.8x the file's size (3606 lines over 71 NLOC, top 1% of repo churn) -- **high** `crates/sc-compose/src/render_request.rs` `(top-level)`: 90-day churn rewrote 2.7x the file's size (878 lines over 323 NLOC, top 8% of repo churn) -- **medium** `crates/sc-compose/src/reporting/render_many.rs` `(top-level)`: 90-day churn rewrote 2.3x the file's size (735 lines over 325 NLOC, top 18% of repo churn) -- **low** `crates/sc-compose/src/commands/compose.rs` `(top-level)`: 90-day churn rewrote 1.4x the file's size (771 lines over 536 NLOC, top 16% of repo churn) -- *... and 3 more* - -### hidden_coupling (20 findings) - -- **medium** `crates/sc-composer/src/validate.rs` `(top-level)`: crates/sc-composer/src/composer.rs co-changes with this file 5 times (56% of shared commits) but no static dependency exists -- **medium** `crates/sc-compose/src/reporting/output.rs` `(top-level)`: crates/sc-compose/src/main.rs co-changes with this file 5 times (50% of shared commits) but no static dependency exists -- **medium** `crates/sc-compose/src/commands/mod.rs` `(top-level)`: crates/sc-compose/src/var_file.rs co-changes with this file 4 times (67% of shared commits) but no static dependency exists -- **medium** `crates/sc-compose/src/reporting/index.rs` `(top-level)`: crates/sc-compose/src/reporting/render_many.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists -- **medium** `crates/sc-compose/src/reporting/index.rs` `(top-level)`: crates/sc-compose/src/reporting/templates.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists -- **medium** `crates/sc-compose/src/reporting/index.rs` `(top-level)`: crates/sc-compose/src/main.rs co-changes with this file 3 times (50% of shared commits) but no static dependency exists -- *... and 14 more* - -### error_handling (34 findings) - +| duplicated_assertion_block | 352 | Repeated assertion patterns — test helper opportunity | +| error_handling | 234 | Error handling gaps or inconsistencies | +| prior_defect | 165 | Files with bug-fix history — strong defect predictor | +| dry_violation | 157 | DRY violations — opportunities to extract shared code | +| hot_path_sync_io | 79 | Sync I/O on hot paths — should be async | +| co_change_scatter | 78 | Files that change together — high coupling | +| complex_method | 61 | | +| change_entropy | 57 | | +| primitive_obsession | 52 | | +| large_method | 49 | | +| io_in_loop | 48 | | +| churn_risk | 38 | High recent change frequency — churn-driven risk | +| nested_complexity | 38 | | +| function_hotspot | 32 | | +| low_cohesion | 27 | | +| untested_hotspot | 10 | Depended-upon files with no paired test coverage | +| large_assertion_block | 4 | | +| complex_conditional | 3 | | +| bumpy_road | 2 | | +| nested_loop_with_io | 2 | | + +### Highest-Impact Findings (by type) + +### [352] duplicated_assertion_block +Repeated assertion patterns — test helper opportunity +- **medium** `crates/sc-compose/tests/sc_lint_runner.rs` `(top-level)`: assertion block at lines 120-132 is duplicated in crates/sc-compose/tests/sc_lint_check_native.rs +- **medium** `crates/sc-compose/tests/cli/help.rs` `(top-level)`: assertion block at lines 124-129 is duplicated in crates/sc-compose/tests/cli/render.rs +- **medium** `crates/sc-compose/tests/sc_lint_identity_literals.rs` `(top-level)`: assertion block at lines 32-59 is duplicated in crates/sc-compose/tests/sc_lint_check_xwin.rs +- **medium** `crates/sc-compose/tests/sc_lint_identity_literals.rs` `(top-level)`: assertion block at lines 79-96 is duplicated in crates/sc-compose/tests/sc_lint_identity_literals.rs +- **medium** `crates/sc-compose/src/reporting/publish_manifest/tests.rs` `(top-level)`: assertion block at lines 29-33 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs +- **medium** `crates/sc-compose/src/reporting/publish_manifest/tests.rs` `(top-level)`: assertion block at lines 70-75 is duplicated in crates/sc-compose/src/reporting/publish_manifest/tests.rs + +### [234] error_handling +Error handling gaps or inconsistencies +- **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash - **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash - **low** `crates/sc-compose/src/main_tests.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash -- **low** `crates/sc-composer/src/renderer.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash -- **low** `crates/sc-composer/src/validation.rs` `(top-level)`: panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally -- **low** `crates/sc-compose/tests/repo_boundaries.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash -- **low** `crates/sc-compose/tests/repo_boundaries.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash -- *... and 28 more* +- **low** `crates/sc-compose/src/var_file_yaml.rs` `(top-level)`: panic!/unreachable!/todo!/unimplemented! aborts the process unconditionally +- **low** `crates/sc-compose/src/commands/sc_lint.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash +- **low** `crates/sc-compose/src/commands/sc_lint.rs` `(top-level)`: unwrap/expect turns a recoverable error into a crash -## Refactoring Targets +### [165] prior_defect +Files with bug-fix history — strong defect predictor +- **critical** `crates/sc-compose/src/path_utils.rs` `(top-level)`: 17 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/catalog.rs` `(top-level)`: 12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/index.rs` `(top-level)`: 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/init.rs` `(top-level)`: 20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/output.rs` `(top-level)`: 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **critical** `crates/sc-compose/src/reporting/render_many.rs` `(top-level)`: 20 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects + +### [157] dry_violation +DRY violations — opportunities to extract shared code +- **high** `crates/sc-compose/src/commands/examples.rs` `(top-level)`: 34% of file duplicated; worst clone shares 13 lines with crates/sc-compose/src/commands/templates.rs (co-changed 3x) +- **high** `crates/sc-compose/src/reporting/catalog.rs` `(top-level)`: 27% of file duplicated; worst clone shares 20 lines with crates/sc-compose/src/reporting/templates.rs (co-changed 6x) +- **high** `crates/sc-compose/src/reporting/init.rs` `(top-level)`: 39% of file duplicated; worst clone shares 14 lines with crates/sc-compose/src/reporting/output.rs (co-changed 6x) +- **high** `crates/sc-compose/src/reporting/spec.rs` `(top-level)`: 29% of file duplicated; worst clone shares 12 lines with crates/sc-compose/src/reporting/init.rs (co-changed 4x) +- **high** `crates/sc-compose/tests/sc_lint_ci.rs` `(top-level)`: 56% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_lint_full.rs (co-changed 3x) +- **high** `crates/sc-compose/tests/sc_lint_lint_full.rs` `(top-level)`: 49% of file duplicated; worst clone shares 32 lines with crates/sc-compose/tests/sc_lint_ci.rs (co-changed 3x) + +### [79] hot_path_sync_io +Sync I/O on hot paths — should be async +- **low** `crates/sc-compose/src/main_tests.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/observer_impl.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/observer_impl.rs` `read_log_lines`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/var_file.rs` `load_var_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/commands/template_init.rs` `template_init_file`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function +- **low** `crates/sc-compose/src/commands/template_init.rs` `temp_root`: a blocking filesystem call runs on a hot, request-reachable path; its latency is paid on every call through this function + +### [78] co_change_scatter +Files that change together — high coupling +- **high** `crates/sc-compose/src/template_store.rs` `(top-level)`: co-changes with 17 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-compose/src/commands/extract.rs` `(top-level)`: co-changes with 18 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-compose/tests/sc_lint_sc_boundary.rs` `(top-level)`: co-changes with 15 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-composer/src/diagnostics/schema.rs` `(top-level)`: co-changes with 22 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-composer/src/diagnostics/schema.rs` `(top-level)`: co-changes with 22 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **high** `crates/sc-composer/src/init_workspace.rs` `(top-level)`: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) + +## Dead Code / Unreachable + +| Kind | Count | +|---|---| +| unused_export | 143 | +| unreachable_file | 33 | +| zombie_package | 2 | -Prioritized by impact-per-effort ratio (highest ROI first). +#### unused_export -### #1: `crates/sc-compose/tests/cli.rs` (6.5/10, 11 NLOC) -| Metric | Value | -|---|---| -| Biomarker | **change_entropy** (critical) | -| Impact Score | 3.5 | -| Effort | S | -| ROI | 3.5 | -| Finding Count | 4 | -| Reason | changes are scattered across noisy commits (top 1% change entropy); a strong history-based fault predictor | +#### unreachable_file -### #2: `crates/sc-compose/tests/json_cli.rs` (6.5/10, 11 NLOC) -| Metric | Value | -|---|---| -| Biomarker | **change_entropy** (critical) | -| Impact Score | 3.5 | -| Effort | S | -| ROI | 3.5 | -| Finding Count | 4 | -| Reason | changes are scattered across noisy commits (top 2% change entropy); a strong history-based fault predictor | +#### zombie_package +- `plugins` (2830 lines, conf 0.5): Package 'plugins' has no importers from other packages +- `prototype` (1900 lines, conf 0.5): Package 'prototype' has no importers from other packages -### #3: `crates/sc-compose/src/path_utils.rs` (4.5/10, 69 NLOC) +## Refactoring Targets (impact-per-effort ranked) -| Metric | Value | -|---|---| -| Biomarker | **untested_hotspot** (critical) | -| Impact Score | 5.5 | -| Effort | M | -| ROI | 2.7 | -| Finding Count | 4 | -| Reason | Hotspot with no paired test file and no coverage data — 20 dependents | - -### #4: `crates/sc-composer/src/diagnostics.rs` (3.9/10, 162 NLOC) +### #1: `crates/sc-composer/src/diagnostics.rs` — untested_hotspot (critical) -| Metric | Value | -|---|---| -| Biomarker | **untested_hotspot** (critical) | -| Impact Score | 6.1 | -| Effort | L | -| ROI | 2.0 | -| Finding Count | 5 | -| Reason | Hotspot with no paired test file and no coverage data — 20 dependents | +| Impact | Effort | ROI | Findings | +| 5.5 | S | 5.5 | 5 | -### #5: `crates/sc-compose/src/reporting/output.rs` (4.2/10, 257 NLOC) +Reason: Hotspot with no paired test file and no coverage data — 37 dependents -| Metric | Value | -|---|---| -| Biomarker | **prior_defect** (critical) | -| Impact Score | 5.8 | -| Effort | L | -| ROI | 1.9 | -| Finding Count | 8 | -| Reason | 6 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects | +### #2: `crates/sc-compose/tests/cli.rs` — co_change_scatter (high) -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/output.rs', 'line_start': 115, 'line_end': 122}, {'file': 'crates/sc-compose/src/reporting/ -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/output.rs', 'line_start': 184, 'line_end': 191}, {'file': 'crates/sc-compose/src/reporting/ +| Impact | Effort | ROI | Findings | +| 3.5 | S | 3.5 | 3 | -### #6: `crates/sc-compose/src/reporting/mod.rs` (8.1/10, 13 NLOC) +Reason: co-changes with 25 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -| Metric | Value | -|---|---| -| Biomarker | **co_change_scatter** (medium) | -| Impact Score | 1.9 | -| Effort | S | -| ROI | 1.9 | -| Finding Count | 3 | -| Reason | co-changes with 8 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) | +### #3: `crates/sc-compose/tests/sc_lint_runner.rs` — co_change_scatter (medium) -### #7: `crates/sc-compose/src/reporting/catalog.rs` (4.3/10, 201 NLOC) +| Impact | Effort | ROI | Findings | +| 4.5 | M | 2.3 | 11 | -| Metric | Value | -|---|---| -| Biomarker | **prior_defect** (critical) | -| Impact Score | 5.7 | -| Effort | L | -| ROI | 1.9 | -| Finding Count | 6 | -| Reason | 12 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects | +Reason: co-changes with 12 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/catalog.rs', 'line_start': 138, 'line_end': 162}, {'file': 'crates/sc-compose/src/reporting -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/catalog.rs', 'line_start': 33, 'line_end': 40}, {'file': 'crates/sc-compose/src/reporting/i +### #4: `crates/sc-composer-beads/src/error.rs` — untested_hotspot (high) -### #8: `crates/sc-compose/src/commands/mod.rs` (6.3/10, 82 NLOC) +| Impact | Effort | ROI | Findings | +| 4.0 | M | 2.0 | 3 | -| Metric | Value | -|---|---| -| Biomarker | **prior_defect** (critical) | -| Impact Score | 3.6 | -| Effort | M | -| ROI | 1.8 | -| Finding Count | 5 | -| Reason | 10 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects | +Reason: Hotspot with no paired test file and no coverage data — 4 dependents -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/commands/mod.rs', 'line_start': 1, 'line_end': 9}, {'file': 'crates/sc-compose/src/reporting/mod.rs', +### #5: `crates/sc-compose/tests/json_cli.rs` — prior_defect (critical) -### #9: `crates/sc-compose/src/reporting/index.rs` (4.6/10, 156 NLOC) +| Impact | Effort | ROI | Findings | +| 2.0 | S | 2.0 | 1 | -| Metric | Value | -|---|---| -| Biomarker | **prior_defect** (critical) | -| Impact Score | 5.4 | -| Effort | L | -| ROI | 1.8 | -| Finding Count | 7 | -| Reason | 5 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects | +Reason: 27 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/index.rs', 'line_start': 15, 'line_end': 26}, {'file': 'crates/sc-compose/src/reporting/ini -- **extract_helper**: {'occurrences': [{'file': 'crates/sc-compose/src/reporting/index.rs', 'line_start': 133, 'line_end': 140}, {'file': 'crates/sc-compose/src/reporting/p +### #6: `crates/sc-compose/tests/repo_boundaries.rs` — nested_complexity (medium) -### #10: `bindings/python/python/sc_compose/__init__.py` (6.4/10, 124 NLOC) +| Impact | Effort | ROI | Findings | +| 5.8 | L | 1.9 | 22 | -| Metric | Value | -|---|---| -| Biomarker | **untested_hotspot** (high) | -| Impact Score | 3.6 | -| Effort | M | -| ROI | 1.8 | -| Finding Count | 4 | -| Reason | Hotspot with no paired test file and no coverage data — 5 dependents | +Reason: assert_manifest_dependency_rules nests 4 levels deep +- **extract_method**: -- **extract_helper**: {'occurrences': [{'file': 'bindings/python/python/sc_compose/__init__.py', 'line_start': 2, 'line_end': 61}, {'file': 'crates/sc-composer/src/diagnost +### #7: `crates/sc-composer/src/extract/xml_model.rs` — untested_hotspot (high) -## Dead Code Analysis +| Impact | Effort | ROI | Findings | +| 5.6 | L | 1.9 | 6 | -**Note:** 51 `unused_export` findings in `bindings/python/python/sc_compose/_native.pyi` are PyO3 auto-generated type stubs — not genuine dead code. They are excluded from the actionable count below. +Reason: Hotspot with no paired test file and no coverage data — 4 dependents -| Kind | Total | Actionable | Action | -|---|---|---|---| -| unreachable_file | 6 | 5 | Review — may be dead or scripts/prototypes | -| unused_export | 56 | 24 | 24 clean-up candidates | -| zombie_package | 1 | 1 | Review prototype/ package | +### #8: `crates/sc-compose/src/commands/mod.rs` — co_change_scatter (high) -### Unreachable Files +| Impact | Effort | ROI | Findings | +| 3.6 | M | 1.8 | 4 | -- `.claude/skills/html-a-b-comparison/references/validate-output-path.py` (10 lines) — File has no importers (in_degree=0) [risks: none] -- `prototype/multipass/e2e_demo.py` (10 lines) — File has no importers (in_degree=0) [risks: none] -- `prototype/multipass/run_tests.py` (200 lines) — File has no importers (in_degree=0) [risks: none] -- `scripts/atm-nudge.py` (280 lines) — File has no importers (in_degree=0) [risks: script] -- `scripts/release_artifacts.py` (200 lines) — File has no importers (in_degree=0) [risks: script] +Reason: co-changes with 23 distinct files — editing this file tends to ripple across the codebase (shotgun surgery) +- **extract_helper**: -### Actionable Unused Exports (excl. PyO3 stubs) +### #9: `crates/sc-compose/src/commands/examples.rs` — prior_defect (high) -- `prototype/multipass/examples.py`: `write_temp` — Public symbol 'write_temp' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_no_headers` — Public symbol 'test_parse_no_headers' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_single_header_no_pass_field` — Public symbol 'test_parse_single_header_no_pass_field' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_single_header_with_pass` — Public symbol 'test_parse_single_header_with_pass' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_stacked_headers` — Public symbol 'test_parse_stacked_headers' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_empty_headers` — Public symbol 'test_parse_empty_headers' has no importers -- `prototype/multipass/run_tests.py`: `test_parse_with_dots_delimiter` — Public symbol 'test_parse_with_dots_delimiter' has no importers -- `prototype/multipass/run_tests.py`: `test_discover_standard_braces` — Public symbol 'test_discover_standard_braces' has no importers -- `prototype/multipass/run_tests.py`: `test_discover_triple_braces` — Public symbol 'test_discover_triple_braces' has no importers -- `prototype/multipass/run_tests.py`: `test_discover_quadruple_braces` — Public symbol 'test_discover_quadruple_braces' has no importers -- *... and 14 more* +| Impact | Effort | ROI | Findings | +| 1.8 | S | 1.8 | 2 | -## Top Recommendations +Reason: 3 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects -### 1. Decompose `validation.rs` (2.6/10, 1388 NLOC) -The largest and worst-scoring file. It has 20 biomarker findings, CCN=11, 28% duplication, and co-changes with 24 other files. Split into per-category validators: `var_validation.rs`, `frontmatter_validation.rs`, `include_validation.rs`. +### #10: `crates/sc-composer/src/discovery.rs` — prior_defect (critical) -### 2. Add tests for untested hotspots -11 files flagged as untested hotspots — `path_utils.rs` (16 dependents), `diagnostics.rs` (13 dependents), `cli.rs` (7 dependents). These are heavily depended-upon files with no paired test coverage. Prioritize `path_utils.rs` first (critical severity, highest ROI refactoring target). +| Impact | Effort | ROI | Findings | +| 5.3 | L | 1.8 | 6 | -### 3. Extract test helpers (`cli.rs` 61% dup, `json_cli.rs` 76% dup) -130 duplicated assertion blocks in test files — extract shared assertion helpers. The high duplication percentage in test files is expected but the volume (130 findings) signals a real maintenance burden. +Reason: 4 bug-fixes touched this file in the last ~6 months; recent defect history is the strongest cost-effective predictor of further defects +- **break_cycle**: +- **extract_helper**: -### 4. Address sync I/O on hot paths (52 findings) -52 hot path sync I/O findings — likely from file I/O in the rendering pipeline. Consider async or at minimum document the sync I/O is intentional for CLI tools. +## Recommendations (derived from this run) -### 5. Review prototype/ package visibility -The `prototype/` directory is flagged as a zombie package. If actively used for experimentation, add to the repowise config's `annotated` section. Otherwise, consider archiving. +1. **Start with the worst file** — `crates/sc-compose/src/commands/template_lint.rs` (2.58/10, 576 NLOC). Decompose by responsibility before anything else. +2. **Close test gaps on depended-upon files** — 5 hotspot file(s) lack paired tests: `crates/sc-compose/src/commands/reports/mod.rs`, `crates/sc-compose/src/reporting/catalog.rs`, `crates/sc-compose/src/reporting/index.rs`, `crates/sc-compose/src/reporting/spec.rs`, `crates/sc-composer-beads/src/error.rs`. +3. **Extract duplication** — 352 duplicated assertion blocks; shared test-helper modules would remove the bulk. +4. **Audit sync I/O on hot paths** — 79 findings; either make async or document the intentional sync boundary. +5. **Fastest win** — refactoring target #1: `crates/sc-composer/src/diagnostics.rs` (S effort, ROI 5.5). --- -*Generated by repowise v1.x — codebase intelligence for developers. Config: .sc/repowise.yaml with modules `crates/sc-compose`, `crates/sc-composer` and annotated paths `bindings/python`, `prototype`, `scripts`.* \ No newline at end of file +*Generated by `.sc/repowise/generate-report.py` from scoped repowise data (2026-08-31, b763d2ff). Scope per `.sc/repowise.yaml`: modules + annotated exclusions. No hardcoded prose — every figure is computed from the JSON in `.sc/repowise/data/`.* diff --git a/docs/repowise/history.md b/docs/repowise/history.md new file mode 100644 index 00000000..c93117ea --- /dev/null +++ b/docs/repowise/history.md @@ -0,0 +1,11 @@ +# sc-compose — Repowise Health History + +One row per analysis run, chronological (this run is last). +Read alongside `health.md` — that file is the deep-dive for the latest run. + +| Generated | Version / Commit | Overall | Hotspot | Files | Worst file (score) | PR | +|---|---|---|---|---|---|---| +| 2026-08-02 | v1.2.0-219-gbb79a5f / bb79a5f (develop baseline) | **7.90/10** | 4.70/10 | 286 | `crates/sc-compose/src/cli.rs` (1.55) | n/a (pre-PR runs) | +| 2026-08-29 | release-candidate-v1.6.0-1-g0d70f0c3 / 0d70f0c3 | **8.23/10** | 5.20/10 | 988 | `crates/sc-composer/src/extract/yaml.rs` (2.54) | [#571](https://github.com/randlee/sc-compose/pull/571) | +| 2026-08-29 | v1.6.0-15-g54fff289 / 54fff289 | **8.26/10** | 5.15/10 | 999 | `crates/sc-composer/src/extract/yaml.rs` (2.54) | [#571](https://github.com/randlee/sc-compose/pull/571) | +| 2026-08-31 | release-candidate-v1.6.1-10-gb763d2ff / b763d2ff | **8.32/10** | 5.21/10 | 1017 | `.github/scripts/release_artifacts.py` (1.90) | [#571](https://github.com/randlee/sc-compose/pull/571) |